Question: 5. You are given a magic robot. You feed it apples and it transforms them into gems! When you feed the robot n apples, to

5. You are given a magic robot. You feed it apples and it transforms them into gems! When you feed the robot n apples, to digest them it follows the following simple transformation rules: (i) If n = 1, 2, 3, 4, 5, 6 then the robot returns n gems. (ii) if n%3 = 0, then the robot replaces n apples with apples and returns to (i). (iii) if n%3 = 1, then the robot swallows 5 apples and returns to (i). (iv) If n%3 = 2, then the robot adds 12 apples to the apples which are already inside the robot (it is a magic robot, so everything is possible!) and returns to (i). Suppose you have as many apples as you need. In each of the problems below, you are allowed to give the robot apples only once. (a) Use the contrapositive to prove the claim if this robot gives you 2 gems transforming n apples, then n is not a power of 3." [3 marks] (b) Disprove the claim "It is not possible to make this robot run forever" by finding a coun- terexample. [3 marks] (c) Prove by construction the claim There is some number of apples such that the robot will give you exactly 4 gems after transformation." [3 marks] (d) Prove the claim The only way to get 1 gem is to feed the robot 1 apple (Hint: it is AB proof.) [3 marks) A number n is a power of 3 if there is some non-negative integer k Z such that n= 3k
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
