Professional Documents
Culture Documents
Grades:
First: 25%
Second 25%
Final 50%
*Note: The outline is subject to change
Discrete Mathematics
Is
Algorithm
A list
Chapter 1
Statements
A declarative
ambiguous
A statement is an unambiguous declarative
sentence that is either true or false (also
called a proposition).
Example
5
plus 7 is 12
5 plus 7 is 5
5 plus 7 is large
Did you have coffee this morning?
Sets
Set:
an unambiguous description of a
collection of objects
EX:
Set of outcomes for flipping a coin
S={H,T}
However, the list of outcomes might be:
HTTTHHH.
Sets
Sets
Universe of a statement is the set whose elements are
discussed by the statement
EX:
x multiplied by x is +ve
The universe could be:
- Set of +ve integers
- Set of ve integers
- Set of all integers
Flipping a coin
-Universe: {H,T}
Sets
Note:
P, q,
Compound Statements
Simple statements are represented by symbols
EX:
P: x is a positive integer
Compound statements are represented by symbols+ logical
connectives
Logical Connectives:
Conjunction AND.
Symbol ^
Inclusive disjunction OR
Symbol v
Exclusive disjunction OR
Symbol
Negation Symbol
Implication
Symbol
Compound Statements
Example:
-I will take calculas1 and I will take physics class.
Represented as: p ^ q
I will have coffee or I will have tea
Represented as: p v q
Ali is at school or Ali is at home
Represented as: p q
p: x is greater than 2
p: x is not greater than 2
-George is at school and either Sue is at store or Sue is at home.
P ^( q r )
*Note the use of parentheses ( see example 4 page 7).
Truth sets
The
Truth sets
EX:
Finite sets
- Examples:
A = {1, 2, 3, 4}
B = {x | x is an integer, 1 < x < 4}
D = {dog, cat, horse}
Infinite sets
- Examples:
Venn diagrams
A Venn
diagram
provides a graphic
view of sets and
their operations:
union, intersection,
difference and
complements can
be identified
Set operations
Given
Union
Intersection
Complement
Difference
Union
Intersection
Y
xy
X
XY=
Complement
U Yc
Difference
The
A = A
e) Complement laws:
AAc = U
AAc =
f) Idempotent laws:
AA = A
AA = A
g) Bound laws:
AU = U
A =
h) Absorption laws:
A(AB) = A
A(AB) = A
Uc =
B) = (~A) (~B)
-Proof: To be discussed in class
~(A
B) = (~A) (~B)
-Proof: exercise
Theorem
Let
Subsets
Examples:
A = {3, 9}, B = {5, 9, 1, 3},
is A B ?
Equality: X = Y if X Y and Y X
Theorem
Let
Example
Prove
that
R (S T) S (R T)
EX:
P is the truth set of p: x>0
Q is the truth set of q: x<0
The truth set of p^q = P Q=
P and Q are disjoint sets
Section 1.3
Truth tables
Truth
p^q
pvq
Exclusive disjunction
pq
Negation
Negation of p: in symbols p
p
Truth tables
Examples:
Definition
2
Exercise
Use
-
Section 1.4
The
Conditional Connectives
A conditional
Truth table of p q
pq
T
P q is equivalent to pvq
Recall:
Example
Rewrite
without arrows:
r ( s v (r ^ t))
Example
Consider
Section 1.5
Boolean Algebra:
When we apply known laws about set
operations to derive other ones algebraically,
we say we are doing Boolean Algebra.
b) Commutativity:
pVq=qVp
p^q=q^p
pV0 = p
p ^ p = 0
p^p=p
p^0=0
p ^ ( p v q) = p
Final Example
Simplify:
( r) V (s V (r ^ t))
Answer : r V s
-
( (r ^ s) V (r V s)) ^ ( (r V s) V (r ^ s))
Answer: (r ^ s ) V (r ^ s)
-
intelligence
Determine the consistency of system
specifications
Design of computer circuits
Construction of computer programs
Verifying the correctness of programs
Most web search engines support Boolean
searching techniques
2.