Monthly Archives: July 2019

Assignment #5

Here is Assignment #5, due 11 pm on August 6. LaTeX source for the assignment will be posted on Piazza (because UBC blogs doesn’t allow upload of .tex files).

Protected: Assignment #4 Sample Solution

This content is password protected. To view it please enter your password below:

July 31 Handouts and Notes

We’ll start today’s class by discussing complexity classes and NP-completeness. Then we’ll dive into a new worksheet on reductions (used differently than before).

Announcements for today:

  • You have a tutorial quiz today. Assignment 5 (mainly on memoization/dynamic programming) will be released today at the usual time.
  • We’ve posted some information about the final exam. See the Piazza post.
  • Your second reading quiz on NP-completeness is due Thursday night.

Here are today’s clicker questions.

July 29 Handouts and Notes

Today we will continue working on a 2D dynamic programming algorithm to compute the longest common substring of two strings. If we have time, we may start talking about NP-completeness.

Announcements for today:

  • Assignment #4 is due tomorrow at 11 PM.

Here are today’s clicker questions.

Quiz 4 and (partial) sample solution

To help you with question 4 of the assignment, here is the individual version of quiz 4 and a partial sample solution.

July 26 Handout and Notes

In today’s class we’ll work on making our change-making algorithm more efficient using memoization. If we have time, we may also start on a 2D dynamic programming algorithm to compute the longest common substring of two strings.

Announcements for today:

  • The midterm exams are graded and the grades have been published on Gradescope.
  • Our final exam has been scheduled for 12:00-2:30 pm on Tuesday August 13.
  • Assignment 4 has been released and is due on Tuesday.
  • Your tutorial quiz is today. It’s based on question 4 of your assignment and will provide a hint to help you with that question.
  • Your first reading quiz on NP-completeness is due Sunday night.

Here are today’s clicker questions.

Assignment #4

Here is Assignment #4, due 11 pm on July 30. LaTeX source for the assignment will be posted on Piazza (because UBC blogs doesn’t allow upload of .tex files).

Protected: Midterm Exam and Sample Solution

This content is password protected. To view it please enter your password below:

July 22 Handouts and Notes

Today we’ll start on our memoization/dynamic programming unit with a worksheet on making change (the kind with coins, not the kind you wish to be/see in the world).

Announcements for today:

  • The midterm exam is on Wednesday. We will discuss logistics at the beginning of class today. If you miss the beginning of today’s class, make sure you read the exam information we have on Piazza.

Protected: Assignment #3 Sample Solution

This content is password protected. To view it please enter your password below: