1. Define an algorithm. Explain its characteristics.
2. With the help of the flowchart explain the various steps of algorithm design and analysis process 3. Briefly discuss the algorithm specification. 4. Write an algorithm to compute GCD of a given two numbers (Euclid’s Algorithm) 5. Write down an algorithm to search for a key in a given array, using linear search. Find its best, worst, and average case efficiencies. 6. Discuss the general plan for analyzing the efficiency of non-recursive algorithms. 7. Define the commonly encountered asymptotic notations and illustrate them with figures. 8. Prove the theorem of asymptotic notations: If t1(n)Є O(g1(n)) and t2(n)Є O(g2(n)) then prove the following assertion t1(n) + t1(n) Є O(max(g1(n)), (g1(n))) 9. Write an algorithm to compute n! iteratively. Set up a sum expression for the algorithm’s basic operation and solve it. 10. Find the time efficiency for computing the product of n x n matrices with an algorithm. 11. Develop an algorithm to determine the minimum and maximum values in an array of integers. Determine the worst-case complexity. 12. Suggest an algorithm to find whether the elements in an array are distinct. Analyze its efficiency. 13. Develop an Algorithm to find the number of binary digits to represent a given integer number. Find Algorithms basic operation and determine the best-case and worst-case scenario.
14. Consider the following algorithm.
ALGORITHM Mystery(n) //Input: A nonnegative integer n S ←0 for i ←1 to n do S ←S + i ∗ i return S
a. What does this algorithm compute?
b. What is its basic operation?
c. How many times is the basic operation executed?
d. What is the efficiency class of this algorithm?