Merge branch 'master' of ssh://git.code.sf.net/p/maxima/code
[maxima.git] / share / contrib / prim / prim-ex.mac
blob222376552e21ce38c76d3d0bb3ea1ba790921bad
1 /* An example from Horowitz and Sahni. */
2 prim_cost[1,2]:10;
3 prim_cost[1,4]:30;
4 prim_cost[1,5]:45;
5 prim_cost[2,3]:50;
6 prim_cost[2,5]:40;
7 prim_cost[2,6]:25;
8 prim_cost[3,5]:35;
9 prim_cost[3,6]:15;
10 prim_cost[4,6]:20;
11 prim_cost[5,6]:55;
12 e[1]:[1,2];
13 e[2]:[1,4];
14 e[3]:[1,5];
15 e[4]:[2,3];
16 e[5]:[2,5];
17 e[6]:[2,6];
18 e[7]:[3,5];
19 e[8]:[3,6];
20 e[9]:[4,6];
21 e[10]:[5,6];
22 prim(e,cost,6);