80 likes | 469 Views
Sets: Playing Cards Daniel Hunnicutt Set Definition A set is an unordered collection of objects usually denoted by S = { } Playing Card Set (P): {4 of clubs, Ace of Hearts, …} Cardinality (number of elements): 52 Member element S = {a, b, c, …} Membership: a P Subsets
E N D
Sets: Playing Cards Daniel Hunnicutt
Set Definition • A set is an unordered collection of objects usually denoted by S = { } • Playing Card Set (P): {4 of clubs, Ace of Hearts, …} Cardinality (number of elements): 52 Member element S = {a, b, c, …} Membership: a P
Subsets • A subset is any set that is contained within the original set i.e. Subset Facecards = {King of clubs, …} Facecards P Subset Diamonds ={2 of diamonds,…} Diamonds P • Power set: The set of all subsets of P i.e. P(P) = { {}, {2 of Hearts}, …}
Connectivity , , -, c • Diamonds Facecards: {Jack of Diamonds, Queen of D, King of D, Ace of D} • Diamonds Facecards: Any Diamond or Facecard {King of clubs, 2 of diamonds,…} • Diamonds c: {all cards not Diamond} • Facecards – Diamonds: {all facecards that are not diamonds}
Partitions • A partition of a set P is a set of nonempty subsets of P such that every element c in P is in exactly one of these subsets. • Example: Partition of Suits {Diamonds, Clubs, Hearts, Spades}
Further Application:Card Games • Poker:Object of poker is to obtain the highest valued subset. Subsets include: 4 of a kind, 3 of a kind, Straight, Full House, Flush, Royal Flush, etc.} • Hearts: Game is initially partitioned evenly (13 cards each), avoid certain subsets ({Hearts}, {Queen of Spades})
Further Application: cont. • Solitaire: Collect an ordered subset, beginning with Ace, partitioned into stacks • Almost all card games contain some elements of sets and set theory.