Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

in haskell - Assume that the universe of discourse is either the set - u1 ={1,2,3,4,5,6,7,8} or the set u2={5,2,17,58,21}; that is, . the word

in haskell image text in transcribedimage text in transcribed

- Assume that the universe of discourse is either the set - u1 ={1,2,3,4,5,6,7,8} or the set u2={5,2,17,58,21}; that is, . the word "number" temporarily means element of u1 (or u2). u1=[1,.8]u2=[5,2,17,58,21] . Translate each of the statements 1 - 10 below, first, in a comment, to a - logical statement involving forall, exists, and, or, imp, and not, - and then into Haskell code that checks ("brute force") whether - the statement is true in a given universe u. Provide the results for . both u1 and u2. I'll do number 1, with two possible solutions. - You only need to provide one answer for each one. - 1. "Every number that's greater than 2 is greater than 1" - Formula: forall n,(n>2) imp (n>1) prob1 u= and [(n>2)1)n1n>u,n>2] - 2. Every number is either greater than 1 or less than 2 - Formula: prob2 u= undefined - prob2 u1 - prob2 u2 - 3. Every two numbers are comparable with - prob7 u2 . - 8. There are two odd numbers that add up to 6 - Formula: probs u= undefined - prob8 u1 . > - prob8 U2 . - 9. There is a number that is at least as large as every number . (i.e., according to >= ) - Formula: probg u= undefined . prob9 u1 . > - prob9 U2 . . - 10. For every number, there is a different number such that there are no . numbers between these two. - Formula: prob10 u= undefined - prob10 u1 - prob10 u2

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Students also viewed these Databases questions

Question

LO3 Name the seven categories of HR functions.

Answered: 1 week ago