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