Assignment #5

CORRECTIONS:

  • Clarification in 4.2.1. Note that we’re allowing a “set” to be a collection of possibly non-unique items–more like a list. Solve the (harder) problem for sets of unique items for a bonus point!
  • Typo in 4.2.1. Not “a set of positive integers S of size 2n”, but “a set of positive integers S of size 12n“.
  • Error in 1.1.2 (and the quiz problem it comes from): C(i, j) equals A[i][j] plus the minimum of the options, not just the minimum of the options. (Else the answer would always be 0!)
  • Typo on 2 (various parts) the BestDeShredScore code should have a trampoline call to its helper like “return Helper([false, false, …, false], 0)”, where there are n false entries in the initial array
  • Clarification on 4 (various parts) we said “set” and meant it, but we’re allowing “multi-set”; see @521 for more details
  • on 4, individual quiz, problem 1: S[2n-i] should be S[2n-i-1]. (Or S[i] should be S[i+1], depending on 0-based vs. 1-based indexing.)

Here is Assignment #5, composed of the collected tutorial quizzes, solutions to those quizzes, and some extra questions building on the quizzes for the assignment. (Here is LaTeX source, with a .txt extension so the blog lets us post it!)

The assignment is due on Fri 1 Dec at 10PM. Please submit it on GradeScope.

Leave a Reply

Your email address will not be published. Required fields are marked *