Question: Question 1 (a) Numbers and sets (0) Compute 42 and 43 modulo 3. From these results, conjecture a property PC) of 4 modulo 3. Prove
Question 1 (a) Numbers and sets (0) Compute 42 and 43 modulo 3. From these results, conjecture a property PC) of 4" modulo 3. Prove by induction that P(n) is satisfied for all ne N [3 marks] (ii) Let sart: {X ENX2 0} + {y Rly 20} be the square root function from non-negative integers to non-negative reals, i.e. sart(x) = y if and only if x = y2 Is sart injective? surjective? bijective? Justify your answers, [3 marks] (ii) Let float javaSqrt(int x) be a Java implementation of this square root function (assume it throws an exception if x is negative). Discuss the differ- ences between sart and javaSqrt when considered as mathematical functions between sets. [4 marks]
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
