Reading Quiz 6 CPSC 320 101 102 103 2022W1 Intermediate Algorithm Design and Analysis PDF
Reading Quiz 6 CPSC 320 101 102 103 2022W1 Intermediate Algorithm Design and Analysis PDF
Reading Quiz #6
Due Oct 16 at 7p.m. Points 4 Questions 4
Available Oct 9 at 7:01p.m. - Oct 16 at 7p.m. Time Limit None
Allowed Attempts 3
Instructions
To prepare for this quiz, please read sections 6.1-6.2 (inclusive) in the Kleinberg + Tardos textbook.
The goal of this quiz is to lightly assess a first quick reading of these resources to prepare for class. You
should definitely return to this material for a more thorough read to solidify your learning and prepare for
assignments and exams.
Attempt History
Attempt Time Score
KEPT Attempt 2 7 minutes 4 out of 4
Question 1 1 / 1 pts
This study source was downloaded by 100000822082255 from CourseHero.com on 02-13-2023 22:53:35 GMT -06:00
https://canvas.ubc.ca/courses/101883/quizzes/528419 1/6
https://www.coursehero.com/file/173573606/Reading-Quiz-6-CPSC-320-101-102-103-2022W1-Intermediate-Algorithm-Design-and-Analysispdf/
10/16/22, 3:17 PM Reading Quiz #6: CPSC 320 101/102/103 2022W1 Intermediate Algorithm Design and Analysis
For this question, please match each algorithm on the left to the value of
the solution it would find for this instance. (For the "Optimal" choice, it
doesn't matter which algorithm generated the solution; we're only
interested in the greatest value possibly achievable on this particular
instance.)
GreedyEarliestFinish 8
This study source was downloaded by 100000822082255 from CourseHero.com on 02-13-2023 22:53:35 GMT -06:00
https://canvas.ubc.ca/courses/101883/quizzes/528419 2/6
https://www.coursehero.com/file/173573606/Reading-Quiz-6-CPSC-320-101-102-103-2022W1-Intermediate-Algorithm-Design-and-Analysispdf/
10/16/22, 3:17 PM Reading Quiz #6: CPSC 320 101/102/103 2022W1 Intermediate Algorithm Design and Analysis
GreedyHighestValue 7
Optimal 9
Question 2 1 / 1 pts
For any j between 1 and n, if we know the optimal scheduling for the first j-
1 intervals, finding the optimal solution for the first j intervals amounts to
making a binary choice.
The optimal schedule that includes the nth interval adds its value to the
optimal solution for the first p(n) intervals.
All intervals in the optimal solution for the first j intervals must be included
in the optimal solution for the first j+1 intervals
This study source was downloaded by 100000822082255 from CourseHero.com on 02-13-2023 22:53:35 GMT -06:00
https://canvas.ubc.ca/courses/101883/quizzes/528419 3/6
https://www.coursehero.com/file/173573606/Reading-Quiz-6-CPSC-320-101-102-103-2022W1-Intermediate-Algorithm-Design-and-Analysispdf/
10/16/22, 3:17 PM Reading Quiz #6: CPSC 320 101/102/103 2022W1 Intermediate Algorithm Design and Analysis
If there are exactly two choices for whether the jth interval is included in the
optimal solution, the optimal solution must include the lowest in value of
these choices
Question 3 1 / 1 pts
The j column lists the indices of each interval. The intervals have
been numbered in order of non-decreasing finish time. (The zeroth
index is a placeholder to make the recurrence relation nicer.)
v_j gives the weight/value of the jth interval.
p(j) is defined as in Section 6.1 of the textbook with a typo
correction to the book's English description: it gives the index of
the rightmost interval that ends before j begins.
M[j] is the memo table populated by the DP algorithm; it contains the
value of the optimal solution considering only the first j intervals.
Using this table, along with the recurrence relation for WISP given in
Section 6.1 of the textbook (Equation 6.1), reconstruct the solution
found by the DP algorithm, by selecting the index ("j") of EACH interval
that gets scheduled in the optimal (highest-weight) scheduling.
This study source was downloaded by 100000822082255 from CourseHero.com on 02-13-2023 22:53:35 GMT -06:00
https://canvas.ubc.ca/courses/101883/quizzes/528419 4/6
https://www.coursehero.com/file/173573606/Reading-Quiz-6-CPSC-320-101-102-103-2022W1-Intermediate-Algorithm-Design-and-Analysispdf/
10/16/22, 3:17 PM Reading Quiz #6: CPSC 320 101/102/103 2022W1 Intermediate Algorithm Design and Analysis
Question 4 1 / 1 pts
(Elmer Fudd is not the right answer, but you can Google Seawch
(https://www.google.ca/search?hl=xx-elmer) for him.)
This study source was downloaded by 100000822082255 from CourseHero.com on 02-13-2023 22:53:35 GMT -06:00
https://canvas.ubc.ca/courses/101883/quizzes/528419 5/6
https://www.coursehero.com/file/173573606/Reading-Quiz-6-CPSC-320-101-102-103-2022W1-Intermediate-Algorithm-Design-and-Analysispdf/
10/16/22, 3:17 PM Reading Quiz #6: CPSC 320 101/102/103 2022W1 Intermediate Algorithm Design and Analysis
This study source was downloaded by 100000822082255 from CourseHero.com on 02-13-2023 22:53:35 GMT -06:00
https://canvas.ubc.ca/courses/101883/quizzes/528419 6/6
https://www.coursehero.com/file/173573606/Reading-Quiz-6-CPSC-320-101-102-103-2022W1-Intermediate-Algorithm-Design-and-Analysispdf/
Powered by TCPDF (www.tcpdf.org)