S Such That (X, Y) and (Y, X) Are Treated As Same and - A - B - Is The Absolute
S Such That (X, Y) and (Y, X) Are Treated As Same and - A - B - Is The Absolute
(6) Given ‘n’ circles, C1, C2, …, Cn with radii R1, R2,…, Rn
respectively ( Ri ≥ =1 ∀ i ). All circles can have any point as the
center. Without calculating the areas of the given circles, write
an algorithm to arrange the circles in increasing order of their
areas and compute the running time of your algorithm.
(7) Let S= { A1, A2, …, An } be a finite set , where each ‘Ai’ is a set
with ‘ n’ integers . Write an algorithm to compute the
intersection of all elements in S i.e., A1∩A2∩A3…∩An and
compute the running time of your algorithm.
(9)
A sequence an is defined as follows :
1
1+
1 1
1+ 1+
1 1 1
1+ 1+ 1+
1 1 1 1
1+ 1+ 1+ 1+
a1 = 1 , a2 = 2 a
, 3 = 3 , a4 = 4 ….
Design a recursive algorithm to calculate an and write a C language code for your algorithm.