Download presentation

Presentation is loading. Please wait.

Published byPolly Short Modified over 2 years ago

1
Discrete Mathematics University of Jazeera College of Information Technology & Design Khulood Ghazal

2
Predicate logic Suppose we have Propositional Logic, with statements like: p is "All people with red hair have fiery tempers“ q is "Joe has red hair“ r is "Joe has a fiery temper", To make a statement about Joe having red hair, and therefore a fiery temper, we can write: P ^ q ⇒ r To make a statement about Brenda having red hair, and therefore a fiery temper, we need further propositions, like this: s is "Brenda has red hair" t is "Brenda has a fiery temper" and so: p ^s ⇒ t Each time we want to make a statement about another person having red hair, and therefore a fiery temper, we need further propositions.

3
A much better way of representing these ideas is to use predicates like this: redHair means "... has red hair“ (redHair is not a proposition.) We can use this predicate to form statements about anyone who has red hair; like this: redHair(Joe) means "Joe has red hair“ is a proposition redHair(Brenda) means "‘Brenda has red hair“ is a proposition... and so on. we can define the predicate fieryTemper means "... has a fiery temper" So "If Joe has red hair, then he has a fiery temper" can be represented by: redHair(Joe) ⇒ fieryTemper(Joe) And "If Brenda has red hair, then she has a fiery temper" by: redHair(Brenda) ⇒ fieryTemper(Brenda) Predicate logic

4
Write each of the following propositions using predicate notation: 1. Jimmy is a friend of mine. friend(Jimmy) 2. Sue is wealthy and clever. wealthy(Sue) ^ clever(Sue) 3.Jane is wealthy but not clever. wealthy(Jane) ^ ¬clever(Jane) 4. Both Mark and Elaine are friends of mine. friend(Mark) ^ friend(Elaine) 5. If Peter is a friend of mine, then he is not boring. friend(Peter) ⇒ ¬ boring(Peter) 6. If Jimmy is wealthy and not boring, then he is a friend of mine. (wealthy(Jimmy) ^ ¬boring(Jimmy)) ⇒ friend(Jimmy) Example: The following predicates are defined: friend "… is a friend of mine" wealthy "… is wealthy“ clever "… is clever" boring "… is boring“

5
A function has the property that it returns a unique value when we know the value(s) of any parameter(s) supplied to it. P (x) is a function since it returns a value which depends upon the value of its parameter, x. P (x) can then be described as a propositional function whose predicate is P. Propositional Functions

6
Define suitable propositional functions for : (a)All of my friends are wealthy. (b) Some of my friends are boring. we will making statements about my friends in general, without referring to a particular individual. So we need to define propositional functions as follows: friend(x) is "x is a friend of mine" wealthy(x) is "x is wealthy" boring(x) is "x is boring" We can re_ write the two statements above as: (a)For all x, friend(x) ⇒ wealthy(x) (b)For some x, friend(x) ^ boring(x) Quantifiers

7
Notation: ∀ and ∃ The symbol ∀ (called the universal quantifier) stands for the phrase "For all …“ The symbol ∃ (called the existential quantifier) stands for the phrase "For some …" So we can write (a) above as: (a) ∀ x, friend(x) ⇒ wealthy(x) Means "For each value of x, if x is a friend of mine, then x is wealthy". So we can write (b) above as: (b) ∃ x, friend(x) ^ boring(x) Means "For at least one value of x, x is a friend of mine and x is boring". Quantifiers

8
(a)Some cats understand French. Re-write in the singular: "At least one cat understands French". So we need to define propositional functions as: cat (x) is "x is a cat" French(x) is "x understands French" So there is at least one x that is a cat and understands French; or, in symbols: ∃ x, cat (x) ^ French(x) (b) At least one lecturer is not boring. This is already in the singular; so: lecturer(x) is "x is a lecturer" boring(x) is "x is boring" So: ∃ x, lecturer(x) ^ ¬ boring(x) Example : Define suitable propositional functions and then express in symbols:

9
(c) I go swimming every sunny day. sunny(x) is "x is a sunny day" swimming(x) is "x is a day when I go swimming" we can re-write it as: "For each day, if it is a sunny day then it is a day when I go swimming" So, in symbols: ∀ x, sunny(x) ⇒ swimming(x) (d) No footballers can sing. we might re-write "No footballers can sing" as "For each x, if x is a footballer, then x cannot sing". In symbols, then, this gives the equally valid solution: ∀ x, footballer(x) ⇒ ¬ sing(x) Re-write in the singular: "It is not true that at least one footballer can sing". So: footballer(x) is "x is a footballer" sing(x) is “ x can sing" In symbols, then: ¬ ( ∃ x, footballer(x) ^ sing(x)) So, x P(x) is the same as x P(x).

10
Using the above predicates, symbolize each of the following: (a) Some of my friends are clever. ∃ x, friend(x) ^ clever(x) (b) All clever people are boring. ∀ x, clever(x) ⇒ boring(x) (c) None of my friends is wealthy. ∀ x, friend(x) ⇒ ¬wealthy(x) OR: ¬( ∃ x, friend(x) ^ wealthy(x)) (d) Some of my wealthy friends are clever. ∃ x, friend(x) ^ wealthy(x) ^ clever(x) (e) All my clever friends are boring. ∀ x, (clever(x) ^ friend(x)) ⇒ boring(x) (f) All clever people are either boring or wealthy. ∀ x, clever(x) ⇒ (boring(x) ∨ wealthy(x)) Example :The following predicates are defined : friend "… is a friend of mine" wealthy "… is wealthy" clever "… is clever" boring "… is boring“

Similar presentations

Presentation is loading. Please wait....

OK

CS 285- Discrete Mathematics

CS 285- Discrete Mathematics

© 2017 SlidePlayer.com Inc.

All rights reserved.

Ads by Google

Ppt on job rotation examples Ppt on forest society and colonialism Ppt on society and culture Ppt on email etiquettes presentation Ppt on french revolution download Ppt on circles for class 9 Ppt on diodes Ppt on weapons of mass destruction found Ppt on index numbers and time Ppt on body language training