Question: 6. 7. 8. Use quantified predicates to express the following sentences. The sum of two negative integers will always be negative. For each positive

6. 7. 8. Use quantified predicates to express the following sentences. The

6. 7. 8. Use quantified predicates to express the following sentences. The sum of two negative integers will always be negative. For each positive integer, there doesn't exist any negative integer that has the same value as it. For any two integers, there is always another integer equals to their (the first two integers') product. a. b. C. Negate each predicate you created in question 6, then simplify them to remove the negation operators. While simplifying, clarify which logic rule(s) you use in each step. For each sub-question, please answer the following questions. Is state a proper for proposition / predicate e? If no, explain why; if yes, does o satisfy e? a. o = {p = T}, e = (r p) ^ (r p) b. T= = {p = F, q = T}, o = TU {r = F}, e=p^q C. 0 = = {b = 5, i = 0, x = 6}, e = x > b[i] d. o = {x = 5, b = (5,8)}, e = x + 1 = b[0] o = {p = T, b = a}, where a = (2,0, 4), e = p b[b[1]] = 2 JU e. 9. Find all states o (containing only bindings for p, q and r) such that o = p q r. Briefly explain each state you found. 10. Define predicate functions. a. Define predicate function isGreater (b, m, x) which returns True if and only if positive m is not larger than the length of array b, and integer x is greater than each of the first m numbers in b. For example, under state o = : {b = (2, 4, 1, 6)}, isGreater (b, 3, 5) returns True, isGreater (b, 3, 4) returns False. Remind that, you can use size (b) to find the length of array b. b. Define predicate function hasGreater (a, b) which returns True if and only if every integer in array a is greater than some integer in array b. For example, has Greater ((4, 5, 2, 3), (8, 1, 5, 8)) returns True.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Algorithms Questions!