Monthly Archives: July 2019

July 19 Handouts and Notes

Today we’ll finish up our worksheet on divide and conquer and talk about a cool variant of the QuickSelect algorithm with better theoretical performance guarantees. We also have a handout on the Master Theorem.

Announcements for today:

  • Assignment 3 is up on the course webpage. This one is just practice for the midterm exam and won’t be for submission. We’ll release solutions on Sunday morning.
  • Tutorials today will be about proofs on 320 exams. The proof questions we ask on exams tend to be structured a bit differently from the ones we ask on assignments (though they obviously deal with the same kinds of concepts). Tutorials today will work through some examples.
  • Your first reading quiz on dynamic programming is due on Sunday night.

Here are today’s clicker questions, along with PDF versions of today’s Jupyter notebooks on how to select the pivot, and Steve Wolfman’s more elaborate and complete notebook on the actual algorithm. UBC Blogs does not allow upload of .ipynb files, so the actual notebooks can be downloaded on Piazza.

Assignment #3 (for practice only)

Here is a link to Assignment #3. It is not for submission and will not be graded. Its purpose is to give you practice with greedy algorithms before the midterm exam.

Solutions will be released on Sunday, July 21 (but we recommend you work through every problem before you look at the solutions!).

Protected: Assignment #2 Sample Solution

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

July 17 Handouts and Notes

Today we’ll spend a bit of time reviewing our proof of correctness from last time. Afterwards, we’ll start on our divide and conquer unit with this worksheet on QuickSelect.

Announcements for today:

  • You have a tutorial quiz today.
  • Assignment 3 will be released after tutorials, as usual, but unusually, this assignment is only for practice (because the normal deadline would have been the night before the midterm exam, which didn’t strike us as desirable). We strongly recommend you work through it as part of your exam preparation and put as much effort into it as you would an actual assignment.
  • Assignment 1 grades have been released on Gradescope. If you wish to submit a regrade request, please read our policy on regrade requests first. (In particular: read the sample solution before you dispute your grade!)
  • Your reading quiz on divide and conquer is due Thursday night. (Yes, this is after we will have started on the unit in class; the alternative was having a reading quiz and assignment due at the same time!)

Here are today’s clicker questions and the slides reviewing the proof of correctness of our greedy clustering algorithm.

July 15 Handouts and Notes

In today’s class we’ll wrap up our worksheet on clustering and then we’ll prove that the algorithm we developed is optimal.

Announcements for today:

  • Assignment 2 is due tomorrow night.
  • We have some information about the midterm exam posted on Piazza.

Here are today’s clicker questions.

July 12 Handouts and Notes

In today’s class we’ll start on greedy algorithms. In our worksheet we’ll develop an algorithm for clustering photos.

Announcements for today:

  • Assignment 2 has been released and is due on Tuesday.
  • Tutorials today will cover how to write good pseudocode and a review of asymptotic analysis notation (big- and little-O/omega, etc.). A reminder to please attend your registered tutorial section if possible, as the earlier sections are nearly full and priority needs to be given to students registered in that section.
  • The second reading quiz on greedy algorithms is due on Sunday night. 

Here are the clicker questions from today’s class.

Assignment #2

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

Protected: Assignment #1 Sample Solution

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

July 10 Handouts and Notes

In today’s class we will play with graphs.

Announcements for today:

  • The solution to Assignment 1 has been released on the course page. You will need a password to access it, which you can find on Piazza.
  • You have a quiz in tutorial today, so be sure to attend your registered tutorial section. Assignment 2 will be released today at 4:30 pm and be due on Tuesday July 16 at 11 pm.
  • The first reading quiz on greedy algorithms is due Thursday evening.

Here are the clicker questions from today’s class.

July 8 Handouts and Notes

Today we’ll start on our asymptotic analysis worksheet. We also have this handy-dandy handout on formal definitions in asymptotic notation. If we have time, we may also get started on graphs.

Notes/announcements for today:

  • Assignment 1 is due tomorrow night. Make sure you know how to log in and upload to Gradescope! You will have received an email invitation to your @ugrad.cs.ubc.ca email. If you can’t find the email, go to Gradescope and try to login as [your CSID]@ugrad.cs.ubc.ca and select “Forgot password?” to get a password reset link emailed you.
  • Today is the add/drop deadline. This is your last day to switch tutorial sections or to drop the course without a W standing.

Here are the clicker questions from today’s class.