Presentation is loading. Please wait.

Presentation is loading. Please wait.

Week 2 - Wednesday.  What did we talk about last time?  Arguments  Digital logic circuits  Predicate logic  Universal quantifier  Existential quantifier.

Similar presentations


Presentation on theme: "Week 2 - Wednesday.  What did we talk about last time?  Arguments  Digital logic circuits  Predicate logic  Universal quantifier  Existential quantifier."— Presentation transcript:

1 Week 2 - Wednesday

2  What did we talk about last time?  Arguments  Digital logic circuits  Predicate logic  Universal quantifier  Existential quantifier

3

4  Four men are standing in front of a firing- squad  #1 and #3 are wearing black hats  #2 and #4 are wearing white hats  They are all facing the same direction with a wall between #3 and #4  Thus,  #1 sees #2 and #3  #2 sees #3  #3 and #4 see no one  The men are told that two white hats and two black hats are being worn  The men can go if one man says what color hat he's wearing  No talking is allowed, with the exception of a man announcing what color hat he's wearing.  Are they set free? If so, how? 1 3 2 4

5

6  The following gates have the same function as the logical operators with the same names:  NOT gate:  AND gate:  OR gate:

7  Build an OR circuit using only AND and NOT gates  Build a bidirectional implication circuit using AND, OR, and NOT gates

8

9  The universal quantifier  means “for all”  The statement “All DJ’s are mad ill” can be written more formally as:   x  D, M(x)  Where D is the set of DJ’s and M(x) denotes that x is mad ill  Notation:  P(x)  Q(x) means, for predicates P(x) and Q(x) with domain D:   x  D, P(x)  Q(x)

10  The universal quantifier  means “there exists”  The statement “Some emcee can bust a rhyme” can be written more formally as:   y  E, B(y)  Where E is the set of emcees and B(y) denotes that y can bust a rhyme

11  Consider the following:  S(x) means that x is a square  R(x) means that x is a rectangle  H(x) means that x is a rhombus  P is the set of all polygons  Which of the following is true:   x  P, S(x)  R(x)   x  P, R(x)  S(x)   x  P, R(x)  H(x)  S(x)   x  P, R(x)  ~S(x)   x  P, ~R(x)  H(x)   x  P, R(x)  ~S(x)   x  P, ~H(x)  S(x)

12  Convert the following statements in English into quantified statements of predicate logic  Every son is a descendant  Every person is a son or a daughter  There is someone who is not a descendant  Every parent is a son or a daughter  There is a descendant who is not a son

13  Tarski’s World provides an easy framework for testing knowledge of quantifiers  The following notation is used:  Triangle(x) means “x is a triangle”  Blue(y) means “y is blue”  RightOf(x, y) means “x is to the right of y (but not necessarily on the same row)”

14  Are the following statements true or false?   t, Triangle(t)  Blue(t)   x, Blue(x)  Triangle(x)   y such that Square(y)  RightOf(d, y)   z such that Square(z)  Gray(z) a a c c g g b b d d f f i i k k e e h h j j

15 Student Lecture

16  When doing a negation, negate the predicate and change the universal quantifier to existential or vice versa  Formally:  ~(  x, P(x))   x, ~P(x)  ~(  x, P(x))   x, ~P(x)  Thus, the negation of "Every dragon breathes fire" is "There is one dragon that does not breathe fire"

17  Argue the following:  "Every unicorn has five legs"  First, let's write the statement formally  Let U(x) be "x is a unicorn"  Let F(x) be "x has five legs"   x, U(x)  F(x)  Its negation is  x, ~(U(x)  F(x))  We can rewrite this as  x, U(x)  ~F(x)  Informally, this is "There is a unicorn which does not have five legs"  Clearly, this is false  If the negation is false, the statement must be true

18  The previous slide gives an example of a statement which is vacuously true  When we talk about "all things" and there's nothing there, we can say anything we want

19  Recall:  Statement: p  q  Contrapositive:~q  ~p  Converse:q  p  Inverse:~p  ~q  These can be extended to universal statements:  Statement:  x, P(x)  Q(x)  Contrapositive:  x, ~Q(x)  ~P(x)  Converse:  x, Q(x)  P(x)  Inverse:  x, ~P(x)  ~Q(x)  Similar properties relating a statement equating a statement to its contrapositive (but not to its converse and inverse) apply

20  The ideas of necessary and sufficient are meaningful for universally quantified statements as well:   x, P(x) is a sufficient condition for Q(x) means  x, P(x)  Q(x)   x, P(x) is a necessary condition for Q(x) means  x, Q(x)  P(x)

21

22  So far, we have not had too much trouble converting informal statements of predicate logic into formal statements and vice versa  Many statements with multiple quantifiers in formal statements can be ambiguous in English  Example:  “There is a person supervising every detail of the production process.”

23  “There is a person supervising every detail of the production process.”  What are the two ways that this could be written formally?  Let D be the set of all details of the production process  Let P be the set of all people  Let S(x,y) mean “x supervises y”   x  D,  y  P such that S(x,y)   y  P,  x  D such that S(x,y)

24  Intuitively, we imagine that corresponding “actions” happen in the same order as the quantifiers  The action for  x  A is something like, “pick any x from A you want”  Since a “for all” must work on everything, it doesn’t matter which you pick  The action for  y  B is something like, “find some y from B”  Since a “there exists” only needs one to work, you should try to find the one that matches

25  Is the following statement true?  “For all blue items x, there is a green item y with the same shape.”  Write the statement formally.  Reverse the order of the quantifiers. Does its truth value change? a a c c g g b b d d f f i i k k e e h h j j

26  Given the formal statements with multiple quantifiers for each of the following:  There is someone for everyone.  All roads lead to some city.  Someone in this class is smarter than everyone else.  There is no largest prime number.

27  The rules don’t change  Simply switch every  to  and every  to   Then negate the predicate  Write the following formally:  “Every rose has a thorn”  Now, negate the formal version  Convert the formal version back to informal

28  As show before, changing the order of quantifiers can change the truth of the whole statement  However, it does not necessarily  Furthermore, quantifiers of the same type are commutative:  You can reorder a sequence of  quantifiers however you want  The same goes for   Once they start overlapping, however, you can’t be sure anymore

29

30

31  Arguments with quantifiers

32  Keep reading Chapter 2  Assignment 1 is due Friday at midnight


Download ppt "Week 2 - Wednesday.  What did we talk about last time?  Arguments  Digital logic circuits  Predicate logic  Universal quantifier  Existential quantifier."

Similar presentations


Ads by Google