The test is open-everything with the sole limitation that you neither solicit nor give help while the exam is in progress.
Do any ten problems. Write the numbers of the problems you want graded in the obvious place below. Show me how talented, articulate, and mathematically mature you are.
| Problem | You got | Out of |
|---|---|---|
| | 10 | |
| | 10 | |
| | 10 | |
| | 10 | |
| | 10 | |
| | 10 | |
| | 10 | |
| | 10 | |
| | 10 | |
| | 10 | |
| TOTAL | 100 |
alogbc = clogba
T(n) = 1 if n=1,
T(n) = 2T(n-1)+1, otherwise.
Assuming you were kind and helpful, what would you tell this poor student? And, by the way, since kindness does not involve flat-out telling the student the answer, tell me, instead, how do you express T in Θ-notation?
obviously Θ(n2.32192809)
Explain the structure of the algorithm and how this "obvious" value was obtained.
public static long f(List a) {
if (a.size() > 1) {
f(a.subList(0, a.size()/3));
f(a.subList(a.size()/3, 2*a.size()/3));
f(a.subList(2*a.size()/3, a.size()));
for (int i = 1; i <= n; i *= 2)
for (int j = 1; j <= i; j++)
System.out.println("*");
}
}
}
}