# cost = 10 # n_nodes = 1571 # version = 1.0 # time = 0.210 # n=7, i=4, cost=10: no comparisons done find_1(a,b,c,d,e,f,g) = if a > b then find_2(a,b,c,d,e,f,g) else find_2(b,a,c,d,e,f,g) # n=7, i=4, cost=9: a>b find_2(a,b,c,d,e,f,g) = if c > d then find_3(a,c,b,d,e,f,g) else find_3(a,d,b,c,e,f,g) # n=7, i=4, cost=8: a>c,b>d find_3(a,b,c,d,e,f,g) = if a > b then find_4(a,b,d,c,e,f,g) else find_4(b,a,c,d,e,f,g) # n=7, i=4, cost=7: a>b,a>c,a>d,b>c find_4(a,b,c,d,e,f,g) = if d > e then find_5(b,d,c,e,f,g) else find_6(a,b,e,c,d,f,g) # n=7, i=4, cost=6: a>b,a>d,a>e,b>d,c>e find_6(a,b,c,d,e,f,g) = if b > c then find_7(b,c,e,d,f,g) else find_8(a,c,b,d,e,f,g) # n=7, i=4, cost=5: a>c,a>d,a>e,b>c,b>d,b>e,c>d find_8(a,b,c,d,e,f,g) = if f > g then find_9(a,b,c,f,d,e,g) else find_9(a,b,c,g,d,e,f) # n=7, i=4, cost=4: a>c,a>e,a>f,b>c,b>e,b>f,c>e,d>g find_9(a,b,c,d,e,f,g) = if c > g then find_10(c,d,e,f) else find_11(d,b,a,g,f) # n=5, i=4, cost=3: a>d,b>e,c>e find_11(a,b,c,d,e) = if b > c then find_12(c,a,e,d) else find_12(b,a,e,d) # n=4, i=3, cost=2: a>c,b>d find_12(a,b,c,d) = if c > d then find_13(c,b) else find_13(d,a) # n=2, i=2, cost=1: no comparisons done find_13(a,b) = if a > b then b else a # n=4, i=2, cost=3: a>c find_10(a,b,c,d) = if b > d then find_14(a,b,c,d) else find_14(a,d,c,b) # n=4, i=2, cost=2: a>c,b>d find_14(a,b,c,d) = if a > b then find_15(b,c) else find_15(a,d) # n=2, i=1, cost=1: no comparisons done find_15(a,b) = if a > b then a else b # n=6, i=3, cost=5: a>b,a>c,a>d,b>c find_7(a,b,c,d,e,f) = if b > d then find_16(a,b,c,d,e,f) else find_17(a,d,b,e,f) # n=5, i=3, cost=4: a>b,a>c,b>c find_17(a,b,c,d,e) = if a > d then find_18(b,c,d,e) else find_19(a,b,e) # n=3, i=2, cost=2: a>b find_19(a,b,c) = if a > c then find_15(b,c) else a # n=4, i=2, cost=3: a>b find_18(a,b,c,d) = if c > d then find_14(a,c,b,d) else find_14(a,d,b,c) # n=6, i=3, cost=4: a>b,a>c,a>d,b>c,b>d find_16(a,b,c,d,e,f) = if e > f then find_20(a,b,e,d,c,f) else find_20(a,b,f,d,c,e) # n=6, i=3, cost=3: a>b,a>d,a>e,b>d,b>e,c>f find_20(a,b,c,d,e,f) = if b > c then find_21(c,d,e) else find_19(a,b,f) # n=3, i=1, cost=2: no comparisons done find_21(a,b,c) = if a > b then find_15(a,c) else find_15(b,c) # n=6, i=3, cost=6: a>c,b>d find_5(a,b,c,d,e,f) = if a > b then find_7(a,b,d,c,e,f) else find_7(b,a,c,d,e,f)