4 May 2009 20:33
Random permutation of a list
Matthew Leingang <leingang <at> courant.nyu.edu>
2009-05-04 18:33:00 GMT
2009-05-04 18:33:00 GMT
Hi, I'm just getting into the pgfmath package more. Good stuff! I'm writing an exam and would like to randomly permute the order of multiple-choice items. I was thinking of using the \pgfmathdeclarerandomlist command and then writing something to do a Knuth shuffle: for each i from 1 to n, choose a random number j from 1 to n, then swap position i and j. Before I get too deep, has anyone done this or something like this before? TIA, Matt -- Matthew Leingang Clinical Associate Professor of Mathematics leingang <at> courant.nyu.edu ------------------------------------------------------------------------------ Register Now & Save for Velocity, the Web Performance & Operations Conference from O'Reilly Media. Velocity features a full day of expert-led, hands-on workshops and two days of sessions from industry leaders in dedicated Performance & Operations tracks. Use code vel09scf and Save an extra 15% before 5/3. http://p.sf.net/sfu/velocityconf
RSS Feed