0% found this document useful (0 votes)
85 views18 pages

Three Logicians Walk Into A Bar (Or Why Logic Is Not So Scary)

The document discusses several key concepts in logic: 1) It defines logic as the science of formal reasoning and the study of arguments and their structures. 2) It discusses how logic is applied in computer science, including Boolean logic in circuits and the logical formulation of algorithms. 3) It explains some basic concepts in propositional logic and sets including propositions, relations between sets, and Venn diagrams. 4) It describes syllogisms as deductive arguments with two premises and a conclusion, and common pitfalls in syllogisms. 5) It outlines the use of truth values and truth tables in Boolean logic for logical operators like NOT, AND, OR, and XOR.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
85 views18 pages

Three Logicians Walk Into A Bar (Or Why Logic Is Not So Scary)

The document discusses several key concepts in logic: 1) It defines logic as the science of formal reasoning and the study of arguments and their structures. 2) It discusses how logic is applied in computer science, including Boolean logic in circuits and the logical formulation of algorithms. 3) It explains some basic concepts in propositional logic and sets including propositions, relations between sets, and Venn diagrams. 4) It describes syllogisms as deductive arguments with two premises and a conclusion, and common pitfalls in syllogisms. 5) It outlines the use of truth values and truth tables in Boolean logic for logical operators like NOT, AND, OR, and XOR.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 18

Three Logicians Walk into a Bar

(or why logic is not so scary)

Fall 2013

Nov. 7, 2013
What is Logic?

The science of formal reasoning.


The study of the structure of arguments.
Study of formal inference and proofs.

Nurit Haspel Three Logicians Walk into a Bar (or why logic is not so scary)
Logic in Computer Science

Electronic circuits using Boolean logic (True/False)


Formulation of algorithms as logical statements using sets,
functions, relations...
Computability, completeness, complexity...
AI – verification and proof systems
Syntax and semantics of programming languages
Many many more...

Nurit Haspel Three Logicians Walk into a Bar (or why logic is not so scary)
Propositional Logic

A proposition is a logical sentence, consisting of a subject and a


predicate
Today is Thursday
All cats have four legs
Some cats are dogs
A proposition may be true or false.
Can be viewed as a function from a statement to {0, 1} (True,
False)

Nurit Haspel Three Logicians Walk into a Bar (or why logic is not so scary)
Sets

A set an unordered,
Disjoint (no cats Intersecting (some
non-redundant bunch
have 4 legs) cats have 4 legs)
of elements
Examples: 4 legs
Cats
Cats 4 legs
{11, 13, 17, 19}, all
cats, the letters in the
alphabet, the people
A ⊆ B (all 4 legged B ⊆ A (all cats
in this room...
creatures are cats) have 4 legs)
Logic defines relations
between sets 4 legs Cats

Cats 4 legs

Nurit Haspel Three Logicians Walk into a Bar (or why logic is not so scary)
Syllogism

A deductive argument in which conclusion is inferred from two


premises.
3 terms and 3 propositions - major, minor and conclusion
Example:
1 All men are mortal
2 Robert is a man
3 Hence, Robert is Mortal

Nurit Haspel Three Logicians Walk into a Bar (or why logic is not so scary)
Syllogism – A Common Pitfall

1 All cats have four legs

2 This chair has four legs

3 Hence, this chair is a cat

Nurit Haspel Three Logicians Walk into a Bar (or why logic is not so scary)
Syllogism – A Common Pitfall

Cats
1 All cats have four legs
A→B 4 legs

2 This chair has four legs


C →B
4 legs
Chair

3 Hence, this chair is a cat


What is the relationship
between A and C ? ???
Nurit Haspel Three Logicians Walk into a Bar (or why logic is not so scary)
Syllogism – Another Common Pitfall

if it rains then there are clouds


A→B
is equivalent to...
if it doesn’t rains then there are no clouds
not A → not B
???

Nurit Haspel Three Logicians Walk into a Bar (or why logic is not so scary)
Syllogism – Another Common Pitfall

if it rains then there are clouds


A→B
is equivalent to...
if it doesn’t rains then there are no clouds
not A → not B
???
if there are no clouds then it doesn’t rain
not B → not A

Nurit Haspel Three Logicians Walk into a Bar (or why logic is not so scary)
Venn Diagrams

Nurit Haspel Three Logicians Walk into a Bar (or why logic is not so scary)
Venn Diagrams

Nurit Haspel Three Logicians Walk into a Bar (or why logic is not so scary)
Truth Values and Boolean Logic

Truth values (True/False) are assigned to propositions.


A truth function is a function from a set of truth values to
truth values.
Common examples – Negation (”NOT”), Conjunction
(”AND”), Disjunction (”OR”), exclusive disjunction (”XOR”).

Nurit Haspel Three Logicians Walk into a Bar (or why logic is not so scary)
Truth Tables – ”NOT”,”AND”, ”OR”, ”XOR”

A B A∧B
A ¬A T T T
T F T F F
F T F T F
F F F

A B A∨B
T T T A B A⊕B
T F T T T F
F T T T F T
F F F F T T
F F F

Nurit Haspel Three Logicians Walk into a Bar (or why logic is not so scary)
Three Logicians Walk into a Bar

Nurit Haspel Three Logicians Walk into a Bar (or why logic is not so scary)
Three Logicians are Wearing Hats

Nurit Haspel Three Logicians Walk into a Bar (or why logic is not so scary)
Three Logicians are Wearing Hats

Nurit Haspel Three Logicians Walk into a Bar (or why logic is not so scary)
Puzzle: Where is the Money?
Three doors: Rules:
An iPod The $1M door tells the truth
A million dollars The popsicle door lies
A melting popsicle The iPod door can go either
way

A. iPod is here B. Popsicle behind C C. iPod behind A

Q 1: Where is the money?


Q 2: Where is the iPod?
Based on ”The lady or the tiger”, Times books, 1982
Nurit Haspel Three Logicians Walk into a Bar (or why logic is not so scary)

You might also like