CS 411 Fall 2025: Analysis of Algorithms


CS 411 Fall 2025
Analysis of Algorithms

Department: Computer Science, UAF
Instructor: Glenn G. Chappell
Office: 539 Duckering
Office Hours: In person 11:45–12:45 MWF, 3:30–4:00 MW on fall 2025 class days, or by appointment; private Zoom meetings available on request
E-mail: ggchappell@alaska.edu

Announcements

Course Materials

Materials are listed with the most recent at the top.

Week Class Meetings Readings & Homework Handouts & Code
See Git repository for code
Week 7
Oct 6–Oct 10
  • Oct 10: Midterm Exam
  • Oct 8: Geometric problems (cont’d) [L 5.5]; Transform and Conquer [L Ch 6 intro]; presorting [L 6.1];
    Outline
  • Oct 6: Multiplication (cont’d) [L 5.4]; geometric problems [L 5.5]
    Outline & Supplemental Notes
  • Oct 6: Read L Ch 6 intro, 6.1.
  • closest_pair_dc.cpp [C++ source]
    Closest-Pair, Divide and Conquer Solution
Week 6
Sep 29–Oct 3
  • Midterm Exam Review Problems
  • bintree_traverse.cpp [C++ source]
    Binary Tree traversals: preorder, inorder, postorder
  • quicksort.cpp [C++ source]
    Hoare Partition & Quicksort
  • iterative_merge_sort.cpp [C++ source]
    Iterative Merge Sort using random-access iterators
  • merge_sort.cpp [C++ source]
    Merge Sort using iterators
  • In-Class Worksheet 1: The Master Theorem—Solutions [PDF]
    Worksheet distributed in class Mon, Sep 29
  • In-Class Worksheet 1: The Master Theorem [PDF]
    Worksheet distributed in class Mon, Sep 29
  • inversions_test.cpp [C++ source]
    Test program for function template inversions
    Used in Assignment 3, Exercise B
  • contigsum_test.cpp [C++ source]
    Test program for function template contigSum
    Used in Assignment 3, Exercise A
Week 5
Sep 22–Sep 26
  • Online Quiz 5—on Canvas
    Due 5 pm Sun, Sep 28
  • Sep 26: Read L Ch 5 intro, 5.1.
  • Sep 24: Read L 4.5.
  • Sep 22: Read L 4.4.
  • introselect.cpp [C++ source]
    Introselect with Lomuto Partition
  • mom_select.cpp [C++ source]
    Median-of-Medians Selection
  • quickselect.cpp [C++ source]
    Quickselect with Lomuto Partition
  • rpmult.cpp [C++ source]
    Russian peasant multiplication
  • binary_search.cpp [C++ source]
    Binary Search using iterators
Week 4
Sep 15–Sep 19
  • topological_sort.cpp [C++ source]
    Topological sort
    Uses find-source algorithm
  • bridges_test.cpp [C++ source]
    Test program for function bridges
    Used in Assignment 2, Exercise A
    Uses the “doctest” unit-testing framework, version 2
    Requires doctest.h, bridges.hpp, bridges.cpp
  • insertion_sort_vector_recurse.cpp [C++ source]
    Insertion Sort on a vector, recursive
  • Coding Standards
  • graph_traverse.cpp [C++ source]
    Graph traversals: DFS & BFS
Week 3
Sep 8–Sep 12
  • Sep 12: Brute force for geometric problems [L 3.3]
    Outline
  • Sep 10: Algorithmic strategies, brute force, exhaustive search [L Ch 3 intro]; simple brute-force methods [L 3.1–3.2]
    Outline & Supplemental Notes
  • Sep 8: Analysis examples [L 2.5, Appendix B]
    Outline
  • Online Quiz 3—on Canvas
    Due 5 pm Sun, Sep 14
  • Sep 12: Read L 3.4, 3.5.
  • Sep 10: Read L 3.3.
  • Sep 8: Read L Ch 3 intro, 3.1, 3.2 (skip string-matching material).
  • closest_pair_bf.cpp [C++ source]
    Closest Pair, Brute Force solution
  • selection_sort_vector.cpp [C++ source]
    Selection Sort on a vector
  • bubble_sort_vector.cpp [C++ source]
    Bubble Sort on a vector
  • fibo_matrix.py [Python 3 source]
    Computing Fibonacci numbers
    Based on matrix product
  • fibo_iterate.py [Python 3 source]
    Computing Fibonacci numbers
    Iterative
  • fibo_recurse.cpp [C++ source]
    Computing Fibonacci numbers
    Recursive (return 2, with wrapper)
  • fibo_iterate.cpp [C++ source]
    Computing Fibonacci numbers
    Iterative
  • fibo_recurse_slow.cpp [C++ source]
    Computing Fibonacci numbers
    Slow recursive method
Week 2
Sep 1–Sep 5
  • Sep 5: Analyzing recursive algorithms [L 2.4, Appendix B]
    Outline
  • Sep 3: Analyzing nonrecursive algorithms [L 2.3, Appendix A]
    Outline
  • Sep 1: No class (Labor Day)
  • num_bits.cpp [C++ source]
    Count bits in binary representation
  • factorial_recurse.cpp [C++ source]
    Recursive computation of a factorial
  • insertion_sort_vector.cpp [C++ source]
    Insertion Sort on a vector
Week 1
Aug 25–Aug 29
  • Aug 29: Asymptotic notation [L 2.2]
    Outline
  • Aug 27: Framework for analysis of algorithms [L Ch 2 intro, 2.1]
    Outline
  • Aug 25: Course introduction; introduction to analysis of algorithms [L Ch 1]
    Outline
  • Online Quiz 1—on Canvas
    Due 5 pm Sun, Aug 31
  • Aug 29: Read L 2.3.
  • Aug 27: Read L 2.2.
  • Aug 25: Read L Ch 1 intro, 1.1–1.4, Ch 2 intro, 2.1.
    The above date is when the reading is assigned. It should be done by the next class meeting (Wed, Aug 27 in this case). “L” refers to the Levitin text.
  • first_fit.cpp [C++ source]
    First Fit: approximation algorithm for the Bin Packing Problem
  • Semester Plan
    Updated Sat, Aug 23
  • Syllabus
    Distributed in class Mon, Aug 25

External links last checked 2025-10-03.
Pearson Computer Science Resources: Levitin
From the publisher of the Levitin text, The “Student Resources” link allows you to download a ZIP file of PowerPoint slides.
Git
Git is the the version-control software used in this class. This site includes downloads and a helpful tutorial.
Learn Git Branching
An excellent tutorial. If you are familiar with the Git operations clone, pull, push, add, and commit, but you are having trouble wrapping your head around branching, then this is for you.
Class Git Repository
Source code used in the class will be available in this repository.
cppreference.com
A comprehensive, up-to-date reference for the C & C++ programming languages and their standard libraries. I have found this site to be very helpful; I use it often. One hidden gem is the Useful resources page
Jason Turner’s C++ Best Practices
An excellent page with recommendations on C++ development tools and their use. This is my primary source for which compiler warnings to enable—among other things.
doctest: The fastest C++ single-header testing framework
The website (on GitHub.com) for doctest, a C++ unit-testing framework used by all posted test programs in this class. doctest is simple and easy to use, it comprises only a single header file, and it is available as a free download distributed under a FLOSS license.