Description

(Randomized algorithms) Write a program to “discover” trigonometric identities. Your program should test all combinations of the trigonometric expressions shown below and use a randomized algorithm to
detect the equalities. For your equality testing, generate random numbers in the to range.
(a) sin(t)
(b) cos(t)
(c) tan(t)
(d) sec(t)
(e) sin(t)
(f) cos(t)
(g) tan(t)
(h) sin( t)
(i) cos( t)
(j) tan( t)
_{(k)} sin(t)
cos(t)
(l) 2 sin(t=2) cos(t=2)
(m) sin^{2}(t)
(n) 1 cos^{2}(t)
_{(o)} 1 cos(2t)
2


^{1}

cos(t)

(Backtracking) The partition problem consists of determining if there is a way to partition a set of integers

if S_{1} [S_{2} = S and S_{1} \S_{2} = fg. Write a^{P}
P
S into two subsets S_{1} and S_{2} such that S_{1} =
S_{2}. Recall that S_{1} and S_{2} are a partition of S if and only
function that solves the partition problem using backtracking. If a partition exists, your program should display it; otherwise it should indicate that no partition exists. For example, if S = f2; 4; 5; 9; 12g, your program should output the partition S_{1} = f2; 5; 9g and S_{2} = f4; 12g and if S = f2; 4; 5; 9; 13g your program should indicate that no partition exists.
Given the little time available, a demo will not be required, thus it is very important that your report accurately describes your work.
1