Lecture 1: Course Intro + Propositional Logic
Or: How I Learned to Stop Worrying and Love the Class
1 / 23
Lecture 1: Course Intro + Propositional Logic Or: How I Learned to - - PowerPoint PPT Presentation
Lecture 1: Course Intro + Propositional Logic Or: How I Learned to Stop Worrying and Love the Class 1 / 23 Welcome to CS 70! What is this course? CS 70 is a math course. Focus on proofs and justifjcations Practice mathematical
1 / 23
2 / 23
▶ CS 70 is a math course.
▶ Focus on proofs and justifjcations ▶ Practice “mathematical thinking”
2 / 23
▶ CS 70 is a math course.
▶ Focus on proofs and justifjcations ▶ Practice “mathematical thinking”
▶ Also an EECS course.
▶ Probability, Cryptography, Graphs, ... ▶ Applications throughout EECS
2 / 23
▶ CS 70 is a math course.
▶ Focus on proofs and justifjcations ▶ Practice “mathematical thinking”
▶ Also an EECS course.
▶ Probability, Cryptography, Graphs, ... ▶ Applications throughout EECS
2 / 23
▶ CS 70 is a math course.
▶ Focus on proofs and justifjcations ▶ Practice “mathematical thinking”
▶ Also an EECS course.
▶ Probability, Cryptography, Graphs, ... ▶ Applications throughout EECS
▶ Learn to think critically and argue clearly
2 / 23
▶ CS 70 is a math course.
▶ Focus on proofs and justifjcations ▶ Practice “mathematical thinking”
▶ Also an EECS course.
▶ Probability, Cryptography, Graphs, ... ▶ Applications throughout EECS
▶ Learn to think critically and argue clearly ▶ See the building blocks of Computer Science
2 / 23
▶ CS 70 is a math course.
▶ Focus on proofs and justifjcations ▶ Practice “mathematical thinking”
▶ Also an EECS course.
▶ Probability, Cryptography, Graphs, ... ▶ Applications throughout EECS
▶ Learn to think critically and argue clearly ▶ See the building blocks of Computer Science
2 / 23
▶ Lecturers ▶ TAs ▶ Readers / Academic Interns
3 / 23
▶ Has homeworks, lecture notes, slides, etc.
▶ Ask any questions here! ▶ Can make a private post or email
▶ Will also post announcements here
4 / 23
5 / 23
▶ Graded on putting “reasonable efgort” into
▶ Translation: try all the problems, write down
▶ Readers still give detailed feedback ▶ Do still try your best on the homeworks —
5 / 23
6 / 23
6 / 23
1This is known as the Goldbach Conjecture
7 / 23
▶ 2 + 2 = 4 (True) ▶ I had pizza for breakfast this morning (False) ▶ Even integers are the sum of two primes1 (???)
1This is known as the Goldbach Conjecture
7 / 23
▶ 2 + 2 = 4 (True) ▶ I had pizza for breakfast this morning (False) ▶ Even integers are the sum of two primes1 (???)
▶ A Pop-Tart is a sandwich (defjne sandwich) ▶ x + 2 = 7 (what is x?) ▶ 17 (not making a claim) ▶ Jazz is better than Rock (personal preference)
1This is known as the Goldbach Conjecture
7 / 23
▶ P ∧ Q (Conjunction, “both P and Q”) ▶ P ∨ Q (Disjunction, “at least one of P or Q”) ▶ ¬P (Negation, “not P”)
8 / 23
▶ P ∧ Q (Conjunction, “both P and Q”) ▶ P ∨ Q (Disjunction, “at least one of P or Q”) ▶ ¬P (Negation, “not P”)
▶ P ∧ Q ∧ R ▶ (P ∨ Q) ∧ (¬P) ▶ (P ∧ Q ∧ R) ∨ ((¬P) ∧ (¬Q) ∧ (¬R))
8 / 23
▶ P ∧ Q (Conjunction, “both P and Q”) ▶ P ∨ Q (Disjunction, “at least one of P or Q”) ▶ ¬P (Negation, “not P”)
▶ P ∧ Q ∧ R ▶ (P ∨ Q) ∧ (¬P) ▶ (P ∧ Q ∧ R) ∨ ((¬P) ∧ (¬Q) ∧ (¬R))
8 / 23
9 / 23
▶ Inputs are T/F values to each proposition ▶ Output is T/F value of overall formula ▶ Equivalent if have same truth table
9 / 23
▶ Inputs are T/F values to each proposition ▶ Output is T/F value of overall formula ▶ Equivalent if have same truth table
9 / 23
2This means our language is fully expressive.
10 / 23
2This means our language is fully expressive.
10 / 23
2This means our language is fully expressive.
10 / 23
2This means our language is fully expressive.
10 / 23
2This means our language is fully expressive.
10 / 23
2This means our language is fully expressive.
10 / 23
2This means our language is fully expressive.
10 / 23
2This means our language is fully expressive.
10 / 23
2This means our language is fully expressive.
10 / 23
2This means our language is fully expressive.
10 / 23
2This means our language is fully expressive.
10 / 23
2This means our language is fully expressive.
10 / 23
2This means our language is fully expressive.
10 / 23
▶ Disjunction (or) of many “and” clauses ▶ One clause for each satisfying assignment
2This means our language is fully expressive.
10 / 23
11 / 23
▶ ¬(P ∧ Q)
11 / 23
▶ ¬(P ∧ Q)
▶ (¬P) ∨ (¬Q)
11 / 23
▶ ¬(P ∧ Q)
▶ (¬P) ∨ (¬Q)
11 / 23
▶ ¬(P ∧ Q)
▶ (¬P) ∨ (¬Q)
▶ ¬(P ∨ Q)
11 / 23
▶ ¬(P ∧ Q)
▶ (¬P) ∨ (¬Q)
▶ ¬(P ∨ Q)
▶ (¬P) ∧ (¬Q)
11 / 23
▶ ¬(P ∧ Q)
▶ (¬P) ∨ (¬Q)
▶ ¬(P ∨ Q)
▶ (¬P) ∧ (¬Q)
11 / 23
12 / 23
12 / 23
12 / 23
13 / 23
14 / 23
14 / 23
14 / 23
14 / 23
14 / 23
15 / 23
15 / 23
15 / 23
16 / 23
16 / 23
16 / 23
▶ E(x) says that “x is even” ▶ O(x) says that “x is odd”
17 / 23
▶ E(x) says that “x is even” ▶ O(x) says that “x is odd”
17 / 23
▶ E(x) says that “x is even” ▶ O(x) says that “x is odd”
17 / 23
▶ E(x) says that “x is even” ▶ O(x) says that “x is odd”
17 / 23
▶ E(x) says that “x is even” ▶ O(x) says that “x is odd”
17 / 23
▶ E(x) says that “x is even” ▶ O(x) says that “x is odd”
17 / 23
▶ E(x) says that “x is even” ▶ O(x) says that “x is odd”
17 / 23
3Here, x is a variable allowed to appear in P, called a “free variable” 4or we’re just lazy
18 / 23
▶ (∀x ∈ S)P(x) if P(x) holds for all x ∈ S ▶ (∃x ∈ S)P(x) if P(x) holds for some x ∈ S
3Here, x is a variable allowed to appear in P, called a “free variable” 4or we’re just lazy
18 / 23
▶ (∀x ∈ S)P(x) if P(x) holds for all x ∈ S ▶ (∃x ∈ S)P(x) if P(x) holds for some x ∈ S
3Here, x is a variable allowed to appear in P, called a “free variable” 4or we’re just lazy
18 / 23
▶ (∀x ∈ S)P(x) if P(x) holds for all x ∈ S ▶ (∃x ∈ S)P(x) if P(x) holds for some x ∈ S
3Here, x is a variable allowed to appear in P, called a “free variable” 4or we’re just lazy
18 / 23
19 / 23
▶ ¬(∀x P(x))
19 / 23
▶ ¬(∀x P(x))
▶ ∃x (¬P(x))
19 / 23
▶ ¬(∀x P(x))
▶ ∃x (¬P(x))
19 / 23
▶ ¬(∀x P(x))
▶ ∃x (¬P(x))
▶ ¬(∃x P(x))
19 / 23
▶ ¬(∀x P(x))
▶ ∃x (¬P(x))
▶ ¬(∃x P(x))
▶ ∀x (¬P(x))
19 / 23
▶ ¬(∀x P(x))
▶ ∃x (¬P(x))
▶ ¬(∃x P(x))
▶ ∀x (¬P(x))
19 / 23
▶ ¬(P ∧ Q) ≡ (¬P) ∨ (¬Q) ▶ ¬(P ∨ Q) ≡ (¬P) ∧ (¬Q)
20 / 23
▶ ¬(P ∧ Q) ≡ (¬P) ∨ (¬Q) ▶ ¬(P ∨ Q) ≡ (¬P) ∧ (¬Q)
20 / 23
21 / 23
21 / 23
21 / 23
21 / 23
21 / 23
21 / 23
21 / 23
21 / 23
IV
II c
VI c
III c
22 / 23
IV
II c
VI c
III c
22 / 23
IV
II c
VI c
III c
22 / 23
IV
II(c)
VI c
III c
22 / 23
IV
II(c)
VI(c)
III c
22 / 23
IV
II(c)
VI(c)
III(c)
22 / 23
IV
II(c)
VI(c)
III(c)
22 / 23
IV
II(c)
VI(c)
III(c)
22 / 23
IV
II(c)
VI(c)
III(c)
22 / 23
23 / 23