Dr. Gabriel Robins
Professor of Computer Science
Department of Computer Science
School of Engineering and Applied Science
University of Virginia

www.cs.virginia.edu/robins
Email: GabeRobins@gmail.com
Phone: (434) 249-0809
Gabe's Vitae / Resume (NIH Biosketch)

Mailing address:
P.O. Box 6189
Charlottesville, VA 22906-6189

CS6161 - Algorithms, University of Virginia

  • Syllabus (which includes the cheating/plagiarism policy)

  • Emails and announcements to the class:

  • Prof and TA contact information and office hours

  • Initial questionnaire

  • Basic Concepts Summary


  • The homework readings in this class consist of a minimum of 20 items from the recommended readings list. The required ones are highlighted in red font there, while the rest are "electives". Any items above 20 will count towards extra-credit. The minimum writeup requirements are a 2-paragraph description for each paper / video / Web site, and a 2-page description for books (longer writeups are of course welcomed also). Each writeup should summarize what you learned from it, what you found interesting / surprising, etc.

    At least two submissions are due each Monday (by 5pm, beginning the second week of classes, with penalties for late submissions), and more than two submissions per week are of course very welcomed and highly recommended, but no more than two submissions per day will be accepted. This policy is designed to help you avoid "cramming" at the end of the semester, and also to help you retain more of the knowledge by pacing it more evenly over time. Please Email all submissions to homework.cs6161@gmail.com


  • Lecture slides:

  • Lecture videos (also available as a YouTube Playlist):
    1. Lecture 01 video - syllabus, course overview, organization, readings, problem solving, centrifuge problem, beautiful proofs (and the Panopto version of Lecture 01 video)
    2. Lecture 02 video - scale of things, elegant proofs, mathematical intuition, induction, primes, halting problem, non-existence proofs (and the Panopto version of Lecture 02 video)
    3. Lecture 03 video - prime numbers, pigeon hole principle, maximum sum subarray, halting problem implications, self-replication, self-printing program, generalized numbers (and the Panopto version of Lecture 03 video)
    4. Lecture 04 video - time & space complexities, asymptotic bounds, big-O, recurrences, stirling's formula, data structures, arrays, stacks, queues, linked lists, trees, height-balance (and the Panopto version of Lecture 04 video)
    5. Lecture 05 video - detecting list circularity, maximum subarray sum, data structures, hash tables with good worst-case, sorting algorithms and lower bound, sorting ratios, majority detection, finding max and next-to-max (and the Panopto version of Lecture 05 video)
    6. Lecture 06 video - sorting algorithms, bubble sort, odd-even sort, selection sort, insertion sort, heapsort, smoothsort, mergesort, quicksort, meta sorts (and the Panopto version of Lecture 06 video)
    7. Lecture 07 video - specialized sorting algorithms, shell sort, counting sort, Exabyte clouds, bucket sort, radix sort, sorting animations, meta heuristics, sounds of sorting, sorting ratios (and the Panopto version of Lecture 07 video)
    8. Lecture 08 video - minimum finding, lower bounds, finding min / max / next-to-max, order statistics, selection, median finding (and the Panopto version of Lecture 08 video)
    9. Lecture 09 video - order statistics, i-th selection, median, QuickSelect, linear time median finding (and the Panopto version of Lecture 09 video)
    10. Lecture 10 video - computational geometry, range queries, dimensionality, inclusion-exclusion principle, generalizations, polygons, point location, raycasting, boundary cases, numerical imprecision (and the Panopto version of Lecture 10 video)
    11. Lecture 11 video - computational geometry, point-in-polygon location, trapezoids method, planar subdivision search, worst-case examples, algorithmic art, convex hulls, Jarvis' march, gift wrapping method (and the Panopto version of Lecture 11 video)
    12. Lecture 12 video - convex hulls, Graham's scan, CH meta-heuristics, expected CH sizes, Quickhull, Mergehull, lower bound for convex hulls (and the Panopto version of Lecture 12 video)
    13. Lecture 13 video - Chan's convex hull algorithm and its analysis, combining slower algorithms to yield a faster one (and the Panopto version of Lecture 13 video)
    14. Lecture 14 video - convex polygon intersection and diameter, rotating calipers method, Voronoi diagrams, nearest neighbors, Delanuay triangulations, Euclidean minimum spanning trees, proximity relations (and the Panopto version of Lecture 14 video)
    15. Lecture 15 video - Part 1 - Voronoi diagrams and algorithms, Voronoi art, majority element problem (and the Panopto version of Lecture 15 video)
    16. Lecture 15 video - Part 2 - algorithms for majority detection, algorithmic invariants, simplicity in design (and the Panopto version of Lecture 15 video)
    17. Lecture 16 video - maximum subarray problem, skewed divide-and-conquer, wall gate finding problem, exponential search, marble drop problem, random permutaions, fixing biased coins (and the Panopto version of Lecture 16 video)
    18. Lecture 17 video - exponential search, amortized cost, persistent data structures, searching the past, collinearity detection, pointer-marching searches (and the Panopto version of Lecture 17 video)
    19. Lecture 18 video - pointset distributions, spanning tree growth rates, worst-case examples, "comb-like" trees, average case analyses, areas / volumes / integrals / pyramids (and the Panopto version of Lecture 18 video)
    20. Lecture 19 video - midterm solutions, the Turing Test, artificial intelligence, the Chinese room scenario, science fiction, robotics, self-driving cars (and the Panopto version of Lecture 19 video)
    21. Lecture 20 video - Robotics and AI, science fiction vs. reality, robotic surgeons, Chess / Go / Jeopardy AI's, "gray goo", and the technological singularity (and the Panopto version of Lecture 20 video)
    22. Lecture 21 video - NP-completeness, tractability, non-determinism, reducibilities, problem transformations, NP hardness, boolean satisfiability, Cook/Levin theorem, guess-and-verify, model-independence (and the Panopto version of Lecture 21 video)
    23. Lecture 22 video - robustness of P and NP, reduction types, 3-SAT, classic NP-complete problems, graph cliques, set covers, hamiltonian cycles, graph coloring, partitions, knapsacks, bin packing, Steiner trees, traveling salesperson (and the Panopto version of Lecture 22 video)
    24. Lecture 23 video - Karp's paper, reductions among problems, PSPACE completeness, primality testing, decision vs. optimization, graph cliques, independent sets, reduction of 3-SAT to graph colorability
    25. Lecture 24 video - 3-SAT and graph colorability, colorability of low-degree graphs, NP completeness of planar graph coloring, the four-color theorem, colorings on more general surfaces (and the Panopto version of Lecture 24 video)
  • Problem Sets:

  • Sample Term project (You may also come up with your own project idea, subject to my approval.) All projects must be demoed and turned in before the final exam date.

  • Algorithm demos / visualizations:

  • Course evaluation (plain text version)

  • Q and A: PLEASE READ THIS OFTEN!

  • Good supplemental readings:

  • Good puzzles and games Web stores:


    TA office hours:

    Return to Gabriel Robins' home page