YES(O(1),O(n^1)) We are left with following problem, upon which TcT provides the certificate YES(O(1),O(n^1)). Strict Trs: { minus(X, 0()) -> X , minus(s(X), s(Y)) -> p(minus(X, Y)) , p(s(X)) -> X , div(0(), s(Y)) -> 0() , div(s(X), s(Y)) -> s(div(minus(X, Y), s(Y))) } Obligation: innermost runtime complexity Answer: YES(O(1),O(n^1)) We add following weak dependency pairs: Strict DPs: { minus^#(X, 0()) -> c_1() , minus^#(s(X), s(Y)) -> c_2(p^#(minus(X, Y))) , p^#(s(X)) -> c_3() , div^#(0(), s(Y)) -> c_4() , div^#(s(X), s(Y)) -> c_5(div^#(minus(X, Y), s(Y))) } and mark the set of starting terms. We are left with following problem, upon which TcT provides the certificate YES(O(1),O(n^1)). Strict DPs: { minus^#(X, 0()) -> c_1() , minus^#(s(X), s(Y)) -> c_2(p^#(minus(X, Y))) , p^#(s(X)) -> c_3() , div^#(0(), s(Y)) -> c_4() , div^#(s(X), s(Y)) -> c_5(div^#(minus(X, Y), s(Y))) } Strict Trs: { minus(X, 0()) -> X , minus(s(X), s(Y)) -> p(minus(X, Y)) , p(s(X)) -> X , div(0(), s(Y)) -> 0() , div(s(X), s(Y)) -> s(div(minus(X, Y), s(Y))) } Obligation: innermost runtime complexity Answer: YES(O(1),O(n^1)) We replace rewrite rules by usable rules: Strict Usable Rules: { minus(X, 0()) -> X , minus(s(X), s(Y)) -> p(minus(X, Y)) , p(s(X)) -> X } We are left with following problem, upon which TcT provides the certificate YES(O(1),O(n^1)). Strict DPs: { minus^#(X, 0()) -> c_1() , minus^#(s(X), s(Y)) -> c_2(p^#(minus(X, Y))) , p^#(s(X)) -> c_3() , div^#(0(), s(Y)) -> c_4() , div^#(s(X), s(Y)) -> c_5(div^#(minus(X, Y), s(Y))) } Strict Trs: { minus(X, 0()) -> X , minus(s(X), s(Y)) -> p(minus(X, Y)) , p(s(X)) -> X } Obligation: innermost runtime complexity Answer: YES(O(1),O(n^1)) The weightgap principle applies (using the following constant growth matrix-interpretation) The following argument positions are usable: Uargs(p) = {1}, Uargs(c_2) = {1}, Uargs(p^#) = {1}, Uargs(div^#) = {1}, Uargs(c_5) = {1} TcT has computed following constructor-restricted matrix interpretation. [minus](x1, x2) = [1] x1 + [2] [0] = [0] [s](x1) = [1] x1 + [2] [p](x1) = [1] x1 + [0] [minus^#](x1, x2) = [2] x1 + [1] x2 + [1] [c_1] = [1] [c_2](x1) = [1] x1 + [2] [p^#](x1) = [1] x1 + [2] [c_3] = [2] [div^#](x1, x2) = [2] x1 + [0] [c_4] = [1] [c_5](x1) = [1] x1 + [2] This order satisfies following ordering constraints: [minus(X, 0())] = [1] X + [2] > [1] X + [0] = [X] [minus(s(X), s(Y))] = [1] X + [4] > [1] X + [2] = [p(minus(X, Y))] [p(s(X))] = [1] X + [2] > [1] X + [0] = [X] Further, it can be verified that all rules not oriented are covered by the weightgap condition. We are left with following problem, upon which TcT provides the certificate YES(?,O(n^1)). Strict DPs: { minus^#(X, 0()) -> c_1() , div^#(0(), s(Y)) -> c_4() , div^#(s(X), s(Y)) -> c_5(div^#(minus(X, Y), s(Y))) } Weak DPs: { minus^#(s(X), s(Y)) -> c_2(p^#(minus(X, Y))) , p^#(s(X)) -> c_3() } Weak Trs: { minus(X, 0()) -> X , minus(s(X), s(Y)) -> p(minus(X, Y)) , p(s(X)) -> X } Obligation: innermost runtime complexity Answer: YES(?,O(n^1)) We estimate the number of application of {1,2} by applications of Pre({1,2}) = {3}. Here rules are labeled as follows: DPs: { 1: minus^#(X, 0()) -> c_1() , 2: div^#(0(), s(Y)) -> c_4() , 3: div^#(s(X), s(Y)) -> c_5(div^#(minus(X, Y), s(Y))) , 4: minus^#(s(X), s(Y)) -> c_2(p^#(minus(X, Y))) , 5: p^#(s(X)) -> c_3() } We are left with following problem, upon which TcT provides the certificate YES(?,O(n^1)). Strict DPs: { div^#(s(X), s(Y)) -> c_5(div^#(minus(X, Y), s(Y))) } Weak DPs: { minus^#(X, 0()) -> c_1() , minus^#(s(X), s(Y)) -> c_2(p^#(minus(X, Y))) , p^#(s(X)) -> c_3() , div^#(0(), s(Y)) -> c_4() } Weak Trs: { minus(X, 0()) -> X , minus(s(X), s(Y)) -> p(minus(X, Y)) , p(s(X)) -> X } Obligation: innermost runtime complexity Answer: YES(?,O(n^1)) The following weak DPs constitute a sub-graph of the DG that is closed under successors. The DPs are removed. { minus^#(X, 0()) -> c_1() , minus^#(s(X), s(Y)) -> c_2(p^#(minus(X, Y))) , p^#(s(X)) -> c_3() , div^#(0(), s(Y)) -> c_4() } We are left with following problem, upon which TcT provides the certificate YES(?,O(n^1)). Strict DPs: { div^#(s(X), s(Y)) -> c_5(div^#(minus(X, Y), s(Y))) } Weak Trs: { minus(X, 0()) -> X , minus(s(X), s(Y)) -> p(minus(X, Y)) , p(s(X)) -> X } Obligation: innermost runtime complexity Answer: YES(?,O(n^1)) The following argument positions are usable: Uargs(c_5) = {1} TcT has computed following constructor-based matrix interpretation satisfying not(EDA). [minus](x1, x2) = [1] x1 + [0] [0] = [3] [s](x1) = [1] x1 + [2] [p](x1) = [1] x1 + [0] [div^#](x1, x2) = [2] x1 + [0] [c_5](x1) = [1] x1 + [3] This order satisfies following ordering constraints: [minus(X, 0())] = [1] X + [0] >= [1] X + [0] = [X] [minus(s(X), s(Y))] = [1] X + [2] > [1] X + [0] = [p(minus(X, Y))] [p(s(X))] = [1] X + [2] > [1] X + [0] = [X] [div^#(s(X), s(Y))] = [2] X + [4] > [2] X + [3] = [c_5(div^#(minus(X, Y), s(Y)))] Hurray, we answered YES(O(1),O(n^1))