Sets Flashcards
What is specification?
Description of what the type does and the method it provides to do it.
What is implementation?
Code that actually does the work
What is a set?
A set is a group of things, either related or unrelated.
Does a set have to contain a group of things which are related?
No, it the set can contain either related or unrelated elements.
Does the order within a set matter?
No
Do sets contain duplicates?
No
What does ‘aEs’ mean?
‘a’ is a member of set ‘s’
What does ‘4E{1,2,3,4}’ mean?
‘4’ is a member of set ‘{1,2,3,4}
What would you change to ‘12E{1,2,3,4}’ to show that 12 is not part of the set.
Put a horizontal line through the E-like shape
What does ∅ signify?
An empty set or a null set.
What is U?
The universal set
{1,2,3,4,5} = {3,2,4,1,5}
Is this correct?
Yes, they both equal each other despite the differing order.
{1,2,3,4,5} = {1,2,3,3,4,2,1,5}
Is this correct?
Yes, because within sets duplicates are not important.
{1,2,3,4} = {1,2,3,4,5}
Is this correct?
No, for they do not contain the same elements.
S = {2,3,4,5} T = {1,2,3,4,5,6}
Which, if any, is the subset?
S is the subset as all of its elements are contained with T.
What does an underline ‘c’ symbol indicate?
For example, XcV?
It indicates that the first set is a subset of the second set.
X is a subset of V.