{VERSION 5 0 "IBM INTEL NT" "5.0" } {USTYLETAB {CSTYLE "Maple Input" -1 0 "Courier" 0 1 255 0 0 1 0 1 0 0 1 0 0 0 0 1 }{PSTYLE "Normal" -1 0 1 {CSTYLE "" -1 -1 "Times" 1 12 0 0 0 1 2 2 2 2 2 2 1 1 1 1 }1 1 0 0 0 0 1 0 1 0 2 2 0 1 }} {SECT 0 {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 110 "# algorithm to comp ute the S-minimal curve of a tetrahedral curve \n# Input: weight vecto r of the given curve \n" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 2129 "smin := proc(aa,bb,c,d,e,f) \nlocal a, b, m, i, j, k, s, t, w, W , x, y, z, output1, output2;\n\na := [aa,bb,c,d,e,f];\nb:= a; s := 0; \+ \n\nif (s > -1) then do \n\n# 1. computation of the maximal weight m o f a line \nm := a[1]; j := 1; \nfor i from 2 to 6 do \n \+ if (a[i] > m) then m := a[i]; \n \+ j := i;\n end if;\n od; \n\n# 2. avoid unnecessary computations \nif (m = 0) then output1 := \+ matrix(1,6,[[` `,`Minimal curve to`, b, `is`, a,` `]]):\n \+ output2:= matrix(1,3,[[`It is obtained after`, s,` reduction(s).`]] ):\n print(output1); print(output2);\n r eturn(a); \nend if; \n\n# 3. computation of facet of maximal weight W \+ \nx := a[1] + a[2] + a[3];\ny := a[1] + a[4] + a[5];\nz := a[2] + a[4] + a[6]; \nt := a[3] + a[5] + a[6]; \n\nw := [x, y, z, t];\n\nW:= w[1] ; k := 1; \n\nfor i from 2 to 4 do \n if (w[i] > \+ W) then W := w[i]; \n k := i; \n end if;\n od; \n\n\n# 4. test \+ if curve is S-minimal \nif (a[j] + a[7-j] > W) then \n \+ output1 := matrix(1,6,[[` `,`Minimal curve to`, b, `is`, a,` `]]):\n output2:= matrix(1,3,[[`It is obtained after`, s,` reduction(s).`]]):\n \+ print(output1); print(output2);\n return( a): \nend if; \n\n# 5. reduction of the non-minimal curve \ns := s+1; \n\nif (k = 1) then a[1] := max(0, a[1] - 1); \n a[2] : = max(0, a[2] - 1);\n a[3] := max(0, a[3] - 1);\n \+ \nend if; \n\nif (k = 2) then a[1] := max(0, a[1] - 1); \n a[4] := max(0, a[4] - 1);\n a[5] := max (0, a[5] - 1);\n \nend if;\n\nif (k = 3) then a[2] := max(0, a[2] - 1); \n a[4] := max(0, a[4] - 1);\n \+ a[6] := max(0, a[6] - 1);\n \nend if;\n\nif (k = 4) then a[3] := max(0, a[3] - 1); \n a[5] := max( 0, a[5] - 1);\n a[6] := max(0, a[6] - 1);\n \+ \nend if;\n\nend do; \n\nend if;\n\nend:" }}}}{MARK "1 0 0" 1421 }{VIEWOPTS 1 1 0 1 1 1803 1 1 1 1 }{PAGENUMBERS 0 1 2 33 1 1 }