Beruflich Dokumente
Kultur Dokumente
MIT 6.042J/18.062J
Albert R Meyer March 5, 2012 lec 5M.1 Albert R Meyer March 5, 2012 lec 5M.2
Albert R Meyer March 5, 2012 lec 5M.3 Albert R Meyer March 5, 2012 lec 5M.4
1
Generalized Die Hard Generalized Die Hard
Claim: Can get any multiple of Claim: Can get any linear
gcd(a, b) into a bucket combination of a, b into a
(if there’s room for it). bucket (if there’s room for it).
Namely, say 0 ≤ sa +tb < b.
Get sa +tb into the b gal.
bucket as follows:
Albert R Meyer March 5, 2012 lec 5M.5 Albert R Meyer March 5, 2012 lec 5M.6
# b emptyings must be -t
Albert R Meyer March 5, 2012 lec 5M.7 Albert R Meyer March 5, 2012 lec 5M.8
2
MIT OpenCourseWare
http://ocw.mit.edu
For information about citing these materials or our Terms of Use, visit: http://ocw.mit.edu/terms .