say I have $C = \{\epsilon, aa, aab, bba\}$, what would be the reverse of set C? Is it $C^R = \{bba, aab, aa, \epsilon\}$? but I think the order in a set doesn't matter. Or it is $C^R = \{\epsilon, aa, baa, abb\}$?
What's a reverse of a set?
0
$\begingroup$
discrete-mathematics
-
0In mathematics, order doesn't matter, but in some programming languages, a set has order. – 2017-01-27
-
0The term "reverse of a set" has no standard meaning. Did you encounter this term in some particular context? – 2017-01-27
-
0the example given is a random string, say $(cup)^R = puc$ – 2017-01-27
-
0Then $cup$ is not a set, it's a string. If you have a set of strings, perhaps you want the corresponding set of the reversed strings. but that's not the reverse of the set; it's the set of the reversed elements. – 2017-01-27
1 Answers
1
Not sure what you mean by "reverse" of a set, but you might want $X$ \ $C$ where $X$ is the domain of $C$. In this case, it's called the complement of the set and consists of all elements in $X$ but not in $C$. So if your domain $X$ is $\{\epsilon,a,b,aa,ab,bb,aaa,aab,aba,abb,baa,bab,bba,bbb\}$, then the complement of $C$, $X$ \ $C$, is $\{a,b,ab,bb,aaa,aba,abb,baa,bab,bbb\}$.