Search code examples
setcomputer-scienceset-theory

Is the set {x,x} a subset of {x}?


im currently studying set theory in my Comp Sci class and i'm stuck on a (probably an easy) question. The example given is "Is {Leeds,Leeds} a subset of {Leeds}". Is this true or false and if true why is that?

Thanks Pudsey


Solution

  • {x, x} is a subset of {x} because {x, x} and {x} are the same set. A set either contains or does not contain any particular given thing; the notation {x, x} simply tells us twice that the set contains x, not that the set contains two instances of x. This notation would typically not be used since there is no added value in saying twice something which could be said just once. However, it's not incorrect in any sense to list this element twice. Because every set is a subset (an improper subset) of itself, {Leeds, Leeds} is a subset of {Leeds}.

    There are other data structures in computer science, like a multiset or bag, for which the multiplicity of elements is important, but your class would have to be very specific about their being the subject of discussion for the answer to be any other than the foregoing.