Top Banner
22C:19 Discrete Math Introduction and Scope Propositions Fall 2011 Sukumar Ghosh
30

22C:19 Discrete Math Introduction and Scope Propositions Fall 2011 Sukumar Ghosh.

Dec 24, 2015

Download

Documents

Brendan Hawkins
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: 22C:19 Discrete Math Introduction and Scope Propositions Fall 2011 Sukumar Ghosh.

22C:19 Discrete MathIntroduction and Scope

PropositionsFall 2011

Sukumar Ghosh

Page 2: 22C:19 Discrete Math Introduction and Scope Propositions Fall 2011 Sukumar Ghosh.

The Scope

Discrete mathematics studies mathematical structures

that are fundamentally discrete, not supporting or

requiring the notion of continuity (Wikipedia).

Deals with countable things.

Page 3: 22C:19 Discrete Math Introduction and Scope Propositions Fall 2011 Sukumar Ghosh.

Why Discrete Math?

Discrete math forms the basis for computer science:• Sequences• Digital logic (how computers compute)• Algorithms• Program correctness• Probability and gambling (or taking risks)

“Continuous” math forms the basis for most physical and biological sciences

Page 4: 22C:19 Discrete Math Introduction and Scope Propositions Fall 2011 Sukumar Ghosh.

Propositions

A proposition is a statement that is either true or false “The sky is blue” “Today the temperature is below freezing”

“9 + 3 = 12”

Not propositions: “Who is Bob?” “How many persons are there in this group?”

“X + 1 = 7.”

Page 5: 22C:19 Discrete Math Introduction and Scope Propositions Fall 2011 Sukumar Ghosh.

Propositional (or Boolean) variables

These are variables that refer to propositions.• Usually denoted by lower case letters p, q, r, s, etc.• Each can have one of two values true (T) or false (F)

A proposition can be:• A single variable p• A formula of multiple variables like p ∧ q, s ¬∨ r)

Page 6: 22C:19 Discrete Math Introduction and Scope Propositions Fall 2011 Sukumar Ghosh.

Propositional (or Boolean) operators

Page 7: 22C:19 Discrete Math Introduction and Scope Propositions Fall 2011 Sukumar Ghosh.

Logical operator: NOT

Page 8: 22C:19 Discrete Math Introduction and Scope Propositions Fall 2011 Sukumar Ghosh.

Logical operator: AND

Page 9: 22C:19 Discrete Math Introduction and Scope Propositions Fall 2011 Sukumar Ghosh.

Logical operator: OR

Page 10: 22C:19 Discrete Math Introduction and Scope Propositions Fall 2011 Sukumar Ghosh.

Logical operator: EXCLUSIVE OR

Note. p q is false if ⊕ both p, q are true or both are false

Page 11: 22C:19 Discrete Math Introduction and Scope Propositions Fall 2011 Sukumar Ghosh.

(Inclusive) OR or EXCLUSIVE OR?

Page 12: 22C:19 Discrete Math Introduction and Scope Propositions Fall 2011 Sukumar Ghosh.

Logical Operator NAND and NOR

Page 13: 22C:19 Discrete Math Introduction and Scope Propositions Fall 2011 Sukumar Ghosh.

Conditional Operator

Page 14: 22C:19 Discrete Math Introduction and Scope Propositions Fall 2011 Sukumar Ghosh.

Conditional operators

Page 15: 22C:19 Discrete Math Introduction and Scope Propositions Fall 2011 Sukumar Ghosh.

Conditional operators

Page 16: 22C:19 Discrete Math Introduction and Scope Propositions Fall 2011 Sukumar Ghosh.

Set representations

A proposition p can also be represented by a set (a

collection of elements) for which the proposition is true.

p

¬p

Universe

p

p

q

p q ∧

p q∨

p

q

Venn diagram

Page 17: 22C:19 Discrete Math Introduction and Scope Propositions Fall 2011 Sukumar Ghosh.

Bi-conditional Statements

Page 18: 22C:19 Discrete Math Introduction and Scope Propositions Fall 2011 Sukumar Ghosh.

Translating into English

Page 19: 22C:19 Discrete Math Introduction and Scope Propositions Fall 2011 Sukumar Ghosh.

Translating into English

Great for developing intuition about propositional operators.

You can access the Internet from campus (p) only if you are a CS major (cs), or you are not a freshman (f)

p (cs ¬ f)⟶ ∨

Page 20: 22C:19 Discrete Math Introduction and Scope Propositions Fall 2011 Sukumar Ghosh.

Precedence of Operators

Page 21: 22C:19 Discrete Math Introduction and Scope Propositions Fall 2011 Sukumar Ghosh.

Boolean operators in search

Page 22: 22C:19 Discrete Math Introduction and Scope Propositions Fall 2011 Sukumar Ghosh.

Tautology and Contradiction

Page 23: 22C:19 Discrete Math Introduction and Scope Propositions Fall 2011 Sukumar Ghosh.

Equivalence

Page 24: 22C:19 Discrete Math Introduction and Scope Propositions Fall 2011 Sukumar Ghosh.

Examples of Equivalence

Page 25: 22C:19 Discrete Math Introduction and Scope Propositions Fall 2011 Sukumar Ghosh.

Examples of Equivalence

Page 26: 22C:19 Discrete Math Introduction and Scope Propositions Fall 2011 Sukumar Ghosh.

More Equivalences

Associative Laws

Distributive Law

Law of absorption

Page 27: 22C:19 Discrete Math Introduction and Scope Propositions Fall 2011 Sukumar Ghosh.

De Morgan’s Law

You can take 22C:21 if you take 22C:16 and 22M:26

You cannot take 22C:21 if you have not taken 22C:16 or 22M:26

Page 28: 22C:19 Discrete Math Introduction and Scope Propositions Fall 2011 Sukumar Ghosh.

How to prove Equivalences

Examples? Follow class lectures.

Page 29: 22C:19 Discrete Math Introduction and Scope Propositions Fall 2011 Sukumar Ghosh.

Muddy Children PuzzleA father tells his two children, a boy and a girl, to play in the backyard

without getting dirty. While playing, both children get mud on their

foreheads. After they returned home, the father said: “at least one

of you has a muddy forehead,” and then asked the children to answer

YES or NO to the question: “Do you know if you have a muddy forehead?”

the father asked the question twice. How will the children answer each time?

Page 30: 22C:19 Discrete Math Introduction and Scope Propositions Fall 2011 Sukumar Ghosh.

Wrap up

Understand propositions, logical operators and their usage.

Understand equivalence, tautology, and contradictions.

Practice proving equivalences, tautology, and contradictions.

Study the Muddy Children Puzzle from the book.