Randomization for Recitation 5Patrick Dale McCray, Ph.D.23 February, 2011(initial version)Assignment of problems to speakers for recitation scheduled on Wednesday, 2 March, 2011Assignment of problems to speakers for recitation 4 scheduled on Wednesday, 23 March, 2011Assignment of problems for recitation 5 scheduled on Wednedsay, 6 April, 2011Initialize the psuedorandom number generators.In[3]:=SeedRandom@DIn[4]:=RandomInteger@81 000 000 000, 9 999 999 999<DOut[4]=3 797 531 460In[5]:=SeedRandom@2 036 873 713DThis ten digit number, 2036873713, was initially generated from the system clock circa 3 PM, Wednesday, 23 February, 2011.In[6]:=SeedRandom@7 667 980 127DThis ten digit number, 7667980127, was initially generated from the system clock circa 4:36 PM, Tuesday, 8 March, 2011.In[7]:=SeedRandom@4 925 302 646DThis ten digit number, 4925302646, was initially generated from the system clock circa 12:11 PM, Friday, 1 April, 2011.Generate random samples of the first ten problemsChoose 9 of problems 1 through 10 for Math 149 03:In[8]:=Math14903 = RandomSample@81, 2, 3, 4, 5, 6, 7, 8, 9, 10<,9DOut[8]=82, 4, 3, 1, 8, 5, 6, 10, 9<Choose 6 of these nine problems for Math 149 01:In[9]:=Math14901 = RandomSample@Math14903, 6DOut[9]=83, 2, 4, 6, 10, 1<From this random sample we can assign Problem 7 to Person 3. Computationally,In[10]:=Math14901@@3DDOut[10]=4For recitation 5 we need 10 of 12 problems for 03, and 5 of those 12 for 01.In[11]:=ProblemList = 81, 2, 3, 5, 7, 8,9,10,11,12<Out[11]=81, 2, 3, 5, 7, 8, 9, 10, 11, 12 <In[12]:=Math14903 = RandomSample@ProblemList, 10DOut[12]=83, 10, 11, 2, 8, 9, 5, 1, 7, 12 <In[13]:=Math14901 = RandomSample@Math14903,5DOut[13]=87, 11, 5, 10, 2<2
View Full Document