6. 7. 8. Use quantified predicates to express the following sentences. The sum of two negative...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
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. 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.
Expert Answer:
Related Book For
Posted Date:
Students also viewed these algorithms questions
-
CANMNMM January of this year. (a) Each item will be held in a record. Describe all the data structures that must refer to these records to implement the required functionality. Describe all the...
-
Let A, B be sets. Define: (a) the Cartesian product (A B) (b) the set of relations R between A and B (c) the identity relation A on the set A [3 marks] Suppose S, T are relations between A and B, and...
-
One type of systematic error arises because people tend to think of benefits in percentage terms rather than in absolute dollar amounts. As an example, Samir is willing to drive 20 minutes out of his...
-
Pacific Hotels Inc., a large hotel chain, had Retained Earnings of $250.0 million at the beginning of 2017. The company showed these figures at December 31, 2017: ($ millions) Net income $75.0 Cash...
-
In a products liability case, can it be demonstrated and proven that a warning label on the perfume bottle should have been there to prevent a fire? Explain your answer. Is this a manufacturing...
-
A petrol engine with a stroke length of \(200 \mathrm{~mm}\) and diameter of \(150 \mathrm{~mm}\) has a clearance volume of \(5 \times 10^{3} \mathrm{~mm}^{3}\). The indicated thermal efficiency of...
-
Wallis Company manufactures only one product and uses a standard cost system. The company uses a predetermined plant wide overhead rate that relies on direct labor-hours as the allocation base. All...
-
3) Determine the magnitude of the moment of the force F about a) the x-axis, b) the y-axis, and c) the z-axes. 3 ft 4 ft 2 ft C B F= {41+ 12j3k}lb
-
The trial balance of Pacilio Security Services Inc. as of January 1, 2017, had the following normal balances: Cash ................. 78 , 972 P e t t y C a s h . . . . . . . . . . . . . . . . 100 A c...
-
For the three taxation years ending December 31, 2019, 2020, and 2021 assume that Bronson James had the following actual and estimated amounts of federal and provincial Tax Payable withheld by his...
-
How can acting unprofessionally in a business social situation (for example the annual company picnic or holiday party) hurt your career? Share some examples of inappropriate behavior at business...
-
1:Explain your understanding of why it is important to be persuasive in negotiation and how you would go about being persuasive in a negotiation. 2: Research a conflict or dispute that has occurred...
-
One of your staff members has been asked to give two speeches. Details are as follows: first speech - large target audience; objective: to inform them of company progress over the past year; and ...
-
1. What could be the reasons for the price increase in offline retail stores? 2. From the information given in the case, can one conclude that there was a differential price response from the online...
-
What is one way that Netflix has changed the film/television industry? Can social media (Facebook, Twitter, Instagram, etc.) affect what movie/TV/song we might watch or listen to? Why or why not?...
-
Anzelmo Corporation invested in Jones Manufacturing by purchasing a 10% interest in the company. Anzelmo had no significant influence in Jones. Over time, Anzelmo acquired more shares inJones, and in...
-
"Standard-cost procedures are particularly applicable to process-costing situations." Do you agree? Why?
-
Check to see whether each number written in standard form matches the number written in words. If not, correct the number in words. See the Concept Check in this section. 1. 2. If a number is written...
-
The bar graph shows the top five chocolate-consuming nations in the world. Use this table to answer below Exercises. 1. Which country in the table has the least chocolate consumption per person? 2....
-
The graph below is called a double line graph (or a double broken-line graph.) Use this graph for below Exercises. 1. Overall, is the number of BEVs sold in the United States increasing or...
-
Consider the flow of a perfect gas along a Fanno line. Show that the pressure at the * reference state is given by the relation 1/2 m 2RT, P Ayge(y+1)
-
Air flows in an 8-cm-inside diameter pipe that is \(4 \mathrm{~m}\) long. The air enters with a Mach number of 0.45 and a temperature of \(300 \mathrm{~K}\). (a) What friction factor would cause...
-
Air enters a duct with a mass flow rate of \(35 \mathrm{lbm} / \mathrm{sec}\) at \(T_{1}=520^{\circ} \mathrm{R}\) and \(p_{1}=20 \mathrm{psia}\). The duct is square and has an area of \(0.64...
Study smarter with the SolutionInn App