Successfully reported this slideshow.
Upcoming SlideShare
Loading in …5
×

# Course notes2summer2012

313 views

Published on

Published in: Technology, News & Politics
• Full Name
Comment goes here.

Are you sure you want to Yes No
Your message goes here
• Be the first to comment

• Be the first to like this

### Course notes2summer2012

1. 1. QUANTIFICATION THEORYDefinition: (Open Proposition or Propositional Function)An open proposition is a declarative sentence which1. contains one or more variables2. is not a proposition, and3. produces a proposition when each of its variables is replaced by a specific object from adesignated set.The set of objects which the variables in an open proposition can represent is the UNIVERSE OFDISCOURSE of the open proposition. To be precise it is necessary to establish the universe explicitly butfrequently the universe is left implicit.examples of open propositions1. the number x + 1 is an even integer.2. 2x + y = 5 ∧ x - 3y = 83. x12+ x22+ x32= 144. x is a rational number.5. y > 5 .6. x + y = 57. x climbed Mount Everest.8. He is a lawyer and she is a scientist.Something to think about:Implicitly, the universe of discourse for open propositions 1, 2, 3, 4, 5, and 6 is the set of integers. Whatabout propositions 7 and 8?FUNCTIONAL NOTATIONS( The above propositional functions can be denoted using capital letters and literal variables )Example:1. P( x ) can denote “x is a rational number”2. Q( x, y ) can denote x+y=53. R( X1, X2, X3 ) can denote “x12+ x22+ x32= 14”BINDING A VARIABLETo change an open proposition (propositional function) into a proposition, each individual variablemust be bound. This can be done in two ways:a)By assigning values:ex. 1) P ( 1 ) is trueWhen x = 1, the number x + 1 is an even integer.2) Q ( 2, 1 ) is falseWhen x=2 and y=1, ( 2x + y = 5 ∧ x - 3y = 8 )3) R ( 1, 2, 3 ) is trueWhen X1 = 1, X2 = 2 and X3 = 3, X12+ X22+ X32= 14B)By Quantification1. Universal QuantificationNotation: ∀x P( x ) read as “For all x, P( x )”
2. 2. For an open sentence P(x) with variable x, the sentence ∀x P( x ) is read “for all x, P(x)”and is true precisely when the truth set for P(x) is the entire universe. The symbol ∀ is called theuniversal quantifier.similar forms:For all x, All x such thatFor every x, Every x such thatFor each x, Each x such thatex:1) Let P( x ) denote X2≥ 4consider U = Rset of real nos.universe of discourse∀x P( x ) is falseFor all real numbers x, It is false that x2≥ 42) P( x ) : x2> 0U = Z+set of positive integers∀x P( x ) is trueFor all positive integers x , x2> 0 is true2. Existential QuantificationNotation : ∃x P( x ) read as “there exist an x such that P(x)”The sentence ∃x P( x ) is read “there exist an x such that P( x )” and is true preciselywhen the truth set for P(x) is nonempty. The symbol ∃ is called the existential quantifiersimilar forms:There exist an x such that…There is an x such that…For some x …There is at least one x such that…Some x is such that …ex: Let P( x ) denote x + 75 = 80U = Z+set of positive integers∃x P( x ) is true“There exist a positive integer x such that x+75=80” is trueDETERMINING THE TRUTH VALUE OF QUANTIFIED PROPOSITIONSSTATEMENT WHEN IS IT TRUE? WHEN IS IT FALSE?∃x P( x ) if there is at least one c ∈ U For all c ∈ Usuch that P( x ) is satisfied P(c) is false∀x P( x ) If all elements of U If there is at least one c ∈ Usatisfies P( x ) such that P( x ) is falseQuantified Propositions with 2 variables
3. 3. In general, if P(x,y) is any predicate involving the two variables x and y, then the followingpossibilities exist:(∀x)(∀y)P(x,y) (∀x)(∃y)P(x,y)(∃x)(∀y)P(x,y) (∃x)(∃y)P(x,y)(∀y)(∀x)P(x,y) (∃y)(∀x)P(x,y)(∀y)(∃x)P(x,y) (∃y)(∃x)P(x,y)If a sentence involves both the universal and the existential quantifiers, one must be careful aboutthe order in which they are written. One always works from left to right.For instance, consider the two sentences concerning real numbers:1. (∀x)(∃y)[x+y=5]2. (∃y)(∀x)[x+y=5]Statement 1 is true. Why?Statement 2 is false. Why?Question:Consider (∀x)(∀y)[x∈R ∧ y∈R ⇒ xy ∈ R]a. What does it mean?(R=set of real numbers)b. What is its truth value?Exercises:A. Determine the truth values:let U = { 1,2,3... } = Z+(set of positive integers)1) ∀x ( x is a prime ⇒ x is odd )Ans: false ( 2 is prime but not odd )2) ∀x ∀y ( x is odd ∧ y is odd ) ⇒ x ∗ y is oddAns: true3) ∃w ( 2w + 1 = 5 )Ans: true4) ∃x ( 2x + 1 = 5 ∧ x 2= 9 )Ans: falseB. Determine the truth value of the following sentences where the universe is the set of integers1. ∀x,[x2-2 ≥ 0]2. ∀x,[x2-10x+21 = 0]3. ∃x,[x2-10x+21 = 0]4. ∀x,[x2-x-1 ≠ 0]5. ∃x,[x2-3 = 0]6. ∃x,[(x2>10) ∧ (x is even)]4 TYPES OF QUANTIFIED PROPOSITIONS• let : H(x) denote x is human• M(x) - x is mortal1. Universal Affirmativeex: All humans are mortal. ∀x ( H(x) ⇒ M(x) )2. Universal Negativeex: No human is mortal. ∀x ( H(x) ⇒ ¬M(x) )3. Existential Affirmativeex: Some humans are mortal. ∃x ( H(x) ∧ M(x) )4. Existential Negativeex: Some humans are not mortal. ∃x( H(x) ∧ ¬M(x))
4. 4. Examples and Exercises:Translate each of the following statements into symbols, using quantifiers, variables, and predicatesymbols.1. All members are either parents or teachers.Ans: ∀x [ M(x) ⇒ ( P(x) ∨ T(x) ) ]2. Some politicians are either disloyal or misguided.Ans: ∃x [ P(x) ∧ ( D(x) ∨ M(x) ) ]3. All birds can fly4. Not all birds can fly5. All babies are illogical6. Some babies are illogical7. If Joseph is a man, then Joseph is a giant8. There is a student who likes mathematics but not historyQUANTIFICATION RULES( Rules of Inference):1. Universal Instantiation or Universal Specification∀x P( x )__∴P( c ) * c is an arbitrary element of Uexample : universe of discourse,U = set of humans∀x P( x ) : All humans are mortalsP( c ) : Ronald is mortal.2. Existential Instantiation or Existential Specification∃x P( x )__∴P( c ) *where c is some element of U3. Universal Generalization ( UG )P ( c )____∴∀x P( x )4. Existential Generalization ( EG )P( c )____∴∃x P( x )Construct a proof of validity:1. No mortals are perfect.All humans are mortals.Therefore, no humans are perfect.1) ∀x ( M(x) ⇒ ¬P(x) )2) ∀x ( H(x) ⇒ M(x) )____∴ ∀x ( H(x) ⇒ ¬P(x) )3) M(c) ⇒ ¬P(c) Universal Instantiation ( 1 )4) H(c) ⇒ M(c) Universal Instantiation ( 2 )5) H(c) ⇒ ¬P(c) Hypothetical Syllogism ( 4 )( 3 )6) ∀x ( H(x) ⇒ ¬P(x) ) Universal Generalization ( 5 )2. Tigers are fierce and dangerous.Some tigers are beautiful.Therefore, some dangerous things are beautiful.1) ∀x [ T(x) ⇒ ( F(x) ∧ D(x) ) ]2) ∃x [ T(x) ∧ B(x) ]____∴∃x ( D(x) ∧ B(x))3) T(c) ∧ B(c) Existential Instantiation ( 2 )4) T(c) ⇒ ( F(c) ∧ D(c) ) Universal Instantiation ( 1 )
5. 5. 5) T(c) Simplification ( 3 )6) F(c) ∧ D(c) Modus Ponens ( 4 )( 5 )7) D(c) Simplification ( 6 )8) B(c) Simplification ( 3 )9) D(c) ∧ B(c) Conjunction ( 7 )( 8 )10) ∃x [ D(x) ∧ B(x)] Existential Generalization ( 9 )3. Some cats are animals.Some dogs are animals.Therefore, some cats are dogs.Find the mistake in the given proof.1) ∃x ( C(x) ∧ A(x) ) [ans: error at line 4, we should not use w to instantiate set D.]2) ∃x( D(x) ∧ A(x) ) [ w is a cat as used in line 3]∴∃x( C(x) ∧ D(x) )3) C(w) ∧ A(w) Existential Instantiation ( 1 )4 ) D(w) ∧ A(w) Existential Instantiation ( 2 )5) C(w) Simplification ( 3 )6) D(w) Simplification ( 4 )7) C(w) ∧ D(w) Conjunction ( 5 )( 6 )8) ∃x ( C(x) ∧ D(x) ) Existential Generalization ( 7 )4. Required: Proof of validityMathematicians are neither prophets nor wizardsHence, if Einstein is a mathematician, he is not a prophet.1) ∀x [ M(x) ⇒ ¬( P(x) ∨ W(x) ) ]∴M(e) ⇒ ¬P(e)2) M(e) Rule of Conditional Proof∴¬P(e)3) M(e) ⇒ ¬( P(e) ∨ W(e) ) Universal Instantiation ( 1 )4) ¬( P(e) ∨ W(e) ) Modus Ponens ( 2 )( 3 )5) ¬P(e) ∧ ¬W(e) de Morgan’s law ( 4 )6) ¬P(e) Simplification ( 5 )QUANTIFICATION NEGATION ( use ≡ instead of ⇔ in the ff )1. ¬∃xA(x) ⇔ ∀x ¬( A(x) )2. ¬∀xA(x) ⇔ ∃x ¬( A(x) )3. ¬∃x ( A(x) ∧ B(x) ) ⇔ ∀x ( A(x) ⇒ ¬B(x) )4. ¬∀x ( A(x) ⇒ B(x) ) ⇔ ∃x ( A(x) ∧ ¬B(x) )State the negation of the following :1. All officers are fighters.∀x ( O(x) ⇒ F(x) )negation: ¬∀x ( O(x) ⇒ F(x) ) ⇔ ∃x [ O(x) ∧ ¬F(x) ]Some officers are not fighters.2. Some members are fighters.∃x [ M(x) ∧ F(x) ]negation: ¬∃x [ M(x) ∧ F(x) ] ⇔ ∀x [ M(x) ⇒ ¬F(x) ]All members are not fighter or No members are fighters.Symbolizing RelationsThe following expresses relations between two individuals:1. Plato was a student of Socrates.2. Baguio is north of Manila.
6. 6. 3. Chicago is smaller than New York.These are called “BINARY” or “ DYADIC” relationsLet A( x, y ) : x attracts y then1) b attracts everything ∀x A( b, x )2 ) b attracts something ∃x A( b, x )3) everything attracts b ∀x A( x, b )4) something attracts b ∃x A( x, b )5) everything attracts everything ∀x∀y( x, y )example: Helen likes DavidWhoever likes David likes TomHelen likes only good looking menTherefore, Tom is a good looking manlet : h = Helen; d = David; t = TomG(x) = x is a good looking manL( x, y ) : x likes y1) L( h, d )2) ∀x [ L( x, d ) ⇒ L( x, t ) ]3) ∀x[ L( h, x ) ⇒ G(x) ]∴G(t)4) L( h, d ) ⇒ L( h, t ) Universal Instantiation( 2 )5) L( h, t ) Modus Ponens( 1 )( 4 )6) L( h, t ) ⇒ G(t) Universal Instantiation ( 3 )7) G(t) Modus Ponens( 5 )( 6 )“There is a man whom all men despise.Therefore, at least one man despises himself.”Let D( x, y ) : x despises yM(x) : x is a man1) ∃x [ M(x) ∧ ∀y ( M(y) ⇒ D( y, x ) ]∴∃x [ M(x) ∧ D( x, x ) ]2) M(c) ∧ ∀y [ M(y) ⇒ D( y, c ) ] Existential Instantiation ( 1 )3) M(c) ∧ [ M(c) ⇒ D( c, c ) ] Universal Instantiation ( 2 )4) M(c) ⇒ D( c, c ) Simplification ( 3 )8) ∃x [ M(x) ∧ D( x, x ) ] Existential Generalization ( )Transcribe the following assertions into logical notationsLet P(x,y,z) denote x - y = z1. For every x and y, there are some z such that x-z=y∀x ∀y [ ∃zP( x, z, y ) ]2. There is an x such that for all y, y - x = y∃x [ ∀y P( y, x, y ) ]
7. 7. Quantification Negationa) For all x [ x is prime implies (x2+ 1) is even ]∀x ( x is prime ⇒ x2+ 1 is even )negation:≡ ¬∀x ( x is prime ⇒ x2+ 1 is even )≡ ∃x ( x is prime ∧ x2+ 1 is not even )“There exists an x such that x is prime and x2+1 is odd”b) There exists an x ( x is rational ∧ x2= 3 )∃x ( x is rational ∧ x2= 3 )negation:≡ ¬∃x ( x is rational ∧ x2= 3 )≡ ∀x ( x is rational ⇒ x2< > 3 )“ For all x, x is rational and 2x is not equal to three”c)There exist an x such that for all y ( xy = y )∃x [ ∀y ( xy = y ) ]negation:≡ ¬∃x [ ∀y ( xy = y ) ]≡ ∀x [ ∃y ( xy < > y ) ]“For all x , there exists a y such that xy is not equal to y .”A Peek at PROLOGü The following are statements in Prolog. The statements describe a pile of colored blocks.isabove(g,b1)isabove(b1,w1)isabove(w2,b2)color(g,gray)color(b1,blue)color(b2,blue)color(b3,blue)color(w1,white)color(w2,white)isabove(X,Z) if isabove(X,Y) and isabove(Y,Z)ü The following are statements in Prolog. The statements ask questions about the piled blocks?color(b1,blue)?isabove(X,w1