Luckself

0 Reputation

2 Badges

13 years, 234 days

MaplePrimes Activity


These are questions asked by Luckself

I have a peace of a programm of finding the shortest way in graph! And I need to animate this way! Help please! 

This is a code of programme:

 

> restart: with(networks):
> new(G): n:=6:
> addvertex(i$i=1..n,G); 
1, 2, 3, 4, 5, 6
> addedge([seq([i,i+3],i=1..3),[1,2],[2,3],[4,5],

> [5,6],[1,5]],weights=[12,16,20,11,15,13,14,26],G):
> draw(Linear([1,4],[2,5],[3,6]),G);

 > T:=shortpathtree(G,1):

Page 1 of 1