Algorithm

$n=range(3,5,1);

$m=range($n,$n*($n - 1)/2,1);

$graphdisplay=plotmaple("GraphTheory[DrawGraph](GraphTheory[RandomGraphs][RandomDigraph]($n,$m)),plotoptions='width=512,height=512'");

$ans=maple("GraphTheory[AdjacencyMatrix](GraphTheory[RandomGraphs][RandomDigraph]($n,$m))");

It seems to me that the random digraphs generated by these two commands should be different, yet they turn up the same and $ans gives the correct adjacency matrix every time. I thought I had made an error but the problem seems to function just fine with

Answer: $ans

Grading Code: LinearAlgebra[Equal]($RESPONSE,$ans);

Could someone please explain what is going on?

Algorithm

$n=range(3,5,1);

$m=range($n,$n*($n - 1)/2,1);

$graphdisplay=plotmaple("GraphTheory[DrawGraph](GraphTheory[RandomGraphs][RandomDigraph]($n,$m)),plotoptions='width=512,height=512'");

$ans=maple("GraphTheory[AdjacencyMatrix](GraphTheory[RandomGraphs][RandomDigraph]($n,$m))");

It seems to me that the random digraphs generated by these two commands should be different, yet they turn up the same and $ans gives the correct adjacency matrix every time. I thought I had made an error but the problem seems to function just fine with

Answer: $ans

Grading Code: LinearAlgebra[Equal]($RESPONSE,$ans);

Could someone please explain what is going on?

Thus, using

$graphdisplay=plotmaple("randomize():GraphTheory[DrawGraph](GraphTheory[RandomGraphs][RandomDigraph]($n,$m)),plotoptions='width=512,height=512'");

$ans=maple("randomize():GraphTheory[AdjacencyMatrix](GraphTheory[RandomGraphs][RandomDigraph]($n,$m))");

would result in the two different random digraphs (which I do not want in this particular case).

]]>