a) Describe the algorithm which in 6 comparisons correctly findsmedian (the third) out of five unequal numbers (rocks) A1, A2, A3,A4, A5

b) Describe the algorithm which in 3 comparisons with leverscales finds among 12 coins a single false coin (which is differentfrom standard in weight) and also finds if the false coin islighter or heavier than a standard

c) Given two numbers X and Y in the computer memory.Exchange/swap these two units of memory, i.e., get Y and X withoutusing any extra memory. (e.g. you can use X = X + Y, but you cannotuse Z = X since Z is forbidden)