# cost = 12 # n_nodes = 11605 # version = 1.0 # time = 2.070 # n=8, i=4, cost=12: no comparisons done find_1(a,b,c,d,e,f,g,h) = if a > b then find_2(a,b,c,d,e,f,g,h) else find_2(b,a,c,d,e,f,g,h) # n=8, i=4, cost=11: a>b find_2(a,b,c,d,e,f,g,h) = if c > d then find_3(a,c,b,d,e,f,g,h) else find_3(a,d,b,c,e,f,g,h) # n=8, i=4, cost=10: a>c,b>d find_3(a,b,c,d,e,f,g,h) = if a > b then find_4(a,b,d,c,e,f,g,h) else find_4(b,a,c,d,e,f,g,h) # n=8, i=4, cost=9: a>b,a>c,a>d,b>c find_4(a,b,c,d,e,f,g,h) = if b > d then find_5(a,b,c,d,e,f,g,h) else find_6(a,d,b,c,e,f,g,h) # n=8, i=4, cost=8: a>b,a>c,a>d,b>c,b>d,c>d find_6(a,b,c,d,e,f,g,h) = if a > e then find_7(a,b,c,d,e,f,g,h) else find_8(e,a,b,c,f,g,h) # n=7, i=4, cost=6: a>b,a>c,a>d,b>c,b>d,c>d find_8(a,b,c,d,e,f,g) = if b > e then find_9(b,c,d,e,f,g) else find_10(a,e,b,c,f,g) # n=6, i=4, cost=4: a>c,a>d,b>c,b>d,c>d find_10(a,b,c,d,e,f) = if e > f then find_11(a,b,c,e,d,f) else find_11(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_11(a,b,c,d,e,f) = if c > f then find_12(c,d,e) else find_13(f,b,a) # n=3, i=3, cost=2: no comparisons done find_13(a,b,c) = if a > b then find_14(b,c) else find_14(a,c) # n=2, i=2, cost=1: no comparisons done find_14(a,b) = if a > b then b else a # n=3, i=2, cost=2: a>c find_12(a,b,c) = if a > b then find_15(b,c) else a # 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_9(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_20(a,c,b,d) else find_20(a,d,b,c) # n=4, i=2, cost=2: a>c,b>d find_20(a,b,c,d) = if a > b then find_15(b,c) else find_15(a,d) # 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_21(a,b,e,d,c,f) else find_21(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_21(a,b,c,d,e,f) = if b > c then find_22(c,d,e) else find_19(a,b,f) # n=3, i=1, cost=2: no comparisons done find_22(a,b,c) = if a > b then find_15(a,c) else find_15(b,c) # n=8, i=4, cost=7: a>b,a>c,a>d,a>e,b>c,b>d,c>d find_7(a,b,c,d,e,f,g,h) = if e > f then find_23(b,c,e,d,f,g,h) else find_24(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_24(a,b,c,d,e,f,g,h) = if b > d then find_25(b,c,d,e,f,g,h) else find_26(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_26(a,b,c,d,e,f,g) = if f > g then find_27(a,b,c,f,d,e,g) else find_27(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_27(a,b,c,d,e,f,g) = if c > g then find_28(c,d,e,f) else find_29(d,b,a,g,f) # n=5, i=4, cost=3: a>d,b>e,c>e find_29(a,b,c,d,e) = if b > c then find_30(c,a,e,d) else find_30(b,a,e,d) # n=4, i=3, cost=2: a>c,b>d find_30(a,b,c,d) = if c > d then find_14(c,b) else find_14(d,a) # n=4, i=2, cost=3: a>c find_28(a,b,c,d) = if b > d then find_20(a,b,c,d) else find_20(a,d,c,b) # n=7, i=3, cost=5: a>b,a>c,a>d,a>e,b>d,c>e find_25(a,b,c,d,e,f,g) = if b > c then find_16(a,b,c,d,f,g) else find_16(a,c,b,e,f,g) # n=7, i=3, cost=6: a>b,a>d,b>d,c>e find_23(a,b,c,d,e,f,g) = if a > c then find_25(a,b,c,d,e,f,g) else find_9(c,a,b,e,f,g) # n=8, i=4, cost=8: a>b,a>c,a>d,b>c,b>d find_5(a,b,c,d,e,f,g,h) = if e > f then find_31(a,b,e,d,c,f,g,h) else find_31(a,b,f,d,c,e,g,h) # n=8, i=4, cost=7: a>b,a>d,a>e,b>d,b>e,c>f find_31(a,b,c,d,e,f,g,h) = if b > c then find_32(b,c,f,e,d,g,h) else find_33(c,a,b,d,e,f,g,h) # n=8, i=4, cost=6: a>c,a>d,a>e,a>f,b>c,b>d,b>e,c>d,c>e find_33(a,b,c,d,e,f,g,h) = if c > f then find_34(a,b,c,d,e,f,g,h) else find_35(a,f,b,c,g,h) # n=6, i=4, cost=5: a>b,a>d,b>d,c>d find_35(a,b,c,d,e,f) = if b > c then find_17(b,c,d,e,f) else find_10(a,c,b,d,e,f) # 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_34(a,b,c,d,e,f,g,h) = if g > h then find_36(a,b,c,g,e,f,d,h) else find_36(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_36(a,b,c,d,e,f,g,h) = if c > d then find_37(d,e,f,g) else find_38(a,b,c,h) # n=4, i=3, cost=3: a>c,b>c find_38(a,b,c,d) = if a > b then find_19(b,c,d) else find_19(a,c,d) # n=4, i=1, cost=3: no comparisons done find_37(a,b,c,d) = if a > b then find_22(a,c,d) else find_22(b,c,d) # n=7, i=3, cost=6: a>b,a>c,a>d,a>e,b>c find_32(a,b,c,d,e,f,g) = if b > f then find_39(b,c,f,e,d,g) else find_40(a,f,b,e,d,g) # n=6, i=3, cost=5: a>c,a>d,a>e,b>c find_40(a,b,c,d,e,f) = if b > f then find_41(a,b,c,d,e,f) else find_42(a,f,b,e,d) # n=5, i=3, cost=4: a>d,a>e,b>c find_42(a,b,c,d,e) = if a > b then find_18(b,c,d,e) else find_43(a,d,e,c) # n=4, i=2, cost=3: a>b,a>c find_43(a,b,c,d) = if a > d then find_22(b,c,d) else a # n=6, i=3, cost=4: a>c,a>d,a>e,b>c,b>f find_41(a,b,c,d,e,f) = if d > e then find_44(a,b,d,c,e,f) else find_44(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_44(a,b,c,d,e,f) = if c > f then find_20(c,b,e,d) else find_12(a,f,d) # n=6, i=2, cost=5: a>b,a>c find_39(a,b,c,d,e,f) = if d > e then find_45(a,d,c,b,e,f) else find_45(a,e,c,b,d,f) # n=6, i=2, cost=4: a>c,a>d,b>e find_45(a,b,c,d,e,f) = if b > f then find_46(a,b,c,d,e,f) else find_47(f,a,b,d,c) # n=5, i=2, cost=3: a>c,b>d,b>e find_47(a,b,c,d,e) = if a > b then find_15(b,c) else find_22(a,d,e) # n=6, i=2, cost=3: a>c,a>d,b>e,b>f find_46(a,b,c,d,e,f) = if a > b then find_22(b,c,d) else find_22(a,e,f)