Question: stion 5: a) Consider the function, bin, that converts an integer to a binary digit as: bin : Z-(-1,0,1), bin(x) = x congruence modulo 2.

stion 5: a) Consider the function, bin, that converts an integer to a binary digit as: bin : Z-(-1,0,1), bin(x) = x congruence modulo 2. (C.f Introduction to Discrete Mathematics; Mphaka M. 2019; Example 4.12; pp 216) Now, define the logical NOT function as: NOT: Z - {0,1), NOT(X) 0, if x = 0 1, ifx=0 i) Write CH code for the logical NOT function specified above. ii) Using the function defined in i) above, write in C++ the polymorphic logical exor function: int exor(int x, int y):- it returns xey int exor(int * bits, int N):- it returns the exor of the N binary integers, bits. [(3)+(8)] b) Consider the following narration: If equality of opportunity is to be achieved then those people previously disadvantaged should be given special opportunities. If those people previously disadvantaged should be given special opportunities then some people should receive preferential treatment. If some people receive preferential treatment then equality of 32 - Osteotan tioddbjexto estetightartig May207020Ekafrinations Pageage2-of 2 opportunity is not to be achieved. Some people are not going to receive preferential treatment. Therefore, equality of opportunity is not to be achieved. i) Encode the argument in Propositional Calculus. ii) As a result of i) above, use logical rules of inference to show that the given argument is sound/valid. HINT: For any statement forms, P and Q P-Q = -Q--P. [(3)+(6)]
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
