YES(?,O(n^2)) We are left with following problem, upon which TcT provides the certificate YES(?,O(n^2)). Strict Trs: { f(0()) -> true() , f(1()) -> false() , f(s(x)) -> f(x) , if(true(), x, y) -> x , if(false(), x, y) -> y , g(x, c(y)) -> g(x, g(s(c(y)), y)) , g(s(x), s(y)) -> if(f(x), s(x), s(y)) } Obligation: innermost runtime complexity Answer: YES(?,O(n^2)) We add following dependency tuples: Strict DPs: { f^#(0()) -> c_1() , f^#(1()) -> c_2() , f^#(s(x)) -> c_3(f^#(x)) , if^#(true(), x, y) -> c_4() , if^#(false(), x, y) -> c_5() , g^#(x, c(y)) -> c_6(g^#(x, g(s(c(y)), y)), g^#(s(c(y)), y)) , g^#(s(x), s(y)) -> c_7(if^#(f(x), s(x), s(y)), f^#(x)) } and mark the set of starting terms. We are left with following problem, upon which TcT provides the certificate YES(?,O(n^2)). Strict DPs: { f^#(0()) -> c_1() , f^#(1()) -> c_2() , f^#(s(x)) -> c_3(f^#(x)) , if^#(true(), x, y) -> c_4() , if^#(false(), x, y) -> c_5() , g^#(x, c(y)) -> c_6(g^#(x, g(s(c(y)), y)), g^#(s(c(y)), y)) , g^#(s(x), s(y)) -> c_7(if^#(f(x), s(x), s(y)), f^#(x)) } Weak Trs: { f(0()) -> true() , f(1()) -> false() , f(s(x)) -> f(x) , if(true(), x, y) -> x , if(false(), x, y) -> y , g(x, c(y)) -> g(x, g(s(c(y)), y)) , g(s(x), s(y)) -> if(f(x), s(x), s(y)) } Obligation: innermost runtime complexity Answer: YES(?,O(n^2)) We estimate the number of application of {1,2,4,5} by applications of Pre({1,2,4,5}) = {3,7}. Here rules are labeled as follows: DPs: { 1: f^#(0()) -> c_1() , 2: f^#(1()) -> c_2() , 3: f^#(s(x)) -> c_3(f^#(x)) , 4: if^#(true(), x, y) -> c_4() , 5: if^#(false(), x, y) -> c_5() , 6: g^#(x, c(y)) -> c_6(g^#(x, g(s(c(y)), y)), g^#(s(c(y)), y)) , 7: g^#(s(x), s(y)) -> c_7(if^#(f(x), s(x), s(y)), f^#(x)) } We are left with following problem, upon which TcT provides the certificate YES(?,O(n^2)). Strict DPs: { f^#(s(x)) -> c_3(f^#(x)) , g^#(x, c(y)) -> c_6(g^#(x, g(s(c(y)), y)), g^#(s(c(y)), y)) , g^#(s(x), s(y)) -> c_7(if^#(f(x), s(x), s(y)), f^#(x)) } Weak DPs: { f^#(0()) -> c_1() , f^#(1()) -> c_2() , if^#(true(), x, y) -> c_4() , if^#(false(), x, y) -> c_5() } Weak Trs: { f(0()) -> true() , f(1()) -> false() , f(s(x)) -> f(x) , if(true(), x, y) -> x , if(false(), x, y) -> y , g(x, c(y)) -> g(x, g(s(c(y)), y)) , g(s(x), s(y)) -> if(f(x), s(x), s(y)) } Obligation: innermost runtime complexity Answer: YES(?,O(n^2)) The following weak DPs constitute a sub-graph of the DG that is closed under successors. The DPs are removed. { f^#(0()) -> c_1() , f^#(1()) -> c_2() , if^#(true(), x, y) -> c_4() , if^#(false(), x, y) -> c_5() } We are left with following problem, upon which TcT provides the certificate YES(?,O(n^2)). Strict DPs: { f^#(s(x)) -> c_3(f^#(x)) , g^#(x, c(y)) -> c_6(g^#(x, g(s(c(y)), y)), g^#(s(c(y)), y)) , g^#(s(x), s(y)) -> c_7(if^#(f(x), s(x), s(y)), f^#(x)) } Weak Trs: { f(0()) -> true() , f(1()) -> false() , f(s(x)) -> f(x) , if(true(), x, y) -> x , if(false(), x, y) -> y , g(x, c(y)) -> g(x, g(s(c(y)), y)) , g(s(x), s(y)) -> if(f(x), s(x), s(y)) } Obligation: innermost runtime complexity Answer: YES(?,O(n^2)) Due to missing edges in the dependency-graph, the right-hand sides of following rules could be simplified: { g^#(s(x), s(y)) -> c_7(if^#(f(x), s(x), s(y)), f^#(x)) } We are left with following problem, upon which TcT provides the certificate YES(?,O(n^2)). Strict DPs: { f^#(s(x)) -> c_1(f^#(x)) , g^#(x, c(y)) -> c_2(g^#(x, g(s(c(y)), y)), g^#(s(c(y)), y)) , g^#(s(x), s(y)) -> c_3(f^#(x)) } Weak Trs: { f(0()) -> true() , f(1()) -> false() , f(s(x)) -> f(x) , if(true(), x, y) -> x , if(false(), x, y) -> y , g(x, c(y)) -> g(x, g(s(c(y)), y)) , g(s(x), s(y)) -> if(f(x), s(x), s(y)) } Obligation: innermost runtime complexity Answer: YES(?,O(n^2)) The following argument positions are usable: Uargs(c_1) = {1}, Uargs(c_2) = {1, 2}, Uargs(c_3) = {1} TcT has computed following constructor-based matrix interpretation satisfying not(EDA). [f](x1) = [0] [0] [0] = [0] [0] [true] = [0] [0] [1] = [0] [0] [false] = [0] [0] [s](x1) = [1 0] x1 + [2] [0 0] [0] [if](x1, x2, x3) = [2 0] x2 + [1 0] x3 + [0] [0 2] [0 2] [0] [g](x1, x2) = [2 0] x1 + [1 2] x2 + [0] [0 0] [0 0] [0] [c](x1) = [0 0] x1 + [0] [1 1] [3] [f^#](x1) = [1 0] x1 + [0] [0 0] [1] [g^#](x1, x2) = [1 0] x1 + [0 1] x2 + [0] [0 0] [0 0] [0] [c_1](x1) = [1 0] x1 + [1] [0 0] [1] [c_2](x1, x2) = [1 0] x1 + [1 0] x2 + [0] [0 0] [0 0] [0] [c_3](x1) = [1 1] x1 + [0] [0 0] [0] This order satisfies following ordering constraints: [if(true(), x, y)] = [2 0] x + [1 0] y + [0] [0 2] [0 2] [0] >= [1 0] x + [0] [0 1] [0] = [x] [if(false(), x, y)] = [2 0] x + [1 0] y + [0] [0 2] [0 2] [0] >= [1 0] y + [0] [0 1] [0] = [y] [g(x, c(y))] = [2 0] x + [2 2] y + [6] [0 0] [0 0] [0] > [2 0] x + [1 2] y + [4] [0 0] [0 0] [0] = [g(x, g(s(c(y)), y))] [g(s(x), s(y))] = [2 0] x + [1 0] y + [6] [0 0] [0 0] [0] >= [2 0] x + [1 0] y + [6] [0 0] [0 0] [0] = [if(f(x), s(x), s(y))] [f^#(s(x))] = [1 0] x + [2] [0 0] [1] > [1 0] x + [1] [0 0] [1] = [c_1(f^#(x))] [g^#(x, c(y))] = [1 0] x + [1 1] y + [3] [0 0] [0 0] [0] > [1 0] x + [0 1] y + [2] [0 0] [0 0] [0] = [c_2(g^#(x, g(s(c(y)), y)), g^#(s(c(y)), y))] [g^#(s(x), s(y))] = [1 0] x + [2] [0 0] [0] > [1 0] x + [1] [0 0] [0] = [c_3(f^#(x))] Hurray, we answered YES(?,O(n^2))