Monthly Archives: October 2017

Making Change (Part 2), Sample Solution

Here’s a sample solution to our second making change worksheet.

Making Change (Part 1), Sample Solution

Here’s a sample solution to our first making change worksheet.

Making Change (memoization and DP), Part 2

Here’s Part 2 of our Making Change worksheet.

Readings to finish for the week of Oct 29-Nov 4

The readings for this week are sections 6.1-6.3.

Protected: Assignment #3 Sample Solution

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

Deterministic Select Sample Solution

Here are sample solutions to our live-coding exercise on Deterministic Select in various formats:

 

Divide and Conquer (Tug-O-War) Sample Solution

Here’s a sample solution to our divide and conquer (tug-o-war) worksheet.

Making Change (memoization and DP), Part 1

Here’s Part 1 of our Making Change worksheet.

Deterministic Select, Live!

We don’t code a lot in CPSC 320, and that’s intentional. You have lots of coding classes in CPSC. Reasoning about problems, writing about them on paper or whiteboards, designing and analyzing solutions: these are all incredibly important skills to be a successful Computer Scientist, no matter what work you take on.

However, now and then, it’s fun to code. Especially when an algorithm is so completely bizarre that it’s hard to believe it works without trying it.

Enter Deterministic Select.

We’ll do our best to code this rather intricate algorithm live, after working through the ideas that lead up to it. It could even work!

If you’d like to follow along, try opening https://ubc.syzygy.ca. You can then download our blank DSelect Jupyter Notebook to your computer, start your Syzygy server, and use the “Upload” button to upload the notebook onto syzygy. Use the “play”, “up”, and “down” buttons on syzygy to run code and navigate among the cells.

You can also see blank copies in plain python, PDF, or HTML.

Readings to finish for the week of Oct 22-Oct 28

Our upcoming readings for this week are: Sections 5.3 and 5.4.