Randomization Initial21 January, 2011Patrick Dale McCray, Ph.D.In[4]:=<< Combinatorica`General::compat :Combinatorica Graph and Permutations functionality has been superseded by preloaded functionaliy. Thepackage now being loaded may conflict with this. Please see the Compatibility Guide for details.In[5]:=L = 81, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13,14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29<Out[5]=81, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29<In[9]:=LM = RandomKSubset@L, 10DOut[9]=84, 7, 10, 16, 17, 18, 19, 21, 25, 29<In[11]:=L\LMSyntax::tsntxi : "LLM" is incomplete; more input is needed.Syntax::sntxi : Incomplete expression; more input is needed .In[11]:=L2 = 81, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19<Out[11]=81, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19<In[12]:=LM2 = RandomKSubset@L2, 10DOut[12]=84, 5, 6, 7, 10, 13, 14, 16, 17, 19<Problems = 81, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13<Out[13]=81, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13<In[14]:=RandomKSubset@%,10DOut[14]=81, 2, 3, 4, 5, 6, 7, 8, 9, 10<In[15]:=RandomKSubset@Problems, 10DOut[15]=81, 2, 3, 6, 7, 8, 9, 10, 12, 13<In[16]:=RandomPermutation@10DOut[16]=82, 1, 4, 6, 9, 10, 7, 3, 8, 5<In[17]:=Class01 = 81, 2, 3, 4, 5, 6, 7, 8, 9<Out[17]=81, 2, 3, 4, 5, 6, 7, 8, 9<In[18]:=RandomKSubset@Class01, 6DOut[18]=81, 3, 4, 5, 7, 9<In[19]:=RandomPermutation@6DOut[19]=84, 3, 2, 6, 1, 5<In[20]:=RandomKSubset@81, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13<,6DOut[20]=81, 3, 5, 6, 7, 12<2
View Full Document