NO ### Pre-processing the ITS problem ### Initial linear ITS problem Start location: l5 0: l0 -> l1 : nd^0'=nd^post_1, p^0'=p^post_1, x^0'=x^post_1, [ nd^0<=0 && p^post_1==2 && nd^0==nd^post_1 && x^0==x^post_1 ], cost: 1 1: l0 -> l1 : nd^0'=nd^post_2, p^0'=p^post_2, x^0'=x^post_2, [ 1<=nd^0 && p^post_2==1 && nd^0==nd^post_2 && x^0==x^post_2 ], cost: 1 2: l1 -> l0 : nd^0'=nd^post_3, p^0'=p^post_3, x^0'=x^post_3, [ nd^post_3==nd^post_3 && p^0==p^post_3 && x^0==x^post_3 ], cost: 1 3: l2 -> l3 : nd^0'=nd^post_4, p^0'=p^post_4, x^0'=x^post_4, [ nd^0<=0 && x^post_4==-2+x^0 && nd^0==nd^post_4 && p^0==p^post_4 ], cost: 1 4: l2 -> l3 : nd^0'=nd^post_5, p^0'=p^post_5, x^0'=x^post_5, [ 1<=nd^0 && x^post_5==-1+x^0 && nd^0==nd^post_5 && p^0==p^post_5 ], cost: 1 5: l3 -> l1 : nd^0'=nd^post_6, p^0'=p^post_6, x^0'=x^post_6, [ x^0<=0 && nd^0==nd^post_6 && p^0==p^post_6 && x^0==x^post_6 ], cost: 1 6: l3 -> l2 : nd^0'=nd^post_7, p^0'=p^post_7, x^0'=x^post_7, [ 1<=x^0 && nd^post_7==nd^post_7 && p^0==p^post_7 && x^0==x^post_7 ], cost: 1 7: l4 -> l3 : nd^0'=nd^post_8, p^0'=p^post_8, x^0'=x^post_8, [ p^post_8==0 && nd^0==nd^post_8 && x^0==x^post_8 ], cost: 1 8: l5 -> l4 : nd^0'=nd^post_9, p^0'=p^post_9, x^0'=x^post_9, [ nd^0==nd^post_9 && p^0==p^post_9 && x^0==x^post_9 ], cost: 1 Checking for constant complexity: The following rule is satisfiable with cost >= 1, yielding constant complexity: 8: l5 -> l4 : nd^0'=nd^post_9, p^0'=p^post_9, x^0'=x^post_9, [ nd^0==nd^post_9 && p^0==p^post_9 && x^0==x^post_9 ], cost: 1 Simplified all rules, resulting in: Start location: l5 0: l0 -> l1 : p^0'=2, [ nd^0<=0 ], cost: 1 1: l0 -> l1 : p^0'=1, [ 1<=nd^0 ], cost: 1 2: l1 -> l0 : nd^0'=nd^post_3, [], cost: 1 3: l2 -> l3 : x^0'=-2+x^0, [ nd^0<=0 ], cost: 1 4: l2 -> l3 : x^0'=-1+x^0, [ 1<=nd^0 ], cost: 1 5: l3 -> l1 : [ x^0<=0 ], cost: 1 6: l3 -> l2 : nd^0'=nd^post_7, [ 1<=x^0 ], cost: 1 7: l4 -> l3 : p^0'=0, [], cost: 1 8: l5 -> l4 : [], cost: 1 ### Simplification by acceleration and chaining ### Eliminated locations (on linear paths): Start location: l5 0: l0 -> l1 : p^0'=2, [ nd^0<=0 ], cost: 1 1: l0 -> l1 : p^0'=1, [ 1<=nd^0 ], cost: 1 2: l1 -> l0 : nd^0'=nd^post_3, [], cost: 1 3: l2 -> l3 : x^0'=-2+x^0, [ nd^0<=0 ], cost: 1 4: l2 -> l3 : x^0'=-1+x^0, [ 1<=nd^0 ], cost: 1 5: l3 -> l1 : [ x^0<=0 ], cost: 1 6: l3 -> l2 : nd^0'=nd^post_7, [ 1<=x^0 ], cost: 1 9: l5 -> l3 : p^0'=0, [], cost: 2 Eliminated locations (on tree-shaped paths): Start location: l5 12: l1 -> l1 : nd^0'=nd^post_3, p^0'=2, [ nd^post_3<=0 ], cost: 2 13: l1 -> l1 : nd^0'=nd^post_3, p^0'=1, [ 1<=nd^post_3 ], cost: 2 5: l3 -> l1 : [ x^0<=0 ], cost: 1 10: l3 -> l3 : nd^0'=nd^post_7, x^0'=-2+x^0, [ 1<=x^0 && nd^post_7<=0 ], cost: 2 11: l3 -> l3 : nd^0'=nd^post_7, x^0'=-1+x^0, [ 1<=x^0 && 1<=nd^post_7 ], cost: 2 9: l5 -> l3 : p^0'=0, [], cost: 2 Accelerating simple loops of location 1. Accelerating the following rules: 12: l1 -> l1 : nd^0'=nd^post_3, p^0'=2, [ nd^post_3<=0 ], cost: 2 13: l1 -> l1 : nd^0'=nd^post_3, p^0'=1, [ 1<=nd^post_3 ], cost: 2 Accelerated rule 12 with non-termination, yielding the new rule 14. Accelerated rule 13 with non-termination, yielding the new rule 15. [accelerate] Nesting with 0 inner and 0 outer candidates Removing the simple loops: 12 13. Accelerating simple loops of location 3. Accelerating the following rules: 10: l3 -> l3 : nd^0'=nd^post_7, x^0'=-2+x^0, [ 1<=x^0 && nd^post_7<=0 ], cost: 2 11: l3 -> l3 : nd^0'=nd^post_7, x^0'=-1+x^0, [ 1<=x^0 && 1<=nd^post_7 ], cost: 2 Accelerated rule 10 with backward acceleration, yielding the new rule 16. Accelerated rule 11 with backward acceleration, yielding the new rule 17. [accelerate] Nesting with 2 inner and 2 outer candidates Removing the simple loops: 10 11. Accelerated all simple loops using metering functions (where possible): Start location: l5 14: l1 -> [6] : [ nd^post_3<=0 ], cost: NONTERM 15: l1 -> [6] : [ 1<=nd^post_3 ], cost: NONTERM 5: l3 -> l1 : [ x^0<=0 ], cost: 1 16: l3 -> l3 : nd^0'=nd^post_7, x^0'=-2*k+x^0, [ nd^post_7<=0 && k>=1 && 1<=2-2*k+x^0 ], cost: 2*k 17: l3 -> l3 : nd^0'=nd^post_7, x^0'=0, [ 1<=nd^post_7 && x^0>=1 ], cost: 2*x^0 9: l5 -> l3 : p^0'=0, [], cost: 2 Chained accelerated rules (with incoming rules): Start location: l5 5: l3 -> l1 : [ x^0<=0 ], cost: 1 18: l3 -> [6] : [ x^0<=0 ], cost: NONTERM 19: l3 -> [6] : [ x^0<=0 ], cost: NONTERM 9: l5 -> l3 : p^0'=0, [], cost: 2 20: l5 -> l3 : nd^0'=nd^post_7, p^0'=0, x^0'=-2*k+x^0, [ nd^post_7<=0 && k>=1 && 1<=2-2*k+x^0 ], cost: 2+2*k 21: l5 -> l3 : nd^0'=nd^post_7, p^0'=0, x^0'=0, [ 1<=nd^post_7 && x^0>=1 ], cost: 2+2*x^0 Removed unreachable locations (and leaf rules with constant cost): Start location: l5 18: l3 -> [6] : [ x^0<=0 ], cost: NONTERM 19: l3 -> [6] : [ x^0<=0 ], cost: NONTERM 9: l5 -> l3 : p^0'=0, [], cost: 2 20: l5 -> l3 : nd^0'=nd^post_7, p^0'=0, x^0'=-2*k+x^0, [ nd^post_7<=0 && k>=1 && 1<=2-2*k+x^0 ], cost: 2+2*k 21: l5 -> l3 : nd^0'=nd^post_7, p^0'=0, x^0'=0, [ 1<=nd^post_7 && x^0>=1 ], cost: 2+2*x^0 Eliminated locations (on tree-shaped paths): Start location: l5 22: l5 -> [6] : [ x^0<=0 ], cost: NONTERM 23: l5 -> [6] : [ x^0<=0 ], cost: NONTERM 24: l5 -> [6] : [ nd^post_7<=0 && k>=1 && 1<=2-2*k+x^0 && -2*k+x^0<=0 ], cost: NONTERM 25: l5 -> [6] : [ nd^post_7<=0 && k>=1 && 1<=2-2*k+x^0 && -2*k+x^0<=0 ], cost: NONTERM 26: l5 -> [6] : [ 1<=nd^post_7 && x^0>=1 ], cost: NONTERM 27: l5 -> [6] : [ 1<=nd^post_7 && x^0>=1 ], cost: NONTERM ### Computing asymptotic complexity ### Fully simplified ITS problem Start location: l5 23: l5 -> [6] : [ x^0<=0 ], cost: NONTERM 25: l5 -> [6] : [ nd^post_7<=0 && k>=1 && 1<=2-2*k+x^0 && -2*k+x^0<=0 ], cost: NONTERM 27: l5 -> [6] : [ 1<=nd^post_7 && x^0>=1 ], cost: NONTERM Computing asymptotic complexity for rule 23 Guard is satisfiable, yielding nontermination Resulting cost NONTERM has complexity: Nonterm Found new complexity Nonterm. Obtained the following overall complexity (w.r.t. the length of the input n): Complexity: Nonterm Cpx degree: Nonterm Solved cost: NONTERM Rule cost: NONTERM Rule guard: [ x^0<=0 ] NO