QQ1. This assignment has four questions (80 Marks). Answer all questions. The remaining 20 marks are for viva voce. You may use illustrations and diagrams to enhance the explanations. Please go through the guidelines regarding assignments given in the Programme guide for the presentation format.
- a) Design and develop an efficient algorithm to find the list of prime numbers in the range 501 to 2000. What is the complexity of this algorithm? (137 words)
- b) Differentiate between Cubic-time and Factorial-time algorithms. Give example of one algorithm each for these two running times. (137 words)
- c) Write an algorithm to multiply two square matrices of order n*n. Also explain the time complexity of this algorithm. (137 words)
- d) What are asymptotic bounds for analysis of efficiency of algorithms? Why are asymptotic bounds used? What are their shortcomings? Explain the Big O and Big notation with the help of a diagram. Find the Big O-notation and -notation for the function: f(n)= 100n4 +1000n3 +100000 (137 words)
- e) Write and explain the Left to Right binary exponentiation algorithm. Demonstrate the use of this algorithm to compute the value of 329 (Show the steps of computation). Explain the worst-case complexity of this algorithm. (137 words)
- f) Write and explain the Bubble sort algorithm. Discuss its best and worst-case time complexity. (137 words)
- g) What are the uses of recurrence relations? Solve the following recurrence relations using the Master's method (137 words)
- Sieve of Eratosthenes finds primes up to N in O(N log log N) time.
- Cubic-time (O(n³)) is feasible for moderate inputs; Factorial-time (O(n!)) is highly impractical.
- Standard matrix multiplication for n x n matrices has O(n³) time complexity using three nested loops.
- Asymptotic bounds (Big O, Big Omega) describe algorithm growth for large inputs, ignoring constants.
Answer: This assignment covers fundamental concepts and algorithms in Design and Analysis of Algorithms, focusing on efficiency, complexity analysis, and specific algorithmic techniques. The answers below provide detailed explanations for each sub-question, adhering to the specified word limits and formatting guidelines.