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: { prime(0()) -> false() , prime(s(0())) -> false() , prime(s(s(x))) -> prime1(s(s(x)), s(x)) , prime1(x, 0()) -> false() , prime1(x, s(0())) -> true() , prime1(x, s(s(y))) -> and(not(divp(s(s(y)), x)), prime1(x, s(y))) , divp(x, y) -> =(rem(x, y), 0()) } Obligation: innermost runtime complexity Answer: YES(O(1),O(n^1)) We add following weak dependency pairs: Strict DPs: { prime^#(0()) -> c_1() , prime^#(s(0())) -> c_2() , prime^#(s(s(x))) -> c_3(prime1^#(s(s(x)), s(x))) , prime1^#(x, 0()) -> c_4() , prime1^#(x, s(0())) -> c_5() , prime1^#(x, s(s(y))) -> c_6(divp^#(s(s(y)), x), prime1^#(x, s(y))) , divp^#(x, y) -> c_7() } 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: { prime^#(0()) -> c_1() , prime^#(s(0())) -> c_2() , prime^#(s(s(x))) -> c_3(prime1^#(s(s(x)), s(x))) , prime1^#(x, 0()) -> c_4() , prime1^#(x, s(0())) -> c_5() , prime1^#(x, s(s(y))) -> c_6(divp^#(s(s(y)), x), prime1^#(x, s(y))) , divp^#(x, y) -> c_7() } Strict Trs: { prime(0()) -> false() , prime(s(0())) -> false() , prime(s(s(x))) -> prime1(s(s(x)), s(x)) , prime1(x, 0()) -> false() , prime1(x, s(0())) -> true() , prime1(x, s(s(y))) -> and(not(divp(s(s(y)), x)), prime1(x, s(y))) , divp(x, y) -> =(rem(x, y), 0()) } Obligation: innermost runtime complexity Answer: YES(O(1),O(n^1)) No rule is usable, rules are removed from the input problem. We are left with following problem, upon which TcT provides the certificate YES(O(1),O(n^1)). Strict DPs: { prime^#(0()) -> c_1() , prime^#(s(0())) -> c_2() , prime^#(s(s(x))) -> c_3(prime1^#(s(s(x)), s(x))) , prime1^#(x, 0()) -> c_4() , prime1^#(x, s(0())) -> c_5() , prime1^#(x, s(s(y))) -> c_6(divp^#(s(s(y)), x), prime1^#(x, s(y))) , divp^#(x, y) -> c_7() } 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(c_3) = {1}, Uargs(c_6) = {1, 2} TcT has computed following constructor-restricted matrix interpretation. [0] = [0] [s](x1) = [1] [prime^#](x1) = [1] [c_1] = [0] [c_2] = [0] [c_3](x1) = [1] x1 + [0] [prime1^#](x1, x2) = [1] x2 + [0] [c_4] = [1] [c_5] = [0] [c_6](x1, x2) = [1] x1 + [1] x2 + [0] [divp^#](x1, x2) = [0] [c_7] = [1] This order satisfies following ordering constraints: 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: { prime^#(s(s(x))) -> c_3(prime1^#(s(s(x)), s(x))) , prime1^#(x, 0()) -> c_4() , prime1^#(x, s(s(y))) -> c_6(divp^#(s(s(y)), x), prime1^#(x, s(y))) , divp^#(x, y) -> c_7() } Weak DPs: { prime^#(0()) -> c_1() , prime^#(s(0())) -> c_2() , prime1^#(x, s(0())) -> c_5() } Obligation: innermost runtime complexity Answer: YES(?,O(n^1)) We estimate the number of application of {2,4} by applications of Pre({2,4}) = {3}. Here rules are labeled as follows: DPs: { 1: prime^#(s(s(x))) -> c_3(prime1^#(s(s(x)), s(x))) , 2: prime1^#(x, 0()) -> c_4() , 3: prime1^#(x, s(s(y))) -> c_6(divp^#(s(s(y)), x), prime1^#(x, s(y))) , 4: divp^#(x, y) -> c_7() , 5: prime^#(0()) -> c_1() , 6: prime^#(s(0())) -> c_2() , 7: prime1^#(x, s(0())) -> c_5() } We are left with following problem, upon which TcT provides the certificate YES(?,O(n^1)). Strict DPs: { prime^#(s(s(x))) -> c_3(prime1^#(s(s(x)), s(x))) , prime1^#(x, s(s(y))) -> c_6(divp^#(s(s(y)), x), prime1^#(x, s(y))) } Weak DPs: { prime^#(0()) -> c_1() , prime^#(s(0())) -> c_2() , prime1^#(x, 0()) -> c_4() , prime1^#(x, s(0())) -> c_5() , divp^#(x, y) -> c_7() } 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. { prime^#(0()) -> c_1() , prime^#(s(0())) -> c_2() , prime1^#(x, 0()) -> c_4() , prime1^#(x, s(0())) -> c_5() , divp^#(x, y) -> c_7() } We are left with following problem, upon which TcT provides the certificate YES(?,O(n^1)). Strict DPs: { prime^#(s(s(x))) -> c_3(prime1^#(s(s(x)), s(x))) , prime1^#(x, s(s(y))) -> c_6(divp^#(s(s(y)), x), prime1^#(x, s(y))) } Obligation: innermost runtime complexity Answer: YES(?,O(n^1)) Due to missing edges in the dependency-graph, the right-hand sides of following rules could be simplified: { prime1^#(x, s(s(y))) -> c_6(divp^#(s(s(y)), x), prime1^#(x, s(y))) } We are left with following problem, upon which TcT provides the certificate YES(?,O(n^1)). Strict DPs: { prime^#(s(s(x))) -> c_1(prime1^#(s(s(x)), s(x))) , prime1^#(x, s(s(y))) -> c_2(prime1^#(x, s(y))) } Obligation: innermost runtime complexity Answer: YES(?,O(n^1)) Consider the dependency graph 1: prime^#(s(s(x))) -> c_1(prime1^#(s(s(x)), s(x))) -->_1 prime1^#(x, s(s(y))) -> c_2(prime1^#(x, s(y))) :2 2: prime1^#(x, s(s(y))) -> c_2(prime1^#(x, s(y))) -->_1 prime1^#(x, s(s(y))) -> c_2(prime1^#(x, s(y))) :2 Following roots of the dependency graph are removed, as the considered set of starting terms is closed under reduction with respect to these rules (modulo compound contexts). { prime^#(s(s(x))) -> c_1(prime1^#(s(s(x)), s(x))) } We are left with following problem, upon which TcT provides the certificate YES(?,O(n^1)). Strict DPs: { prime1^#(x, s(s(y))) -> c_2(prime1^#(x, s(y))) } Obligation: innermost runtime complexity Answer: YES(?,O(n^1)) The following argument positions are usable: Uargs(c_2) = {1} TcT has computed following constructor-based matrix interpretation satisfying not(EDA). [s](x1) = [1] x1 + [2] [prime1^#](x1, x2) = [3] x1 + [1] x2 + [0] [c_2](x1) = [1] x1 + [1] This order satisfies following ordering constraints: [prime1^#(x, s(s(y)))] = [3] x + [1] y + [4] > [3] x + [1] y + [3] = [c_2(prime1^#(x, s(y)))] Hurray, we answered YES(O(1),O(n^1))