Some thougts on cartesian products
Christoph Zwerschke
cito at online.de
Mon Jan 23 21:21:51 EST 2006
Bryan Olson schrieb:
>> Still think there is no such thing?
>
> Uh, yes.
>
> The Cartesian product of two sets A and B (also called the
> product set, set direct product, or cross product) is defined to
> be the set of [...]
>
> All sets, no strings. What were you looking at?
Not only sets. This goes on (anyway "everything is a set"). You can also
have the Cartesian product of functions. And you can think of a string
as a function from a countable index set I to the set of all characters
C. So the Cartesian product of two strings will become a function from
IxI to CxC. Since IxX is countable again, this is equivalent to a tuple
of 2-tuples of characters which you can also interpret as a tuple of
strings with 2 chars:
"ab" x "cd" = ("ac", "ad", "bc", "bd")
Do I have eliminated all remaining clarities now? :-)
-- Christoph
More information about the Python-list
mailing list