UNIT 1 - SELF OUIZ A solution is said to be efficient if it: Select one: .Solves the problem within the required resource constraints b.Executes faster than other solutions c.Is completed in the fewest number of steps d.Can be explained in the context of Bia-Oh notation An ADT is: Select one: a.A type together with a collection of operations to manipulate the type b.An implementation of a flyweight design pattern c. The realization of a data type as a software component d.An implementation in iava of a class for a data type The implementation of a data type as a data structure is the physical form of an ADT. ANSWER: TRUE Which of the following is NOT one of the design patterns outlined in our text. Select one: If A={1, 2, 3, 4} and B={4, 5, 6}, find A U B . a.Flyweight b. Visitor c.Composite .Svnerav Select one: a.{1,2,3,4,4,5,6} b.{4} c.{x | x is all positive integers} d.{1.2.3.4.5.6} According to the properties of logarithms, log(nm) = Note: Due to issues with HTML formatting. an exponent is represented by preceding it with the ^ symbol. As such x^2 is equivalent to x2. Select one: Recursion is when an algorithm uses a series of loop structures to repeat an operation until the answer has been computed. a.log n - log m b.n log n c.log n + log m d.loa(n^m) ANSWER: FALSE Which of the following is not a mathematical proof technique? Select one: a.Proof by mathematical induction b.Proof by contradiction c.Direct proof d.Proof bv consensus Which of the following is not a characteristic of an algorithm? Select one: a.It must be correct b.It must be composed of concrete steps c.It can have no ambiguity .It must be composed of an infinite number of steps.
UNIT 2 - SELF OUIZ The upper bound for the growth of the Algorithms running time is represented by: Select one: .Big Oh (O) b.Big Omega (Q) c.Big Theta (O) d.Exponential growth Asymptotic Algorithm Analysis is primarily concerned with: Select one: a. The size of the constant in the algorithm running time equation b. The speed of the computing running the algorithm c. The speed of the compiler The growth rate demonstrated in the algorithm running time eauation True/False: Big Theta (O) indicates that the Upper and Lower bounds of an algorithm are the same. ANSWER: TRUE For the following code fragment, select the option that represents the most appropriate asymptotic analysis: for (int i = 0; i < a.length; i++) { System.out.println(a[i]); } For the following code fragment, select the option that represents the most appropriate asymptotic analysis: Option 1. O(n) Option 2. O( 2n ) Option 3. O( n log n ) Option 4. O( n2) for (int i = 1; i <= n; i *= 2) { for (int j = 0; j < n; j++) { count++; Select one: } .Option 1 b.Option 2 c.Option 3 d.Option 4 } Select one: a.Option 1 b.Option 2 Option 3 d. Option 4
For the