boolean logic chapter 4 (sections 4.1 and 4.2). the roots: logic 1848 george boole the calculus of...
TRANSCRIPT
![Page 1: Boolean Logic Chapter 4 (Sections 4.1 and 4.2). The Roots: Logic 1848 George Boole The Calculus of Logic chocolate and nuts and mint](https://reader035.vdocument.in/reader035/viewer/2022081514/56649da65503460f94a91fb4/html5/thumbnails/1.jpg)
Boolean Logic
Chapter 4 (Sections 4.1 and 4.2)
![Page 2: Boolean Logic Chapter 4 (Sections 4.1 and 4.2). The Roots: Logic 1848 George Boole The Calculus of Logic chocolate and nuts and mint](https://reader035.vdocument.in/reader035/viewer/2022081514/56649da65503460f94a91fb4/html5/thumbnails/2.jpg)
The Roots: Logic1848 George Boole The Calculus of Logic
chocolate and nuts and mint
![Page 3: Boolean Logic Chapter 4 (Sections 4.1 and 4.2). The Roots: Logic 1848 George Boole The Calculus of Logic chocolate and nuts and mint](https://reader035.vdocument.in/reader035/viewer/2022081514/56649da65503460f94a91fb4/html5/thumbnails/3.jpg)
The Roots: Logic
cheese and (pepperoni or sausage)
![Page 4: Boolean Logic Chapter 4 (Sections 4.1 and 4.2). The Roots: Logic 1848 George Boole The Calculus of Logic chocolate and nuts and mint](https://reader035.vdocument.in/reader035/viewer/2022081514/56649da65503460f94a91fb4/html5/thumbnails/4.jpg)
Boolean Searching
• crane silk
• Washington (pin,button,charm)
![Page 5: Boolean Logic Chapter 4 (Sections 4.1 and 4.2). The Roots: Logic 1848 George Boole The Calculus of Logic chocolate and nuts and mint](https://reader035.vdocument.in/reader035/viewer/2022081514/56649da65503460f94a91fb4/html5/thumbnails/5.jpg)
What’s the “Native Language” of Our Computers?
The first “computers” were actually people who crunched numbers.
The Mathematical Tables Project
NY in the 1940’s
http://gridtalk-project.blogspot.com/2010/09/when-computers-were-human.html Top Secret Rosies: http://www.cnn.com/2011/TECH/innovation/02/08/women.rosies.math/index.html?hpt=C2
![Page 6: Boolean Logic Chapter 4 (Sections 4.1 and 4.2). The Roots: Logic 1848 George Boole The Calculus of Logic chocolate and nuts and mint](https://reader035.vdocument.in/reader035/viewer/2022081514/56649da65503460f94a91fb4/html5/thumbnails/6.jpg)
Would You Like the Job?
![Page 7: Boolean Logic Chapter 4 (Sections 4.1 and 4.2). The Roots: Logic 1848 George Boole The Calculus of Logic chocolate and nuts and mint](https://reader035.vdocument.in/reader035/viewer/2022081514/56649da65503460f94a91fb4/html5/thumbnails/7.jpg)
Babbage’s Analytical Engine
In 1833 Charles Babbage (1791-1871) conceived a plan for a general purpose calculating machine. It was designed to contain a store, a mill, capable of performing the four operations of arithmetic, an input/output system which used punched cards, and a printer to display the results. The engine would have been steam-driven and programmed by the punched cards. It was designed in great detail on paper but it was never completed. This is a portion of the mill with a printing mechanism.
![Page 8: Boolean Logic Chapter 4 (Sections 4.1 and 4.2). The Roots: Logic 1848 George Boole The Calculus of Logic chocolate and nuts and mint](https://reader035.vdocument.in/reader035/viewer/2022081514/56649da65503460f94a91fb4/html5/thumbnails/8.jpg)
What’s the “Native Language” of Our Computers?
CDC 6600 c. 1980
![Page 9: Boolean Logic Chapter 4 (Sections 4.1 and 4.2). The Roots: Logic 1848 George Boole The Calculus of Logic chocolate and nuts and mint](https://reader035.vdocument.in/reader035/viewer/2022081514/56649da65503460f94a91fb4/html5/thumbnails/9.jpg)
Computing Today
![Page 10: Boolean Logic Chapter 4 (Sections 4.1 and 4.2). The Roots: Logic 1848 George Boole The Calculus of Logic chocolate and nuts and mint](https://reader035.vdocument.in/reader035/viewer/2022081514/56649da65503460f94a91fb4/html5/thumbnails/10.jpg)
Computing Is About Boolean Logic
The rules of the logic tell us how to manipulate inputs and produce outputs.
We define the rules so that we get answers that are useful to us.
![Page 11: Boolean Logic Chapter 4 (Sections 4.1 and 4.2). The Roots: Logic 1848 George Boole The Calculus of Logic chocolate and nuts and mint](https://reader035.vdocument.in/reader035/viewer/2022081514/56649da65503460f94a91fb4/html5/thumbnails/11.jpg)
Boolean Operators
NOT
P
True
False
![Page 12: Boolean Logic Chapter 4 (Sections 4.1 and 4.2). The Roots: Logic 1848 George Boole The Calculus of Logic chocolate and nuts and mint](https://reader035.vdocument.in/reader035/viewer/2022081514/56649da65503460f94a91fb4/html5/thumbnails/12.jpg)
Boolean Operators
NOT
P
True False
False True
![Page 13: Boolean Logic Chapter 4 (Sections 4.1 and 4.2). The Roots: Logic 1848 George Boole The Calculus of Logic chocolate and nuts and mint](https://reader035.vdocument.in/reader035/viewer/2022081514/56649da65503460f94a91fb4/html5/thumbnails/13.jpg)
Boolean Operators
AND
P Q P Q
True True
True False
False True
False False
![Page 14: Boolean Logic Chapter 4 (Sections 4.1 and 4.2). The Roots: Logic 1848 George Boole The Calculus of Logic chocolate and nuts and mint](https://reader035.vdocument.in/reader035/viewer/2022081514/56649da65503460f94a91fb4/html5/thumbnails/14.jpg)
Boolean Operators
AND
P Q P Q
True True True
True False False
False True False
False False False
![Page 15: Boolean Logic Chapter 4 (Sections 4.1 and 4.2). The Roots: Logic 1848 George Boole The Calculus of Logic chocolate and nuts and mint](https://reader035.vdocument.in/reader035/viewer/2022081514/56649da65503460f94a91fb4/html5/thumbnails/15.jpg)
Boolean Operators
OR
P Q P Q
True True
True False
False True
False False
![Page 16: Boolean Logic Chapter 4 (Sections 4.1 and 4.2). The Roots: Logic 1848 George Boole The Calculus of Logic chocolate and nuts and mint](https://reader035.vdocument.in/reader035/viewer/2022081514/56649da65503460f94a91fb4/html5/thumbnails/16.jpg)
Boolean Operators
OR
P Q P Q
True True True
True False True
False True True
False False False
![Page 17: Boolean Logic Chapter 4 (Sections 4.1 and 4.2). The Roots: Logic 1848 George Boole The Calculus of Logic chocolate and nuts and mint](https://reader035.vdocument.in/reader035/viewer/2022081514/56649da65503460f94a91fb4/html5/thumbnails/17.jpg)
Boolean Operators
IMPLIES
P Q P Q
True True
True False
False True
False False
![Page 18: Boolean Logic Chapter 4 (Sections 4.1 and 4.2). The Roots: Logic 1848 George Boole The Calculus of Logic chocolate and nuts and mint](https://reader035.vdocument.in/reader035/viewer/2022081514/56649da65503460f94a91fb4/html5/thumbnails/18.jpg)
Boolean Operators
IMPLIES
P Q P Q
True True True
True False False
False True True
False False True
![Page 19: Boolean Logic Chapter 4 (Sections 4.1 and 4.2). The Roots: Logic 1848 George Boole The Calculus of Logic chocolate and nuts and mint](https://reader035.vdocument.in/reader035/viewer/2022081514/56649da65503460f94a91fb4/html5/thumbnails/19.jpg)
Boolean Operators
EQUIVALENCE
P Q P Q
True True
True False
False True
False False
![Page 20: Boolean Logic Chapter 4 (Sections 4.1 and 4.2). The Roots: Logic 1848 George Boole The Calculus of Logic chocolate and nuts and mint](https://reader035.vdocument.in/reader035/viewer/2022081514/56649da65503460f94a91fb4/html5/thumbnails/20.jpg)
Boolean Operators
EQUIVALENCE
P Q P Q
True True True
True False False
False True False
False False True
![Page 21: Boolean Logic Chapter 4 (Sections 4.1 and 4.2). The Roots: Logic 1848 George Boole The Calculus of Logic chocolate and nuts and mint](https://reader035.vdocument.in/reader035/viewer/2022081514/56649da65503460f94a91fb4/html5/thumbnails/21.jpg)
Boolean Logic
P Q P P Q P Q P Q P QTrue True False True True True True
True False False True False False False
False True True True False True False
False False True False False True True
![Page 22: Boolean Logic Chapter 4 (Sections 4.1 and 4.2). The Roots: Logic 1848 George Boole The Calculus of Logic chocolate and nuts and mint](https://reader035.vdocument.in/reader035/viewer/2022081514/56649da65503460f94a91fb4/html5/thumbnails/22.jpg)
Using Boolean Logic
P Q P
True True
True False
False True
False False
P ((P Q) Q)
![Page 23: Boolean Logic Chapter 4 (Sections 4.1 and 4.2). The Roots: Logic 1848 George Boole The Calculus of Logic chocolate and nuts and mint](https://reader035.vdocument.in/reader035/viewer/2022081514/56649da65503460f94a91fb4/html5/thumbnails/23.jpg)
Using Boolean Logic
P Q P P Q
True True False
True False False
False True True
False False True
P ((P Q) Q)
![Page 24: Boolean Logic Chapter 4 (Sections 4.1 and 4.2). The Roots: Logic 1848 George Boole The Calculus of Logic chocolate and nuts and mint](https://reader035.vdocument.in/reader035/viewer/2022081514/56649da65503460f94a91fb4/html5/thumbnails/24.jpg)
Using Boolean Logic
P Q P P Q P Q
True True False True
True False False True
False True True True
False False True False
P ((P Q) Q)
![Page 25: Boolean Logic Chapter 4 (Sections 4.1 and 4.2). The Roots: Logic 1848 George Boole The Calculus of Logic chocolate and nuts and mint](https://reader035.vdocument.in/reader035/viewer/2022081514/56649da65503460f94a91fb4/html5/thumbnails/25.jpg)
Using Boolean Logic
P Q P P Q A B (P Q) Q
True True False True True
True False False True False
False True True True True
False False True False True
P ((P Q) Q)
![Page 26: Boolean Logic Chapter 4 (Sections 4.1 and 4.2). The Roots: Logic 1848 George Boole The Calculus of Logic chocolate and nuts and mint](https://reader035.vdocument.in/reader035/viewer/2022081514/56649da65503460f94a91fb4/html5/thumbnails/26.jpg)
Using Boolean Logic
P Q P P Q P Q (P Q) Q P ((P Q) Q)
True True False True True True
True False False True False False
False True True True True True
False False True False True True
P ((P Q) Q)
![Page 27: Boolean Logic Chapter 4 (Sections 4.1 and 4.2). The Roots: Logic 1848 George Boole The Calculus of Logic chocolate and nuts and mint](https://reader035.vdocument.in/reader035/viewer/2022081514/56649da65503460f94a91fb4/html5/thumbnails/27.jpg)
Using Boolean Logic
P Q P P Q P Q (P Q) Q P ((P Q) Q)
True True False True True True False
True False False True False False False
False True True True True True True
False False True False True True True
P ((P Q) Q)
![Page 28: Boolean Logic Chapter 4 (Sections 4.1 and 4.2). The Roots: Logic 1848 George Boole The Calculus of Logic chocolate and nuts and mint](https://reader035.vdocument.in/reader035/viewer/2022081514/56649da65503460f94a91fb4/html5/thumbnails/28.jpg)
Another ExampleE H N S E H ((E H) N S
True True True True True
True True True True True
True False True True
True False True True
True True True True
True True True True
True False True
True False True
![Page 29: Boolean Logic Chapter 4 (Sections 4.1 and 4.2). The Roots: Logic 1848 George Boole The Calculus of Logic chocolate and nuts and mint](https://reader035.vdocument.in/reader035/viewer/2022081514/56649da65503460f94a91fb4/html5/thumbnails/29.jpg)
Another ExampleE H N S E H ((E H) N S
True True True True True
True True True True True
True False True True
True False True True
True True True True
True True True True
True False True
True False True
((Exhausted HidingPlaceNearby) Nightime) StopToSleep
![Page 30: Boolean Logic Chapter 4 (Sections 4.1 and 4.2). The Roots: Logic 1848 George Boole The Calculus of Logic chocolate and nuts and mint](https://reader035.vdocument.in/reader035/viewer/2022081514/56649da65503460f94a91fb4/html5/thumbnails/30.jpg)
Boolean Logic
P Q P P Q P Q P Q P QTrue True False True True True True
True False False True False False False
False True True True False True False
False False True False False True True
Let’s practice.
![Page 31: Boolean Logic Chapter 4 (Sections 4.1 and 4.2). The Roots: Logic 1848 George Boole The Calculus of Logic chocolate and nuts and mint](https://reader035.vdocument.in/reader035/viewer/2022081514/56649da65503460f94a91fb4/html5/thumbnails/31.jpg)
Booleans in Python
def chocolate(): password = input("Type your password: ") while password != "chocolate": password = input("Try again: ") print("Got it!!")
![Page 32: Boolean Logic Chapter 4 (Sections 4.1 and 4.2). The Roots: Logic 1848 George Boole The Calculus of Logic chocolate and nuts and mint](https://reader035.vdocument.in/reader035/viewer/2022081514/56649da65503460f94a91fb4/html5/thumbnails/32.jpg)
Booleans in Python
def for_dummies(): password = input("Type your password: ") tries = 0 while password != "chocolate" and tries < 5: password = input("Try again: ") tries +=1 if tries == 5: print("Okay, you've tried hard enough") else: print("Got it!!")
![Page 33: Boolean Logic Chapter 4 (Sections 4.1 and 4.2). The Roots: Logic 1848 George Boole The Calculus of Logic chocolate and nuts and mint](https://reader035.vdocument.in/reader035/viewer/2022081514/56649da65503460f94a91fb4/html5/thumbnails/33.jpg)
Booleans in Python
def for_dummies1(): password = input("Type your password: ") tries = 0 while not(password == "chocolate" or tries >= 5): password = input("Try again: ") tries +=1 if tries == 5: print("Okay, you've tried hard enough") else: print("Got it!!")
![Page 34: Boolean Logic Chapter 4 (Sections 4.1 and 4.2). The Roots: Logic 1848 George Boole The Calculus of Logic chocolate and nuts and mint](https://reader035.vdocument.in/reader035/viewer/2022081514/56649da65503460f94a91fb4/html5/thumbnails/34.jpg)
Boolean Identities
This notation:
• Multiply for AND• Add for OR
![Page 35: Boolean Logic Chapter 4 (Sections 4.1 and 4.2). The Roots: Logic 1848 George Boole The Calculus of Logic chocolate and nuts and mint](https://reader035.vdocument.in/reader035/viewer/2022081514/56649da65503460f94a91fb4/html5/thumbnails/35.jpg)
Proving These Things
A B A B (A B)
True True True False
True False False True
False True False True
False False False True
A B A B A B
True True False False False
True False False True True
False True True False True
False False True True True
Prove the first of deMorgan’s laws:
(A B) A B
![Page 36: Boolean Logic Chapter 4 (Sections 4.1 and 4.2). The Roots: Logic 1848 George Boole The Calculus of Logic chocolate and nuts and mint](https://reader035.vdocument.in/reader035/viewer/2022081514/56649da65503460f94a91fb4/html5/thumbnails/36.jpg)
Proving These Things
A B A B (A B)
True True True False
True False False True
False True False True
False False False True
A B A B A B
True True False False False
True False False True True
False True True False True
False False True True True
Prove the first of deMorgan’s laws:
(A B) A B
![Page 37: Boolean Logic Chapter 4 (Sections 4.1 and 4.2). The Roots: Logic 1848 George Boole The Calculus of Logic chocolate and nuts and mint](https://reader035.vdocument.in/reader035/viewer/2022081514/56649da65503460f94a91fb4/html5/thumbnails/37.jpg)
Satisfiability
A Boolean formula is satisfiable if and only if there is some row of the truth table that is T.
P Q P P Q P Q (P Q) Q P ((P Q) Q)
True True False True True True False
True False False True False False False
False True True True True True True
False False True False True True True
The job of a SAT solver is to determine satisfiability.
![Page 38: Boolean Logic Chapter 4 (Sections 4.1 and 4.2). The Roots: Logic 1848 George Boole The Calculus of Logic chocolate and nuts and mint](https://reader035.vdocument.in/reader035/viewer/2022081514/56649da65503460f94a91fb4/html5/thumbnails/38.jpg)
Using Boolean Expressions
(W C D) (W A D)
Is this expression satisfiable?
![Page 39: Boolean Logic Chapter 4 (Sections 4.1 and 4.2). The Roots: Logic 1848 George Boole The Calculus of Logic chocolate and nuts and mint](https://reader035.vdocument.in/reader035/viewer/2022081514/56649da65503460f94a91fb4/html5/thumbnails/39.jpg)
Using Boolean Expressions
(Wounded CanRun Daylight) (Wounded InAmbulance Daylight)
Is this expression satisfiable?
![Page 40: Boolean Logic Chapter 4 (Sections 4.1 and 4.2). The Roots: Logic 1848 George Boole The Calculus of Logic chocolate and nuts and mint](https://reader035.vdocument.in/reader035/viewer/2022081514/56649da65503460f94a91fb4/html5/thumbnails/40.jpg)
Binary Boolean Operators
P Q
T T T T T T T T T T F F F F F F F F
T F T T T T F F F F T T T T F F F F
F T T T F F T T F F T T F F T T F F
F F T F T F T F T F T F T F T F T F
What about the other 12 columns?
![Page 41: Boolean Logic Chapter 4 (Sections 4.1 and 4.2). The Roots: Logic 1848 George Boole The Calculus of Logic chocolate and nuts and mint](https://reader035.vdocument.in/reader035/viewer/2022081514/56649da65503460f94a91fb4/html5/thumbnails/41.jpg)
Boolean Operators
Exclusive Or XOR
P Q P Q
True True
True False
False True
False False
Chips OR Fries
![Page 42: Boolean Logic Chapter 4 (Sections 4.1 and 4.2). The Roots: Logic 1848 George Boole The Calculus of Logic chocolate and nuts and mint](https://reader035.vdocument.in/reader035/viewer/2022081514/56649da65503460f94a91fb4/html5/thumbnails/42.jpg)
Boolean Operators
Exclusive Or XOR
P Q P Q
True True False
True False True
False True True
False False False
Chips OR Fries
![Page 43: Boolean Logic Chapter 4 (Sections 4.1 and 4.2). The Roots: Logic 1848 George Boole The Calculus of Logic chocolate and nuts and mint](https://reader035.vdocument.in/reader035/viewer/2022081514/56649da65503460f94a91fb4/html5/thumbnails/43.jpg)
Boolean Operators
Not And NAND
P Q NAND
True True True
True False False
False True False
False False False
![Page 44: Boolean Logic Chapter 4 (Sections 4.1 and 4.2). The Roots: Logic 1848 George Boole The Calculus of Logic chocolate and nuts and mint](https://reader035.vdocument.in/reader035/viewer/2022081514/56649da65503460f94a91fb4/html5/thumbnails/44.jpg)
Boolean Operators
Not And NAND
P Q NAND
True True True False
True False False True
False True False True
False False False True
![Page 45: Boolean Logic Chapter 4 (Sections 4.1 and 4.2). The Roots: Logic 1848 George Boole The Calculus of Logic chocolate and nuts and mint](https://reader035.vdocument.in/reader035/viewer/2022081514/56649da65503460f94a91fb4/html5/thumbnails/45.jpg)
Boolean Operators
Not Or NOR
P Q NOR
True True True
True False True
False True True
False False False
![Page 46: Boolean Logic Chapter 4 (Sections 4.1 and 4.2). The Roots: Logic 1848 George Boole The Calculus of Logic chocolate and nuts and mint](https://reader035.vdocument.in/reader035/viewer/2022081514/56649da65503460f94a91fb4/html5/thumbnails/46.jpg)
Boolean Operators
Not Or NOR
P Q NOR
True True True False
True False True False
False True True False
False False False True
![Page 47: Boolean Logic Chapter 4 (Sections 4.1 and 4.2). The Roots: Logic 1848 George Boole The Calculus of Logic chocolate and nuts and mint](https://reader035.vdocument.in/reader035/viewer/2022081514/56649da65503460f94a91fb4/html5/thumbnails/47.jpg)
Binary Boolean Operators
P Q NAND NOR
T T T T T T T T T T F F F F F F F F
T F T T T T F F F F T T T T F F F F
F T T T F F T T F F T T F F T T F F
F F T F T F T F T F T F T F T F T F
![Page 48: Boolean Logic Chapter 4 (Sections 4.1 and 4.2). The Roots: Logic 1848 George Boole The Calculus of Logic chocolate and nuts and mint](https://reader035.vdocument.in/reader035/viewer/2022081514/56649da65503460f94a91fb4/html5/thumbnails/48.jpg)
Boolean Circuits
NOT
![Page 49: Boolean Logic Chapter 4 (Sections 4.1 and 4.2). The Roots: Logic 1848 George Boole The Calculus of Logic chocolate and nuts and mint](https://reader035.vdocument.in/reader035/viewer/2022081514/56649da65503460f94a91fb4/html5/thumbnails/49.jpg)
Boolean Circuits
AND
![Page 50: Boolean Logic Chapter 4 (Sections 4.1 and 4.2). The Roots: Logic 1848 George Boole The Calculus of Logic chocolate and nuts and mint](https://reader035.vdocument.in/reader035/viewer/2022081514/56649da65503460f94a91fb4/html5/thumbnails/50.jpg)
Boolean Circuits
OR
![Page 51: Boolean Logic Chapter 4 (Sections 4.1 and 4.2). The Roots: Logic 1848 George Boole The Calculus of Logic chocolate and nuts and mint](https://reader035.vdocument.in/reader035/viewer/2022081514/56649da65503460f94a91fb4/html5/thumbnails/51.jpg)
Boolean Circuits
XOR
![Page 52: Boolean Logic Chapter 4 (Sections 4.1 and 4.2). The Roots: Logic 1848 George Boole The Calculus of Logic chocolate and nuts and mint](https://reader035.vdocument.in/reader035/viewer/2022081514/56649da65503460f94a91fb4/html5/thumbnails/52.jpg)
Boolean Circuits
NAND
![Page 53: Boolean Logic Chapter 4 (Sections 4.1 and 4.2). The Roots: Logic 1848 George Boole The Calculus of Logic chocolate and nuts and mint](https://reader035.vdocument.in/reader035/viewer/2022081514/56649da65503460f94a91fb4/html5/thumbnails/53.jpg)
Boolean Circuits
NOR
![Page 54: Boolean Logic Chapter 4 (Sections 4.1 and 4.2). The Roots: Logic 1848 George Boole The Calculus of Logic chocolate and nuts and mint](https://reader035.vdocument.in/reader035/viewer/2022081514/56649da65503460f94a91fb4/html5/thumbnails/54.jpg)
Boolean Gates• Not
• And
• Or
• XOR
• NAND
• NOR
![Page 55: Boolean Logic Chapter 4 (Sections 4.1 and 4.2). The Roots: Logic 1848 George Boole The Calculus of Logic chocolate and nuts and mint](https://reader035.vdocument.in/reader035/viewer/2022081514/56649da65503460f94a91fb4/html5/thumbnails/55.jpg)
Circuits That ComputeBuilding an Adder
0 0 1 1+ 0 + 1 + 0 + 1 0 1 1 1 0
A half adder:
![Page 56: Boolean Logic Chapter 4 (Sections 4.1 and 4.2). The Roots: Logic 1848 George Boole The Calculus of Logic chocolate and nuts and mint](https://reader035.vdocument.in/reader035/viewer/2022081514/56649da65503460f94a91fb4/html5/thumbnails/56.jpg)
Circuits That ComputeBuilding an Adder
0 0 1 1+ 0 + 1 + 0 + 1 0 1 1 1 0
A half adder:
![Page 57: Boolean Logic Chapter 4 (Sections 4.1 and 4.2). The Roots: Logic 1848 George Boole The Calculus of Logic chocolate and nuts and mint](https://reader035.vdocument.in/reader035/viewer/2022081514/56649da65503460f94a91fb4/html5/thumbnails/57.jpg)
Circuits That ComputeBuilding an Adder
0 0 1 1+ 0 + 1 + 0 + 1 0 1 1 1 0
A full adder:
![Page 58: Boolean Logic Chapter 4 (Sections 4.1 and 4.2). The Roots: Logic 1848 George Boole The Calculus of Logic chocolate and nuts and mint](https://reader035.vdocument.in/reader035/viewer/2022081514/56649da65503460f94a91fb4/html5/thumbnails/58.jpg)
Reasoning About Circuits (and Programs)
• CircuitA Specification
• ProgramB Specification
![Page 59: Boolean Logic Chapter 4 (Sections 4.1 and 4.2). The Roots: Logic 1848 George Boole The Calculus of Logic chocolate and nuts and mint](https://reader035.vdocument.in/reader035/viewer/2022081514/56649da65503460f94a91fb4/html5/thumbnails/59.jpg)
Satisfiability
Recall: A Boolean formula is satisfiable if and only if there is some row of the truth table that is T.
P Q P P Q P Q (P Q) Q P ((P Q) Q)
True True False True True True False
True False False True False False False
False True True True True True True
False False True False True True True
The job of a SAT solver is to determine satisfiability.
![Page 60: Boolean Logic Chapter 4 (Sections 4.1 and 4.2). The Roots: Logic 1848 George Boole The Calculus of Logic chocolate and nuts and mint](https://reader035.vdocument.in/reader035/viewer/2022081514/56649da65503460f94a91fb4/html5/thumbnails/60.jpg)
Reasoning About Circuits (and Programs)
• CircuitA Specification
• ProgramB Specification
So we want to assure that:
(CircuitA Specification)
is not satisfiable.
![Page 61: Boolean Logic Chapter 4 (Sections 4.1 and 4.2). The Roots: Logic 1848 George Boole The Calculus of Logic chocolate and nuts and mint](https://reader035.vdocument.in/reader035/viewer/2022081514/56649da65503460f94a91fb4/html5/thumbnails/61.jpg)
Other Applications of SAT Solvers
• Cryptography
• Artificial Intelligence:
• Planc Problem solved
• Is new fact1 consistent with what we already know?
![Page 62: Boolean Logic Chapter 4 (Sections 4.1 and 4.2). The Roots: Logic 1848 George Boole The Calculus of Logic chocolate and nuts and mint](https://reader035.vdocument.in/reader035/viewer/2022081514/56649da65503460f94a91fb4/html5/thumbnails/62.jpg)
Other Applications of SAT Solvers
• Is new fact1 consistent with what we already know?
(T A) L H TD TU A
U H L
Put another way, is the following formula satisfiable?
((T A) L) (H T) (D T ) (U A ) (U H L )
![Page 63: Boolean Logic Chapter 4 (Sections 4.1 and 4.2). The Roots: Logic 1848 George Boole The Calculus of Logic chocolate and nuts and mint](https://reader035.vdocument.in/reader035/viewer/2022081514/56649da65503460f94a91fb4/html5/thumbnails/63.jpg)
Other Applications of SAT Solvers
• Is new fact1 consistent with what we already know?
So what’s the problem? Write out the truth table and we are done.
(T A) L (Texan Aggie) Longhorn H T Houston TexanD T Dallas TexanU A UT Aggie
U H L UT Houston Longhorn
![Page 64: Boolean Logic Chapter 4 (Sections 4.1 and 4.2). The Roots: Logic 1848 George Boole The Calculus of Logic chocolate and nuts and mint](https://reader035.vdocument.in/reader035/viewer/2022081514/56649da65503460f94a91fb4/html5/thumbnails/64.jpg)
How Big Are the Truth Tables?
P Q RTrue True True
True True False
True False True
True False False
False True True
False True False
False False True
False False False
![Page 65: Boolean Logic Chapter 4 (Sections 4.1 and 4.2). The Roots: Logic 1848 George Boole The Calculus of Logic chocolate and nuts and mint](https://reader035.vdocument.in/reader035/viewer/2022081514/56649da65503460f94a91fb4/html5/thumbnails/65.jpg)
Back to the Longhorn Problem
(T A) L H TD TU A
U H L
How many rows in the truth table for this?
![Page 66: Boolean Logic Chapter 4 (Sections 4.1 and 4.2). The Roots: Logic 1848 George Boole The Calculus of Logic chocolate and nuts and mint](https://reader035.vdocument.in/reader035/viewer/2022081514/56649da65503460f94a91fb4/html5/thumbnails/66.jpg)
The Longhorn Problem
T A L H D UTrue True True True True True
True True True True True
True False True True True
True False True True
True True True True True
True True True True
True False True True
True False True
![Page 67: Boolean Logic Chapter 4 (Sections 4.1 and 4.2). The Roots: Logic 1848 George Boole The Calculus of Logic chocolate and nuts and mint](https://reader035.vdocument.in/reader035/viewer/2022081514/56649da65503460f94a91fb4/html5/thumbnails/67.jpg)
2n
0
200000
400000
600000
800000
1000000
1200000
1 3 5 7 9 11 13 15 17 19 21
![Page 68: Boolean Logic Chapter 4 (Sections 4.1 and 4.2). The Roots: Logic 1848 George Boole The Calculus of Logic chocolate and nuts and mint](https://reader035.vdocument.in/reader035/viewer/2022081514/56649da65503460f94a91fb4/html5/thumbnails/68.jpg)
But Practical Solutions Exist
They routinely solve problems with hundreds of thousands of variables.