Menu

[Solved]-Question 1 50 Points E Niention Five Important Fealures Algorithm Must Explain Three B Des Q37251524

Question 1 (50 points) e) Niention the five important fealures an algorithm must have and explain any three b) Describe the EQuestion 1 (50 points) e) Niention the five important fealures an algorithm must have and explain any three b) Describe the Euclid’s Algorithm for finding the greatest common divisor (GCD) of c) se your aigorithm in b) to find the GCD of 119 and 544 (10 marks) (12 marks) two positive integers (12 marks) hat oes Euclid s algorithm co for a pair of numbers in which the first number is tn the sucond one? What ‘s trie largegt number of tismes this can happen during the algoritn n s execution on such an input? (6 marks) e) States three things you like and two that you do not like about this course (10 marks) Question 2 (50 points) a) Mention the steps for designing and analyzing an algorithm (15 marks) b) Design an algor rnithim to determine the value of the largest element in a given array 10 marks c, What is the algorithm s basic operation? (3 marks) d) What would be the average performance of the algorithm? (7 marks) e) Consider the following algorithm ALGORITHM Mystery(AIO n-1]) l input An array A[0 n-1] of n real numbers rnanval (-A101 maxval ← A(0] for i 1 to n-1 do if Ali)> maxval maxval A return maxval – minval What does this algorthm compure (3 marks) a) What is its basic operation? (3 marks ili) How imany times is the basic opereton executed? (2 marks) v) What is the efficiency class of this aigorithm? (7 marks) Show transcribed image text Question 1 (50 points) e) Niention the five important fealures an algorithm must have and explain any three b) Describe the Euclid’s Algorithm for finding the greatest common divisor (GCD) of c) se your aigorithm in b) to find the GCD of 119 and 544 (10 marks) (12 marks) two positive integers (12 marks) hat oes Euclid s algorithm co for a pair of numbers in which the first number is tn the sucond one? What ‘s trie largegt number of tismes this can happen during the algoritn n s execution on such an input? (6 marks) e) States three things you like and two that you do not like about this course (10 marks) Question 2 (50 points) a) Mention the steps for designing and analyzing an algorithm (15 marks) b) Design an algor rnithim to determine the value of the largest element in a given array 10 marks c, What is the algorithm s basic operation? (3 marks) d) What would be the average performance of the algorithm? (7 marks) e) Consider the following algorithm ALGORITHM Mystery(AIO n-1]) l input An array A[0 n-1] of n real numbers rnanval (-A101 maxval ← A(0] for i 1 to n-1 do if Ali)> maxval maxval A return maxval – minval What does this algorthm compure (3 marks) a) What is its basic operation? (3 marks ili) How imany times is the basic opereton executed? (2 marks) v) What is the efficiency class of this aigorithm? (7 marks)

Expert Answer


Answer to Question 1 (50 points) e) Niention the five important fealures an algorithm must have and explain any three b) Describe … . . .

OR


Leave a Reply

Your email address will not be published. Required fields are marked *