WORST_CASE(Omega(1),?) ### Pre-processing the ITS problem ### Initial linear ITS problem Start location: l15 0: l0 -> l1 : Index2^0'=Index2^post_1, Index7^0'=Index7^post_1, Sorted5^0'=Sorted5^post_1, Temp6^0'=Temp6^post_1, fact3^0'=fact3^post_1, factor^0'=factor^post_1, i8^0'=i8^post_1, [ 101<=Index2^0 && Sorted5^post_1==0 && i8^post_1==1 && Index2^0==Index2^post_1 && Index7^0==Index7^post_1 && Temp6^0==Temp6^post_1 && fact3^0==fact3^post_1 && factor^0==factor^post_1 ], cost: 1 1: l0 -> l2 : Index2^0'=Index2^post_2, Index7^0'=Index7^post_2, Sorted5^0'=Sorted5^post_2, Temp6^0'=Temp6^post_2, fact3^0'=fact3^post_2, factor^0'=factor^post_2, i8^0'=i8^post_2, [ Index2^0<=100 && Index2^post_2==1+Index2^0 && Index7^0==Index7^post_2 && Sorted5^0==Sorted5^post_2 && Temp6^0==Temp6^post_2 && fact3^0==fact3^post_2 && factor^0==factor^post_2 && i8^0==i8^post_2 ], cost: 1 10: l1 -> l10 : Index2^0'=Index2^post_11, Index7^0'=Index7^post_11, Sorted5^0'=Sorted5^post_11, Temp6^0'=Temp6^post_11, fact3^0'=fact3^post_11, factor^0'=factor^post_11, i8^0'=i8^post_11, [ Index2^0==Index2^post_11 && Index7^0==Index7^post_11 && Sorted5^0==Sorted5^post_11 && Temp6^0==Temp6^post_11 && fact3^0==fact3^post_11 && factor^0==factor^post_11 && i8^0==i8^post_11 ], cost: 1 2: l2 -> l0 : Index2^0'=Index2^post_3, Index7^0'=Index7^post_3, Sorted5^0'=Sorted5^post_3, Temp6^0'=Temp6^post_3, fact3^0'=fact3^post_3, factor^0'=factor^post_3, i8^0'=i8^post_3, [ Index2^0==Index2^post_3 && Index7^0==Index7^post_3 && Sorted5^0==Sorted5^post_3 && Temp6^0==Temp6^post_3 && fact3^0==fact3^post_3 && factor^0==factor^post_3 && i8^0==i8^post_3 ], cost: 1 3: l3 -> l4 : Index2^0'=Index2^post_4, Index7^0'=Index7^post_4, Sorted5^0'=Sorted5^post_4, Temp6^0'=Temp6^post_4, fact3^0'=fact3^post_4, factor^0'=factor^post_4, i8^0'=i8^post_4, [ Index2^0==Index2^post_4 && Index7^0==Index7^post_4 && Sorted5^0==Sorted5^post_4 && Temp6^0==Temp6^post_4 && fact3^0==fact3^post_4 && factor^0==factor^post_4 && i8^0==i8^post_4 ], cost: 1 4: l5 -> l3 : Index2^0'=Index2^post_5, Index7^0'=Index7^post_5, Sorted5^0'=Sorted5^post_5, Temp6^0'=Temp6^post_5, fact3^0'=fact3^post_5, factor^0'=factor^post_5, i8^0'=i8^post_5, [ Index2^0==Index2^post_5 && Index7^0==Index7^post_5 && Sorted5^0==Sorted5^post_5 && Temp6^0==Temp6^post_5 && fact3^0==fact3^post_5 && factor^0==factor^post_5 && i8^0==i8^post_5 ], cost: 1 5: l6 -> l7 : Index2^0'=Index2^post_6, Index7^0'=Index7^post_6, Sorted5^0'=Sorted5^post_6, Temp6^0'=Temp6^post_6, fact3^0'=fact3^post_6, factor^0'=factor^post_6, i8^0'=i8^post_6, [ Index2^0==Index2^post_6 && Index7^0==Index7^post_6 && Sorted5^0==Sorted5^post_6 && Temp6^0==Temp6^post_6 && fact3^0==fact3^post_6 && factor^0==factor^post_6 && i8^0==i8^post_6 ], cost: 1 6: l7 -> l1 : Index2^0'=Index2^post_7, Index7^0'=Index7^post_7, Sorted5^0'=Sorted5^post_7, Temp6^0'=Temp6^post_7, fact3^0'=fact3^post_7, factor^0'=factor^post_7, i8^0'=i8^post_7, [ Sorted5^0<=0 && 0<=Sorted5^0 && i8^post_7==1+i8^0 && Index2^0==Index2^post_7 && Index7^0==Index7^post_7 && Sorted5^0==Sorted5^post_7 && Temp6^0==Temp6^post_7 && fact3^0==fact3^post_7 && factor^0==factor^post_7 ], cost: 1 7: l7 -> l5 : Index2^0'=Index2^post_8, Index7^0'=Index7^post_8, Sorted5^0'=Sorted5^post_8, Temp6^0'=Temp6^post_8, fact3^0'=fact3^post_8, factor^0'=factor^post_8, i8^0'=i8^post_8, [ 1<=Sorted5^0 && Index2^0==Index2^post_8 && Index7^0==Index7^post_8 && Sorted5^0==Sorted5^post_8 && Temp6^0==Temp6^post_8 && fact3^0==fact3^post_8 && factor^0==factor^post_8 && i8^0==i8^post_8 ], cost: 1 8: l7 -> l5 : Index2^0'=Index2^post_9, Index7^0'=Index7^post_9, Sorted5^0'=Sorted5^post_9, Temp6^0'=Temp6^post_9, fact3^0'=fact3^post_9, factor^0'=factor^post_9, i8^0'=i8^post_9, [ 1+Sorted5^0<=0 && Index2^0==Index2^post_9 && Index7^0==Index7^post_9 && Sorted5^0==Sorted5^post_9 && Temp6^0==Temp6^post_9 && fact3^0==fact3^post_9 && factor^0==factor^post_9 && i8^0==i8^post_9 ], cost: 1 9: l8 -> l9 : Index2^0'=Index2^post_10, Index7^0'=Index7^post_10, Sorted5^0'=Sorted5^post_10, Temp6^0'=Temp6^post_10, fact3^0'=fact3^post_10, factor^0'=factor^post_10, i8^0'=i8^post_10, [ Index7^post_10==1+Index7^0 && Index2^0==Index2^post_10 && Sorted5^0==Sorted5^post_10 && Temp6^0==Temp6^post_10 && fact3^0==fact3^post_10 && factor^0==factor^post_10 && i8^0==i8^post_10 ], cost: 1 17: l9 -> l13 : Index2^0'=Index2^post_18, Index7^0'=Index7^post_18, Sorted5^0'=Sorted5^post_18, Temp6^0'=Temp6^post_18, fact3^0'=fact3^post_18, factor^0'=factor^post_18, i8^0'=i8^post_18, [ Index2^0==Index2^post_18 && Index7^0==Index7^post_18 && Sorted5^0==Sorted5^post_18 && Temp6^0==Temp6^post_18 && fact3^0==fact3^post_18 && factor^0==factor^post_18 && i8^0==i8^post_18 ], cost: 1 18: l10 -> l3 : Index2^0'=Index2^post_19, Index7^0'=Index7^post_19, Sorted5^0'=Sorted5^post_19, Temp6^0'=Temp6^post_19, fact3^0'=fact3^post_19, factor^0'=factor^post_19, i8^0'=i8^post_19, [ 100<=i8^0 && Index2^0==Index2^post_19 && Index7^0==Index7^post_19 && Sorted5^0==Sorted5^post_19 && Temp6^0==Temp6^post_19 && fact3^0==fact3^post_19 && factor^0==factor^post_19 && i8^0==i8^post_19 ], cost: 1 19: l10 -> l9 : Index2^0'=Index2^post_20, Index7^0'=Index7^post_20, Sorted5^0'=Sorted5^post_20, Temp6^0'=Temp6^post_20, fact3^0'=fact3^post_20, factor^0'=factor^post_20, i8^0'=i8^post_20, [ i8^0<=99 && Sorted5^post_20==1 && Index7^post_20==1 && Index2^0==Index2^post_20 && Temp6^0==Temp6^post_20 && fact3^0==fact3^post_20 && factor^0==factor^post_20 && i8^0==i8^post_20 ], cost: 1 11: l11 -> l8 : Index2^0'=Index2^post_12, Index7^0'=Index7^post_12, Sorted5^0'=Sorted5^post_12, Temp6^0'=Temp6^post_12, fact3^0'=fact3^post_12, factor^0'=factor^post_12, i8^0'=i8^post_12, [ Temp6^post_12==Temp6^post_12 && Sorted5^post_12==0 && Index2^0==Index2^post_12 && Index7^0==Index7^post_12 && fact3^0==fact3^post_12 && factor^0==factor^post_12 && i8^0==i8^post_12 ], cost: 1 12: l11 -> l8 : Index2^0'=Index2^post_13, Index7^0'=Index7^post_13, Sorted5^0'=Sorted5^post_13, Temp6^0'=Temp6^post_13, fact3^0'=fact3^post_13, factor^0'=factor^post_13, i8^0'=i8^post_13, [ Index2^0==Index2^post_13 && Index7^0==Index7^post_13 && Sorted5^0==Sorted5^post_13 && Temp6^0==Temp6^post_13 && fact3^0==fact3^post_13 && factor^0==factor^post_13 && i8^0==i8^post_13 ], cost: 1 13: l12 -> l11 : Index2^0'=Index2^post_14, Index7^0'=Index7^post_14, Sorted5^0'=Sorted5^post_14, Temp6^0'=Temp6^post_14, fact3^0'=fact3^post_14, factor^0'=factor^post_14, i8^0'=i8^post_14, [ Index7^0<=100-i8^0 && Index2^0==Index2^post_14 && Index7^0==Index7^post_14 && Sorted5^0==Sorted5^post_14 && Temp6^0==Temp6^post_14 && fact3^0==fact3^post_14 && factor^0==factor^post_14 && i8^0==i8^post_14 ], cost: 1 14: l12 -> l6 : Index2^0'=Index2^post_15, Index7^0'=Index7^post_15, Sorted5^0'=Sorted5^post_15, Temp6^0'=Temp6^post_15, fact3^0'=fact3^post_15, factor^0'=factor^post_15, i8^0'=i8^post_15, [ 101-i8^0<=Index7^0 && Index2^0==Index2^post_15 && Index7^0==Index7^post_15 && Sorted5^0==Sorted5^post_15 && Temp6^0==Temp6^post_15 && fact3^0==fact3^post_15 && factor^0==factor^post_15 && i8^0==i8^post_15 ], cost: 1 15: l13 -> l6 : Index2^0'=Index2^post_16, Index7^0'=Index7^post_16, Sorted5^0'=Sorted5^post_16, Temp6^0'=Temp6^post_16, fact3^0'=fact3^post_16, factor^0'=factor^post_16, i8^0'=i8^post_16, [ 100<=Index7^0 && Index2^0==Index2^post_16 && Index7^0==Index7^post_16 && Sorted5^0==Sorted5^post_16 && Temp6^0==Temp6^post_16 && fact3^0==fact3^post_16 && factor^0==factor^post_16 && i8^0==i8^post_16 ], cost: 1 16: l13 -> l12 : Index2^0'=Index2^post_17, Index7^0'=Index7^post_17, Sorted5^0'=Sorted5^post_17, Temp6^0'=Temp6^post_17, fact3^0'=fact3^post_17, factor^0'=factor^post_17, i8^0'=i8^post_17, [ Index7^0<=99 && Index2^0==Index2^post_17 && Index7^0==Index7^post_17 && Sorted5^0==Sorted5^post_17 && Temp6^0==Temp6^post_17 && fact3^0==fact3^post_17 && factor^0==factor^post_17 && i8^0==i8^post_17 ], cost: 1 20: l14 -> l2 : Index2^0'=Index2^post_21, Index7^0'=Index7^post_21, Sorted5^0'=Sorted5^post_21, Temp6^0'=Temp6^post_21, fact3^0'=fact3^post_21, factor^0'=factor^post_21, i8^0'=i8^post_21, [ factor^post_21==-1 && fact3^post_21==factor^post_21 && Index2^post_21==1 && Index7^0==Index7^post_21 && Sorted5^0==Sorted5^post_21 && Temp6^0==Temp6^post_21 && i8^0==i8^post_21 ], cost: 1 21: l15 -> l14 : Index2^0'=Index2^post_22, Index7^0'=Index7^post_22, Sorted5^0'=Sorted5^post_22, Temp6^0'=Temp6^post_22, fact3^0'=fact3^post_22, factor^0'=factor^post_22, i8^0'=i8^post_22, [ Index2^0==Index2^post_22 && Index7^0==Index7^post_22 && Sorted5^0==Sorted5^post_22 && Temp6^0==Temp6^post_22 && fact3^0==fact3^post_22 && factor^0==factor^post_22 && i8^0==i8^post_22 ], cost: 1 Checking for constant complexity: The following rule is satisfiable with cost >= 1, yielding constant complexity: 21: l15 -> l14 : Index2^0'=Index2^post_22, Index7^0'=Index7^post_22, Sorted5^0'=Sorted5^post_22, Temp6^0'=Temp6^post_22, fact3^0'=fact3^post_22, factor^0'=factor^post_22, i8^0'=i8^post_22, [ Index2^0==Index2^post_22 && Index7^0==Index7^post_22 && Sorted5^0==Sorted5^post_22 && Temp6^0==Temp6^post_22 && fact3^0==fact3^post_22 && factor^0==factor^post_22 && i8^0==i8^post_22 ], cost: 1 Removed unreachable and leaf rules: Start location: l15 0: l0 -> l1 : Index2^0'=Index2^post_1, Index7^0'=Index7^post_1, Sorted5^0'=Sorted5^post_1, Temp6^0'=Temp6^post_1, fact3^0'=fact3^post_1, factor^0'=factor^post_1, i8^0'=i8^post_1, [ 101<=Index2^0 && Sorted5^post_1==0 && i8^post_1==1 && Index2^0==Index2^post_1 && Index7^0==Index7^post_1 && Temp6^0==Temp6^post_1 && fact3^0==fact3^post_1 && factor^0==factor^post_1 ], cost: 1 1: l0 -> l2 : Index2^0'=Index2^post_2, Index7^0'=Index7^post_2, Sorted5^0'=Sorted5^post_2, Temp6^0'=Temp6^post_2, fact3^0'=fact3^post_2, factor^0'=factor^post_2, i8^0'=i8^post_2, [ Index2^0<=100 && Index2^post_2==1+Index2^0 && Index7^0==Index7^post_2 && Sorted5^0==Sorted5^post_2 && Temp6^0==Temp6^post_2 && fact3^0==fact3^post_2 && factor^0==factor^post_2 && i8^0==i8^post_2 ], cost: 1 10: l1 -> l10 : Index2^0'=Index2^post_11, Index7^0'=Index7^post_11, Sorted5^0'=Sorted5^post_11, Temp6^0'=Temp6^post_11, fact3^0'=fact3^post_11, factor^0'=factor^post_11, i8^0'=i8^post_11, [ Index2^0==Index2^post_11 && Index7^0==Index7^post_11 && Sorted5^0==Sorted5^post_11 && Temp6^0==Temp6^post_11 && fact3^0==fact3^post_11 && factor^0==factor^post_11 && i8^0==i8^post_11 ], cost: 1 2: l2 -> l0 : Index2^0'=Index2^post_3, Index7^0'=Index7^post_3, Sorted5^0'=Sorted5^post_3, Temp6^0'=Temp6^post_3, fact3^0'=fact3^post_3, factor^0'=factor^post_3, i8^0'=i8^post_3, [ Index2^0==Index2^post_3 && Index7^0==Index7^post_3 && Sorted5^0==Sorted5^post_3 && Temp6^0==Temp6^post_3 && fact3^0==fact3^post_3 && factor^0==factor^post_3 && i8^0==i8^post_3 ], cost: 1 5: l6 -> l7 : Index2^0'=Index2^post_6, Index7^0'=Index7^post_6, Sorted5^0'=Sorted5^post_6, Temp6^0'=Temp6^post_6, fact3^0'=fact3^post_6, factor^0'=factor^post_6, i8^0'=i8^post_6, [ Index2^0==Index2^post_6 && Index7^0==Index7^post_6 && Sorted5^0==Sorted5^post_6 && Temp6^0==Temp6^post_6 && fact3^0==fact3^post_6 && factor^0==factor^post_6 && i8^0==i8^post_6 ], cost: 1 6: l7 -> l1 : Index2^0'=Index2^post_7, Index7^0'=Index7^post_7, Sorted5^0'=Sorted5^post_7, Temp6^0'=Temp6^post_7, fact3^0'=fact3^post_7, factor^0'=factor^post_7, i8^0'=i8^post_7, [ Sorted5^0<=0 && 0<=Sorted5^0 && i8^post_7==1+i8^0 && Index2^0==Index2^post_7 && Index7^0==Index7^post_7 && Sorted5^0==Sorted5^post_7 && Temp6^0==Temp6^post_7 && fact3^0==fact3^post_7 && factor^0==factor^post_7 ], cost: 1 9: l8 -> l9 : Index2^0'=Index2^post_10, Index7^0'=Index7^post_10, Sorted5^0'=Sorted5^post_10, Temp6^0'=Temp6^post_10, fact3^0'=fact3^post_10, factor^0'=factor^post_10, i8^0'=i8^post_10, [ Index7^post_10==1+Index7^0 && Index2^0==Index2^post_10 && Sorted5^0==Sorted5^post_10 && Temp6^0==Temp6^post_10 && fact3^0==fact3^post_10 && factor^0==factor^post_10 && i8^0==i8^post_10 ], cost: 1 17: l9 -> l13 : Index2^0'=Index2^post_18, Index7^0'=Index7^post_18, Sorted5^0'=Sorted5^post_18, Temp6^0'=Temp6^post_18, fact3^0'=fact3^post_18, factor^0'=factor^post_18, i8^0'=i8^post_18, [ Index2^0==Index2^post_18 && Index7^0==Index7^post_18 && Sorted5^0==Sorted5^post_18 && Temp6^0==Temp6^post_18 && fact3^0==fact3^post_18 && factor^0==factor^post_18 && i8^0==i8^post_18 ], cost: 1 19: l10 -> l9 : Index2^0'=Index2^post_20, Index7^0'=Index7^post_20, Sorted5^0'=Sorted5^post_20, Temp6^0'=Temp6^post_20, fact3^0'=fact3^post_20, factor^0'=factor^post_20, i8^0'=i8^post_20, [ i8^0<=99 && Sorted5^post_20==1 && Index7^post_20==1 && Index2^0==Index2^post_20 && Temp6^0==Temp6^post_20 && fact3^0==fact3^post_20 && factor^0==factor^post_20 && i8^0==i8^post_20 ], cost: 1 11: l11 -> l8 : Index2^0'=Index2^post_12, Index7^0'=Index7^post_12, Sorted5^0'=Sorted5^post_12, Temp6^0'=Temp6^post_12, fact3^0'=fact3^post_12, factor^0'=factor^post_12, i8^0'=i8^post_12, [ Temp6^post_12==Temp6^post_12 && Sorted5^post_12==0 && Index2^0==Index2^post_12 && Index7^0==Index7^post_12 && fact3^0==fact3^post_12 && factor^0==factor^post_12 && i8^0==i8^post_12 ], cost: 1 12: l11 -> l8 : Index2^0'=Index2^post_13, Index7^0'=Index7^post_13, Sorted5^0'=Sorted5^post_13, Temp6^0'=Temp6^post_13, fact3^0'=fact3^post_13, factor^0'=factor^post_13, i8^0'=i8^post_13, [ Index2^0==Index2^post_13 && Index7^0==Index7^post_13 && Sorted5^0==Sorted5^post_13 && Temp6^0==Temp6^post_13 && fact3^0==fact3^post_13 && factor^0==factor^post_13 && i8^0==i8^post_13 ], cost: 1 13: l12 -> l11 : Index2^0'=Index2^post_14, Index7^0'=Index7^post_14, Sorted5^0'=Sorted5^post_14, Temp6^0'=Temp6^post_14, fact3^0'=fact3^post_14, factor^0'=factor^post_14, i8^0'=i8^post_14, [ Index7^0<=100-i8^0 && Index2^0==Index2^post_14 && Index7^0==Index7^post_14 && Sorted5^0==Sorted5^post_14 && Temp6^0==Temp6^post_14 && fact3^0==fact3^post_14 && factor^0==factor^post_14 && i8^0==i8^post_14 ], cost: 1 14: l12 -> l6 : Index2^0'=Index2^post_15, Index7^0'=Index7^post_15, Sorted5^0'=Sorted5^post_15, Temp6^0'=Temp6^post_15, fact3^0'=fact3^post_15, factor^0'=factor^post_15, i8^0'=i8^post_15, [ 101-i8^0<=Index7^0 && Index2^0==Index2^post_15 && Index7^0==Index7^post_15 && Sorted5^0==Sorted5^post_15 && Temp6^0==Temp6^post_15 && fact3^0==fact3^post_15 && factor^0==factor^post_15 && i8^0==i8^post_15 ], cost: 1 15: l13 -> l6 : Index2^0'=Index2^post_16, Index7^0'=Index7^post_16, Sorted5^0'=Sorted5^post_16, Temp6^0'=Temp6^post_16, fact3^0'=fact3^post_16, factor^0'=factor^post_16, i8^0'=i8^post_16, [ 100<=Index7^0 && Index2^0==Index2^post_16 && Index7^0==Index7^post_16 && Sorted5^0==Sorted5^post_16 && Temp6^0==Temp6^post_16 && fact3^0==fact3^post_16 && factor^0==factor^post_16 && i8^0==i8^post_16 ], cost: 1 16: l13 -> l12 : Index2^0'=Index2^post_17, Index7^0'=Index7^post_17, Sorted5^0'=Sorted5^post_17, Temp6^0'=Temp6^post_17, fact3^0'=fact3^post_17, factor^0'=factor^post_17, i8^0'=i8^post_17, [ Index7^0<=99 && Index2^0==Index2^post_17 && Index7^0==Index7^post_17 && Sorted5^0==Sorted5^post_17 && Temp6^0==Temp6^post_17 && fact3^0==fact3^post_17 && factor^0==factor^post_17 && i8^0==i8^post_17 ], cost: 1 20: l14 -> l2 : Index2^0'=Index2^post_21, Index7^0'=Index7^post_21, Sorted5^0'=Sorted5^post_21, Temp6^0'=Temp6^post_21, fact3^0'=fact3^post_21, factor^0'=factor^post_21, i8^0'=i8^post_21, [ factor^post_21==-1 && fact3^post_21==factor^post_21 && Index2^post_21==1 && Index7^0==Index7^post_21 && Sorted5^0==Sorted5^post_21 && Temp6^0==Temp6^post_21 && i8^0==i8^post_21 ], cost: 1 21: l15 -> l14 : Index2^0'=Index2^post_22, Index7^0'=Index7^post_22, Sorted5^0'=Sorted5^post_22, Temp6^0'=Temp6^post_22, fact3^0'=fact3^post_22, factor^0'=factor^post_22, i8^0'=i8^post_22, [ Index2^0==Index2^post_22 && Index7^0==Index7^post_22 && Sorted5^0==Sorted5^post_22 && Temp6^0==Temp6^post_22 && fact3^0==fact3^post_22 && factor^0==factor^post_22 && i8^0==i8^post_22 ], cost: 1 Simplified all rules, resulting in: Start location: l15 0: l0 -> l1 : Sorted5^0'=0, i8^0'=1, [ 101<=Index2^0 ], cost: 1 1: l0 -> l2 : Index2^0'=1+Index2^0, [ Index2^0<=100 ], cost: 1 10: l1 -> l10 : [], cost: 1 2: l2 -> l0 : [], cost: 1 5: l6 -> l7 : [], cost: 1 6: l7 -> l1 : i8^0'=1+i8^0, [ Sorted5^0==0 ], cost: 1 9: l8 -> l9 : Index7^0'=1+Index7^0, [], cost: 1 17: l9 -> l13 : [], cost: 1 19: l10 -> l9 : Index7^0'=1, Sorted5^0'=1, [ i8^0<=99 ], cost: 1 11: l11 -> l8 : Sorted5^0'=0, Temp6^0'=Temp6^post_12, [], cost: 1 12: l11 -> l8 : [], cost: 1 13: l12 -> l11 : [ Index7^0<=100-i8^0 ], cost: 1 14: l12 -> l6 : [ 101-i8^0<=Index7^0 ], cost: 1 15: l13 -> l6 : [ 100<=Index7^0 ], cost: 1 16: l13 -> l12 : [ Index7^0<=99 ], cost: 1 20: l14 -> l2 : Index2^0'=1, fact3^0'=-1, factor^0'=-1, [], cost: 1 21: l15 -> l14 : [], cost: 1 ### Simplification by acceleration and chaining ### Eliminated locations (on linear paths): Start location: l15 0: l0 -> l1 : Sorted5^0'=0, i8^0'=1, [ 101<=Index2^0 ], cost: 1 1: l0 -> l2 : Index2^0'=1+Index2^0, [ Index2^0<=100 ], cost: 1 23: l1 -> l9 : Index7^0'=1, Sorted5^0'=1, [ i8^0<=99 ], cost: 2 2: l2 -> l0 : [], cost: 1 24: l6 -> l1 : i8^0'=1+i8^0, [ Sorted5^0==0 ], cost: 2 9: l8 -> l9 : Index7^0'=1+Index7^0, [], cost: 1 17: l9 -> l13 : [], cost: 1 11: l11 -> l8 : Sorted5^0'=0, Temp6^0'=Temp6^post_12, [], cost: 1 12: l11 -> l8 : [], cost: 1 13: l12 -> l11 : [ Index7^0<=100-i8^0 ], cost: 1 14: l12 -> l6 : [ 101-i8^0<=Index7^0 ], cost: 1 15: l13 -> l6 : [ 100<=Index7^0 ], cost: 1 16: l13 -> l12 : [ Index7^0<=99 ], cost: 1 22: l15 -> l2 : Index2^0'=1, fact3^0'=-1, factor^0'=-1, [], cost: 2 Eliminated locations (on tree-shaped paths): Start location: l15 23: l1 -> l9 : Index7^0'=1, Sorted5^0'=1, [ i8^0<=99 ], cost: 2 25: l2 -> l1 : Sorted5^0'=0, i8^0'=1, [ 101<=Index2^0 ], cost: 2 26: l2 -> l2 : Index2^0'=1+Index2^0, [ Index2^0<=100 ], cost: 2 24: l6 -> l1 : i8^0'=1+i8^0, [ Sorted5^0==0 ], cost: 2 9: l8 -> l9 : Index7^0'=1+Index7^0, [], cost: 1 27: l9 -> l6 : [ 100<=Index7^0 ], cost: 2 28: l9 -> l12 : [ Index7^0<=99 ], cost: 2 14: l12 -> l6 : [ 101-i8^0<=Index7^0 ], cost: 1 29: l12 -> l8 : Sorted5^0'=0, Temp6^0'=Temp6^post_12, [ Index7^0<=100-i8^0 ], cost: 2 30: l12 -> l8 : [ Index7^0<=100-i8^0 ], cost: 2 22: l15 -> l2 : Index2^0'=1, fact3^0'=-1, factor^0'=-1, [], cost: 2 Accelerating simple loops of location 2. Accelerating the following rules: 26: l2 -> l2 : Index2^0'=1+Index2^0, [ Index2^0<=100 ], cost: 2 Accelerated rule 26 with backward acceleration, yielding the new rule 31. [accelerate] Nesting with 1 inner and 1 outer candidates Removing the simple loops: 26. Accelerated all simple loops using metering functions (where possible): Start location: l15 23: l1 -> l9 : Index7^0'=1, Sorted5^0'=1, [ i8^0<=99 ], cost: 2 25: l2 -> l1 : Sorted5^0'=0, i8^0'=1, [ 101<=Index2^0 ], cost: 2 31: l2 -> l2 : Index2^0'=101, [ 101-Index2^0>=0 ], cost: 202-2*Index2^0 24: l6 -> l1 : i8^0'=1+i8^0, [ Sorted5^0==0 ], cost: 2 9: l8 -> l9 : Index7^0'=1+Index7^0, [], cost: 1 27: l9 -> l6 : [ 100<=Index7^0 ], cost: 2 28: l9 -> l12 : [ Index7^0<=99 ], cost: 2 14: l12 -> l6 : [ 101-i8^0<=Index7^0 ], cost: 1 29: l12 -> l8 : Sorted5^0'=0, Temp6^0'=Temp6^post_12, [ Index7^0<=100-i8^0 ], cost: 2 30: l12 -> l8 : [ Index7^0<=100-i8^0 ], cost: 2 22: l15 -> l2 : Index2^0'=1, fact3^0'=-1, factor^0'=-1, [], cost: 2 Chained accelerated rules (with incoming rules): Start location: l15 23: l1 -> l9 : Index7^0'=1, Sorted5^0'=1, [ i8^0<=99 ], cost: 2 25: l2 -> l1 : Sorted5^0'=0, i8^0'=1, [ 101<=Index2^0 ], cost: 2 24: l6 -> l1 : i8^0'=1+i8^0, [ Sorted5^0==0 ], cost: 2 9: l8 -> l9 : Index7^0'=1+Index7^0, [], cost: 1 27: l9 -> l6 : [ 100<=Index7^0 ], cost: 2 28: l9 -> l12 : [ Index7^0<=99 ], cost: 2 14: l12 -> l6 : [ 101-i8^0<=Index7^0 ], cost: 1 29: l12 -> l8 : Sorted5^0'=0, Temp6^0'=Temp6^post_12, [ Index7^0<=100-i8^0 ], cost: 2 30: l12 -> l8 : [ Index7^0<=100-i8^0 ], cost: 2 22: l15 -> l2 : Index2^0'=1, fact3^0'=-1, factor^0'=-1, [], cost: 2 32: l15 -> l2 : Index2^0'=101, fact3^0'=-1, factor^0'=-1, [], cost: 202 Eliminated locations (on tree-shaped paths): Start location: l15 23: l1 -> l9 : Index7^0'=1, Sorted5^0'=1, [ i8^0<=99 ], cost: 2 24: l6 -> l1 : i8^0'=1+i8^0, [ Sorted5^0==0 ], cost: 2 9: l8 -> l9 : Index7^0'=1+Index7^0, [], cost: 1 27: l9 -> l6 : [ 100<=Index7^0 ], cost: 2 34: l9 -> l6 : [ Index7^0<=99 && 101-i8^0<=Index7^0 ], cost: 3 35: l9 -> l8 : Sorted5^0'=0, Temp6^0'=Temp6^post_12, [ Index7^0<=99 && Index7^0<=100-i8^0 ], cost: 4 36: l9 -> l8 : [ Index7^0<=99 && Index7^0<=100-i8^0 ], cost: 4 33: l15 -> l1 : Index2^0'=101, Sorted5^0'=0, fact3^0'=-1, factor^0'=-1, i8^0'=1, [], cost: 204 Eliminated locations (on tree-shaped paths): Start location: l15 23: l1 -> l9 : Index7^0'=1, Sorted5^0'=1, [ i8^0<=99 ], cost: 2 37: l9 -> l1 : i8^0'=1+i8^0, [ 100<=Index7^0 && Sorted5^0==0 ], cost: 4 38: l9 -> l1 : i8^0'=1+i8^0, [ Index7^0<=99 && 101-i8^0<=Index7^0 && Sorted5^0==0 ], cost: 5 39: l9 -> l9 : Index7^0'=1+Index7^0, Sorted5^0'=0, Temp6^0'=Temp6^post_12, [ Index7^0<=99 && Index7^0<=100-i8^0 ], cost: 5 40: l9 -> l9 : Index7^0'=1+Index7^0, [ Index7^0<=99 && Index7^0<=100-i8^0 ], cost: 5 33: l15 -> l1 : Index2^0'=101, Sorted5^0'=0, fact3^0'=-1, factor^0'=-1, i8^0'=1, [], cost: 204 Accelerating simple loops of location 9. Accelerating the following rules: 39: l9 -> l9 : Index7^0'=1+Index7^0, Sorted5^0'=0, Temp6^0'=Temp6^post_12, [ Index7^0<=99 && Index7^0<=100-i8^0 ], cost: 5 40: l9 -> l9 : Index7^0'=1+Index7^0, [ Index7^0<=99 && Index7^0<=100-i8^0 ], cost: 5 Accelerated rule 39 with backward acceleration, yielding the new rule 41. Accelerated rule 39 with backward acceleration, yielding the new rule 42. Accelerated rule 40 with backward acceleration, yielding the new rule 43. Accelerated rule 40 with backward acceleration, yielding the new rule 44. [accelerate] Nesting with 4 inner and 2 outer candidates Removing the simple loops: 39 40. Accelerated all simple loops using metering functions (where possible): Start location: l15 23: l1 -> l9 : Index7^0'=1, Sorted5^0'=1, [ i8^0<=99 ], cost: 2 37: l9 -> l1 : i8^0'=1+i8^0, [ 100<=Index7^0 && Sorted5^0==0 ], cost: 4 38: l9 -> l1 : i8^0'=1+i8^0, [ Index7^0<=99 && 101-i8^0<=Index7^0 && Sorted5^0==0 ], cost: 5 41: l9 -> l9 : Index7^0'=100, Sorted5^0'=0, Temp6^0'=Temp6^post_12, [ 100-Index7^0>=1 && 99<=100-i8^0 ], cost: 500-5*Index7^0 42: l9 -> l9 : Index7^0'=101-i8^0, Sorted5^0'=0, Temp6^0'=Temp6^post_12, [ 101-Index7^0-i8^0>=1 && 100-i8^0<=99 ], cost: 505-5*Index7^0-5*i8^0 43: l9 -> l9 : Index7^0'=100, [ 100-Index7^0>=0 && 99<=100-i8^0 ], cost: 500-5*Index7^0 44: l9 -> l9 : Index7^0'=101-i8^0, [ 101-Index7^0-i8^0>=0 && 100-i8^0<=99 ], cost: 505-5*Index7^0-5*i8^0 33: l15 -> l1 : Index2^0'=101, Sorted5^0'=0, fact3^0'=-1, factor^0'=-1, i8^0'=1, [], cost: 204 Chained accelerated rules (with incoming rules): Start location: l15 23: l1 -> l9 : Index7^0'=1, Sorted5^0'=1, [ i8^0<=99 ], cost: 2 45: l1 -> l9 : Index7^0'=100, Sorted5^0'=0, Temp6^0'=Temp6^post_12, [ 99<=100-i8^0 ], cost: 497 46: l1 -> l9 : Index7^0'=101-i8^0, Sorted5^0'=0, Temp6^0'=Temp6^post_12, [ i8^0<=99 && 100-i8^0<=99 ], cost: 502-5*i8^0 47: l1 -> l9 : Index7^0'=100, Sorted5^0'=1, [ 99<=100-i8^0 ], cost: 497 48: l1 -> l9 : Index7^0'=101-i8^0, Sorted5^0'=1, [ i8^0<=99 && 100-i8^0<=99 ], cost: 502-5*i8^0 37: l9 -> l1 : i8^0'=1+i8^0, [ 100<=Index7^0 && Sorted5^0==0 ], cost: 4 38: l9 -> l1 : i8^0'=1+i8^0, [ Index7^0<=99 && 101-i8^0<=Index7^0 && Sorted5^0==0 ], cost: 5 33: l15 -> l1 : Index2^0'=101, Sorted5^0'=0, fact3^0'=-1, factor^0'=-1, i8^0'=1, [], cost: 204 Eliminated locations (on tree-shaped paths): Start location: l15 49: l1 -> l1 : Index7^0'=100, Sorted5^0'=0, Temp6^0'=Temp6^post_12, i8^0'=1+i8^0, [ 99<=100-i8^0 ], cost: 501 50: l1 -> l1 : Index7^0'=101-i8^0, Sorted5^0'=0, Temp6^0'=Temp6^post_12, i8^0'=1+i8^0, [ 100-i8^0<=99 && 100<=101-i8^0 ], cost: 506-5*i8^0 51: l1 -> l1 : Index7^0'=101-i8^0, Sorted5^0'=0, Temp6^0'=Temp6^post_12, i8^0'=1+i8^0, [ i8^0<=99 && 101-i8^0<=99 ], cost: 507-5*i8^0 52: l1 -> [18] : [ i8^0<=99 && 100-i8^0<=99 ], cost: 502-5*i8^0 33: l15 -> l1 : Index2^0'=101, Sorted5^0'=0, fact3^0'=-1, factor^0'=-1, i8^0'=1, [], cost: 204 Accelerating simple loops of location 1. Simplified some of the simple loops (and removed duplicate rules). Accelerating the following rules: 49: l1 -> l1 : Index7^0'=100, Sorted5^0'=0, Temp6^0'=Temp6^post_12, i8^0'=1+i8^0, [ 99<=100-i8^0 ], cost: 501 50: l1 -> l1 : Index7^0'=101-i8^0, Sorted5^0'=0, Temp6^0'=Temp6^post_12, i8^0'=1+i8^0, [ 1-i8^0==0 ], cost: 506-5*i8^0 51: l1 -> l1 : Index7^0'=101-i8^0, Sorted5^0'=0, Temp6^0'=Temp6^post_12, i8^0'=1+i8^0, [ i8^0<=99 && 101-i8^0<=99 ], cost: 507-5*i8^0 Accelerated rule 49 with backward acceleration, yielding the new rule 53. Failed to prove monotonicity of the guard of rule 50. Accelerated rule 51 with backward acceleration, yielding the new rule 54. [accelerate] Nesting with 3 inner and 3 outer candidates Removing the simple loops: 49 51. Accelerated all simple loops using metering functions (where possible): Start location: l15 50: l1 -> l1 : Index7^0'=101-i8^0, Sorted5^0'=0, Temp6^0'=Temp6^post_12, i8^0'=1+i8^0, [ 1-i8^0==0 ], cost: 506-5*i8^0 52: l1 -> [18] : [ i8^0<=99 && 100-i8^0<=99 ], cost: 502-5*i8^0 53: l1 -> l1 : Index7^0'=100, Sorted5^0'=0, Temp6^0'=Temp6^post_12, i8^0'=2, [ 2-i8^0>=1 ], cost: 1002-501*i8^0 54: l1 -> l1 : Index7^0'=2, Sorted5^0'=0, Temp6^0'=Temp6^post_12, i8^0'=100, [ 101-i8^0<=99 && 100-i8^0>=1 ], cost: 50950+5*i8^0*(-100+i8^0)-1019/2*i8^0-5/2*(-100+i8^0)^2 33: l15 -> l1 : Index2^0'=101, Sorted5^0'=0, fact3^0'=-1, factor^0'=-1, i8^0'=1, [], cost: 204 Chained accelerated rules (with incoming rules): Start location: l15 52: l1 -> [18] : [ i8^0<=99 && 100-i8^0<=99 ], cost: 502-5*i8^0 33: l15 -> l1 : Index2^0'=101, Sorted5^0'=0, fact3^0'=-1, factor^0'=-1, i8^0'=1, [], cost: 204 55: l15 -> l1 : Index2^0'=101, Index7^0'=100, Sorted5^0'=0, Temp6^0'=Temp6^post_12, fact3^0'=-1, factor^0'=-1, i8^0'=2, [], cost: 705 56: l15 -> l1 : Index2^0'=101, Index7^0'=100, Sorted5^0'=0, Temp6^0'=Temp6^post_12, fact3^0'=-1, factor^0'=-1, i8^0'=2, [], cost: 705 Eliminated locations (on tree-shaped paths): Start location: l15 57: l15 -> [18] : Index2^0'=101, Sorted5^0'=0, fact3^0'=-1, factor^0'=-1, i8^0'=1, [], cost: 701 58: l15 -> [18] : Index2^0'=101, Index7^0'=100, Sorted5^0'=0, Temp6^0'=Temp6^post_12, fact3^0'=-1, factor^0'=-1, i8^0'=2, [], cost: 1197 59: l15 -> [18] : Index2^0'=101, Index7^0'=100, Sorted5^0'=0, Temp6^0'=Temp6^post_12, fact3^0'=-1, factor^0'=-1, i8^0'=2, [], cost: 1197 ### Computing asymptotic complexity ### Fully simplified ITS problem Start location: l15 59: l15 -> [18] : Index2^0'=101, Index7^0'=100, Sorted5^0'=0, Temp6^0'=Temp6^post_12, fact3^0'=-1, factor^0'=-1, i8^0'=2, [], cost: 1197 Obtained the following overall complexity (w.r.t. the length of the input n): Complexity: Constant Cpx degree: 0 Solved cost: 1 Rule cost: 1 Rule guard: [ Index2^0==Index2^post_22 && Index7^0==Index7^post_22 && Sorted5^0==Sorted5^post_22 && Temp6^0==Temp6^post_22 && fact3^0==fact3^post_22 && factor^0==factor^post_22 && i8^0==i8^post_22 ] WORST_CASE(Omega(1),?)