Some thougts on cartesian products

Bryan Olson fakeaddress at nowhere.org
Mon Jan 23 22:36:01 EST 2006


Kay Schluehr wrote:
> Bryan Olson wrote:
> 
> 
>>There's no such thing; you'd have to define it first. Are duplicates
>>significant? Order?
> 
> 
> That's all trivial isn't it? A string is a set of pairs (i,c) where i
> is an integer number, the index, with 0<=i<j<=card(string)-1, for
> (i,c), (j,d) in string and c is a character. Since there is a natural
> order on integer numbers we can induce this order on the string, so
> that it is an ordered set. For representation purposes we can omit i
> since i is simply the position of c in the sequence. Same holds for
> lists, tuples or other sequences. 

Any of the combinations of duplicates and order being significant
or insignificant are easy to define, and easy to specify when
significant. Anticipating the implications of the choices is the
tricky part.


-- 
--Bryan



More information about the Python-list mailing list