# cost = 14 # n_nodes = 99248 # version = 1.0 # time = 28.290 # n=9, i=5, cost=14: 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=5, cost=13: a>b find_2(a,b,c,d,e,f,g,h,i) = if c > d then find_3(a,c,b,d,e,f,g,h,i) else find_3(a,d,b,c,e,f,g,h,i) # n=9, i=5, cost=12: a>c,b>d find_3(a,b,c,d,e,f,g,h,i) = if a > b then find_4(a,b,d,c,e,f,g,h,i) else find_4(b,a,c,d,e,f,g,h,i) # n=9, i=5, cost=11: a>b,a>c,a>d,b>c find_4(a,b,c,d,e,f,g,h,i) = if d > e then find_5(a,b,d,c,e,f,g,h,i) else find_6(a,b,e,c,d,f,g,h,i) # n=9, i=5, cost=10: a>b,a>d,a>e,b>d,c>e find_6(a,b,c,d,e,f,g,h,i) = if f > g then find_7(a,b,c,f,d,e,g,h,i) else find_7(a,b,c,g,d,e,f,h,i) # n=9, i=5, cost=9: a>b,a>e,a>f,b>e,c>f,d>g find_7(a,b,c,d,e,f,g,h,i) = if h > i then find_8(a,b,c,d,h,e,f,g,i) else find_8(a,b,c,d,i,e,f,g,h) # n=9, i=5, cost=8: a>b,a>f,a>g,b>f,c>g,d>h,e>i find_8(a,b,c,d,e,f,g,h,i) = if d > e then find_9(a,d,b,e,c,f,i,g,h) else find_9(a,e,b,d,c,f,h,g,i) # n=9, i=5, cost=7: a>c,a>f,a>h,b>d,b>g,b>i,c>f,d>g,e>h find_9(a,b,c,d,e,f,g,h,i) = if d > e then find_10(d,a,e,c,h,f,g,i) else find_11(e,b,a,d,c,g,h,f,i) # n=9, i=5, cost=6: a>d,a>f,a>g,b>d,b>f,b>i,c>e,c>g,c>h,d>f,e>h find_11(a,b,c,d,e,f,g,h,i) = if d > e then find_12(d,c,e,f,g,i) else find_13(e,a,b,d,h,g,i) # n=7, i=4, cost=5: a>d,a>e,b>d,b>f,c>d,c>g find_13(a,b,c,d,e,f,g) = if e > f then find_14(a,b,c,e,d,f,g) else find_14(b,a,c,f,d,e,g) # n=7, i=4, cost=4: a>d,a>e,a>f,b>e,b>f,c>e,c>g,d>f find_14(a,b,c,d,e,f,g) = if d > g then find_15(d,c,b,g,f,e) else find_16(a,g,b,d,e) # n=5, i=3, cost=3: a>d,a>e,b>d,c>e find_16(a,b,c,d,e) = if a > b then find_17(b,c,d,e) else find_18(a,c,d) # n=3, i=2, cost=2: a>c find_18(a,b,c) = if a > b then find_19(b,c) else a # n=2, i=1, cost=1: no comparisons done find_19(a,b) = if a > b then a else b # n=4, i=2, cost=2: a>c,b>d find_17(a,b,c,d) = if a > b then find_19(b,c) else find_19(a,d) # n=6, i=3, cost=3: a>d,a>e,b>d,b>f,c>e,c>f find_15(a,b,c,d,e,f) = if a > b then find_17(b,c,d,e) else find_17(a,c,d,f) # n=6, i=3, cost=5: a>c,a>d,b>c,b>e find_12(a,b,c,d,e,f) = if a > b then find_20(b,c,e,d,f) else find_20(a,c,d,e,f) # n=5, i=2, cost=4: a>b,a>c find_20(a,b,c,d,e) = if b > c then find_21(a,b,d,e) else find_21(a,c,d,e) # n=4, i=2, cost=3: a>b find_21(a,b,c,d) = if c > d then find_17(a,c,b,d) else find_17(a,d,b,c) # n=8, i=4, cost=6: a>c,a>e,a>g,b>d,b>e,b>f,c>e,d>f find_10(a,b,c,d,e,f,g,h) = if c > d then find_22(c,b,d,e,g,h) else find_23(b,d,a,c,f,g,h) # n=7, i=4, cost=5: a>b,a>d,a>e,b>d,b>e,c>d,c>f find_23(a,b,c,d,e,f,g) = if b > c then find_20(c,d,f,e,g) else find_24(a,b,d,e,f,g) # n=6, i=3, cost=4: a>b,a>c,a>d,b>c,b>d find_24(a,b,c,d,e,f) = if e > f then find_25(a,b,e,d,c,f) else find_25(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_25(a,b,c,d,e,f) = if b > c then find_26(c,d,e) else find_27(a,b,f) # n=3, i=2, cost=2: a>b find_27(a,b,c) = if a > c then find_19(b,c) else a # n=3, i=1, cost=2: no comparisons done find_26(a,b,c) = if a > b then find_19(a,c) else find_19(b,c) # n=6, i=3, cost=5: a>c,a>d,b>c,b>d find_22(a,b,c,d,e,f) = if a > b then find_24(a,b,c,d,e,f) else find_24(b,a,c,d,e,f) # n=9, i=5, cost=10: a>b,a>c,a>d,a>e,b>d,c>e find_5(a,b,c,d,e,f,g,h,i) = if b > c then find_28(a,b,c,e,d,f,g,h,i) else find_28(a,c,b,d,e,f,g,h,i) # n=9, i=5, cost=9: a>b,a>c,a>d,a>e,b>c,b>d,b>e,c>d find_28(a,b,c,d,e,f,g,h,i) = if c > e then find_29(a,b,c,d,e,f,g,h,i) else find_30(a,b,e,c,d,f,g,h,i) # n=9, i=5, cost=8: a>b,a>c,a>d,a>e,b>c,b>d,b>e,c>d,c>e,d>e find_30(a,b,c,d,e,f,g,h,i) = if b > f then find_31(b,c,d,e,f,g,h,i) else find_32(a,f,b,c,d,g,h,i) # n=8, i=5, cost=6: a>c,a>d,a>e,b>c,b>d,b>e,c>d,c>e,d>e find_32(a,b,c,d,e,f,g,h) = if c > f then find_33(c,d,e,f,g,h) else find_34(a,b,f,c,d,g,h) # n=7, i=5, cost=5: a>d,a>e,b>d,b>e,c>d,c>e,d>e find_34(a,b,c,d,e,f,g) = if a > b then find_35(b,c,d,e,f,g) else find_35(a,c,d,e,f,g) # n=6, i=4, cost=4: a>c,a>d,b>c,b>d,c>d find_35(a,b,c,d,e,f) = if e > f then find_36(a,b,c,e,d,f) else find_36(a,b,c,f,d,e) # n=6, i=4, cost=3: a>c,a>e,b>c,b>e,c>e,d>f find_36(a,b,c,d,e,f) = if c > f then find_18(c,d,e) else find_37(f,b,a) # n=3, i=3, cost=2: no comparisons done find_37(a,b,c) = if a > b then find_38(b,c) else find_38(a,c) # n=2, i=2, cost=1: no comparisons done find_38(a,b) = if a > b then b else a # n=6, i=3, cost=5: a>b,a>c,a>d,b>c find_33(a,b,c,d,e,f) = if b > d then find_24(a,b,c,d,e,f) else find_39(a,d,b,e,f) # n=5, i=3, cost=4: a>b,a>c,b>c find_39(a,b,c,d,e) = if a > d then find_21(b,c,d,e) else find_27(a,b,e) # n=8, i=4, cost=7: a>b,a>c,a>d,a>e,b>c,b>d,c>d find_31(a,b,c,d,e,f,g,h) = if e > f then find_40(b,c,e,d,f,g,h) else find_41(a,b,c,f,d,e,g,h) # n=8, i=4, cost=6: a>b,a>c,a>e,a>f,b>c,b>e,c>e,d>f find_41(a,b,c,d,e,f,g,h) = if b > d then find_42(b,c,d,e,f,g,h) else find_43(a,d,b,c,f,g,h) # n=7, i=4, cost=5: a>c,a>d,a>e,b>c,b>d,b>e,c>d find_43(a,b,c,d,e,f,g) = if f > g then find_44(a,b,c,f,d,e,g) else find_44(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_44(a,b,c,d,e,f,g) = if c > g then find_45(c,d,e,f) else find_46(d,b,a,g,f) # n=5, i=4, cost=3: a>d,b>e,c>e find_46(a,b,c,d,e) = if b > c then find_47(c,a,e,d) else find_47(b,a,e,d) # n=4, i=3, cost=2: a>c,b>d find_47(a,b,c,d) = if c > d then find_38(c,b) else find_38(d,a) # n=4, i=2, cost=3: a>c find_45(a,b,c,d) = if b > d then find_17(a,b,c,d) else find_17(a,d,c,b) # n=7, i=3, cost=5: a>b,a>c,a>d,a>e,b>d,c>e find_42(a,b,c,d,e,f,g) = if b > c then find_24(a,b,c,d,f,g) else find_24(a,c,b,e,f,g) # n=7, i=3, cost=6: a>b,a>d,b>d,c>e find_40(a,b,c,d,e,f,g) = if a > c then find_42(a,b,c,d,e,f,g) else find_33(c,a,b,e,f,g) # n=9, i=5, cost=8: a>b,a>c,a>d,a>e,b>c,b>d,b>e,c>d,c>e find_29(a,b,c,d,e,f,g,h,i) = if f > g then find_48(a,b,c,f,e,d,g,h,i) else find_48(a,b,c,g,e,d,f,h,i) # n=9, i=5, cost=7: a>b,a>c,a>e,a>f,b>c,b>e,b>f,c>e,c>f,d>g find_48(a,b,c,d,e,f,g,h,i) = if c > d then find_49(c,d,g,f,e,h,i) else find_50(a,d,b,c,e,f,g,h,i) # n=9, i=5, cost=6: a>c,a>d,a>e,a>f,b>d,b>e,b>f,b>g,c>d,c>e,c>f,d>e,d>f find_50(a,b,c,d,e,f,g,h,i) = if d > g then find_51(c,b,d,e,f,g,h,i) else find_52(a,b,c,g,d,h,i) # n=7, i=5, cost=5: a>c,a>e,b>d,b>e,c>e,d>e find_52(a,b,c,d,e,f,g) = if c > d then find_35(c,b,d,e,f,g) else find_35(d,a,c,e,f,g) # n=8, i=4, cost=5: a>c,a>d,a>e,a>f,b>c,b>d,b>e,b>f,c>d,c>e,c>f find_51(a,b,c,d,e,f,g,h) = if g > h then find_53(a,b,c,g,e,f,d,h) else find_53(a,b,c,h,e,f,d,g) # n=8, i=4, cost=4: a>c,a>e,a>f,a>g,b>c,b>e,b>f,b>g,c>e,c>f,c>g,d>h find_53(a,b,c,d,e,f,g,h) = if c > d then find_54(d,e,f,g) else find_55(a,b,c,h) # n=4, i=3, cost=3: a>c,b>c find_55(a,b,c,d) = if a > b then find_27(b,c,d) else find_27(a,c,d) # n=4, i=1, cost=3: no comparisons done find_54(a,b,c,d) = if a > b then find_26(a,c,d) else find_26(b,c,d) # n=7, i=3, cost=6: a>b,a>c,a>d,a>e,b>c find_49(a,b,c,d,e,f,g) = if b > f then find_56(b,c,f,e,d,g) else find_57(a,f,b,e,d,g) # n=6, i=3, cost=5: a>c,a>d,a>e,b>c find_57(a,b,c,d,e,f) = if b > f then find_58(a,b,c,d,e,f) else find_59(a,f,b,e,d) # n=5, i=3, cost=4: a>d,a>e,b>c find_59(a,b,c,d,e) = if a > b then find_21(b,c,d,e) else find_60(a,d,e,c) # n=4, i=2, cost=3: a>b,a>c find_60(a,b,c,d) = if a > d then find_26(b,c,d) else a # n=6, i=3, cost=4: a>c,a>d,a>e,b>c,b>f find_58(a,b,c,d,e,f) = if d > e then find_61(a,b,d,c,e,f) else find_61(a,b,e,c,d,f) # n=6, i=3, cost=3: a>c,a>d,a>e,b>d,b>f,c>e find_61(a,b,c,d,e,f) = if c > f then find_17(c,b,e,d) else find_18(a,f,d) # n=6, i=2, cost=5: a>b,a>c find_56(a,b,c,d,e,f) = if d > e then find_62(a,d,c,b,e,f) else find_62(a,e,c,b,d,f) # n=6, i=2, cost=4: a>c,a>d,b>e find_62(a,b,c,d,e,f) = if b > f then find_63(a,b,c,d,e,f) else find_64(f,a,b,d,c) # n=5, i=2, cost=3: a>c,b>d,b>e find_64(a,b,c,d,e) = if a > b then find_19(b,c) else find_26(a,d,e) # n=6, i=2, cost=3: a>c,a>d,b>e,b>f find_63(a,b,c,d,e,f) = if a > b then find_26(b,c,d) else find_26(a,e,f)