CS 6515 Exam 1 | Actual Questions
and Answers Latest Updated
2025/2026 (Graded A+)
Correct 129
Incorrect
CS 6515 Exam 1
Term
What is the difference between FFT of one item vs FFT multiplication of
coefficients produced are n = 0 to 2_n -1, same for the only j loop
, LIS(a_1.. a_n)
for i = 1 to n
L(i) = 1
for j = 1 to n -1
if a_j < a_i & L(i) < 1 + L( j)
L(i) = 1 + L( j)
max = 1
for i = 2 to n
if L(i) > L(max) then max = i
return(L(max))
knapsack repeat(w_i....w_n, w_i... w_n, B)
k(0) = 0
for i = 1 to n
if w_i <= b & k(b) <v_i + K(b-w_i)
then k(b) = v_i + K(b-w_i)
FFT(A,ω)
if n = 1 then return a_0
else
let Aeven = [a_0, a_2... a_(n-2)]
let Aodd = [a_1, a_3... a_(n-1)]
FFT(Aeven, ω^2) = ...s_n
FFT(Aodd, ω^2) = ...t_n
for j = n/2 - 1
r_j = s_j + ω^j * t_j
r_((n/2)+j) = s_j - w^j * t_j
Don't know?
2 of 129
Term
,For (ω_n)^2, what is its multiplicative inverse?
More precisely, for what power k is (ω_n)^k × (ω_n)^2 = 1?
Give this one a try later!
- values
values == O(n) time (from 1 -> 2n)
coefficients == O(n^2) time
It should only require two separate loops:
one to loop to go through to calculate the values
- then a separate loop to figure out what the max is... and then return the max
k = (n-2)
It is whatever it takes to get to 0, which becomes one
so if applied: For (ω_16)^2 *(ω_16)^(16-2) == (ω_16)^16 == (ω_16)^0 == 1
k = (n/2) + 1 - 3 == 6, k = 6!!
Don't know?
3 of 129
Definition
, theta = 2pie/n, and omega_n = (1, 2pie/n). Multiply them together to
increase each step
Give this one a try later!
What is more efficient in terms of
complexity? Polynomial
In the FFT algorithm, why does "j" in
Multiplication with
the last section only go to (n/2 - 1)?
1.) values or
2.) coefficients
why is omega increased in the what degree is -1 in terms of polar
exponent in order to traverse coordinates? what are the polar
through the roots of unity? coordinates?
Don't know?
4 of 129
Definition
D(i, z) = min(D(i − 1, z), min_y(D(i − 1, y) + w(y, z))), where D(i,z) is the
shortest path from the source to z using at most i edges.
Give this one a try later!
Bellman-Ford Algorithm Knapsack with Repetition: Time
Recurrence Complexity
and Answers Latest Updated
2025/2026 (Graded A+)
Correct 129
Incorrect
CS 6515 Exam 1
Term
What is the difference between FFT of one item vs FFT multiplication of
coefficients produced are n = 0 to 2_n -1, same for the only j loop
, LIS(a_1.. a_n)
for i = 1 to n
L(i) = 1
for j = 1 to n -1
if a_j < a_i & L(i) < 1 + L( j)
L(i) = 1 + L( j)
max = 1
for i = 2 to n
if L(i) > L(max) then max = i
return(L(max))
knapsack repeat(w_i....w_n, w_i... w_n, B)
k(0) = 0
for i = 1 to n
if w_i <= b & k(b) <v_i + K(b-w_i)
then k(b) = v_i + K(b-w_i)
FFT(A,ω)
if n = 1 then return a_0
else
let Aeven = [a_0, a_2... a_(n-2)]
let Aodd = [a_1, a_3... a_(n-1)]
FFT(Aeven, ω^2) = ...s_n
FFT(Aodd, ω^2) = ...t_n
for j = n/2 - 1
r_j = s_j + ω^j * t_j
r_((n/2)+j) = s_j - w^j * t_j
Don't know?
2 of 129
Term
,For (ω_n)^2, what is its multiplicative inverse?
More precisely, for what power k is (ω_n)^k × (ω_n)^2 = 1?
Give this one a try later!
- values
values == O(n) time (from 1 -> 2n)
coefficients == O(n^2) time
It should only require two separate loops:
one to loop to go through to calculate the values
- then a separate loop to figure out what the max is... and then return the max
k = (n-2)
It is whatever it takes to get to 0, which becomes one
so if applied: For (ω_16)^2 *(ω_16)^(16-2) == (ω_16)^16 == (ω_16)^0 == 1
k = (n/2) + 1 - 3 == 6, k = 6!!
Don't know?
3 of 129
Definition
, theta = 2pie/n, and omega_n = (1, 2pie/n). Multiply them together to
increase each step
Give this one a try later!
What is more efficient in terms of
complexity? Polynomial
In the FFT algorithm, why does "j" in
Multiplication with
the last section only go to (n/2 - 1)?
1.) values or
2.) coefficients
why is omega increased in the what degree is -1 in terms of polar
exponent in order to traverse coordinates? what are the polar
through the roots of unity? coordinates?
Don't know?
4 of 129
Definition
D(i, z) = min(D(i − 1, z), min_y(D(i − 1, y) + w(y, z))), where D(i,z) is the
shortest path from the source to z using at most i edges.
Give this one a try later!
Bellman-Ford Algorithm Knapsack with Repetition: Time
Recurrence Complexity