Intermediate Data Structures and Algorithms
Note: these are the materials from WINTER 2005.
Go here for other offerings of cs141.
winter quarter, 2005
You may want to review the grading policy... see /Grades and make sure you
note that change to the policy described there.
Hwk4 is graded and available at the instructor's office (Surge 347).
Stop by during office hours (Tuesday 2-3pm) or send email to make
- March 16, Wednesday, 2-4pm, Surge 349: study group
- March 17, 11:30am-2:30pm -- final exam
Lectures, Homeworks, Projects
- Course administration. What is an "algorithm"? Correctness, running time. Two algorithms for greatest common divisor, analyzed for correctness and running time.
Comments about /Proofs
- Euclid's algorithm for g.c.d. --- worst-case running time.
- Fibonacci numbers - recursion diagrams
- mathematics (polynomials, exponentials, sums), Big-O notation.
- intro. dynamic programming - fibonacci, counting paths, n choose k
- More dynamic programming - counting odd paths, shortest paths, longest paths, subset sum
Lectures 7 and 8 - Longest ascending subsequence, longest common subsequence (see book section 11.5).
Subset sum code
added to the /Repository
so you can run the algorithms and see detailed code.
- depth-first search
- cut vertices by DFS
Lecture11 - recurrence relations, recurrence trees (see here: S04_CS141:RecurrenceRelations
Lecture12 - DFS in digraphs and topological sort (S04_CS141:DFSInDiGraphs
Lecture13 - bread-first-search, graph representations (S04_CS141:BreadthFirstSearch
Lecture14 - shortest paths (Dijkstra's algorithm) (S04_CS141:ShortestPathsByDijkstras
Lecture15 - weighted graphs, minimum spanning trees (S04_CS141:MinimumSpanningTreesByKruskals
/Prog1 -- Programming assignment 1. (Solution available in the /Repository)
/Prog2 - program assignment 2 - making change. (solution in /Repository)
/Prog3 - text formatting. (solution in /Repository)
/Prog4 - bread-first-search in maze (solution in /Repository)
practice midterm and solutions to practice midterm
midterm solutions and /Grades
Reading: Read chapters 3, section 11.5 (longest common subsequence algorithm), chapter 12 (graphs, focus on DFS, BFS, Dijkstra's algorithm)
Jason's demonstration of longest common subsequence algorithm...
/Grades - grading policy changed (best 3 of 4 on hwks and progs, final can replace midterm)
C++ and STL documentation
/Repository -- Get started for /Labs by downloading files from the /Repository .
/Labs (attendance required).
Lab2 - survey on book topics, search algorithms, stl, hwk1, prog2
instructor: Neal E. Young (office hours: Tuesday, 2-3pm, Surge 347)
- Serdar Bozdag (office hours: Thursday, 3:30-4:30pm, Surge 282),
- Adam Meadows (office hours: Wednesday, 12-1pm, Surge 282)