Fall Quarter, 2017

Intermediate Data Structures and Algorithms

News

  • (Dec 8) Problems discussed in class posted (set 3)
  • (Dec 7) Solution homework 9
  • (Nov 30) Extended deadline for homework 9
  • (Nov 30) Midterm 2 posted
  • (Nov 28) Solution homework 8 posted
  • (Nov 27) Problems discussed in class posted (set 2)
  • (Nov 22) Mock exam solution fixed
  • (Nov 21) Mock exam for Midterm 2 posted
  • (Nov 21) Homework 7 solution
  • (Nov 17) Homework 8,9 posted
  • (Nov 17) Weighted graphs slides posted
  • (Nov 14) Midterm 2 syllabus posted
  • (Nov 13) Homework 6 solution posted
  • (Nov 12) Homework 7 posted
  • (Nov 8) Midterm 1/A, 1/B posted
  • (Nov 8) Homework 5 solution posted
  • (Nov 6) Master theorem problems w solution posted
  • (Nov 6) Problems discussed in class posted (set 1)
  • (Nov 3) Howework 6 posted (short)
  • (Nov 2) Mock exam for Midterm 1 posted
  • (Nov 1) Midterm 1 syllabus posted
  • (Oct 30) Homework 5 and homework 4 solution posted
  • (Oct 25) Greedy slides updated
  • (Oct 24) Homework 3 solution posted
  • (Oct 20) Homework 4 posted
  • (Oct 19) Slides on greedy and dynamic programming
  • (Oct 17) Homework 2 solution posted
  • (Oct 13) Homework 3 posted
  • (Oct 6) Homework 2 posted, Divide and Conquer slides posted
  • (Sep 29) Check your room before going to the discussion
  • (Sep 29) Homework 1 posted
  • (Sep 29) Room Change: Discussion 023 (Monday) is SURGE 172
  • (Sep 29) Slides posted
  • (Sep 18) Dipankar is our TA

  • Overview

    CS 141 introduces the "core" of Computer Science: data structures like graphs, and problem solving techniques. This material is essential in almost all of our upper-division courses.

    Catalog description: CS 141 Intermediate Data Structures and Algorithms 4 Lecture, 3 hours; discussion, 1 hour. Prerequisite(s): CS 014 with a grade of "C-" or better; CS 111/MATH 111; MATH 009C or MATH 09HC; proficiency in C++. Explores basic algorithm analysis using asymptotic notations, summation and recurrence relations, and algorithms and data structures for discrete structures including trees, strings, and graphs. Also covers general algorithm design techniques including "divide-and-conquer," the greedy method, and dynamic programming. Integrate knowledge of data structures, algorithms, and programming.


    Basic information

    Syllabus:
  • Read the syllabus.

  • Instructor:
  • Stefano Lonardi (stelo@cs.ucr.edu)
  • Office hours: Friday 10-11am.
  • Office: CHUNG HALL, room 325.

  • Teaching Assistant:
  • Dipankar Ranjan Baisya (dipankar.baisya@email.ucr.edu)
  • Office hours: Tuesday 3-5pm
  • TA Office hours are held in CHUNG HALL, room 110.

  • Lectures:
  • MWF 1:10am-2pm, Bourns Hall, room A125.

  • Text Book:
  • Algorithms, by Sanjoy Dasgupta, Christos Papadimitriou, Umesh Vazirani. McGrawHill 2007.

  • References:
  • Introduction to the Design and Analysis of Algorithms, 2nd edition, by A. Levitin.
  • Introduction to Algorithms (3rd Edition) by Thomas H. Cormen, Charles E. Leiserson, Ronald L. Rivest, and Cliff Stein, MIT Press.
  • Algorithm Design (Foundations, Analysis, and Internet Examples) by Michael T. Goodrich and Roberto Tamassia, Wiley.

  • Approximate Time Requirements:
  • This is a four-unit CS course. As such, you should expect to spend the following approximate amount of time: 3 hours/week in lecture
    1 hour/week discussion
    6 to 10 hours/week doing individual study (readings, homework, programming assignments, preparation for lectures, etc).
  • Please don't underestimate the time you will need to spend on this course. These are real time amounts spent by average successful past students. Computer Science and Engineering are challenging disciplines requiring extensive time to master.

  • Discussion Board

    We will be using Piazza for class discussion. The system is highly catered to getting you help fast and efficiently from classmates, the TA, and myself. Rather than emailing questions to the teaching staff, I encourage you to post your questions on Piazza. If you have any problems or feedback for the developers, email team@piazza.com. Find our class page at: https://piazza.com/ucr/fall2017/cs141/home

    Lectures

    Read the book and the slides before lecture! Reading ahead is one of the most effective ways of doing better in class -- you'll be amazed how much more comprehensible and useful the lectures will be. The schedule is subject to change as the quarter progresses.

    Lecture Notes and other Material:

  • Course Overview [PDF]
  • Algorithm Analysis [PDF]
  • Divide & Conquer [PDF]
  • Greedy [PDF] (updated Oct 25)
  • Note about opt substructure[PDF] (Nov 1)
  • Dynamic Programming [PDF]
  • Weighted Graphs [PDF]

  • Content covered in lectures:
  • Sep 29: Overview of the course, Analysis (slides 1-17)
  • Oct  2: Analysis (slides 18-35) [hw1 posted]
  • Oct  4: Analysis (slides 36-54)
  • Oct  6: Analysis (slides 55-71)
  • Oct  9: Analysis (slides 72-end), Divide and Conquer (slides 1-6) [hw1 due][hw2 posted]
  • Oct 11: Divide and Conquer (slides 7-18)
  • Oct 13: Divide and Conquer (slides 19-40)
  • Oct 16: Divide and Conquer (slides 41-49) [hw2 due][hw3 posted]
  • Oct 18: Divide and Conquer (slides 50-57)
  • Oct 20: Divide and Conquer (slides 58-end)
  • Oct 23: Greedy (slides 1-29) [hw3 due][hw4 posted]
  • Oct 25: Greedy (slides) [Lecture by N. Young]
  • Oct 27: Greedy (slides) [Lecture by J. Mcdaniel]
  • Oct 30: Greedy (slides -end) [Lecture by J. Mcdaniel][hw4 due][hw5 posted]
  • Nov  1: Dynamic Programming (slides 1-18)
  • Nov  3: Dynamic Programming (slides 19-33)
  • Nov  6: Midterm 1 prep [hw5 due][hw6 posted]
  • Nov  8: Midterm 1
  • Nov 10: Holiday: Veterans Day
  • Nov 13: Dynamic Programming (34-43) [hw6 due][hw7 posted]
  • Nov 15: Midterm 1 review, Dynamic Programming (44-49)
  • Nov 17: Dynamic Programming (50-end), Weighted graphs (1-5)
  • Nov 20: Weighted graphs (6-20) [hw7 due][hw8 posted]
  • Nov 22: Weighted graphs (21-33)
  • Nov 24: Holiday: Thanksgiving
  • Nov 27: Midterm 2 prep [hw8 due][hw9 posted]
  • Nov 29: Midterm 2
  • Dec  1: Weighted graphs (34-)
  • Dec  4: Weighted graphs (-) [hw9 due]
  • Dec  6: Weighted graphs (-end)
  • Dec  8: Final prep
  • Dec 12: Final 7pm-10pm
  • Do not put off reading the assignments or you will risk falling behind. Reading ahead is one of the most effective ways of doing better in class -- you'll be amazed how much more comprehensible and useful the lectures will be.

    Python Code


    Homework and Solutions

    Homework papers should be prepared in LaTeX or some other word-processing system that can handle equations (figures can be hand-drawn), then converted/scanned to pdf format and turned in via Gradescope. Each student's work should be fully authored by his or her self, in his or her own words - that is, each student should turn in only text authored by his or her self. Each student is responsible for understanding all text that they submit. Finally, in each turned-in work, each student should appropriately cite any help or ideas that came from any other source. Violation of this policy is plagiarism and will be referred to the UCR student conduct office.


    Exams and related material


    General course features and policies


    Some useful pointers