{"id":1956,"date":"2017-11-22T13:10:08","date_gmt":"2017-11-22T21:10:08","guid":{"rendered":"https:\/\/blogs.ubc.ca\/cpsc3202017w1\/?p=1956"},"modified":"2017-11-29T12:51:19","modified_gmt":"2017-11-29T20:51:19","slug":"assignment-5","status":"publish","type":"post","link":"https:\/\/blogs.ubc.ca\/cpsc3202017w1\/2017\/11\/22\/assignment-5\/","title":{"rendered":"Assignment #5"},"content":{"rendered":"<p><strong>CORRECTIONS:<\/strong><\/p>\n<ul>\n<li><strong> Clarification in 4.2.1. Note that we&#8217;re allowing a &#8220;set&#8221; to be a collection of possibly non-unique items&#8211;more like a list. Solve the (harder) problem for sets of unique items for a bonus point!<\/strong><\/li>\n<li><strong> Typo in 4.2.1. Not &#8220;a set of positive integers S of size 2n&#8221;, but &#8220;a set of positive integers S of size <em>12n<\/em>&#8220;.<\/strong><\/li>\n<li><strong>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!)<\/strong><\/li>\n<li><strong>Typo on 2 (various parts)\u00a0<\/strong>the BestDeShredScore code should have a trampoline call to its helper like &#8220;return Helper([false, false, &#8230;, false], 0)&#8221;, where there are n false entries in the initial array<\/li>\n<li><strong>Clarification on 4 (various parts)<\/strong>\u00a0we said &#8220;set&#8221; and meant it, but we&#8217;re allowing &#8220;multi-set&#8221;; see\u00a0<a href=\"https:\/\/piazza.com\/class\/j5iib9thtp86du?cid=521\">@521<\/a>\u00a0for more details<\/li>\n<li><strong>on 4, individual quiz, problem 1<\/strong>: S[2n-i] should be S[2n-i-1]. (Or S[i] should be S[i+1], depending on 0-based vs.\u00a01-based indexing.)<\/li>\n<\/ul>\n<p>Here is\u00a0<a href=\"https:\/\/blogs.ubc.ca\/cpsc3202017w1\/files\/2017\/11\/assn5-v2.pdf\">Assignment #5<\/a>, composed of the collected tutorial quizzes, solutions to those quizzes, and some extra questions building on the quizzes for the assignment. (Here is\u00a0<a href=\"https:\/\/blogs.ubc.ca\/cpsc3202017w1\/files\/2017\/11\/assn5-v2.txt\">LaTeX source<\/a>, with a .txt extension so the blog lets us post it!)<\/p>\n<p>The assignment is due on Fri 1 Dec at 10PM.\u00a0Please submit it on\u00a0<a href=\"https:\/\/gradescope.com\/\">GradeScope<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>CORRECTIONS: Clarification in 4.2.1. Note that we&#8217;re allowing a &#8220;set&#8221; to be a collection of possibly non-unique items&#8211;more like a list. Solve the (harder) problem for sets of unique items for a bonus point! Typo in 4.2.1. Not &#8220;a set &hellip; <a href=\"https:\/\/blogs.ubc.ca\/cpsc3202017w1\/2017\/11\/22\/assignment-5\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":7560,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[98],"tags":[],"class_list":["post-1956","post","type-post","status-publish","format-standard","hentry","category-assignments"],"_links":{"self":[{"href":"https:\/\/blogs.ubc.ca\/cpsc3202017w1\/wp-json\/wp\/v2\/posts\/1956","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blogs.ubc.ca\/cpsc3202017w1\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blogs.ubc.ca\/cpsc3202017w1\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blogs.ubc.ca\/cpsc3202017w1\/wp-json\/wp\/v2\/users\/7560"}],"replies":[{"embeddable":true,"href":"https:\/\/blogs.ubc.ca\/cpsc3202017w1\/wp-json\/wp\/v2\/comments?post=1956"}],"version-history":[{"count":11,"href":"https:\/\/blogs.ubc.ca\/cpsc3202017w1\/wp-json\/wp\/v2\/posts\/1956\/revisions"}],"predecessor-version":[{"id":2004,"href":"https:\/\/blogs.ubc.ca\/cpsc3202017w1\/wp-json\/wp\/v2\/posts\/1956\/revisions\/2004"}],"wp:attachment":[{"href":"https:\/\/blogs.ubc.ca\/cpsc3202017w1\/wp-json\/wp\/v2\/media?parent=1956"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.ubc.ca\/cpsc3202017w1\/wp-json\/wp\/v2\/categories?post=1956"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.ubc.ca\/cpsc3202017w1\/wp-json\/wp\/v2\/tags?post=1956"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}