Question 16
What is the solution to the recurrence relation T(n) = T(n-1) + n with base case T(1) = 1?
$Expanding T(n) = n + (n-1) + (n-2) + ... + 1 = n(n+1)/2 = O(n^2).$
What is the solution to the recurrence relation T(n) = T(n-1) + n with base case T(1) = 1?
$Expanding T(n) = n + (n-1) + (n-2) + ... + 1 = n(n+1)/2 = O(n^2).$
Which of the following statements about Big-$\Omega notation f(n) = \Omega (g(n))$ are correct?
$\Omega provides$ an asymptotic lower bound. Θ(g) implies both O(g) and $\Omega (g)$. Therefore all three statements are correct.
In Big-$\Omega notation (\Omega ), what does f(n) = \Omega (g(n)) represent$?
Big-$\Omega (\Omega ) notation provides$ an asymptotic lower bound on algorithm execution time, specifying minimum growth rate.
What is the address of element A[3] in a 1D base-0 array starting at base address 2000 with element size 4 bytes?
$Address(A[i]) = Base + i * W = 2000 + 3 * 4 = 2012.$
Which technique converts a multidimensional array into a flat 1D memory array in Fortran?
Languages like Fortran and MATLAB store multidimensional arrays in Column-Major order, whereas C/C++ use Row-Major order.