Presentation is loading. Please wait.

Presentation is loading. Please wait.

Xuan Guo xguo9@student.gsu.edu Lab 3 Xuan Guo xguo9@student.gsu.edu.

Similar presentations


Presentation on theme: "Xuan Guo xguo9@student.gsu.edu Lab 3 Xuan Guo xguo9@student.gsu.edu."— Presentation transcript:

1 Xuan Guo xguo9@student.gsu.edu
Lab 3 Xuan Guo

2 Content translate English statement into logical expression using predicates, quantifiers. section 1.4, exercise 25, 41 translate English statement into logical expression using nested quantifiers. section 1.4, exercise 9 Section 1.5, exercise 13

3 Exercise 25 Translate each of these statements into logical expressions using predicates, quantifiers, and logical connectives. a) No one is perfect. b)Not everyone is perfect. c) All your friends are perfect. d)At least one of your friends is perfect. e) Everyone is your friend and is perfect. f) Not everybody is your friend or someone is not perfect. (Let P(x) be “x is perfect”; let F(x)be “x is your friend”; and let the domain be all people. )

4 Solution for exercise 25 a) No one is perfect.
(Let P(x) be “x is perfect”; let F(x)be “x is your friend”; and let the domain be all people. ) a)∀x¬P(x)

5 Solution for exercise 25 b)Not everyone is perfect.
(Let P(x) be “x is perfect”; let F(x)be “x is your friend”; and let the domain be all people. ) b)¬∀x P(x)

6 Solution for exercise 25 c) All your friends are perfect.
(Let P(x) be “x is perfect”; let F(x)be “x is your friend”; and let the domain be all people. ) c)∀x(F(x)→P(x))

7 Solution for exercise 25 d)At least one of your friends is perfect.
(Let P(x) be “x is perfect”; let F(x)be “x is your friend”; and let the domain be all people. ) d)∃x(F(x)∧P(x))

8 Solution for exercise 25 e) Everyone is your friend and is perfect.
(Let P(x) be “x is perfect”; let F(x)be “x is your friend”; and let the domain be all people. ) e)∀x(F(x)∧P(x))or(∀x F(x))∧(∀x P(x))

9 Solution for exercise 25 f) Not everybody is your friend or someone is not perfect. (Let P(x) be “x is perfect”; let F(x)be “x is your friend”; and let the domain be all people. ) f)(¬∀x F(x))∨(∃x¬P(x))

10 Exercise 41 Express each of these system specifications using predicates, quantifiers, and logical connectives. a) At least one mail message, among the nonempty set of messages, can be saved if there is a disk with more than 10 kilobytes of free space. b)Whenever there is an active alert, all queued messages are transmitted. c) The diagnostic monitor tracks the status of all systems except the main console.

11 Solution for exercise 41 a) At least one mail message, among the nonempty set of messages, can be saved if there is a disk with more than 10 kilobytes of free space. F(x, y)is “Disk x has more than y kilobytes of free space,” and S(x) is “Mail message x can be saved” a)(∃x F(x,10)) →∃z S(z),

12 Solution for exercise 41 b)Whenever there is an active alert, all queued messages are transmitted. A(x) is “Alert x is active,” Q(x) is “Message x is queued,” and T(x)is “Message x is transmitted” b)(∃x A(x))→∀y(Q(y)→T(y)),

13 Solution for exercise 41 c) The diagnostic monitor tracks the status of all systems except the main console. T(x) is “The diagnostic monitor tracks the status of system x” c)∀x((x =main console)→T(x)),

14 Exercise 9 Let P(x) be the statement “x can speak Russian” and let Q(x) be the statement “x knows the computer language C++.” Express each of these sentences in terms of P(x), Q(x), quantifiers, and logical connectives. The domain for quantifiers consists of all students at your school. a) There is a student at your school who can speak Russian and who knows C++. b)There is a student at your school who can speak Russian but who doesn’t know C++. c) Every student at your school either can speak Russian or knows C++. d)No student at your school can speak Russian or knows C++.

15 Solutions for exercise 9
a)∃x(P(x)∧Q(x)) b)∃x(P(x)∧¬Q(x)) c)∀x(P(x)∨Q(x)) d)∀x¬(P(x)∨Q(x))

16 Let M(x, y)be “x has sent y an message” and T (x, y)be “x has telephoned y,” where the domain consists of all students in your class. Use quantifiers to express each of these statements. (Assume that all messages that were sent are received, which is not the way things often work.) g) There is a student in your class who has sent everyone else in your class an message. h) There is someone in your class who has either sent an message or telephoned everyone else in your class. m)There are at least two students in your class such that one student has sent the other and the second student has telephoned the first student. n) There are two different students in your class who between them have sent an message to or telephoned everyone else in the class.

17 Solution for exercise 13 g) There is a student in your class who has sent everyone else in your class an message. M(x, y) is “x has sent y an message” and T (x, y) is “x has telephoned y,” g)∃x∀y(y =x→M(x, y))

18 Solution for exercise 13 h) There is someone in your class who has either sent an message or telephoned everyone else in your class. M(x, y) is “x has sent y an message” and T (x, y) is “x has telephoned y,” h)∃x∀y(y =x →(M(x, y)∨T (x, y)))

19 Solution for exercise 13 m)There are at least two students in your class such that one student has sent the other and the second student has telephoned the first student. M(x, y) is “x has sent y an message” and T (x, y) is “x has telephoned y,” m)∃x∃y(x =y∧M(x, y)∧T (y, x))

20 Solution for exercise 13 n) There are two different students in your class who between them have sent an message to or telephoned everyone else in the class. M(x, y) is “x has sent y an message” and T (x, y) is “x has telephoned y,” n)∃x∃y(x =y∧ ∀z((z =x∧z =y)→(M (x, z) ∨M(y,z)∨T(x,z)∨ T (y, z))))


Download ppt "Xuan Guo xguo9@student.gsu.edu Lab 3 Xuan Guo xguo9@student.gsu.edu."

Similar presentations


Ads by Google