Download Document

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts

Homomorphism wikipedia , lookup

Laws of Form wikipedia , lookup

Birkhoff's representation theorem wikipedia , lookup

Transcript
2.1 Sets
2.2 Set Operations
–
–
–
–
Set Operations
Venn Diagrams
Set Identities
Union and Intersection of Indexed Collections
2.3 Functions
2.4 Sequences and Summations
1
P. 1
Set Operations
• Propositional calculus and set theory are
both instances of an algebraic system called
a Boolean Algebra.
• The operators in set theory are defined in
terms of the corresponding operator in
propositional calculus.
• As always there must be a universe U. All
sets are assumed to be subsets of U.
2
P. 1
Set Operations
• Definition: Two sets A and B are equal,
denoted A = B, iff x[x A ↔ x  B].
• Note:
By a previous logical equivalence we have
A = B iff  x[(x  A→ x  B) Λ (x  B → x  A)]
or
A = B iff A  B and B  A
3
P. 1
Set Operations
• Definitions:
– The union of A and B, denoted AB, is the
set {x | xA V xB}
– The intersection of A and B, denoted
AB, is the set {x | xA Λ xB}
FIGURE 1
∪
FIGURE 2
∩
4
P. 1
Set Operations
• Note: If the intersection is void, A and B are said
to be disjoint.
– The complement of A, denoted A , is the set
{x | x  A}={x | ¬(xA)}
• Note: Alternative notation is A C, and {x|xA}.
– The difference of A and B, or the complement of B
relative to A, denoted A - B, is the set A  B
• Note: The complement of A is U - A.
– The symmetric difference of A and B, denoted AB, is
the set (A - B)(B - A).
5
P. 1
Set Operations
• Examples: U = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10}
A= {1, 2, 3, 4, 5}, B = {4, 5, 6, 7, 8}. Then
–
–
–
–
–
–
–
AB = {1, 2, 3, 4, 5, 6, 7, 8}
AB = {4, 5}
A = {0, 6, 7, 8, 9, 10}
B = {0, 1, 2, 3, 9, 10}
A - B = {1, 2, 3}
B - A = {6, 7, 8}
A  B = {1, 2, 3, 6, 7, 8}
6
P. 1
Venn Diagrams
• A useful geometric visualization tool (for 3 or less
sets)
– The Universe U is the rectangular box.
– Each set is represented by a circle and its interior.
– All possible combinations of the sets must be
represented.
• Shade the appropriate region to represent the given set
operation.
7
P. 1
Set Identities
• Set identities correspond to the logical
equivalences.
• Example:
The complement of the union is the intersection
of the complements
A B  A B
8
P. 1
Set Identities
• Proof: To show
x[ x  A  B  x  A  B]
To show two sets are equal we show for all x that x is
a member of one set if and only if it is a member of
the other.
• We now apply an important rule of inference
(defined later) called Universal Instantiation
9
Set Identities
• Universal Instantiation
In a proof we can eliminate the universal quantifier
which binds a variable if we do not assume anything
about the variable other than it is an arbitrary
member of the Universe. We can then treat the
resulting predicate as a proposition.
10
Set Identities
• We say 'Let x be arbitrary. '
Then we can treat the predicates as propositions:
Assertion
Reason
Def. of complement
x  A  B  x  [A  B]
Def. of 
x  A  B  ¬[ x  A  B]
 ¬[ x  A  x  B]
Def. of union
 ¬ xA Λ ¬ x B
DeMorgan's Laws
Def. of 
 x A xB
Def. of complement
 x A  xB
Def. of intersection
 x A  B
Hence x  A  B  x  A  B is a tautology.
11
P. 1
Set Identities
Since
– x was arbitrary
– we have used only logically equivalent assertions and
definitions
we can apply another rule of inference called
Universal Generalization
We can apply a universal quantifier to bind a variable
if we have shown the predicate to be true for all values
of the variable in the Universe.
and claim the assertion is true for all x, i.e.,
x[ x  A  B  x  A  B ]
P. 1
Set Identities
• Q. E. D. (an abbreviation for the Latin phrase
“Quod Erat Demonstrandum” - “which was to
be demonstrated” used to signal the end of a
proof)
• Note: As an alternative which might be easier
in some cases, use the identity
A  B [A  B
and
B  A]
13
Set Identities
• Example: Show A(B - A) = Ø
The void set is a subset of every set. Hence,
A (B - A)  Ø
Therefore, it suffices to show
A(B - A) Ø
or
x[x A (B - A) → x  Ø]
14
P. 1
Set Identities
So as before we say 'let x be arbitrary’.
Show x  A  (B- A) → x  Ø is a tautology.
But the consequent is always false.
Therefore, the antecedent better always be
false also.
15
Set Identities
• Solution:
Apply the definitions:
Assertion
x A(B- A)x  A Λ x  (B- A)
 x  A Λ (x  B Λ x A)
(x  A Λ x  A) Λ x  B
0ΛxB
 0 (false)
Reason
by Def. of 
by Def. of by Def. of Associative
by Def. of Complement
by Def. of Domination
16
P. 1
Union and Intersection of Indexed Collections
• Let A1,A2 ,..., An be an indexed collection of
sets.
• Definition: The union of a collection of sets is
the set that contains those elements that are
members of at least one set in the collection.
we use the notation
n

i 1
Ai  A1  A2  ...  An
to denote the union of the sets A1,A2 ,..., An
17
P. 1
Union and Intersection of Indexed Collections
• Definition: The intersection of a collection of sets is
the set that contains those elements that are
members of all the set in the collection.
we use the notation
n

i 1
Ai  A1  A2  ...  An
to denote the intersection of the sets A1,A2 ,..., An
18
Union and Intersection of Indexed Collections
• Examples:
• Let
Ai  [i, ),1  i  
n

Ai  [1, )
n
Ai  [n, )
i 1

i 1
19
P. 1
Terms
•
•
•
•
•
•
Boolean Algebra
Set operations
Union
Intersection
Complement
Difference
•
•
•
•
•
Symmetric difference
Venn Diagram
Set Identities
Universal Instantiation
Universal Generalization
20
P. 1