CS 206 -- Feb 1, 2005

lecture notes
class/program A
class/program B NOTE: this class will not compile
program/class BB
class/program C NOTE: this class will not compile
class/program Person Note: infinite loop when run
program/class Adult
program/class Rand Requires the following command line arguments (in order):
  1. number of items to be permuted (10-100 is good)
  2. number of trials (at least 10 times the number of items -- preferably much more)
  3. number of loops (causes some algorithms to run longer)
  4. Color intensity typically near 5, bigger numbers cause things to get red/blue quicker. For instance, at 5 a 20% diff from expected yields full red / blue.
  5. Algorithm number: 1==base swapper, 2==double swapper, 3=list remover (smaple without replacement), 4==another swapper try, 5==like 3 but done in-place so faster
Note: you may need to iconify/deiconify the resulting program window to see anything.