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: { merge(Cons(x', xs'), Cons(x, xs)) -> merge[Ite][False][Ite][False][Ite](<=(x', x), Cons(x', xs'), Cons(x, xs)) , merge(Cons(x, xs), Nil()) -> Cons(x, xs) , merge(Nil(), ys) -> ys , goal(xs, ys) -> merge(xs, ys) } Weak Trs: { <=(S(x), S(y)) -> <=(x, y) , <=(S(x), 0()) -> False() , <=(0(), y) -> True() } Obligation: innermost runtime complexity Answer: YES(O(1),O(n^1)) We add the following innermost weak dependency pairs: Strict DPs: { merge^#(Cons(x', xs'), Cons(x, xs)) -> c_1(<=^#(x', x)) , merge^#(Cons(x, xs), Nil()) -> c_2() , merge^#(Nil(), ys) -> c_3() , goal^#(xs, ys) -> c_4(merge^#(xs, ys)) } Weak DPs: { <=^#(S(x), S(y)) -> c_5(<=^#(x, y)) , <=^#(S(x), 0()) -> c_6() , <=^#(0(), 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: { merge^#(Cons(x', xs'), Cons(x, xs)) -> c_1(<=^#(x', x)) , merge^#(Cons(x, xs), Nil()) -> c_2() , merge^#(Nil(), ys) -> c_3() , goal^#(xs, ys) -> c_4(merge^#(xs, ys)) } Strict Trs: { merge(Cons(x', xs'), Cons(x, xs)) -> merge[Ite][False][Ite][False][Ite](<=(x', x), Cons(x', xs'), Cons(x, xs)) , merge(Cons(x, xs), Nil()) -> Cons(x, xs) , merge(Nil(), ys) -> ys , goal(xs, ys) -> merge(xs, ys) } Weak DPs: { <=^#(S(x), S(y)) -> c_5(<=^#(x, y)) , <=^#(S(x), 0()) -> c_6() , <=^#(0(), y) -> c_7() } Weak Trs: { <=(S(x), S(y)) -> <=(x, y) , <=(S(x), 0()) -> False() , <=(0(), y) -> True() } 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: { merge^#(Cons(x', xs'), Cons(x, xs)) -> c_1(<=^#(x', x)) , merge^#(Cons(x, xs), Nil()) -> c_2() , merge^#(Nil(), ys) -> c_3() , goal^#(xs, ys) -> c_4(merge^#(xs, ys)) } Weak DPs: { <=^#(S(x), S(y)) -> c_5(<=^#(x, y)) , <=^#(S(x), 0()) -> c_6() , <=^#(0(), 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_1) = {1}, Uargs(c_4) = {1}, Uargs(c_5) = {1} TcT has computed the following constructor-restricted matrix interpretation. [S](x1) = [1 0] x1 + [0] [0 0] [0] [Cons](x1, x2) = [1 0] x1 + [0] [0 0] [0] [Nil] = [0] [0] [0] = [0] [0] [merge^#](x1, x2) = [2] [0] [c_1](x1) = [1 0] x1 + [0] [0 1] [0] [<=^#](x1, x2) = [1] [0] [c_2] = [1] [0] [c_3] = [1] [0] [goal^#](x1, x2) = [2 1] x1 + [1 2] x2 + [2] [2 1] [2 1] [2] [c_4](x1) = [1 0] x1 + [1] [0 1] [2] [c_5](x1) = [1 0] x1 + [0] [0 1] [0] [c_6] = [1] [0] [c_7] = [1] [0] The following symbols are considered usable {merge^#, <=^#, goal^#} The order satisfies the following ordering constraints: [merge^#(Cons(x', xs'), Cons(x, xs))] = [2] [0] > [1] [0] = [c_1(<=^#(x', x))] [merge^#(Cons(x, xs), Nil())] = [2] [0] > [1] [0] = [c_2()] [merge^#(Nil(), ys)] = [2] [0] > [1] [0] = [c_3()] [<=^#(S(x), S(y))] = [1] [0] >= [1] [0] = [c_5(<=^#(x, y))] [<=^#(S(x), 0())] = [1] [0] >= [1] [0] = [c_6()] [<=^#(0(), y)] = [1] [0] >= [1] [0] = [c_7()] [goal^#(xs, ys)] = [2 1] xs + [1 2] ys + [2] [2 1] [2 1] [2] ? [3] [2] = [c_4(merge^#(xs, ys))] 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(1),O(1)). Strict DPs: { goal^#(xs, ys) -> c_4(merge^#(xs, ys)) } Weak DPs: { merge^#(Cons(x', xs'), Cons(x, xs)) -> c_1(<=^#(x', x)) , merge^#(Cons(x, xs), Nil()) -> c_2() , merge^#(Nil(), ys) -> c_3() , <=^#(S(x), S(y)) -> c_5(<=^#(x, y)) , <=^#(S(x), 0()) -> c_6() , <=^#(0(), y) -> c_7() } Obligation: innermost runtime complexity Answer: YES(O(1),O(1)) We estimate the number of application of {1} by applications of Pre({1}) = {}. Here rules are labeled as follows: DPs: { 1: goal^#(xs, ys) -> c_4(merge^#(xs, ys)) , 2: merge^#(Cons(x', xs'), Cons(x, xs)) -> c_1(<=^#(x', x)) , 3: merge^#(Cons(x, xs), Nil()) -> c_2() , 4: merge^#(Nil(), ys) -> c_3() , 5: <=^#(S(x), S(y)) -> c_5(<=^#(x, y)) , 6: <=^#(S(x), 0()) -> c_6() , 7: <=^#(0(), y) -> c_7() } We are left with following problem, upon which TcT provides the certificate YES(O(1),O(1)). Weak DPs: { merge^#(Cons(x', xs'), Cons(x, xs)) -> c_1(<=^#(x', x)) , merge^#(Cons(x, xs), Nil()) -> c_2() , merge^#(Nil(), ys) -> c_3() , <=^#(S(x), S(y)) -> c_5(<=^#(x, y)) , <=^#(S(x), 0()) -> c_6() , <=^#(0(), y) -> c_7() , goal^#(xs, ys) -> c_4(merge^#(xs, ys)) } Obligation: innermost runtime complexity Answer: YES(O(1),O(1)) The following weak DPs constitute a sub-graph of the DG that is closed under successors. The DPs are removed. { merge^#(Cons(x', xs'), Cons(x, xs)) -> c_1(<=^#(x', x)) , merge^#(Cons(x, xs), Nil()) -> c_2() , merge^#(Nil(), ys) -> c_3() , <=^#(S(x), S(y)) -> c_5(<=^#(x, y)) , <=^#(S(x), 0()) -> c_6() , <=^#(0(), y) -> c_7() , goal^#(xs, ys) -> c_4(merge^#(xs, ys)) } We are left with following problem, upon which TcT provides the certificate YES(O(1),O(1)). Rules: Empty Obligation: innermost runtime complexity Answer: YES(O(1),O(1)) Empty rules are trivially bounded Hurray, we answered YES(O(1),O(n^1))