












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
Community
Ask the community for help and clear up your study doubts
Discover the best universities in your country according to Docsity users
Free resources
Download our free guides on studying techniques, anxiety management strategies, and thesis advice from Docsity tutors
During the study of discrete mathematics, I found this course very informative and applicable.The main points in these lecture slides are:Propositional Variables, Single Variable, Operation of Multiple Variables, Logical Operators, Algebraic Operators, Bi-Conditional Means, Truth Values, Boolean Operators Summary, Precedence of Operators, Boolean Searches
Typology: Slides
1 / 20
This page cannot be seen from the preview
Don't miss anything!
We use propositional variables to refer to propositions Usually are lower case letters starting with p (i.e. p, q, r, s , etc.) A propositional variable can have one of two values: true (T) or false (F)
A proposition can be…
A single variable: p An operation of multiple variables: p ∧( q ∨¬ r )
A “not” operation switches (negates) the
truth value
Symbol: ¬ or ~
¬ p = “Today is not Friday”
p ¬ p T F F T
An “and” operation is true if both operands
are true
Symbol: ∧
It’s like the ‘A’ in And
p ∧ q = “Today is Friday and
today is my birthday”
p q p ∧ q T T T T F F F T F F F F
A conditional means “if p then q ” Symbol: → p → q = “If today is Friday, then today is my birthday” p→q=¬p ∨ q
the antecedent
the consequence
p q p → q T T T T F F F T T F F T
Let p = “I am elected” and q = “I will lower taxes”
I state: p → q = “If I am elected, then I will lower taxes”
Consider all possibilities
Note that if p is false, then the conditional is true regardless of whether q is true or false
p q p → q T T T T F F F T T F F T
Conditional Inverse Converse Contrapositive p q ¬ p ¬ q p → q ¬ p →¬ q q → p ¬ q →¬ p T T F F T T T T T F F T F T T F F T T F T F F T F F T T T T T T
A bi-conditional means “ p if and only if q ”
Symbol: ↔
Alternatively, it means “(if p then q ) and (if q then p )”
Note that a bi-conditional has the opposite truth values of the exclusive or
p q p ↔ q T T T T F F F T F F F T
Learn what they mean, don’t just memorize the table!
not not and or xor conditional Bi-conditional p q ¬ p^ ¬ q^ p ∧ q^ p ∨ q^ p ⊕ q^ p → q^ p ↔ q T T F F T T F T T T F F T F T T F F F T T F F T T T F F F T T F F F T T
Just as in algebra, operators have precedence 4+32 = 4+(32), not (4+3)*
Precedence order (from highest to lowest):
¬ ∧ ∨ → ↔ The first three are the most important
This means that p ∨ q ∧ ¬ r → s ↔ t yields: ( p ∨ ( q ∧ (¬ r )) → s ) ↔ ( t )
Not is always performed before any other operation
Heard on the radio:
A study showed that there was a correlation between the more children ate dinners with their families and lower rate of substance abuse by those children Announcer conclusions: If children eat more meals with their family, they will have lower substance abuse If they have a higher substance abuse rate, then they did not eat more meals with their family
“I have neither given nor received help on this exam”
Let p = “I have given help on this exam”
Let q = “I have received help on this exam”
¬ p ∧¬ q
(2011 OR 5471) AND yongdae AND “computer science”
Note that Google requires you to capitalize Boolean operators
Google defaults to AND; many others do not
Boolean values can be represented as 1 (true) and 0 (false)
A bit string is a series of Boolean values. Length of the string is the number of bits. 10110100 is eight Boolean values in one string
We can then do operations on these Boolean strings Each column is its own Boolean operation
01011010 ⊕ 10110100 11101110