MichaelKaplan

14 Reputation

One Badge

18 years, 190 days

MaplePrimes Activity


These are replies submitted by MichaelKaplan

Thanks a lot. The proposed method seems to work with RandomMatrix but didn't work for me with randperm. I now found a working but ineffective solution. I used

    \code{
      $m=4;      
      $s=range(4,100);
      $pb=maple("with(combinat,randperm):[seq(randperm($m),i=1..$s)]");
      :

though I only need 2 permutations and use $pb[$s] and $pb[$s-1] in the rest of the program.

Thanks a lot. The proposed method seems to work with RandomMatrix but didn't work for me with randperm. I now found a working but ineffective solution. I used

    \code{
      $m=4;      
      $s=range(4,100);
      $pb=maple("with(combinat,randperm):[seq(randperm($m),i=1..$s)]");
      :

though I only need 2 permutations and use $pb[$s] and $pb[$s-1] in the rest of the program.

I use the following LaTeX-Code

 

  \begin{question}{Multipart}
    \numbering{alpha}
    \name{S3}
    \weighting{3,3,4}
    \code{
      $n=3;
      $pa=maple("randomize();with(combinat);[randperm($n),randperm($n)]");
      :

 

I tried

      $pa=maple("[combinat[randperm]($n),combinat[randperm]($n)]");

before but $pa is the same in every assignment.

 

Regards, Michael

Page 1 of 1