Mathematics/Discrete Math/Sets: Difference between revisions
< Mathematics | Discrete Math
Jump to navigation
Jump to search
Brodriguez (talk | contribs) (Add common set types) |
Brodriguez (talk | contribs) (Add basic set operations) |
||
Line 18: | Line 18: | ||
* Real Numbers ('''R''') - The set of '''R+''', but including zero and negative numbers. | * Real Numbers ('''R''') - The set of '''R+''', but including zero and negative numbers. | ||
* Complex Numbers ('''C''') - The set of all numbers, including imaginary ones. | * Complex Numbers ('''C''') - The set of all numbers, including imaginary ones. | ||
== Basic Set Operations == | |||
The following are basic operations are explained with sets '''A={2, 3, 4, 5}''' and '''B={0, 2, 4, 6}''' onto set '''S'''. But the operations could be applied to any arbitrary two sets. | |||
* Union of A and B ('''A ∪ B''') - The set of all distinct elements contained in either A or B. | |||
** Ex: '''S={0, 2, 3, 4 ,5, 6}'''. | |||
* Intersection of A and B ('''A ∩ B''') - The set of all distinct elements that are contained in both A and B. | |||
** Ex: '''S={2, 4}'''. | |||
* Difference - The given set, minus all elements in the second set. | |||
** Ex: '''A/B={3, 5}''' | |||
** Ex: '''B/A={0, 6}''' | |||
* Symmetric Difference of A and B ('''A △ B''' or '''A ⊖ B''') - The set of all elements that are a member of exactly one set A or B. | |||
** Ex: '''S={0, 3, 5, 6}''' | |||
* Cartesian Product of A and B (''' A x B''') - The set containing all ordered pairs '''(a, b)''' for each '''a''' in set A and each '''b''' in set B. | |||
** Ex: '''S={(2, 0), (2, 2), (2, 4), (2, 6), (3, 0), (3, 2), (3, 4), (3, 6), (4, 0), (4, 2), (4, 4), (4, 6), (5, 0), (5, 2), (5, 4), (5, 6)}''' | |||
* Power Set of A ('''A''') - The set containing all possible subsets using elements from the original set A. Includes the empty set. | |||
** Note that the number of elements is always equal to 2<sup>x</sup>, where x is equal to the cardinality of the given set. This is why it's called the power set; The number of elements corresponds to powers of 2. Thus, counting the elements is a good way to check that it's correct. | |||
*** For example, a set of Cardinality 3 will have 2<sup>3</sup> elements. | |||
** Ex: '''S={∅, {2}, {3}, {4}, {5}, {2, 3}, {2, 4}, {2, 5}, {3, 4}, {3, 5}, {4, 5}, {2, 3, 4}, {2, 3, 5}, {2, 4, 5}, {3, 4, 5}, {2, 3, 4, 5}}''' |
Revision as of 22:21, 7 September 2019
Sets, aka groups of elements and logic regarding such.
Terminology
- Set - A grouping of various elements.
- Subset - A grouping of such that all elements of the set are also contained within an equal-sized or larger set. May include two equivalent sets.
- Proper Subset - A subset in which the two sets are not equivalent.
- Empty Set/Zero Set (∅) - A set containing exactly 0 elements. Aka a null set.
- Closed Set - A set in which it's own boundary is contained within the set.
- Open Set - A set where the boundary is excluded from the set, but all values between the boundary are included.
- Cardinality - The number of distinct elements within a set. Ex: The set {-1, 0, 1} has a Cardinality of 3.
Common Set Types:
- Universal Set (U) - An arbitrary set, which changes based on context. However, it is assumed to always contain every possible element currently being considered for the given context.
- Integers (Z) - The set of all integers. Ex: {..., -3, -2, -1, 0, 1, 2, 3, ...}.
- Positive Integers (Z+) - The set of all positive integers. Ex: {1, 2, 3, ...}.
- Natural Numbers (N) - The set of Z+, but including zero. Ex: {0, 1, 2, 3, ...}
- Positive Real Numbers (R+) - The set of non-imaginary numbers, greater than zero. Includes fractions, decimals, etc.
- Real Numbers (R) - The set of R+, but including zero and negative numbers.
- Complex Numbers (C) - The set of all numbers, including imaginary ones.
Basic Set Operations
The following are basic operations are explained with sets A={2, 3, 4, 5} and B={0, 2, 4, 6} onto set S. But the operations could be applied to any arbitrary two sets.
- Union of A and B (A ∪ B) - The set of all distinct elements contained in either A or B.
- Ex: S={0, 2, 3, 4 ,5, 6}.
- Intersection of A and B (A ∩ B) - The set of all distinct elements that are contained in both A and B.
- Ex: S={2, 4}.
- Difference - The given set, minus all elements in the second set.
- Ex: A/B={3, 5}
- Ex: B/A={0, 6}
- Symmetric Difference of A and B (A △ B or A ⊖ B) - The set of all elements that are a member of exactly one set A or B.
- Ex: S={0, 3, 5, 6}
- Cartesian Product of A and B ( A x B) - The set containing all ordered pairs (a, b) for each a in set A and each b in set B.
- Ex: S={(2, 0), (2, 2), (2, 4), (2, 6), (3, 0), (3, 2), (3, 4), (3, 6), (4, 0), (4, 2), (4, 4), (4, 6), (5, 0), (5, 2), (5, 4), (5, 6)}
- Power Set of A (A) - The set containing all possible subsets using elements from the original set A. Includes the empty set.
- Note that the number of elements is always equal to 2x, where x is equal to the cardinality of the given set. This is why it's called the power set; The number of elements corresponds to powers of 2. Thus, counting the elements is a good way to check that it's correct.
- For example, a set of Cardinality 3 will have 23 elements.
- Ex: S={∅, {2}, {3}, {4}, {5}, {2, 3}, {2, 4}, {2, 5}, {3, 4}, {3, 5}, {4, 5}, {2, 3, 4}, {2, 3, 5}, {2, 4, 5}, {3, 4, 5}, {2, 3, 4, 5}}
- Note that the number of elements is always equal to 2x, where x is equal to the cardinality of the given set. This is why it's called the power set; The number of elements corresponds to powers of 2. Thus, counting the elements is a good way to check that it's correct.