WORST_CASE(Omega(1),?) ### Pre-processing the ITS problem ### Initial linear ITS problem Start location: l8 0: l0 -> l1 : j^0'=j^post_1, tmp3^0'=tmp3^post_1, x1^0'=x1^post_1, y2^0'=y2^post_1, [ x1^post_1==j^0 && y2^post_1==1+j^0 && tmp3^post_1==tmp3^post_1 && j^0==j^post_1 ], cost: 1 1: l0 -> l1 : j^0'=j^post_2, tmp3^0'=tmp3^post_2, x1^0'=x1^post_2, y2^0'=y2^post_2, [ j^0==j^post_2 && tmp3^0==tmp3^post_2 && x1^0==x1^post_2 && y2^0==y2^post_2 ], cost: 1 8: l1 -> l6 : j^0'=j^post_9, tmp3^0'=tmp3^post_9, x1^0'=x1^post_9, y2^0'=y2^post_9, [ j^post_9==1+j^0 && tmp3^0==tmp3^post_9 && x1^0==x1^post_9 && y2^0==y2^post_9 ], cost: 1 2: l2 -> l3 : j^0'=j^post_3, tmp3^0'=tmp3^post_3, x1^0'=x1^post_3, y2^0'=y2^post_3, [ 4<=j^0 && j^0==j^post_3 && tmp3^0==tmp3^post_3 && x1^0==x1^post_3 && y2^0==y2^post_3 ], cost: 1 3: l2 -> l0 : j^0'=j^post_4, tmp3^0'=tmp3^post_4, x1^0'=x1^post_4, y2^0'=y2^post_4, [ 1+j^0<=4 && j^0==j^post_4 && tmp3^0==tmp3^post_4 && x1^0==x1^post_4 && y2^0==y2^post_4 ], cost: 1 6: l3 -> l4 : j^0'=j^post_7, tmp3^0'=tmp3^post_7, x1^0'=x1^post_7, y2^0'=y2^post_7, [ j^0==j^post_7 && tmp3^0==tmp3^post_7 && x1^0==x1^post_7 && y2^0==y2^post_7 ], cost: 1 7: l3 -> l4 : j^0'=j^post_8, tmp3^0'=tmp3^post_8, x1^0'=x1^post_8, y2^0'=y2^post_8, [ j^0==j^post_8 && tmp3^0==tmp3^post_8 && x1^0==x1^post_8 && y2^0==y2^post_8 ], cost: 1 4: l4 -> l5 : j^0'=j^post_5, tmp3^0'=tmp3^post_5, x1^0'=x1^post_5, y2^0'=y2^post_5, [ j^0==j^post_5 && tmp3^0==tmp3^post_5 && x1^0==x1^post_5 && y2^0==y2^post_5 ], cost: 1 5: l6 -> l2 : j^0'=j^post_6, tmp3^0'=tmp3^post_6, x1^0'=x1^post_6, y2^0'=y2^post_6, [ j^0==j^post_6 && tmp3^0==tmp3^post_6 && x1^0==x1^post_6 && y2^0==y2^post_6 ], cost: 1 9: l7 -> l6 : j^0'=j^post_10, tmp3^0'=tmp3^post_10, x1^0'=x1^post_10, y2^0'=y2^post_10, [ j^post_10==0 && tmp3^0==tmp3^post_10 && x1^0==x1^post_10 && y2^0==y2^post_10 ], cost: 1 10: l8 -> l7 : j^0'=j^post_11, tmp3^0'=tmp3^post_11, x1^0'=x1^post_11, y2^0'=y2^post_11, [ j^0==j^post_11 && tmp3^0==tmp3^post_11 && x1^0==x1^post_11 && y2^0==y2^post_11 ], cost: 1 Checking for constant complexity: The following rule is satisfiable with cost >= 1, yielding constant complexity: 10: l8 -> l7 : j^0'=j^post_11, tmp3^0'=tmp3^post_11, x1^0'=x1^post_11, y2^0'=y2^post_11, [ j^0==j^post_11 && tmp3^0==tmp3^post_11 && x1^0==x1^post_11 && y2^0==y2^post_11 ], cost: 1 Removed unreachable and leaf rules: Start location: l8 0: l0 -> l1 : j^0'=j^post_1, tmp3^0'=tmp3^post_1, x1^0'=x1^post_1, y2^0'=y2^post_1, [ x1^post_1==j^0 && y2^post_1==1+j^0 && tmp3^post_1==tmp3^post_1 && j^0==j^post_1 ], cost: 1 1: l0 -> l1 : j^0'=j^post_2, tmp3^0'=tmp3^post_2, x1^0'=x1^post_2, y2^0'=y2^post_2, [ j^0==j^post_2 && tmp3^0==tmp3^post_2 && x1^0==x1^post_2 && y2^0==y2^post_2 ], cost: 1 8: l1 -> l6 : j^0'=j^post_9, tmp3^0'=tmp3^post_9, x1^0'=x1^post_9, y2^0'=y2^post_9, [ j^post_9==1+j^0 && tmp3^0==tmp3^post_9 && x1^0==x1^post_9 && y2^0==y2^post_9 ], cost: 1 3: l2 -> l0 : j^0'=j^post_4, tmp3^0'=tmp3^post_4, x1^0'=x1^post_4, y2^0'=y2^post_4, [ 1+j^0<=4 && j^0==j^post_4 && tmp3^0==tmp3^post_4 && x1^0==x1^post_4 && y2^0==y2^post_4 ], cost: 1 5: l6 -> l2 : j^0'=j^post_6, tmp3^0'=tmp3^post_6, x1^0'=x1^post_6, y2^0'=y2^post_6, [ j^0==j^post_6 && tmp3^0==tmp3^post_6 && x1^0==x1^post_6 && y2^0==y2^post_6 ], cost: 1 9: l7 -> l6 : j^0'=j^post_10, tmp3^0'=tmp3^post_10, x1^0'=x1^post_10, y2^0'=y2^post_10, [ j^post_10==0 && tmp3^0==tmp3^post_10 && x1^0==x1^post_10 && y2^0==y2^post_10 ], cost: 1 10: l8 -> l7 : j^0'=j^post_11, tmp3^0'=tmp3^post_11, x1^0'=x1^post_11, y2^0'=y2^post_11, [ j^0==j^post_11 && tmp3^0==tmp3^post_11 && x1^0==x1^post_11 && y2^0==y2^post_11 ], cost: 1 Simplified all rules, resulting in: Start location: l8 0: l0 -> l1 : tmp3^0'=tmp3^post_1, x1^0'=j^0, y2^0'=1+j^0, [], cost: 1 1: l0 -> l1 : [], cost: 1 8: l1 -> l6 : j^0'=1+j^0, [], cost: 1 3: l2 -> l0 : [ 1+j^0<=4 ], cost: 1 5: l6 -> l2 : [], cost: 1 9: l7 -> l6 : j^0'=0, [], cost: 1 10: l8 -> l7 : [], cost: 1 ### Simplification by acceleration and chaining ### Eliminated locations (on linear paths): Start location: l8 0: l0 -> l1 : tmp3^0'=tmp3^post_1, x1^0'=j^0, y2^0'=1+j^0, [], cost: 1 1: l0 -> l1 : [], cost: 1 8: l1 -> l6 : j^0'=1+j^0, [], cost: 1 12: l6 -> l0 : [ 1+j^0<=4 ], cost: 2 11: l8 -> l6 : j^0'=0, [], cost: 2 Eliminated locations (on tree-shaped paths): Start location: l8 8: l1 -> l6 : j^0'=1+j^0, [], cost: 1 13: l6 -> l1 : tmp3^0'=tmp3^post_1, x1^0'=j^0, y2^0'=1+j^0, [ 1+j^0<=4 ], cost: 3 14: l6 -> l1 : [ 1+j^0<=4 ], cost: 3 11: l8 -> l6 : j^0'=0, [], cost: 2 Eliminated locations (on tree-shaped paths): Start location: l8 15: l6 -> l6 : j^0'=1+j^0, tmp3^0'=tmp3^post_1, x1^0'=j^0, y2^0'=1+j^0, [ 1+j^0<=4 ], cost: 4 16: l6 -> l6 : j^0'=1+j^0, [ 1+j^0<=4 ], cost: 4 11: l8 -> l6 : j^0'=0, [], cost: 2 Accelerating simple loops of location 6. Accelerating the following rules: 15: l6 -> l6 : j^0'=1+j^0, tmp3^0'=tmp3^post_1, x1^0'=j^0, y2^0'=1+j^0, [ 1+j^0<=4 ], cost: 4 16: l6 -> l6 : j^0'=1+j^0, [ 1+j^0<=4 ], cost: 4 Accelerated rule 15 with backward acceleration, yielding the new rule 17. Accelerated rule 16 with backward acceleration, yielding the new rule 18. [accelerate] Nesting with 2 inner and 2 outer candidates Removing the simple loops: 15 16. Accelerated all simple loops using metering functions (where possible): Start location: l8 17: l6 -> l6 : j^0'=4, tmp3^0'=tmp3^post_1, x1^0'=3, y2^0'=4, [ 4-j^0>=1 ], cost: 16-4*j^0 18: l6 -> l6 : j^0'=4, [ 4-j^0>=0 ], cost: 16-4*j^0 11: l8 -> l6 : j^0'=0, [], cost: 2 Chained accelerated rules (with incoming rules): Start location: l8 11: l8 -> l6 : j^0'=0, [], cost: 2 19: l8 -> l6 : j^0'=4, tmp3^0'=tmp3^post_1, x1^0'=3, y2^0'=4, [], cost: 18 20: l8 -> l6 : j^0'=4, [], cost: 18 Removed unreachable locations (and leaf rules with constant cost): Start location: l8 ### Computing asymptotic complexity ### Fully simplified ITS problem Start location: l8 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: [ j^0==j^post_11 && tmp3^0==tmp3^post_11 && x1^0==x1^post_11 && y2^0==y2^post_11 ] WORST_CASE(Omega(1),?)