jeffgerickson / algorithms

Bug-tracking for Jeff's algorithms book, notes, etc.
7.92k stars 1.02k forks source link

[Oops.] A small bug in Section 0.3? #155

Open vistb opened 5 years ago

vistb commented 5 years ago

Chapter number or note title: Section 0.3

Page number: 9 (or 27 in the v1 PDF file)

Error description: In the pseudocode of ApportionCongress, the expression "n-R" appears (at least) twice, which I think should be "R-n", as n is the number of states and R is the number of representatives (thus R>=n).

Suggested fix (if any): As mentioned above, change "n-R" to "R-n".

echuber2 commented 5 years ago

Feeling déjà vu... Here are some related issues for this algorithm. Maybe they should all be double-checked. #21 #85

echuber2 commented 5 years ago

(Note: not a duplicate. The issue still seems present in the June PDF.)

jeffgerickson commented 5 years ago

Issues #21 and #85 are indeed fixed.