Note that we use round parantheses instead of curly braces. This helps to distinguish sets from tuples.
Furthermore, two tuples with
values each are the same based on the
following rule:
Also, there is an empty tuple (0-tuple) that is the identity of tuple
concatination:
.
By definition, an
tuple (where
) can be rewritten as follows:
Note that the same value can appear multiple times in a tuple. By comparison, duplicate values are not permitted in sets.
Also, note that a tuple can be an element in a set, and a set can be a value in a tuple. The significance of this statement leads to a method to transform a tuple into a set as follows:
This translation makes it possible to translate a tuple into a set, even though a set does not permit duplicate values! Let us observe an example:
Here is an explanation of the transformation:
Copyright © 2006-09-25 by Tak Auyeung