Skip to content

[GradTrak] Optimal course assignment for unit-threshold buckets - #1211

Open
ethanransing wants to merge 1 commit into
ethan/btll-bipartite-breadth-matchingfrom
ethan/btll-unit-threshold-matching
Open

[GradTrak] Optimal course assignment for unit-threshold buckets#1211
ethanransing wants to merge 1 commit into
ethan/btll-bipartite-breadth-matchingfrom
ethan/btll-unit-threshold-matching

Conversation

@ethanransing

@ethanransing ethanransing commented Sep 13, 2026

Copy link
Copy Markdown
Contributor

Split out of #1141. Stacked on #1210.

Same problem as #1210, for unit thresholds instead of course counts. The CS major's upper-div requirements are four buckets (Design ≥4 units, CS ≥8, CS/EE/EECS ≥8, Tech Elective ≥4) with overlapping eligible courses, filled in order with take_until_units. A course that could count toward two buckets was always consumed by the first one.

Adds assign_by_units, which does a backtracking search (most-constrained bucket first, with an upper-bound prune) to maximize the number of buckets that hit their threshold. Also adds isUpperDivision, which handles course numbers like C100, 170L, 170AC. The CS program now uses assign_by_units; seed regenerated.

5 new tests.

The CS major's upper-division requirements are four unit buckets (Design
≥4, CS ≥8, CS/EE/EECS ≥8, Technical Elective ≥4) that share overlapping
eligible courses. The program filled them in order with take_until_units,
then hand-excluded each bucket's picks from the next. A course that could
count toward two buckets was always consumed by whichever came first, even
when that left a later bucket short that it could otherwise have filled.

Replaces that with assign_by_units, a backtracking search with
most-constrained-first ordering and an upper-bound prune that maximizes
the number of buckets whose thresholds are met, with no course used twice.
Adds isUpperDivision as a shared helper for parsing Berkeley course
numbers (letter prefixes/suffixes like C100, 170L, 170AC).

Claude-Session: https://claude.ai/code/session_012F9yFMhu4JYgy3BwQSjSDC
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant