- Course Information
- Staff
- Resources
Description
General Information
Announcements
Hi everyone,
There are still a few slots open for peer mentoring, and I wanted to make sure everyone who wants some extra mentoring has the opportunity for it. We heavily encourage those who haven't seen us before to sign up.
We've added more time slots on Sunday and Monday, and we're introducing drop-in office hours on Tuesday. From 10AM-4PM, at least one of us will be in CS 4384 to answer brief questions you have. This time is meant for BRIEF QUESTIONS ONLY (~15 min each).
Good luck studying!
-- CS 577 Peer Mentors
If you haven't filled out course evals yet, please do so by tonight. It only takes 5-10 mins of your time. Your feedback is extremely important to us, especially as this course scales up in size and transitions from a 3 credit to a 4 credit course.
We are still at a roughly 50% response rate. I'm hoping we can achieve a 70-80% response rate.
Thanks, everyone!
In Homework 8, problem 4 was graded by Andrew Brockmann and problem 5 was graded by Amanda.
Problem 4 seems to have been a difficult one - the issues that arose were many and varied. Those who did part (c) generally did so correctly (or very close to it), but numerous submissions left (c) blank, and problems in parts (a) and (b) were quite common.
First, here are a couple general pieces of advice for homework:
(a) Many p4 submissions regressed to writing almost pure code. Don't do this. It is not at all easy to understand. Experience leads me to think that it should be annoying to write, too.
(b) If you're given a target runtime and your algorithm does even better, carefully examine your work. Sometimes it is possible to beat the target runtimes, usually with more complicated algorithms. But if you come up with a very fast and very simple algorithm (e.g., an
Here are explanations of the problems corresponding to the numbers I sometimes wrote while grading:
#1: "Trivial" or brute force algorithms. Each part of this problem really was nontrivial.
(i) Simply checking every array element to determine whether it's between
(ii) A common problem in (a) was the use of an incorrect shortcut. Numerous submissions made reference to a "box" with
(iii) The most common "trivial" algorithm for (b) was to take all of the elements counted in (a), put them in a new array, and uniformly select an element from that array. This isn't
(iv) Overly simplistic algorithms for (c) were uncommon. They tended to try one of two things: finding a median of medians (taking the median of each column/row, then returning the median of those medians), or taking the median of the diagonal entries. The attached counterexample foils both of these attempts. Note that 51 is the median of that array.
#2: Non-uniform algorithms for (b). (Alternately, neglecting to demonstrate that one's algorithm for (b) is uniform.) For a submission for (b) to demonstrate uniformity, it is necessary that all array elements between
(i) The most common incorrect approach was to uniformly select a row/column, and then uniformly select one of the values of that row/column that is between
(ii) Another incorrect approach stemmed from misconceptions about the "box" mentioned in issue #1(b). Uniformly selecting a value from the box is not sufficient - some values within range may be outside of the box, and this approach would never select any of those values.
Q4 was graded by Amanda and Q5 was graded by Gautam, Please direct any grading related questions to the T.A. who graded the problem.
The most common error in Q5 involved an incorrect approach to decide the order in which the child subtrees of a given node should be visited.
The two most common incorrect strategies involved either visiting the children in decreasing order of
Some submissions failed to notice that the order in which the subtrees are visited matters.
And a few others used an incorrect recurrence relation.
Effective next week, I will be moving my Wednesday 3:30-4:30 office hours to 12-1 on Fridays, due to the change in homework due date. This change is reflected on the course calendar.
I will not be having office hours this Friday 4/21.
The grading for HW 5 is finished. The graders this time were:
p4: Tianyu
p5: Andrew Brockmann
Following is some explanation on the common types of errors/issues in problem 5 submissions. There were, broadly speaking, two major classes of issues.
Issue #1: Algorithm design is incomplete or incorrect.
(i) Numerous submissions tried using a graph consisting of the locations on the race track, with edges drawn between nodes when a car can move from one node to the other in one time step. This is perhaps the most natural thing to try, but this approach faces problems because we can take different paths to arrive at the same node with different velocities, and the set of nodes we can immediately travel to depends on our current velocity. Consequently, no single graph that we can create will suffice - either it will not allow for all possible paths through the race track, or it will permit some invalid paths.
(ii) Other submissions recognized that tracking our current velocity was necessary but fell into a more subtle pitfall. Specifically, we may get incorrect output if we mark a position as "visited" the first time we reach it and then disregard all other paths through that position. (The correct approach here is to mark a state, position + velocity, as visited.) Oddly enough, reaching each position as fast as possible will not necessarily bring us to the finish line as fast as possible. Let each state be represented as a 5-tuple
(iii) Other people crafted a recursive algorithm to be implemented with memoization. The issue here is that a memoization order is needed, and in the most general case (where no single race track is specified), creating a valid memoization order is not simple. Memoization works nicely in many DP problems because each entry in a DP table can be computed by reference to table entries that have already been filled in. That is, we can specify an order in which to fill in a DP table (row by row, diagonal by diagonal, etc.) such that each value only depends on values which have already been filled in. Generally, our race track might be complicated (e.g., it might zigzag through the grid), so a valid memoization order is not easy to produce. Without memoization, these algorithms will not be efficient.
Issue #2: Runtime analysis is incomplete.
Note that the algorithmic runtime should always be specified in terms of the input size. In this case, the input is the
(i) The standard approach to this problem was to construct a graph and then run a shortest path algorithm on it - usually BFS, though Dijkstra was sometimes used too. For algorithms that used BFS, for example, it was incorrect to simply say that the algorithm was
(ii) Other submissions fell short of a complete runtime analysis by setting bounds for
The midterm exam will be held on Thursday, March 16, 7:15-9:15 PM in Agriculture Hall room 125.
Please make sure to get to the room *15 minutes before* the start of the exam. The exam will begin and end promptly.
You are allowed to bring a cheat-sheet to the exam -- one letter-sized sheet, front and back. No other material, books or notes, is allowed.
Just a reminder that Tianyu has office hours 5-6 today, a change from his usual office hours.
Name | Office Hours | |
---|---|---|
Gautam Prakriya | When? Where? | |
Shuchi Chawla | When? Where? | |
Andrew Morgan | When? Where? | |
Willa Cai | When? Where? | |
Newton Wolfe | When? Where? | |
Tianyu Liu | When? Where? | |
Marcus Millin | When? Where? | |
Andrew Brockmann | When? Where? | |
Baris | When? Where? | |
Amanda Strominger | When? Where? | |
Baris Aydinlioglu | When? Where? |