Please carefully read the Academic Integrity before you start working on the homework assignments.

In short, you can get help from the instructors, TAs, textbooks (or relevant books), the Internet, or discussions with your classmates, but you must cite them fully and completely (i.e., provide citations to the book or website link, acknowledge the other students that had discussions with you). Again, you are NOT allowed to:

  • copy anything from the book or the Internet,
  • read or look at anyone else’s solutions (write-up or code),
  • share your solutions (write-up or code) with any other students, during or after the completion of the course.

When you write down your solution, it MUST be close-book. This is to make sure you truly understand and can recreate the solutions.

📃 Course Policy Test

We have a course policy test about academic integrity and course policy. It takes 1/100 point in your overall grade. This test is due on 01/11.

📃 Entrance Exam

There is an entrance exam for this course. There are 4 programming problems, covering several important algorithms you should have learned in prerequisite courses (basic programming, basic sorting, basic DP, and graph algorithms). You need to finish them in the first week. They will take 9/100 points in your overall grade. The four problems will be 11 points in total, and the full mark is 9 points. If you get more than 9 points, they will count as bonus points. Ideally you should pass all the 4 problems. ⚠ We would not recommend anyone getting <= 6 points to take the course.

If you cannot finish them in the first week, then CS 142 can be very challenging for you. You should consider taking prerequisite courses for algorithms and programming, including CS 10A/B/C, 11, 111 and 141.

The deadline for the entrance exam is 01/18.

Problem-Solving Assignments

All problems will be given on codeforces (including the entrance exam), so we do not post the problems here.

We will use CodeForces to submit and test codes. You also need to submit a short report to describe your algorithm and specify your submission id. Here is a guideline about using CodeForces. Here is a beginner’s cheatsheet for learning programming.

We run automatic code comparison programs on student solutions. These programs are very good at detecting similarity between code, even code that has been purposefully obfuscated. Such programs can compare a submitted assignment against all other submitted assignments, against all known previous solutions of a problem, etc. The signal-to-noise ratio of such comparisons is usually very distinctive, making it very clear what code is a student’s original creative work and what code is merely transcribed from some other source. Cheating is simply not worth the risk.

You need to submit a brief report on how you solved these problems, including:

  • Your name, SID and/or NETID, and your codeforces ID;
  • Submission ID (there is a unique id for each submission);
  • Describe the algorithm you designed;
  • Show cost analysis if necessary.

You will not get the point if you don’t provide the report to explain how your algorithm works.

Assignment Deadline
Problem-Solving I 02/08
Problem-Solving II 02/22
Problem-Solving III 03/14

Each programming assignment takes 10/100 points in your overall grade. In each assignment, there are six problems. The first three problems are basic problems, and are easier. Each of them is worth for 3 points.
The last three problems are challenge problems and are harder. Each of them is 1 point. You can choose any of the three challenge problems to work on. If you work on more than one challenge problems, they will be counted as bonus points.

For each challenge problem that you solved before the regular deadline, you will get one bonus candy.

For challenge programming assignments, you can work on them after the deadline - as long as you finish them before the end of the class, you can still get half of the credits.

Performance-Engineering Assignments

Performance-Engineering Assignments are mini projects that requires programming. Generally, your goal is to write parallel code to engineer a specific problem. You will test and run your code on a server at UCR, and the detailed instruction will be given in the assignment problem description.

Each performance-engineering assignment contributes 15/100 to your overall grade. Similar to the problem-solving training, you can get more than 15 points if you get the bonus points.

Assignment Deadline
Performance-Engineering (PE) HW I 01/25
Performance-Engineering (PE) HW II 02/15

Written Assignments

There are two written assignmetns. Each takes 10/100 points in your overall grade. The written part is similar to other algorithm courses you have taken, and you must use LaTeX to prepare your solution. Here you can find sample code for writing solutions using LaTeX.

In grading, we will reward not only correctness but also clarity and simplicity. To avoid losing points for hard-to-understand solutions, you should make sure your solutions are either self-explanatory or contains good explanations. Please understand that grading your assignments is a lot of work for your TAs and readers, especially determining the correctness and cost bounds for your algorithms. We reserve the right to manually deduct points for solutions that are conceptually correct but does not show a sincere attempt to explain the ideas clearly.

Assignment Deadline
Written (WR) HW I 02/01
Written (WR) HW II 02/29

Presentation

At the end of the class, you can choose to give a presentation in class to get bonus points. We encourage you to present one of your favorite bonus questions and your solution to the class. For bonus question presentation, you have to pass all the test cases before the presentation.