Cs6515 exam 1 - Study guides, Class notes & Summaries
Looking for the best study guides, study notes and summaries about Cs6515 exam 1? On this page you'll find 25 study documents about Cs6515 exam 1.
Page 3 out of 25 results
Sort by
-
cs6515 Exam 1 Prep questions and answers
- Exam (elaborations) • 10 pages • 2024
-
Available in package deal
-
- $7.99
- + learn more
Knapsack without repetition - ANSWER-k(0) = 0 
for w = 1 to W: 
if w_j >w: k(w,j) = k(w, j - 1) 
else: K(w,j) = max{K(w, j -1),K(w - w_j, j -1) + v_i} 
knapsack with repetition - ANSWER-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) 
Longest Increasing Subsequence - ANSWER-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 ...
-
CS6515 - Algorithms- Exam 1 100% correct solution
- Exam (elaborations) • 3 pages • 2024
-
Available in package deal
-
- $7.99
- + learn more
Steps to solve a Dynamic Programming Problem - ANSWER-1. Define the Input 
and Output. 
2. Define entries in table, i.e. T(i) or T(i, j) is... 
3. Define a Recurrence relationship - Based on a subproblem to the main 
problem. (hint: use a prefix of the original input 1 < i < n). 
4. Define the Pseudocode. 
5. Define the Runtime of the algorithm. Use Time Function notation here => T(n) 
= T(n/2) + 1... 
DP: Types of Subproblems (4) - ANSWER-Input = x1, x2, ..., xn 
1) Subproblem = x1, x2...
-
CS6515 - Exam 1 questions and answers 2024
- Exam (elaborations) • 4 pages • 2024
-
Available in package deal
-
- $7.99
- + learn more
What is the running time for Longest Increasing Subsequence (LIS) - 
ANSWER-O(n^2) 
What is the recurrence for Longest Increasing Subsequence (LIS)? - 
ANSWER-L(i) = 1 + max{ L(j) | xj < xi} 
This reads as the answer to index I is 1 + the maximum over all j's between 1 
and i where xj is less than xi 
What is the recurrence for Longest Common Subsequence (LCS) - 
ANSWER-L(i,j) = 1 + L(i-1, j-1) if xi = yj 
L(i,j) = max(L(i-1,j),L(i,j-1)) otherwise 
What is the running time for Longest Common...
-
Bundle for CS6515 Exams | Questions and Answers | Latest update 2024/2025
- Package deal • 2 items • 2024
-
- $16.99
- + learn more
Bundle for CS6515 Exams | Questions and Answers | Latest update 2024/2025. Actual tests, Exam 1, Exam 2, Algorithms,
-
CS6515 Exam 2 Questions And Answers
- Exam (elaborations) • 3 pages • 2024
-
- $9.49
- + learn more
CS6515 Exam 2 Questions And Answers
Get paid weekly? You can!
That summary you just bought made someone very happy. Also get paid weekly? Sell your study resources on Stuvia! Discover all about earning on Stuvia