





































Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
The set builder notation describes all elements as a subset of a set having a certain property. Q = { p/q ∈ R | p ∈ Z, q ∈ Z, and q ≠ 0 }.
Typology: Exercises
1 / 45
This page cannot be seen from the preview
Don't miss anything!






































Discrete Structures for Computing
Dr. Hyunyoung Lee Based on slides by Andreas Klappenecker
We use naive set theory, rather than axiomatic set theory, since this approach is more intuitive. The drawback is that one can construct paradoxes using the naive set theory approach unless one is careful. The set theoretic complications have little bearing on the subsequent material, though, since we are mostly concerned with finite and countable sets.
We denote the empty set {} by ∅. A set can be an element of another set. {∅} is the set containing one element, namely ∅. Note that ∅ and {∅} are different sets, since they contain different elements (the first one none, and the second one contains the element ∅). The set {∅,{∅}} contains two elements.
N = {0,1,2,3,4,...} natural numbers (according to our book) [Note that in 50% of the literature N contains 0 and in the other 50% it does not. This will not change, since each view has its merits.] Z = {..., -2,-1,0,1,2,...} set of integers R , set of real numbers C , set of complex numbers
Two sets A and B are called equal if and only if they have the same elements. A = B if and only if ∀ x ( x ∈ A ↔ x ∈ B ) [To prove A=B, it is sufficient to show that both ∀ x ( x ∈ A → x ∈ B ) and ∀ x ( x ∈ B → x ∈ A ) hold. Why? ]
A set A is a subset of B, written A ⊆ B, if and only if every element of A is an element of B. Thus, A ⊆ B if and only if ∀ x ( x ∈ A → x ∈ B )
Let S be a set with a finite number of elements. We say that the set has cardinality n if and only if S contains n elements. We write |S| to denote the cardinality of the set. For example, | ∅ | = 0_._
Given a set S, the power set P ( S ) of S is the set of all subsets of S. Example: P ( {1} ) = { ∅ , {1} } P ( {1,2} ) = { ∅ , {1}, {2}, {1,2} } P (∅) = { ∅ } since every set contains the empty set as a subset, even the empty set. P ({∅}) = {∅, {∅}}.
Let A and B be sets. The Cartesian product of A and B, denote A x B, is the set of all pairs ( a,b ) with a ∈ A and b ∈ B. A x B = { ( a,b ) | a ∈ A ⋀ b ∈ B }
Let A= {1,2,3}. What elements does the set A x ∅ contain?
Let A and B be sets. The union of A and B, denoted A ∪ B, is the set that contains those elements that are in A or in B, or in both_._ The intersection of A and B, denoted A ∩ B, is the set that contains those elements that are in both A and B.
Set Difference Let A and B be sets_._ The difference between A and B, denoted A-B or A\B, is the set A-B = { x ∈ A | x ∉ B }.
Let U be the universal set. Identity laws: A ∩ U = A A ∪ ∅ = A Domination laws: A ∪ U = U A ∩ ∅ = ∅ Idempotent laws: A ∪ A = A A ∩ A = A Also: Commutative Laws Associative Laws Distributive Laws
A \ B = A [ B P roof : A \ B = {x | x 62 A \ B} by definition of complement = {x | ¬(x 2 A \ B)} = {x | ¬(x 2 A ^ x 2 B)} by definition of intersection = {x | ¬(x 2 A) _ ¬(x 2 B)} de Morgan’s law from logic = {x | (x 62 A) _ (x 62 B)} by definition of 62 = {x | x 2 A _ x 2 B} by definition of complement = {x | x 2 A [ B} by definition of union = A [ B