Professional Documents
Culture Documents
Course Staff: Instructor: Proctors
Course Staff: Instructor: Proctors
Course Staff: Instructor: Proctors
Instructor: Işıl Dillig, CS311H: Discrete Mathematics Intro and Propositional Logic 1/35 Instructor: Işıl Dillig, CS311H: Discrete Mathematics Intro and Propositional Logic 2/35
I Master CS311H material if you want to do well in future I Skip many chapters and cover extra material
courses!
Instructor: Işıl Dillig, CS311H: Discrete Mathematics Intro and Propositional Logic 3/35 Instructor: Işıl Dillig, CS311H: Discrete Mathematics Intro and Propositional Logic 4/35
Instructor: Işıl Dillig, CS311H: Discrete Mathematics Intro and Propositional Logic 5/35 Instructor: Işıl Dillig, CS311H: Discrete Mathematics Intro and Propositional Logic 6/35
1
Requirements Grading
Instructor: Işıl Dillig, CS311H: Discrete Mathematics Intro and Propositional Logic 7/35 Instructor: Işıl Dillig, CS311H: Discrete Mathematics Intro and Propositional Logic 8/35
I Can only consult lecture notes and textbook but nothing else I Everyone expected to attend lectures and turn video on
I Cannot talk with others about exam questions (no discussion I 5% of course grade for participation (attendance,
allowed, including on Piazza!) asking/answering questions)
I If you have clarification question about exam, please email I Please ask questions!
cs311h-staff.cs.utexas.edu I Will make class more fun for everyone
I Honor code taken very seriously at UT (both for exams + ps) I Others also benefit from your questions
I May be expelled for violating honor code!
Instructor: Işıl Dillig, CS311H: Discrete Mathematics Intro and Propositional Logic 11/35 Instructor: Işıl Dillig, CS311H: Discrete Mathematics Intro and Propositional Logic 12/35
2
Logic
Instructor: Işıl Dillig, CS311H: Discrete Mathematics Intro and Propositional Logic 13/35 Instructor: Işıl Dillig, CS311H: Discrete Mathematics Intro and Propositional Logic 14/35
I A proposition is a statement that is either true or false I What is truth value of ”Today is Friday”?
Instructor: Işıl Dillig, CS311H: Discrete Mathematics Intro and Propositional Logic 15/35 Instructor: Işıl Dillig, CS311H: Discrete Mathematics Intro and Propositional Logic 16/35
I Three basic logical connectives: I Negation of a proposition p, written ¬p, represents the
1. ∧: conjunction (read ”and”), statement ”It is not the case that p”.
Instructor: Işıl Dillig, CS311H: Discrete Mathematics Intro and Propositional Logic 17/35 Instructor: Işıl Dillig, CS311H: Discrete Mathematics Intro and Propositional Logic 18/35
3
Conjunction Disjunction
I Conjunction of two propositions p and q, written p ∧ q , is the I Disjunction of two propositions p and q, written p ∨ q , is the
proposition ”p and q” proposition ”p or q”
I p ∧ q is T if both p is true and q is true, and F otherwise. I p ∨ q is T if either p is true or q is true, and F otherwise.
I What is the conjunction and the truth value of p ∧ q for . . . I What is the disjunction and the truth value of p ∨ q for . . .
I p = “It is Thursday”, q = ”It is morning” ? I p = “It is spring semester”, q = ”Today is Thursday”?
Instructor: Işıl Dillig, CS311H: Discrete Mathematics Intro and Propositional Logic 19/35 Instructor: Işıl Dillig, CS311H: Discrete Mathematics Intro and Propositional Logic 20/35
Instructor: Işıl Dillig, CS311H: Discrete Mathematics Intro and Propositional Logic 21/35 Instructor: Işıl Dillig, CS311H: Discrete Mathematics Intro and Propositional Logic 22/35
Construct truth tables for the following formulas: I Other connectives: exclusive or ⊕, implication →,
biconditional ↔
1. (p ∨ q) ∧ ¬p
I Exclusive or: p ⊕ q is true when exactly one of p and q is
2. (p ∧ q) ∨ (¬p ∧ ¬q) true, and false otherwise
3. (p ∨ q ∨ ¬r ) ∧ r p q p⊕q
T T F
I Truth table: T F T
F T T
F F F
Instructor: Işıl Dillig, CS311H: Discrete Mathematics Intro and Propositional Logic 23/35 Instructor: Işıl Dillig, CS311H: Discrete Mathematics Intro and Propositional Logic 24/35
4
Implication (Conditional) Converting English into Logic
I
Let p =” I major in CS” and q = ”I will find a good job”. How do
An implication (or conditional) p → q is read ”if p then q” or
we translate following English sentences into logical formulas?
”p implies q”
I ”If I major in CS, then I will find a good job”:
I It is false if p is true and q is false, and true otherwise
I ”I will not find a good job unless I major in CS”:
I Exercise: Draw truth table for p → q
I ”It is sufficient for me to major in CS to find a good job”:
I In an implication p → q, p is called antecedent and q is called
consequent I ”It is necessary for me to major in CS to find a good job”:
Instructor: Işıl Dillig, CS311H: Discrete Mathematics Intro and Propositional Logic 25/35 Instructor: Işıl Dillig, CS311H: Discrete Mathematics Intro and Propositional Logic 26/35
I ”If I major in CS, then I will be able to program and I can find
a good job”:
Instructor: Işıl Dillig, CS311H: Discrete Mathematics Intro and Propositional Logic 27/35 Instructor: Işıl Dillig, CS311H: Discrete Mathematics Intro and Propositional Logic 28/35
I What is the inverse of ”If I get an A in CS311, then I am I What is the contrapositive of ”If I am a CS major, then I can
smart”? program”?
I Note: It is possible for a implication to be true, but its inverse I Question: Is it possible for an implication to be true, but its
to be false. F → T is true, but inverse is false contrapositive to be false?
Instructor: Işıl Dillig, CS311H: Discrete Mathematics Intro and Propositional Logic 29/35 Instructor: Işıl Dillig, CS311H: Discrete Mathematics Intro and Propositional Logic 30/35
5
Question Biconditionals
Instructor: Işıl Dillig, CS311H: Discrete Mathematics Intro and Propositional Logic 31/35 Instructor: Işıl Dillig, CS311H: Discrete Mathematics Intro and Propositional Logic 32/35
Instructor: Işıl Dillig, CS311H: Discrete Mathematics Intro and Propositional Logic 33/35 Instructor: Işıl Dillig, CS311H: Discrete Mathematics Intro and Propositional Logic 34/35
p ∨ q ∧ r ↔ q → ¬r
(C) (p ∨ (q ∧ r )) ↔ (q → (¬r ))
Instructor: Işıl Dillig, CS311H: Discrete Mathematics Intro and Propositional Logic 35/35