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