We are left with following problem, upon which TcT provides the certificate YES(O(1),O(n^3)). Strict Trs: { +(0(), y) -> y , +(s(x), y) -> s(+(x, y)) , ++(nil(), ys) -> ys , ++(:(x, xs), ys) -> :(x, ++(xs, ys)) , sum(++(xs, :(x, :(y, ys)))) -> sum(++(xs, sum(:(x, :(y, ys))))) , sum(:(x, nil())) -> :(x, nil()) , sum(:(x, :(y, xs))) -> sum(:(+(x, y), xs)) , -(x, 0()) -> x , -(0(), s(y)) -> 0() , -(s(x), s(y)) -> -(x, y) , quot(0(), s(y)) -> 0() , quot(s(x), s(y)) -> s(quot(-(x, y), s(y))) , length(nil()) -> 0() , length(:(x, xs)) -> s(length(xs)) , hd(:(x, xs)) -> x , avg(xs) -> quot(hd(sum(xs)), length(xs)) } Obligation: innermost runtime complexity Answer: YES(O(1),O(n^3)) We add the following dependency tuples: Strict DPs: { +^#(0(), y) -> c_1() , +^#(s(x), y) -> c_2(+^#(x, y)) , ++^#(nil(), ys) -> c_3() , ++^#(:(x, xs), ys) -> c_4(++^#(xs, ys)) , sum^#(++(xs, :(x, :(y, ys)))) -> c_5(sum^#(++(xs, sum(:(x, :(y, ys))))), ++^#(xs, sum(:(x, :(y, ys)))), sum^#(:(x, :(y, ys)))) , sum^#(:(x, nil())) -> c_6() , sum^#(:(x, :(y, xs))) -> c_7(sum^#(:(+(x, y), xs)), +^#(x, y)) , -^#(x, 0()) -> c_8() , -^#(0(), s(y)) -> c_9() , -^#(s(x), s(y)) -> c_10(-^#(x, y)) , quot^#(0(), s(y)) -> c_11() , quot^#(s(x), s(y)) -> c_12(quot^#(-(x, y), s(y)), -^#(x, y)) , length^#(nil()) -> c_13() , length^#(:(x, xs)) -> c_14(length^#(xs)) , hd^#(:(x, xs)) -> c_15() , avg^#(xs) -> c_16(quot^#(hd(sum(xs)), length(xs)), hd^#(sum(xs)), sum^#(xs), length^#(xs)) } and mark the set of starting terms. We are left with following problem, upon which TcT provides the certificate YES(O(1),O(n^3)). Strict DPs: { +^#(0(), y) -> c_1() , +^#(s(x), y) -> c_2(+^#(x, y)) , ++^#(nil(), ys) -> c_3() , ++^#(:(x, xs), ys) -> c_4(++^#(xs, ys)) , sum^#(++(xs, :(x, :(y, ys)))) -> c_5(sum^#(++(xs, sum(:(x, :(y, ys))))), ++^#(xs, sum(:(x, :(y, ys)))), sum^#(:(x, :(y, ys)))) , sum^#(:(x, nil())) -> c_6() , sum^#(:(x, :(y, xs))) -> c_7(sum^#(:(+(x, y), xs)), +^#(x, y)) , -^#(x, 0()) -> c_8() , -^#(0(), s(y)) -> c_9() , -^#(s(x), s(y)) -> c_10(-^#(x, y)) , quot^#(0(), s(y)) -> c_11() , quot^#(s(x), s(y)) -> c_12(quot^#(-(x, y), s(y)), -^#(x, y)) , length^#(nil()) -> c_13() , length^#(:(x, xs)) -> c_14(length^#(xs)) , hd^#(:(x, xs)) -> c_15() , avg^#(xs) -> c_16(quot^#(hd(sum(xs)), length(xs)), hd^#(sum(xs)), sum^#(xs), length^#(xs)) } Weak Trs: { +(0(), y) -> y , +(s(x), y) -> s(+(x, y)) , ++(nil(), ys) -> ys , ++(:(x, xs), ys) -> :(x, ++(xs, ys)) , sum(++(xs, :(x, :(y, ys)))) -> sum(++(xs, sum(:(x, :(y, ys))))) , sum(:(x, nil())) -> :(x, nil()) , sum(:(x, :(y, xs))) -> sum(:(+(x, y), xs)) , -(x, 0()) -> x , -(0(), s(y)) -> 0() , -(s(x), s(y)) -> -(x, y) , quot(0(), s(y)) -> 0() , quot(s(x), s(y)) -> s(quot(-(x, y), s(y))) , length(nil()) -> 0() , length(:(x, xs)) -> s(length(xs)) , hd(:(x, xs)) -> x , avg(xs) -> quot(hd(sum(xs)), length(xs)) } Obligation: innermost runtime complexity Answer: YES(O(1),O(n^3)) We estimate the number of application of {1,3,6,8,9,11,13,15} by applications of Pre({1,3,6,8,9,11,13,15}) = {2,4,5,7,10,12,14,16}. Here rules are labeled as follows: DPs: { 1: +^#(0(), y) -> c_1() , 2: +^#(s(x), y) -> c_2(+^#(x, y)) , 3: ++^#(nil(), ys) -> c_3() , 4: ++^#(:(x, xs), ys) -> c_4(++^#(xs, ys)) , 5: sum^#(++(xs, :(x, :(y, ys)))) -> c_5(sum^#(++(xs, sum(:(x, :(y, ys))))), ++^#(xs, sum(:(x, :(y, ys)))), sum^#(:(x, :(y, ys)))) , 6: sum^#(:(x, nil())) -> c_6() , 7: sum^#(:(x, :(y, xs))) -> c_7(sum^#(:(+(x, y), xs)), +^#(x, y)) , 8: -^#(x, 0()) -> c_8() , 9: -^#(0(), s(y)) -> c_9() , 10: -^#(s(x), s(y)) -> c_10(-^#(x, y)) , 11: quot^#(0(), s(y)) -> c_11() , 12: quot^#(s(x), s(y)) -> c_12(quot^#(-(x, y), s(y)), -^#(x, y)) , 13: length^#(nil()) -> c_13() , 14: length^#(:(x, xs)) -> c_14(length^#(xs)) , 15: hd^#(:(x, xs)) -> c_15() , 16: avg^#(xs) -> c_16(quot^#(hd(sum(xs)), length(xs)), hd^#(sum(xs)), sum^#(xs), length^#(xs)) } We are left with following problem, upon which TcT provides the certificate YES(O(1),O(n^3)). Strict DPs: { +^#(s(x), y) -> c_2(+^#(x, y)) , ++^#(:(x, xs), ys) -> c_4(++^#(xs, ys)) , sum^#(++(xs, :(x, :(y, ys)))) -> c_5(sum^#(++(xs, sum(:(x, :(y, ys))))), ++^#(xs, sum(:(x, :(y, ys)))), sum^#(:(x, :(y, ys)))) , sum^#(:(x, :(y, xs))) -> c_7(sum^#(:(+(x, y), xs)), +^#(x, y)) , -^#(s(x), s(y)) -> c_10(-^#(x, y)) , quot^#(s(x), s(y)) -> c_12(quot^#(-(x, y), s(y)), -^#(x, y)) , length^#(:(x, xs)) -> c_14(length^#(xs)) , avg^#(xs) -> c_16(quot^#(hd(sum(xs)), length(xs)), hd^#(sum(xs)), sum^#(xs), length^#(xs)) } Weak DPs: { +^#(0(), y) -> c_1() , ++^#(nil(), ys) -> c_3() , sum^#(:(x, nil())) -> c_6() , -^#(x, 0()) -> c_8() , -^#(0(), s(y)) -> c_9() , quot^#(0(), s(y)) -> c_11() , length^#(nil()) -> c_13() , hd^#(:(x, xs)) -> c_15() } Weak Trs: { +(0(), y) -> y , +(s(x), y) -> s(+(x, y)) , ++(nil(), ys) -> ys , ++(:(x, xs), ys) -> :(x, ++(xs, ys)) , sum(++(xs, :(x, :(y, ys)))) -> sum(++(xs, sum(:(x, :(y, ys))))) , sum(:(x, nil())) -> :(x, nil()) , sum(:(x, :(y, xs))) -> sum(:(+(x, y), xs)) , -(x, 0()) -> x , -(0(), s(y)) -> 0() , -(s(x), s(y)) -> -(x, y) , quot(0(), s(y)) -> 0() , quot(s(x), s(y)) -> s(quot(-(x, y), s(y))) , length(nil()) -> 0() , length(:(x, xs)) -> s(length(xs)) , hd(:(x, xs)) -> x , avg(xs) -> quot(hd(sum(xs)), length(xs)) } Obligation: innermost runtime complexity Answer: YES(O(1),O(n^3)) The following weak DPs constitute a sub-graph of the DG that is closed under successors. The DPs are removed. { +^#(0(), y) -> c_1() , ++^#(nil(), ys) -> c_3() , sum^#(:(x, nil())) -> c_6() , -^#(x, 0()) -> c_8() , -^#(0(), s(y)) -> c_9() , quot^#(0(), s(y)) -> c_11() , length^#(nil()) -> c_13() , hd^#(:(x, xs)) -> c_15() } We are left with following problem, upon which TcT provides the certificate YES(O(1),O(n^3)). Strict DPs: { +^#(s(x), y) -> c_2(+^#(x, y)) , ++^#(:(x, xs), ys) -> c_4(++^#(xs, ys)) , sum^#(++(xs, :(x, :(y, ys)))) -> c_5(sum^#(++(xs, sum(:(x, :(y, ys))))), ++^#(xs, sum(:(x, :(y, ys)))), sum^#(:(x, :(y, ys)))) , sum^#(:(x, :(y, xs))) -> c_7(sum^#(:(+(x, y), xs)), +^#(x, y)) , -^#(s(x), s(y)) -> c_10(-^#(x, y)) , quot^#(s(x), s(y)) -> c_12(quot^#(-(x, y), s(y)), -^#(x, y)) , length^#(:(x, xs)) -> c_14(length^#(xs)) , avg^#(xs) -> c_16(quot^#(hd(sum(xs)), length(xs)), hd^#(sum(xs)), sum^#(xs), length^#(xs)) } Weak Trs: { +(0(), y) -> y , +(s(x), y) -> s(+(x, y)) , ++(nil(), ys) -> ys , ++(:(x, xs), ys) -> :(x, ++(xs, ys)) , sum(++(xs, :(x, :(y, ys)))) -> sum(++(xs, sum(:(x, :(y, ys))))) , sum(:(x, nil())) -> :(x, nil()) , sum(:(x, :(y, xs))) -> sum(:(+(x, y), xs)) , -(x, 0()) -> x , -(0(), s(y)) -> 0() , -(s(x), s(y)) -> -(x, y) , quot(0(), s(y)) -> 0() , quot(s(x), s(y)) -> s(quot(-(x, y), s(y))) , length(nil()) -> 0() , length(:(x, xs)) -> s(length(xs)) , hd(:(x, xs)) -> x , avg(xs) -> quot(hd(sum(xs)), length(xs)) } Obligation: innermost runtime complexity Answer: YES(O(1),O(n^3)) Due to missing edges in the dependency-graph, the right-hand sides of following rules could be simplified: { sum^#(++(xs, :(x, :(y, ys)))) -> c_5(sum^#(++(xs, sum(:(x, :(y, ys))))), ++^#(xs, sum(:(x, :(y, ys)))), sum^#(:(x, :(y, ys)))) , avg^#(xs) -> c_16(quot^#(hd(sum(xs)), length(xs)), hd^#(sum(xs)), sum^#(xs), length^#(xs)) } We are left with following problem, upon which TcT provides the certificate YES(O(1),O(n^3)). Strict DPs: { +^#(s(x), y) -> c_1(+^#(x, y)) , ++^#(:(x, xs), ys) -> c_2(++^#(xs, ys)) , sum^#(++(xs, :(x, :(y, ys)))) -> c_3(sum^#(++(xs, sum(:(x, :(y, ys))))), sum^#(:(x, :(y, ys)))) , sum^#(:(x, :(y, xs))) -> c_4(sum^#(:(+(x, y), xs)), +^#(x, y)) , -^#(s(x), s(y)) -> c_5(-^#(x, y)) , quot^#(s(x), s(y)) -> c_6(quot^#(-(x, y), s(y)), -^#(x, y)) , length^#(:(x, xs)) -> c_7(length^#(xs)) , avg^#(xs) -> c_8(quot^#(hd(sum(xs)), length(xs)), sum^#(xs), length^#(xs)) } Weak Trs: { +(0(), y) -> y , +(s(x), y) -> s(+(x, y)) , ++(nil(), ys) -> ys , ++(:(x, xs), ys) -> :(x, ++(xs, ys)) , sum(++(xs, :(x, :(y, ys)))) -> sum(++(xs, sum(:(x, :(y, ys))))) , sum(:(x, nil())) -> :(x, nil()) , sum(:(x, :(y, xs))) -> sum(:(+(x, y), xs)) , -(x, 0()) -> x , -(0(), s(y)) -> 0() , -(s(x), s(y)) -> -(x, y) , quot(0(), s(y)) -> 0() , quot(s(x), s(y)) -> s(quot(-(x, y), s(y))) , length(nil()) -> 0() , length(:(x, xs)) -> s(length(xs)) , hd(:(x, xs)) -> x , avg(xs) -> quot(hd(sum(xs)), length(xs)) } Obligation: innermost runtime complexity Answer: YES(O(1),O(n^3)) We replace rewrite rules by usable rules: Weak Usable Rules: { +(0(), y) -> y , +(s(x), y) -> s(+(x, y)) , ++(nil(), ys) -> ys , ++(:(x, xs), ys) -> :(x, ++(xs, ys)) , sum(++(xs, :(x, :(y, ys)))) -> sum(++(xs, sum(:(x, :(y, ys))))) , sum(:(x, nil())) -> :(x, nil()) , sum(:(x, :(y, xs))) -> sum(:(+(x, y), xs)) , -(x, 0()) -> x , -(0(), s(y)) -> 0() , -(s(x), s(y)) -> -(x, y) , length(nil()) -> 0() , length(:(x, xs)) -> s(length(xs)) , hd(:(x, xs)) -> x } We are left with following problem, upon which TcT provides the certificate YES(O(1),O(n^3)). Strict DPs: { +^#(s(x), y) -> c_1(+^#(x, y)) , ++^#(:(x, xs), ys) -> c_2(++^#(xs, ys)) , sum^#(++(xs, :(x, :(y, ys)))) -> c_3(sum^#(++(xs, sum(:(x, :(y, ys))))), sum^#(:(x, :(y, ys)))) , sum^#(:(x, :(y, xs))) -> c_4(sum^#(:(+(x, y), xs)), +^#(x, y)) , -^#(s(x), s(y)) -> c_5(-^#(x, y)) , quot^#(s(x), s(y)) -> c_6(quot^#(-(x, y), s(y)), -^#(x, y)) , length^#(:(x, xs)) -> c_7(length^#(xs)) , avg^#(xs) -> c_8(quot^#(hd(sum(xs)), length(xs)), sum^#(xs), length^#(xs)) } Weak Trs: { +(0(), y) -> y , +(s(x), y) -> s(+(x, y)) , ++(nil(), ys) -> ys , ++(:(x, xs), ys) -> :(x, ++(xs, ys)) , sum(++(xs, :(x, :(y, ys)))) -> sum(++(xs, sum(:(x, :(y, ys))))) , sum(:(x, nil())) -> :(x, nil()) , sum(:(x, :(y, xs))) -> sum(:(+(x, y), xs)) , -(x, 0()) -> x , -(0(), s(y)) -> 0() , -(s(x), s(y)) -> -(x, y) , length(nil()) -> 0() , length(:(x, xs)) -> s(length(xs)) , hd(:(x, xs)) -> x } Obligation: innermost runtime complexity Answer: YES(O(1),O(n^3)) We analyse the complexity of following sub-problems (R) and (S). Problem (S) is obtained from the input problem by shifting strict rules from (R) into the weak component: Problem (R): ------------ Strict DPs: { length^#(:(x, xs)) -> c_7(length^#(xs)) , avg^#(xs) -> c_8(quot^#(hd(sum(xs)), length(xs)), sum^#(xs), length^#(xs)) } Weak DPs: { +^#(s(x), y) -> c_1(+^#(x, y)) , ++^#(:(x, xs), ys) -> c_2(++^#(xs, ys)) , sum^#(++(xs, :(x, :(y, ys)))) -> c_3(sum^#(++(xs, sum(:(x, :(y, ys))))), sum^#(:(x, :(y, ys)))) , sum^#(:(x, :(y, xs))) -> c_4(sum^#(:(+(x, y), xs)), +^#(x, y)) , -^#(s(x), s(y)) -> c_5(-^#(x, y)) , quot^#(s(x), s(y)) -> c_6(quot^#(-(x, y), s(y)), -^#(x, y)) } Weak Trs: { +(0(), y) -> y , +(s(x), y) -> s(+(x, y)) , ++(nil(), ys) -> ys , ++(:(x, xs), ys) -> :(x, ++(xs, ys)) , sum(++(xs, :(x, :(y, ys)))) -> sum(++(xs, sum(:(x, :(y, ys))))) , sum(:(x, nil())) -> :(x, nil()) , sum(:(x, :(y, xs))) -> sum(:(+(x, y), xs)) , -(x, 0()) -> x , -(0(), s(y)) -> 0() , -(s(x), s(y)) -> -(x, y) , length(nil()) -> 0() , length(:(x, xs)) -> s(length(xs)) , hd(:(x, xs)) -> x } StartTerms: basic terms Strategy: innermost Problem (S): ------------ Strict DPs: { +^#(s(x), y) -> c_1(+^#(x, y)) , ++^#(:(x, xs), ys) -> c_2(++^#(xs, ys)) , sum^#(++(xs, :(x, :(y, ys)))) -> c_3(sum^#(++(xs, sum(:(x, :(y, ys))))), sum^#(:(x, :(y, ys)))) , sum^#(:(x, :(y, xs))) -> c_4(sum^#(:(+(x, y), xs)), +^#(x, y)) , -^#(s(x), s(y)) -> c_5(-^#(x, y)) , quot^#(s(x), s(y)) -> c_6(quot^#(-(x, y), s(y)), -^#(x, y)) } Weak DPs: { length^#(:(x, xs)) -> c_7(length^#(xs)) , avg^#(xs) -> c_8(quot^#(hd(sum(xs)), length(xs)), sum^#(xs), length^#(xs)) } Weak Trs: { +(0(), y) -> y , +(s(x), y) -> s(+(x, y)) , ++(nil(), ys) -> ys , ++(:(x, xs), ys) -> :(x, ++(xs, ys)) , sum(++(xs, :(x, :(y, ys)))) -> sum(++(xs, sum(:(x, :(y, ys))))) , sum(:(x, nil())) -> :(x, nil()) , sum(:(x, :(y, xs))) -> sum(:(+(x, y), xs)) , -(x, 0()) -> x , -(0(), s(y)) -> 0() , -(s(x), s(y)) -> -(x, y) , length(nil()) -> 0() , length(:(x, xs)) -> s(length(xs)) , hd(:(x, xs)) -> x } StartTerms: basic terms Strategy: innermost Overall, the transformation results in the following sub-problem(s): Generated new problems: ----------------------- R) Strict DPs: { length^#(:(x, xs)) -> c_7(length^#(xs)) , avg^#(xs) -> c_8(quot^#(hd(sum(xs)), length(xs)), sum^#(xs), length^#(xs)) } Weak DPs: { +^#(s(x), y) -> c_1(+^#(x, y)) , ++^#(:(x, xs), ys) -> c_2(++^#(xs, ys)) , sum^#(++(xs, :(x, :(y, ys)))) -> c_3(sum^#(++(xs, sum(:(x, :(y, ys))))), sum^#(:(x, :(y, ys)))) , sum^#(:(x, :(y, xs))) -> c_4(sum^#(:(+(x, y), xs)), +^#(x, y)) , -^#(s(x), s(y)) -> c_5(-^#(x, y)) , quot^#(s(x), s(y)) -> c_6(quot^#(-(x, y), s(y)), -^#(x, y)) } Weak Trs: { +(0(), y) -> y , +(s(x), y) -> s(+(x, y)) , ++(nil(), ys) -> ys , ++(:(x, xs), ys) -> :(x, ++(xs, ys)) , sum(++(xs, :(x, :(y, ys)))) -> sum(++(xs, sum(:(x, :(y, ys))))) , sum(:(x, nil())) -> :(x, nil()) , sum(:(x, :(y, xs))) -> sum(:(+(x, y), xs)) , -(x, 0()) -> x , -(0(), s(y)) -> 0() , -(s(x), s(y)) -> -(x, y) , length(nil()) -> 0() , length(:(x, xs)) -> s(length(xs)) , hd(:(x, xs)) -> x } StartTerms: basic terms Strategy: innermost This problem was proven YES(O(1),O(n^1)). S) Strict DPs: { +^#(s(x), y) -> c_1(+^#(x, y)) , ++^#(:(x, xs), ys) -> c_2(++^#(xs, ys)) , sum^#(++(xs, :(x, :(y, ys)))) -> c_3(sum^#(++(xs, sum(:(x, :(y, ys))))), sum^#(:(x, :(y, ys)))) , sum^#(:(x, :(y, xs))) -> c_4(sum^#(:(+(x, y), xs)), +^#(x, y)) , -^#(s(x), s(y)) -> c_5(-^#(x, y)) , quot^#(s(x), s(y)) -> c_6(quot^#(-(x, y), s(y)), -^#(x, y)) } Weak DPs: { length^#(:(x, xs)) -> c_7(length^#(xs)) , avg^#(xs) -> c_8(quot^#(hd(sum(xs)), length(xs)), sum^#(xs), length^#(xs)) } Weak Trs: { +(0(), y) -> y , +(s(x), y) -> s(+(x, y)) , ++(nil(), ys) -> ys , ++(:(x, xs), ys) -> :(x, ++(xs, ys)) , sum(++(xs, :(x, :(y, ys)))) -> sum(++(xs, sum(:(x, :(y, ys))))) , sum(:(x, nil())) -> :(x, nil()) , sum(:(x, :(y, xs))) -> sum(:(+(x, y), xs)) , -(x, 0()) -> x , -(0(), s(y)) -> 0() , -(s(x), s(y)) -> -(x, y) , length(nil()) -> 0() , length(:(x, xs)) -> s(length(xs)) , hd(:(x, xs)) -> x } StartTerms: basic terms Strategy: innermost This problem was proven YES(O(1),O(n^3)). Proofs for generated problems: ------------------------------ R) We are left with following problem, upon which TcT provides the certificate YES(O(1),O(n^1)). Strict DPs: { length^#(:(x, xs)) -> c_7(length^#(xs)) , avg^#(xs) -> c_8(quot^#(hd(sum(xs)), length(xs)), sum^#(xs), length^#(xs)) } Weak DPs: { +^#(s(x), y) -> c_1(+^#(x, y)) , ++^#(:(x, xs), ys) -> c_2(++^#(xs, ys)) , sum^#(++(xs, :(x, :(y, ys)))) -> c_3(sum^#(++(xs, sum(:(x, :(y, ys))))), sum^#(:(x, :(y, ys)))) , sum^#(:(x, :(y, xs))) -> c_4(sum^#(:(+(x, y), xs)), +^#(x, y)) , -^#(s(x), s(y)) -> c_5(-^#(x, y)) , quot^#(s(x), s(y)) -> c_6(quot^#(-(x, y), s(y)), -^#(x, y)) } Weak Trs: { +(0(), y) -> y , +(s(x), y) -> s(+(x, y)) , ++(nil(), ys) -> ys , ++(:(x, xs), ys) -> :(x, ++(xs, ys)) , sum(++(xs, :(x, :(y, ys)))) -> sum(++(xs, sum(:(x, :(y, ys))))) , sum(:(x, nil())) -> :(x, nil()) , sum(:(x, :(y, xs))) -> sum(:(+(x, y), xs)) , -(x, 0()) -> x , -(0(), s(y)) -> 0() , -(s(x), s(y)) -> -(x, y) , length(nil()) -> 0() , length(:(x, xs)) -> s(length(xs)) , hd(:(x, xs)) -> x } Obligation: innermost runtime complexity Answer: YES(O(1),O(n^1)) The following weak DPs constitute a sub-graph of the DG that is closed under successors. The DPs are removed. { +^#(s(x), y) -> c_1(+^#(x, y)) , ++^#(:(x, xs), ys) -> c_2(++^#(xs, ys)) , sum^#(++(xs, :(x, :(y, ys)))) -> c_3(sum^#(++(xs, sum(:(x, :(y, ys))))), sum^#(:(x, :(y, ys)))) , sum^#(:(x, :(y, xs))) -> c_4(sum^#(:(+(x, y), xs)), +^#(x, y)) , -^#(s(x), s(y)) -> c_5(-^#(x, y)) , quot^#(s(x), s(y)) -> c_6(quot^#(-(x, y), s(y)), -^#(x, y)) } We are left with following problem, upon which TcT provides the certificate YES(O(1),O(n^1)). Strict DPs: { length^#(:(x, xs)) -> c_7(length^#(xs)) , avg^#(xs) -> c_8(quot^#(hd(sum(xs)), length(xs)), sum^#(xs), length^#(xs)) } Weak Trs: { +(0(), y) -> y , +(s(x), y) -> s(+(x, y)) , ++(nil(), ys) -> ys , ++(:(x, xs), ys) -> :(x, ++(xs, ys)) , sum(++(xs, :(x, :(y, ys)))) -> sum(++(xs, sum(:(x, :(y, ys))))) , sum(:(x, nil())) -> :(x, nil()) , sum(:(x, :(y, xs))) -> sum(:(+(x, y), xs)) , -(x, 0()) -> x , -(0(), s(y)) -> 0() , -(s(x), s(y)) -> -(x, y) , length(nil()) -> 0() , length(:(x, xs)) -> s(length(xs)) , hd(:(x, xs)) -> x } Obligation: innermost runtime complexity Answer: YES(O(1),O(n^1)) Due to missing edges in the dependency-graph, the right-hand sides of following rules could be simplified: { avg^#(xs) -> c_8(quot^#(hd(sum(xs)), length(xs)), sum^#(xs), length^#(xs)) } We are left with following problem, upon which TcT provides the certificate YES(O(1),O(n^1)). Strict DPs: { length^#(:(x, xs)) -> c_1(length^#(xs)) , avg^#(xs) -> c_2(length^#(xs)) } Weak Trs: { +(0(), y) -> y , +(s(x), y) -> s(+(x, y)) , ++(nil(), ys) -> ys , ++(:(x, xs), ys) -> :(x, ++(xs, ys)) , sum(++(xs, :(x, :(y, ys)))) -> sum(++(xs, sum(:(x, :(y, ys))))) , sum(:(x, nil())) -> :(x, nil()) , sum(:(x, :(y, xs))) -> sum(:(+(x, y), xs)) , -(x, 0()) -> x , -(0(), s(y)) -> 0() , -(s(x), s(y)) -> -(x, y) , length(nil()) -> 0() , length(:(x, xs)) -> s(length(xs)) , hd(:(x, xs)) -> x } 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: { length^#(:(x, xs)) -> c_1(length^#(xs)) , avg^#(xs) -> c_2(length^#(xs)) } Obligation: innermost runtime complexity Answer: YES(O(1),O(n^1)) We use the processor 'Small Polynomial Path Order (PS,1-bounded)' to orient following rules strictly. DPs: { 1: length^#(:(x, xs)) -> c_1(length^#(xs)) , 2: avg^#(xs) -> c_2(length^#(xs)) } Sub-proof: ---------- The input was oriented with the instance of 'Small Polynomial Path Order (PS,1-bounded)' as induced by the safe mapping safe(:) = {1, 2}, safe(length^#) = {}, safe(avg^#) = {}, safe(c_1) = {}, safe(c_2) = {} and precedence avg^# > length^# . Following symbols are considered recursive: {length^#} The recursion depth is 1. Further, following argument filtering is employed: pi(:) = [2], pi(length^#) = [1], pi(avg^#) = [1], pi(c_1) = [1], pi(c_2) = [1] Usable defined function symbols are a subset of: {length^#, avg^#} For your convenience, here are the satisfied ordering constraints: pi(length^#(:(x, xs))) = length^#(:(; xs);) > c_1(length^#(xs;);) = pi(c_1(length^#(xs))) pi(avg^#(xs)) = avg^#(xs;) > c_2(length^#(xs;);) = pi(c_2(length^#(xs))) The strictly oriented rules are moved into the weak component. We are left with following problem, upon which TcT provides the certificate YES(O(1),O(1)). Weak DPs: { length^#(:(x, xs)) -> c_1(length^#(xs)) , avg^#(xs) -> c_2(length^#(xs)) } 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. { length^#(:(x, xs)) -> c_1(length^#(xs)) , avg^#(xs) -> c_2(length^#(xs)) } 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 S) We are left with following problem, upon which TcT provides the certificate YES(O(1),O(n^3)). Strict DPs: { +^#(s(x), y) -> c_1(+^#(x, y)) , ++^#(:(x, xs), ys) -> c_2(++^#(xs, ys)) , sum^#(++(xs, :(x, :(y, ys)))) -> c_3(sum^#(++(xs, sum(:(x, :(y, ys))))), sum^#(:(x, :(y, ys)))) , sum^#(:(x, :(y, xs))) -> c_4(sum^#(:(+(x, y), xs)), +^#(x, y)) , -^#(s(x), s(y)) -> c_5(-^#(x, y)) , quot^#(s(x), s(y)) -> c_6(quot^#(-(x, y), s(y)), -^#(x, y)) } Weak DPs: { length^#(:(x, xs)) -> c_7(length^#(xs)) , avg^#(xs) -> c_8(quot^#(hd(sum(xs)), length(xs)), sum^#(xs), length^#(xs)) } Weak Trs: { +(0(), y) -> y , +(s(x), y) -> s(+(x, y)) , ++(nil(), ys) -> ys , ++(:(x, xs), ys) -> :(x, ++(xs, ys)) , sum(++(xs, :(x, :(y, ys)))) -> sum(++(xs, sum(:(x, :(y, ys))))) , sum(:(x, nil())) -> :(x, nil()) , sum(:(x, :(y, xs))) -> sum(:(+(x, y), xs)) , -(x, 0()) -> x , -(0(), s(y)) -> 0() , -(s(x), s(y)) -> -(x, y) , length(nil()) -> 0() , length(:(x, xs)) -> s(length(xs)) , hd(:(x, xs)) -> x } Obligation: innermost runtime complexity Answer: YES(O(1),O(n^3)) The following weak DPs constitute a sub-graph of the DG that is closed under successors. The DPs are removed. { length^#(:(x, xs)) -> c_7(length^#(xs)) } We are left with following problem, upon which TcT provides the certificate YES(O(1),O(n^3)). Strict DPs: { +^#(s(x), y) -> c_1(+^#(x, y)) , ++^#(:(x, xs), ys) -> c_2(++^#(xs, ys)) , sum^#(++(xs, :(x, :(y, ys)))) -> c_3(sum^#(++(xs, sum(:(x, :(y, ys))))), sum^#(:(x, :(y, ys)))) , sum^#(:(x, :(y, xs))) -> c_4(sum^#(:(+(x, y), xs)), +^#(x, y)) , -^#(s(x), s(y)) -> c_5(-^#(x, y)) , quot^#(s(x), s(y)) -> c_6(quot^#(-(x, y), s(y)), -^#(x, y)) } Weak DPs: { avg^#(xs) -> c_8(quot^#(hd(sum(xs)), length(xs)), sum^#(xs), length^#(xs)) } Weak Trs: { +(0(), y) -> y , +(s(x), y) -> s(+(x, y)) , ++(nil(), ys) -> ys , ++(:(x, xs), ys) -> :(x, ++(xs, ys)) , sum(++(xs, :(x, :(y, ys)))) -> sum(++(xs, sum(:(x, :(y, ys))))) , sum(:(x, nil())) -> :(x, nil()) , sum(:(x, :(y, xs))) -> sum(:(+(x, y), xs)) , -(x, 0()) -> x , -(0(), s(y)) -> 0() , -(s(x), s(y)) -> -(x, y) , length(nil()) -> 0() , length(:(x, xs)) -> s(length(xs)) , hd(:(x, xs)) -> x } Obligation: innermost runtime complexity Answer: YES(O(1),O(n^3)) Due to missing edges in the dependency-graph, the right-hand sides of following rules could be simplified: { avg^#(xs) -> c_8(quot^#(hd(sum(xs)), length(xs)), sum^#(xs), length^#(xs)) } We are left with following problem, upon which TcT provides the certificate YES(O(1),O(n^3)). Strict DPs: { +^#(s(x), y) -> c_1(+^#(x, y)) , ++^#(:(x, xs), ys) -> c_2(++^#(xs, ys)) , sum^#(++(xs, :(x, :(y, ys)))) -> c_3(sum^#(++(xs, sum(:(x, :(y, ys))))), sum^#(:(x, :(y, ys)))) , sum^#(:(x, :(y, xs))) -> c_4(sum^#(:(+(x, y), xs)), +^#(x, y)) , -^#(s(x), s(y)) -> c_5(-^#(x, y)) , quot^#(s(x), s(y)) -> c_6(quot^#(-(x, y), s(y)), -^#(x, y)) } Weak DPs: { avg^#(xs) -> c_7(quot^#(hd(sum(xs)), length(xs)), sum^#(xs)) } Weak Trs: { +(0(), y) -> y , +(s(x), y) -> s(+(x, y)) , ++(nil(), ys) -> ys , ++(:(x, xs), ys) -> :(x, ++(xs, ys)) , sum(++(xs, :(x, :(y, ys)))) -> sum(++(xs, sum(:(x, :(y, ys))))) , sum(:(x, nil())) -> :(x, nil()) , sum(:(x, :(y, xs))) -> sum(:(+(x, y), xs)) , -(x, 0()) -> x , -(0(), s(y)) -> 0() , -(s(x), s(y)) -> -(x, y) , length(nil()) -> 0() , length(:(x, xs)) -> s(length(xs)) , hd(:(x, xs)) -> x } Obligation: innermost runtime complexity Answer: YES(O(1),O(n^3)) We analyse the complexity of following sub-problems (R) and (S). Problem (S) is obtained from the input problem by shifting strict rules from (R) into the weak component: Problem (R): ------------ Strict DPs: { -^#(s(x), s(y)) -> c_5(-^#(x, y)) , quot^#(s(x), s(y)) -> c_6(quot^#(-(x, y), s(y)), -^#(x, y)) } Weak DPs: { +^#(s(x), y) -> c_1(+^#(x, y)) , ++^#(:(x, xs), ys) -> c_2(++^#(xs, ys)) , sum^#(++(xs, :(x, :(y, ys)))) -> c_3(sum^#(++(xs, sum(:(x, :(y, ys))))), sum^#(:(x, :(y, ys)))) , sum^#(:(x, :(y, xs))) -> c_4(sum^#(:(+(x, y), xs)), +^#(x, y)) , avg^#(xs) -> c_7(quot^#(hd(sum(xs)), length(xs)), sum^#(xs)) } Weak Trs: { +(0(), y) -> y , +(s(x), y) -> s(+(x, y)) , ++(nil(), ys) -> ys , ++(:(x, xs), ys) -> :(x, ++(xs, ys)) , sum(++(xs, :(x, :(y, ys)))) -> sum(++(xs, sum(:(x, :(y, ys))))) , sum(:(x, nil())) -> :(x, nil()) , sum(:(x, :(y, xs))) -> sum(:(+(x, y), xs)) , -(x, 0()) -> x , -(0(), s(y)) -> 0() , -(s(x), s(y)) -> -(x, y) , length(nil()) -> 0() , length(:(x, xs)) -> s(length(xs)) , hd(:(x, xs)) -> x } StartTerms: basic terms Strategy: innermost Problem (S): ------------ Strict DPs: { +^#(s(x), y) -> c_1(+^#(x, y)) , ++^#(:(x, xs), ys) -> c_2(++^#(xs, ys)) , sum^#(++(xs, :(x, :(y, ys)))) -> c_3(sum^#(++(xs, sum(:(x, :(y, ys))))), sum^#(:(x, :(y, ys)))) , sum^#(:(x, :(y, xs))) -> c_4(sum^#(:(+(x, y), xs)), +^#(x, y)) } Weak DPs: { -^#(s(x), s(y)) -> c_5(-^#(x, y)) , quot^#(s(x), s(y)) -> c_6(quot^#(-(x, y), s(y)), -^#(x, y)) , avg^#(xs) -> c_7(quot^#(hd(sum(xs)), length(xs)), sum^#(xs)) } Weak Trs: { +(0(), y) -> y , +(s(x), y) -> s(+(x, y)) , ++(nil(), ys) -> ys , ++(:(x, xs), ys) -> :(x, ++(xs, ys)) , sum(++(xs, :(x, :(y, ys)))) -> sum(++(xs, sum(:(x, :(y, ys))))) , sum(:(x, nil())) -> :(x, nil()) , sum(:(x, :(y, xs))) -> sum(:(+(x, y), xs)) , -(x, 0()) -> x , -(0(), s(y)) -> 0() , -(s(x), s(y)) -> -(x, y) , length(nil()) -> 0() , length(:(x, xs)) -> s(length(xs)) , hd(:(x, xs)) -> x } StartTerms: basic terms Strategy: innermost Overall, the transformation results in the following sub-problem(s): Generated new problems: ----------------------- R) Strict DPs: { -^#(s(x), s(y)) -> c_5(-^#(x, y)) , quot^#(s(x), s(y)) -> c_6(quot^#(-(x, y), s(y)), -^#(x, y)) } Weak DPs: { +^#(s(x), y) -> c_1(+^#(x, y)) , ++^#(:(x, xs), ys) -> c_2(++^#(xs, ys)) , sum^#(++(xs, :(x, :(y, ys)))) -> c_3(sum^#(++(xs, sum(:(x, :(y, ys))))), sum^#(:(x, :(y, ys)))) , sum^#(:(x, :(y, xs))) -> c_4(sum^#(:(+(x, y), xs)), +^#(x, y)) , avg^#(xs) -> c_7(quot^#(hd(sum(xs)), length(xs)), sum^#(xs)) } Weak Trs: { +(0(), y) -> y , +(s(x), y) -> s(+(x, y)) , ++(nil(), ys) -> ys , ++(:(x, xs), ys) -> :(x, ++(xs, ys)) , sum(++(xs, :(x, :(y, ys)))) -> sum(++(xs, sum(:(x, :(y, ys))))) , sum(:(x, nil())) -> :(x, nil()) , sum(:(x, :(y, xs))) -> sum(:(+(x, y), xs)) , -(x, 0()) -> x , -(0(), s(y)) -> 0() , -(s(x), s(y)) -> -(x, y) , length(nil()) -> 0() , length(:(x, xs)) -> s(length(xs)) , hd(:(x, xs)) -> x } StartTerms: basic terms Strategy: innermost This problem was proven YES(O(1),O(n^2)). S) Strict DPs: { +^#(s(x), y) -> c_1(+^#(x, y)) , ++^#(:(x, xs), ys) -> c_2(++^#(xs, ys)) , sum^#(++(xs, :(x, :(y, ys)))) -> c_3(sum^#(++(xs, sum(:(x, :(y, ys))))), sum^#(:(x, :(y, ys)))) , sum^#(:(x, :(y, xs))) -> c_4(sum^#(:(+(x, y), xs)), +^#(x, y)) } Weak DPs: { -^#(s(x), s(y)) -> c_5(-^#(x, y)) , quot^#(s(x), s(y)) -> c_6(quot^#(-(x, y), s(y)), -^#(x, y)) , avg^#(xs) -> c_7(quot^#(hd(sum(xs)), length(xs)), sum^#(xs)) } Weak Trs: { +(0(), y) -> y , +(s(x), y) -> s(+(x, y)) , ++(nil(), ys) -> ys , ++(:(x, xs), ys) -> :(x, ++(xs, ys)) , sum(++(xs, :(x, :(y, ys)))) -> sum(++(xs, sum(:(x, :(y, ys))))) , sum(:(x, nil())) -> :(x, nil()) , sum(:(x, :(y, xs))) -> sum(:(+(x, y), xs)) , -(x, 0()) -> x , -(0(), s(y)) -> 0() , -(s(x), s(y)) -> -(x, y) , length(nil()) -> 0() , length(:(x, xs)) -> s(length(xs)) , hd(:(x, xs)) -> x } StartTerms: basic terms Strategy: innermost This problem was proven YES(O(1),O(n^3)). Proofs for generated problems: ------------------------------ R) We are left with following problem, upon which TcT provides the certificate YES(O(1),O(n^2)). Strict DPs: { -^#(s(x), s(y)) -> c_5(-^#(x, y)) , quot^#(s(x), s(y)) -> c_6(quot^#(-(x, y), s(y)), -^#(x, y)) } Weak DPs: { +^#(s(x), y) -> c_1(+^#(x, y)) , ++^#(:(x, xs), ys) -> c_2(++^#(xs, ys)) , sum^#(++(xs, :(x, :(y, ys)))) -> c_3(sum^#(++(xs, sum(:(x, :(y, ys))))), sum^#(:(x, :(y, ys)))) , sum^#(:(x, :(y, xs))) -> c_4(sum^#(:(+(x, y), xs)), +^#(x, y)) , avg^#(xs) -> c_7(quot^#(hd(sum(xs)), length(xs)), sum^#(xs)) } Weak Trs: { +(0(), y) -> y , +(s(x), y) -> s(+(x, y)) , ++(nil(), ys) -> ys , ++(:(x, xs), ys) -> :(x, ++(xs, ys)) , sum(++(xs, :(x, :(y, ys)))) -> sum(++(xs, sum(:(x, :(y, ys))))) , sum(:(x, nil())) -> :(x, nil()) , sum(:(x, :(y, xs))) -> sum(:(+(x, y), xs)) , -(x, 0()) -> x , -(0(), s(y)) -> 0() , -(s(x), s(y)) -> -(x, y) , length(nil()) -> 0() , length(:(x, xs)) -> s(length(xs)) , hd(:(x, xs)) -> x } Obligation: innermost runtime complexity Answer: YES(O(1),O(n^2)) The following weak DPs constitute a sub-graph of the DG that is closed under successors. The DPs are removed. { +^#(s(x), y) -> c_1(+^#(x, y)) , ++^#(:(x, xs), ys) -> c_2(++^#(xs, ys)) , sum^#(++(xs, :(x, :(y, ys)))) -> c_3(sum^#(++(xs, sum(:(x, :(y, ys))))), sum^#(:(x, :(y, ys)))) , sum^#(:(x, :(y, xs))) -> c_4(sum^#(:(+(x, y), xs)), +^#(x, y)) } We are left with following problem, upon which TcT provides the certificate YES(O(1),O(n^2)). Strict DPs: { -^#(s(x), s(y)) -> c_5(-^#(x, y)) , quot^#(s(x), s(y)) -> c_6(quot^#(-(x, y), s(y)), -^#(x, y)) } Weak DPs: { avg^#(xs) -> c_7(quot^#(hd(sum(xs)), length(xs)), sum^#(xs)) } Weak Trs: { +(0(), y) -> y , +(s(x), y) -> s(+(x, y)) , ++(nil(), ys) -> ys , ++(:(x, xs), ys) -> :(x, ++(xs, ys)) , sum(++(xs, :(x, :(y, ys)))) -> sum(++(xs, sum(:(x, :(y, ys))))) , sum(:(x, nil())) -> :(x, nil()) , sum(:(x, :(y, xs))) -> sum(:(+(x, y), xs)) , -(x, 0()) -> x , -(0(), s(y)) -> 0() , -(s(x), s(y)) -> -(x, y) , length(nil()) -> 0() , length(:(x, xs)) -> s(length(xs)) , hd(:(x, xs)) -> x } Obligation: innermost runtime complexity Answer: YES(O(1),O(n^2)) Due to missing edges in the dependency-graph, the right-hand sides of following rules could be simplified: { avg^#(xs) -> c_7(quot^#(hd(sum(xs)), length(xs)), sum^#(xs)) } We are left with following problem, upon which TcT provides the certificate YES(O(1),O(n^2)). Strict DPs: { -^#(s(x), s(y)) -> c_1(-^#(x, y)) , quot^#(s(x), s(y)) -> c_2(quot^#(-(x, y), s(y)), -^#(x, y)) } Weak DPs: { avg^#(xs) -> c_3(quot^#(hd(sum(xs)), length(xs))) } Weak Trs: { +(0(), y) -> y , +(s(x), y) -> s(+(x, y)) , ++(nil(), ys) -> ys , ++(:(x, xs), ys) -> :(x, ++(xs, ys)) , sum(++(xs, :(x, :(y, ys)))) -> sum(++(xs, sum(:(x, :(y, ys))))) , sum(:(x, nil())) -> :(x, nil()) , sum(:(x, :(y, xs))) -> sum(:(+(x, y), xs)) , -(x, 0()) -> x , -(0(), s(y)) -> 0() , -(s(x), s(y)) -> -(x, y) , length(nil()) -> 0() , length(:(x, xs)) -> s(length(xs)) , hd(:(x, xs)) -> x } Obligation: innermost runtime complexity Answer: YES(O(1),O(n^2)) We decompose the input problem according to the dependency graph into the upper component { quot^#(s(x), s(y)) -> c_2(quot^#(-(x, y), s(y)), -^#(x, y)) , avg^#(xs) -> c_3(quot^#(hd(sum(xs)), length(xs))) } and lower component { -^#(s(x), s(y)) -> c_1(-^#(x, y)) } Further, following extension rules are added to the lower component. { quot^#(s(x), s(y)) -> -^#(x, y) , quot^#(s(x), s(y)) -> quot^#(-(x, y), s(y)) , avg^#(xs) -> quot^#(hd(sum(xs)), length(xs)) } TcT solves the upper component with certificate YES(O(1),O(n^1)). Sub-proof: ---------- We are left with following problem, upon which TcT provides the certificate YES(O(1),O(n^1)). Strict DPs: { quot^#(s(x), s(y)) -> c_2(quot^#(-(x, y), s(y)), -^#(x, y)) } Weak DPs: { avg^#(xs) -> c_3(quot^#(hd(sum(xs)), length(xs))) } Weak Trs: { +(0(), y) -> y , +(s(x), y) -> s(+(x, y)) , ++(nil(), ys) -> ys , ++(:(x, xs), ys) -> :(x, ++(xs, ys)) , sum(++(xs, :(x, :(y, ys)))) -> sum(++(xs, sum(:(x, :(y, ys))))) , sum(:(x, nil())) -> :(x, nil()) , sum(:(x, :(y, xs))) -> sum(:(+(x, y), xs)) , -(x, 0()) -> x , -(0(), s(y)) -> 0() , -(s(x), s(y)) -> -(x, y) , length(nil()) -> 0() , length(:(x, xs)) -> s(length(xs)) , hd(:(x, xs)) -> x } Obligation: innermost runtime complexity Answer: YES(O(1),O(n^1)) We use the processor 'matrix interpretation of dimension 1' to orient following rules strictly. DPs: { 1: quot^#(s(x), s(y)) -> c_2(quot^#(-(x, y), s(y)), -^#(x, y)) , 2: avg^#(xs) -> c_3(quot^#(hd(sum(xs)), length(xs))) } Trs: { -(s(x), s(y)) -> -(x, y) , length(nil()) -> 0() } Sub-proof: ---------- The following argument positions are usable: Uargs(c_2) = {1}, Uargs(c_3) = {1} TcT has computed the following constructor-based matrix interpretation satisfying not(EDA). [+](x1, x2) = [1] x1 + [1] x2 + [0] [0] = [0] [s](x1) = [1] x1 + [2] [++](x1, x2) = [4] x1 + [1] x2 + [0] [nil] = [0] [:](x1, x2) = [1] x1 + [1] x2 + [0] [sum](x1) = [1] x1 + [0] [-](x1, x2) = [1] x1 + [0] [length](x1) = [1] [hd](x1) = [1] x1 + [0] [-^#](x1, x2) = [0] [quot^#](x1, x2) = [4] x1 + [4] [avg^#](x1) = [7] x1 + [7] [c_2](x1, x2) = [1] x1 + [1] x2 + [5] [c_3](x1) = [1] x1 + [0] The order satisfies the following ordering constraints: [+(0(), y)] = [1] y + [0] >= [1] y + [0] = [y] [+(s(x), y)] = [1] y + [1] x + [2] >= [1] y + [1] x + [2] = [s(+(x, y))] [++(nil(), ys)] = [1] ys + [0] >= [1] ys + [0] = [ys] [++(:(x, xs), ys)] = [4] x + [1] ys + [4] xs + [0] >= [1] x + [1] ys + [4] xs + [0] = [:(x, ++(xs, ys))] [sum(++(xs, :(x, :(y, ys))))] = [1] y + [1] x + [1] ys + [4] xs + [0] >= [1] y + [1] x + [1] ys + [4] xs + [0] = [sum(++(xs, sum(:(x, :(y, ys)))))] [sum(:(x, nil()))] = [1] x + [0] >= [1] x + [0] = [:(x, nil())] [sum(:(x, :(y, xs)))] = [1] y + [1] x + [1] xs + [0] >= [1] y + [1] x + [1] xs + [0] = [sum(:(+(x, y), xs))] [-(x, 0())] = [1] x + [0] >= [1] x + [0] = [x] [-(0(), s(y))] = [0] >= [0] = [0()] [-(s(x), s(y))] = [1] x + [2] > [1] x + [0] = [-(x, y)] [length(nil())] = [1] > [0] = [0()] [length(:(x, xs))] = [1] ? [3] = [s(length(xs))] [hd(:(x, xs))] = [1] x + [1] xs + [0] >= [1] x + [0] = [x] [quot^#(s(x), s(y))] = [4] x + [12] > [4] x + [9] = [c_2(quot^#(-(x, y), s(y)), -^#(x, y))] [avg^#(xs)] = [7] xs + [7] > [4] xs + [4] = [c_3(quot^#(hd(sum(xs)), length(xs)))] The strictly oriented rules are moved into the weak component. We are left with following problem, upon which TcT provides the certificate YES(O(1),O(1)). Weak DPs: { quot^#(s(x), s(y)) -> c_2(quot^#(-(x, y), s(y)), -^#(x, y)) , avg^#(xs) -> c_3(quot^#(hd(sum(xs)), length(xs))) } Weak Trs: { +(0(), y) -> y , +(s(x), y) -> s(+(x, y)) , ++(nil(), ys) -> ys , ++(:(x, xs), ys) -> :(x, ++(xs, ys)) , sum(++(xs, :(x, :(y, ys)))) -> sum(++(xs, sum(:(x, :(y, ys))))) , sum(:(x, nil())) -> :(x, nil()) , sum(:(x, :(y, xs))) -> sum(:(+(x, y), xs)) , -(x, 0()) -> x , -(0(), s(y)) -> 0() , -(s(x), s(y)) -> -(x, y) , length(nil()) -> 0() , length(:(x, xs)) -> s(length(xs)) , hd(:(x, xs)) -> x } 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. { quot^#(s(x), s(y)) -> c_2(quot^#(-(x, y), s(y)), -^#(x, y)) , avg^#(xs) -> c_3(quot^#(hd(sum(xs)), length(xs))) } We are left with following problem, upon which TcT provides the certificate YES(O(1),O(1)). Weak Trs: { +(0(), y) -> y , +(s(x), y) -> s(+(x, y)) , ++(nil(), ys) -> ys , ++(:(x, xs), ys) -> :(x, ++(xs, ys)) , sum(++(xs, :(x, :(y, ys)))) -> sum(++(xs, sum(:(x, :(y, ys))))) , sum(:(x, nil())) -> :(x, nil()) , sum(:(x, :(y, xs))) -> sum(:(+(x, y), xs)) , -(x, 0()) -> x , -(0(), s(y)) -> 0() , -(s(x), s(y)) -> -(x, y) , length(nil()) -> 0() , length(:(x, xs)) -> s(length(xs)) , hd(:(x, xs)) -> x } Obligation: innermost runtime complexity Answer: YES(O(1),O(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(1)). Rules: Empty Obligation: innermost runtime complexity Answer: YES(O(1),O(1)) Empty rules are trivially bounded We return to the main proof. We are left with following problem, upon which TcT provides the certificate YES(O(1),O(n^1)). Strict DPs: { -^#(s(x), s(y)) -> c_1(-^#(x, y)) } Weak DPs: { quot^#(s(x), s(y)) -> -^#(x, y) , quot^#(s(x), s(y)) -> quot^#(-(x, y), s(y)) , avg^#(xs) -> quot^#(hd(sum(xs)), length(xs)) } Weak Trs: { +(0(), y) -> y , +(s(x), y) -> s(+(x, y)) , ++(nil(), ys) -> ys , ++(:(x, xs), ys) -> :(x, ++(xs, ys)) , sum(++(xs, :(x, :(y, ys)))) -> sum(++(xs, sum(:(x, :(y, ys))))) , sum(:(x, nil())) -> :(x, nil()) , sum(:(x, :(y, xs))) -> sum(:(+(x, y), xs)) , -(x, 0()) -> x , -(0(), s(y)) -> 0() , -(s(x), s(y)) -> -(x, y) , length(nil()) -> 0() , length(:(x, xs)) -> s(length(xs)) , hd(:(x, xs)) -> x } Obligation: innermost runtime complexity Answer: YES(O(1),O(n^1)) We use the processor 'Small Polynomial Path Order (PS,1-bounded)' to orient following rules strictly. DPs: { 1: -^#(s(x), s(y)) -> c_1(-^#(x, y)) , 2: quot^#(s(x), s(y)) -> -^#(x, y) } Sub-proof: ---------- The input was oriented with the instance of 'Small Polynomial Path Order (PS,1-bounded)' as induced by the safe mapping safe(+) = {}, safe(0) = {}, safe(s) = {1}, safe(++) = {1, 2}, safe(nil) = {}, safe(:) = {1, 2}, safe(sum) = {}, safe(-) = {1, 2}, safe(length) = {}, safe(hd) = {1}, safe(-^#) = {1}, safe(quot^#) = {}, safe(avg^#) = {}, safe(c_1) = {} and precedence sum > +, quot^# > -^#, avg^# > sum, quot^# ~ avg^# . Following symbols are considered recursive: {sum, -^#} The recursion depth is 1. Further, following argument filtering is employed: pi(+) = 2, pi(0) = [], pi(s) = [1], pi(++) = [1, 2], pi(nil) = [], pi(:) = [2], pi(sum) = [1], pi(-) = 1, pi(length) = 1, pi(hd) = 1, pi(-^#) = [2], pi(quot^#) = [2], pi(avg^#) = [1], pi(c_1) = [1] Usable defined function symbols are a subset of: {length, -^#, quot^#, avg^#} For your convenience, here are the satisfied ordering constraints: pi(-^#(s(x), s(y))) = -^#(s(; y);) > c_1(-^#(y;);) = pi(c_1(-^#(x, y))) pi(quot^#(s(x), s(y))) = quot^#(s(; y);) > -^#(y;) = pi(-^#(x, y)) pi(quot^#(s(x), s(y))) = quot^#(s(; y);) >= quot^#(s(; y);) = pi(quot^#(-(x, y), s(y))) pi(avg^#(xs)) = avg^#(xs;) >= quot^#(xs;) = pi(quot^#(hd(sum(xs)), length(xs))) pi(length(nil())) = nil() >= 0() = pi(0()) pi(length(:(x, xs))) = :(; xs) >= s(; xs) = pi(s(length(xs))) We return to the main proof. Consider the set of all dependency pairs : { 1: -^#(s(x), s(y)) -> c_1(-^#(x, y)) , 2: quot^#(s(x), s(y)) -> -^#(x, y) , 3: quot^#(s(x), s(y)) -> quot^#(-(x, y), s(y)) , 4: avg^#(xs) -> quot^#(hd(sum(xs)), length(xs)) } Processor 'Small Polynomial Path Order (PS,1-bounded)' induces the complexity certificate YES(?,O(n^1)) on application of dependency pairs {1,2}. These cover all (indirect) predecessors of dependency pairs {1,2,4}, their number of application is equally bounded. The dependency pairs are shifted into the weak component. We are left with following problem, upon which TcT provides the certificate YES(O(1),O(1)). Weak DPs: { -^#(s(x), s(y)) -> c_1(-^#(x, y)) , quot^#(s(x), s(y)) -> -^#(x, y) , quot^#(s(x), s(y)) -> quot^#(-(x, y), s(y)) , avg^#(xs) -> quot^#(hd(sum(xs)), length(xs)) } Weak Trs: { +(0(), y) -> y , +(s(x), y) -> s(+(x, y)) , ++(nil(), ys) -> ys , ++(:(x, xs), ys) -> :(x, ++(xs, ys)) , sum(++(xs, :(x, :(y, ys)))) -> sum(++(xs, sum(:(x, :(y, ys))))) , sum(:(x, nil())) -> :(x, nil()) , sum(:(x, :(y, xs))) -> sum(:(+(x, y), xs)) , -(x, 0()) -> x , -(0(), s(y)) -> 0() , -(s(x), s(y)) -> -(x, y) , length(nil()) -> 0() , length(:(x, xs)) -> s(length(xs)) , hd(:(x, xs)) -> x } 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. { -^#(s(x), s(y)) -> c_1(-^#(x, y)) , quot^#(s(x), s(y)) -> -^#(x, y) , quot^#(s(x), s(y)) -> quot^#(-(x, y), s(y)) , avg^#(xs) -> quot^#(hd(sum(xs)), length(xs)) } We are left with following problem, upon which TcT provides the certificate YES(O(1),O(1)). Weak Trs: { +(0(), y) -> y , +(s(x), y) -> s(+(x, y)) , ++(nil(), ys) -> ys , ++(:(x, xs), ys) -> :(x, ++(xs, ys)) , sum(++(xs, :(x, :(y, ys)))) -> sum(++(xs, sum(:(x, :(y, ys))))) , sum(:(x, nil())) -> :(x, nil()) , sum(:(x, :(y, xs))) -> sum(:(+(x, y), xs)) , -(x, 0()) -> x , -(0(), s(y)) -> 0() , -(s(x), s(y)) -> -(x, y) , length(nil()) -> 0() , length(:(x, xs)) -> s(length(xs)) , hd(:(x, xs)) -> x } Obligation: innermost runtime complexity Answer: YES(O(1),O(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(1)). Rules: Empty Obligation: innermost runtime complexity Answer: YES(O(1),O(1)) Empty rules are trivially bounded S) We are left with following problem, upon which TcT provides the certificate YES(O(1),O(n^3)). Strict DPs: { +^#(s(x), y) -> c_1(+^#(x, y)) , ++^#(:(x, xs), ys) -> c_2(++^#(xs, ys)) , sum^#(++(xs, :(x, :(y, ys)))) -> c_3(sum^#(++(xs, sum(:(x, :(y, ys))))), sum^#(:(x, :(y, ys)))) , sum^#(:(x, :(y, xs))) -> c_4(sum^#(:(+(x, y), xs)), +^#(x, y)) } Weak DPs: { -^#(s(x), s(y)) -> c_5(-^#(x, y)) , quot^#(s(x), s(y)) -> c_6(quot^#(-(x, y), s(y)), -^#(x, y)) , avg^#(xs) -> c_7(quot^#(hd(sum(xs)), length(xs)), sum^#(xs)) } Weak Trs: { +(0(), y) -> y , +(s(x), y) -> s(+(x, y)) , ++(nil(), ys) -> ys , ++(:(x, xs), ys) -> :(x, ++(xs, ys)) , sum(++(xs, :(x, :(y, ys)))) -> sum(++(xs, sum(:(x, :(y, ys))))) , sum(:(x, nil())) -> :(x, nil()) , sum(:(x, :(y, xs))) -> sum(:(+(x, y), xs)) , -(x, 0()) -> x , -(0(), s(y)) -> 0() , -(s(x), s(y)) -> -(x, y) , length(nil()) -> 0() , length(:(x, xs)) -> s(length(xs)) , hd(:(x, xs)) -> x } Obligation: innermost runtime complexity Answer: YES(O(1),O(n^3)) The following weak DPs constitute a sub-graph of the DG that is closed under successors. The DPs are removed. { -^#(s(x), s(y)) -> c_5(-^#(x, y)) , quot^#(s(x), s(y)) -> c_6(quot^#(-(x, y), s(y)), -^#(x, y)) } We are left with following problem, upon which TcT provides the certificate YES(O(1),O(n^3)). Strict DPs: { +^#(s(x), y) -> c_1(+^#(x, y)) , ++^#(:(x, xs), ys) -> c_2(++^#(xs, ys)) , sum^#(++(xs, :(x, :(y, ys)))) -> c_3(sum^#(++(xs, sum(:(x, :(y, ys))))), sum^#(:(x, :(y, ys)))) , sum^#(:(x, :(y, xs))) -> c_4(sum^#(:(+(x, y), xs)), +^#(x, y)) } Weak DPs: { avg^#(xs) -> c_7(quot^#(hd(sum(xs)), length(xs)), sum^#(xs)) } Weak Trs: { +(0(), y) -> y , +(s(x), y) -> s(+(x, y)) , ++(nil(), ys) -> ys , ++(:(x, xs), ys) -> :(x, ++(xs, ys)) , sum(++(xs, :(x, :(y, ys)))) -> sum(++(xs, sum(:(x, :(y, ys))))) , sum(:(x, nil())) -> :(x, nil()) , sum(:(x, :(y, xs))) -> sum(:(+(x, y), xs)) , -(x, 0()) -> x , -(0(), s(y)) -> 0() , -(s(x), s(y)) -> -(x, y) , length(nil()) -> 0() , length(:(x, xs)) -> s(length(xs)) , hd(:(x, xs)) -> x } Obligation: innermost runtime complexity Answer: YES(O(1),O(n^3)) Due to missing edges in the dependency-graph, the right-hand sides of following rules could be simplified: { avg^#(xs) -> c_7(quot^#(hd(sum(xs)), length(xs)), sum^#(xs)) } We are left with following problem, upon which TcT provides the certificate YES(O(1),O(n^3)). Strict DPs: { +^#(s(x), y) -> c_1(+^#(x, y)) , ++^#(:(x, xs), ys) -> c_2(++^#(xs, ys)) , sum^#(++(xs, :(x, :(y, ys)))) -> c_3(sum^#(++(xs, sum(:(x, :(y, ys))))), sum^#(:(x, :(y, ys)))) , sum^#(:(x, :(y, xs))) -> c_4(sum^#(:(+(x, y), xs)), +^#(x, y)) } Weak DPs: { avg^#(xs) -> c_5(sum^#(xs)) } Weak Trs: { +(0(), y) -> y , +(s(x), y) -> s(+(x, y)) , ++(nil(), ys) -> ys , ++(:(x, xs), ys) -> :(x, ++(xs, ys)) , sum(++(xs, :(x, :(y, ys)))) -> sum(++(xs, sum(:(x, :(y, ys))))) , sum(:(x, nil())) -> :(x, nil()) , sum(:(x, :(y, xs))) -> sum(:(+(x, y), xs)) , -(x, 0()) -> x , -(0(), s(y)) -> 0() , -(s(x), s(y)) -> -(x, y) , length(nil()) -> 0() , length(:(x, xs)) -> s(length(xs)) , hd(:(x, xs)) -> x } Obligation: innermost runtime complexity Answer: YES(O(1),O(n^3)) We replace rewrite rules by usable rules: Weak Usable Rules: { +(0(), y) -> y , +(s(x), y) -> s(+(x, y)) , ++(nil(), ys) -> ys , ++(:(x, xs), ys) -> :(x, ++(xs, ys)) , sum(++(xs, :(x, :(y, ys)))) -> sum(++(xs, sum(:(x, :(y, ys))))) , sum(:(x, nil())) -> :(x, nil()) , sum(:(x, :(y, xs))) -> sum(:(+(x, y), xs)) } We are left with following problem, upon which TcT provides the certificate YES(O(1),O(n^3)). Strict DPs: { +^#(s(x), y) -> c_1(+^#(x, y)) , ++^#(:(x, xs), ys) -> c_2(++^#(xs, ys)) , sum^#(++(xs, :(x, :(y, ys)))) -> c_3(sum^#(++(xs, sum(:(x, :(y, ys))))), sum^#(:(x, :(y, ys)))) , sum^#(:(x, :(y, xs))) -> c_4(sum^#(:(+(x, y), xs)), +^#(x, y)) } Weak DPs: { avg^#(xs) -> c_5(sum^#(xs)) } Weak Trs: { +(0(), y) -> y , +(s(x), y) -> s(+(x, y)) , ++(nil(), ys) -> ys , ++(:(x, xs), ys) -> :(x, ++(xs, ys)) , sum(++(xs, :(x, :(y, ys)))) -> sum(++(xs, sum(:(x, :(y, ys))))) , sum(:(x, nil())) -> :(x, nil()) , sum(:(x, :(y, xs))) -> sum(:(+(x, y), xs)) } Obligation: innermost runtime complexity Answer: YES(O(1),O(n^3)) We analyse the complexity of following sub-problems (R) and (S). Problem (S) is obtained from the input problem by shifting strict rules from (R) into the weak component: Problem (R): ------------ Strict DPs: { +^#(s(x), y) -> c_1(+^#(x, y)) , sum^#(:(x, :(y, xs))) -> c_4(sum^#(:(+(x, y), xs)), +^#(x, y)) } Weak DPs: { ++^#(:(x, xs), ys) -> c_2(++^#(xs, ys)) , sum^#(++(xs, :(x, :(y, ys)))) -> c_3(sum^#(++(xs, sum(:(x, :(y, ys))))), sum^#(:(x, :(y, ys)))) , avg^#(xs) -> c_5(sum^#(xs)) } Weak Trs: { +(0(), y) -> y , +(s(x), y) -> s(+(x, y)) , ++(nil(), ys) -> ys , ++(:(x, xs), ys) -> :(x, ++(xs, ys)) , sum(++(xs, :(x, :(y, ys)))) -> sum(++(xs, sum(:(x, :(y, ys))))) , sum(:(x, nil())) -> :(x, nil()) , sum(:(x, :(y, xs))) -> sum(:(+(x, y), xs)) } StartTerms: basic terms Strategy: innermost Problem (S): ------------ Strict DPs: { ++^#(:(x, xs), ys) -> c_2(++^#(xs, ys)) , sum^#(++(xs, :(x, :(y, ys)))) -> c_3(sum^#(++(xs, sum(:(x, :(y, ys))))), sum^#(:(x, :(y, ys)))) } Weak DPs: { +^#(s(x), y) -> c_1(+^#(x, y)) , sum^#(:(x, :(y, xs))) -> c_4(sum^#(:(+(x, y), xs)), +^#(x, y)) , avg^#(xs) -> c_5(sum^#(xs)) } Weak Trs: { +(0(), y) -> y , +(s(x), y) -> s(+(x, y)) , ++(nil(), ys) -> ys , ++(:(x, xs), ys) -> :(x, ++(xs, ys)) , sum(++(xs, :(x, :(y, ys)))) -> sum(++(xs, sum(:(x, :(y, ys))))) , sum(:(x, nil())) -> :(x, nil()) , sum(:(x, :(y, xs))) -> sum(:(+(x, y), xs)) } StartTerms: basic terms Strategy: innermost Overall, the transformation results in the following sub-problem(s): Generated new problems: ----------------------- R) Strict DPs: { +^#(s(x), y) -> c_1(+^#(x, y)) , sum^#(:(x, :(y, xs))) -> c_4(sum^#(:(+(x, y), xs)), +^#(x, y)) } Weak DPs: { ++^#(:(x, xs), ys) -> c_2(++^#(xs, ys)) , sum^#(++(xs, :(x, :(y, ys)))) -> c_3(sum^#(++(xs, sum(:(x, :(y, ys))))), sum^#(:(x, :(y, ys)))) , avg^#(xs) -> c_5(sum^#(xs)) } Weak Trs: { +(0(), y) -> y , +(s(x), y) -> s(+(x, y)) , ++(nil(), ys) -> ys , ++(:(x, xs), ys) -> :(x, ++(xs, ys)) , sum(++(xs, :(x, :(y, ys)))) -> sum(++(xs, sum(:(x, :(y, ys))))) , sum(:(x, nil())) -> :(x, nil()) , sum(:(x, :(y, xs))) -> sum(:(+(x, y), xs)) } StartTerms: basic terms Strategy: innermost This problem was proven YES(O(1),O(n^3)). S) Strict DPs: { ++^#(:(x, xs), ys) -> c_2(++^#(xs, ys)) , sum^#(++(xs, :(x, :(y, ys)))) -> c_3(sum^#(++(xs, sum(:(x, :(y, ys))))), sum^#(:(x, :(y, ys)))) } Weak DPs: { +^#(s(x), y) -> c_1(+^#(x, y)) , sum^#(:(x, :(y, xs))) -> c_4(sum^#(:(+(x, y), xs)), +^#(x, y)) , avg^#(xs) -> c_5(sum^#(xs)) } Weak Trs: { +(0(), y) -> y , +(s(x), y) -> s(+(x, y)) , ++(nil(), ys) -> ys , ++(:(x, xs), ys) -> :(x, ++(xs, ys)) , sum(++(xs, :(x, :(y, ys)))) -> sum(++(xs, sum(:(x, :(y, ys))))) , sum(:(x, nil())) -> :(x, nil()) , sum(:(x, :(y, xs))) -> sum(:(+(x, y), xs)) } StartTerms: basic terms Strategy: innermost This problem was proven YES(O(1),O(n^1)). Proofs for generated problems: ------------------------------ R) We are left with following problem, upon which TcT provides the certificate YES(O(1),O(n^3)). Strict DPs: { +^#(s(x), y) -> c_1(+^#(x, y)) , sum^#(:(x, :(y, xs))) -> c_4(sum^#(:(+(x, y), xs)), +^#(x, y)) } Weak DPs: { ++^#(:(x, xs), ys) -> c_2(++^#(xs, ys)) , sum^#(++(xs, :(x, :(y, ys)))) -> c_3(sum^#(++(xs, sum(:(x, :(y, ys))))), sum^#(:(x, :(y, ys)))) , avg^#(xs) -> c_5(sum^#(xs)) } Weak Trs: { +(0(), y) -> y , +(s(x), y) -> s(+(x, y)) , ++(nil(), ys) -> ys , ++(:(x, xs), ys) -> :(x, ++(xs, ys)) , sum(++(xs, :(x, :(y, ys)))) -> sum(++(xs, sum(:(x, :(y, ys))))) , sum(:(x, nil())) -> :(x, nil()) , sum(:(x, :(y, xs))) -> sum(:(+(x, y), xs)) } Obligation: innermost runtime complexity Answer: YES(O(1),O(n^3)) The following weak DPs constitute a sub-graph of the DG that is closed under successors. The DPs are removed. { ++^#(:(x, xs), ys) -> c_2(++^#(xs, ys)) } We are left with following problem, upon which TcT provides the certificate YES(O(1),O(n^3)). Strict DPs: { +^#(s(x), y) -> c_1(+^#(x, y)) , sum^#(:(x, :(y, xs))) -> c_4(sum^#(:(+(x, y), xs)), +^#(x, y)) } Weak DPs: { sum^#(++(xs, :(x, :(y, ys)))) -> c_3(sum^#(++(xs, sum(:(x, :(y, ys))))), sum^#(:(x, :(y, ys)))) , avg^#(xs) -> c_5(sum^#(xs)) } Weak Trs: { +(0(), y) -> y , +(s(x), y) -> s(+(x, y)) , ++(nil(), ys) -> ys , ++(:(x, xs), ys) -> :(x, ++(xs, ys)) , sum(++(xs, :(x, :(y, ys)))) -> sum(++(xs, sum(:(x, :(y, ys))))) , sum(:(x, nil())) -> :(x, nil()) , sum(:(x, :(y, xs))) -> sum(:(+(x, y), xs)) } Obligation: innermost runtime complexity Answer: YES(O(1),O(n^3)) We decompose the input problem according to the dependency graph into the upper component { sum^#(++(xs, :(x, :(y, ys)))) -> c_3(sum^#(++(xs, sum(:(x, :(y, ys))))), sum^#(:(x, :(y, ys)))) , avg^#(xs) -> c_5(sum^#(xs)) } and lower component { +^#(s(x), y) -> c_1(+^#(x, y)) , sum^#(:(x, :(y, xs))) -> c_4(sum^#(:(+(x, y), xs)), +^#(x, y)) } Further, following extension rules are added to the lower component. { sum^#(++(xs, :(x, :(y, ys)))) -> sum^#(++(xs, sum(:(x, :(y, ys))))) , sum^#(++(xs, :(x, :(y, ys)))) -> sum^#(:(x, :(y, ys))) , avg^#(xs) -> sum^#(xs) } TcT solves the upper component with certificate YES(O(1),O(n^1)). Sub-proof: ---------- We are left with following problem, upon which TcT provides the certificate YES(O(1),O(n^1)). Strict DPs: { sum^#(++(xs, :(x, :(y, ys)))) -> c_3(sum^#(++(xs, sum(:(x, :(y, ys))))), sum^#(:(x, :(y, ys)))) , avg^#(xs) -> c_5(sum^#(xs)) } Weak Trs: { +(0(), y) -> y , +(s(x), y) -> s(+(x, y)) , ++(nil(), ys) -> ys , ++(:(x, xs), ys) -> :(x, ++(xs, ys)) , sum(++(xs, :(x, :(y, ys)))) -> sum(++(xs, sum(:(x, :(y, ys))))) , sum(:(x, nil())) -> :(x, nil()) , sum(:(x, :(y, xs))) -> sum(:(+(x, y), xs)) } Obligation: innermost runtime complexity Answer: YES(O(1),O(n^1)) We use the processor 'matrix interpretation of dimension 1' to orient following rules strictly. DPs: { 1: sum^#(++(xs, :(x, :(y, ys)))) -> c_3(sum^#(++(xs, sum(:(x, :(y, ys))))), sum^#(:(x, :(y, ys)))) , 2: avg^#(xs) -> c_5(sum^#(xs)) } Trs: { ++(:(x, xs), ys) -> :(x, ++(xs, ys)) } Sub-proof: ---------- The following argument positions are usable: Uargs(c_3) = {1}, Uargs(c_5) = {1} TcT has computed the following constructor-based matrix interpretation satisfying not(EDA). [+](x1, x2) = [2] x2 + [0] [0] = [0] [s](x1) = [0] [++](x1, x2) = [2] x1 + [1] x2 + [0] [nil] = [0] [:](x1, x2) = [1] x2 + [1] [sum](x1) = [1] [sum^#](x1) = [4] x1 + [4] [avg^#](x1) = [7] x1 + [7] [c_3](x1, x2) = [1] x1 + [3] [c_5](x1) = [1] x1 + [0] The order satisfies the following ordering constraints: [+(0(), y)] = [2] y + [0] >= [1] y + [0] = [y] [+(s(x), y)] = [2] y + [0] >= [0] = [s(+(x, y))] [++(nil(), ys)] = [1] ys + [0] >= [1] ys + [0] = [ys] [++(:(x, xs), ys)] = [1] ys + [2] xs + [2] > [1] ys + [2] xs + [1] = [:(x, ++(xs, ys))] [sum(++(xs, :(x, :(y, ys))))] = [1] >= [1] = [sum(++(xs, sum(:(x, :(y, ys)))))] [sum(:(x, nil()))] = [1] >= [1] = [:(x, nil())] [sum(:(x, :(y, xs)))] = [1] >= [1] = [sum(:(+(x, y), xs))] [sum^#(++(xs, :(x, :(y, ys))))] = [4] ys + [8] xs + [12] > [8] xs + [11] = [c_3(sum^#(++(xs, sum(:(x, :(y, ys))))), sum^#(:(x, :(y, ys))))] [avg^#(xs)] = [7] xs + [7] > [4] xs + [4] = [c_5(sum^#(xs))] The strictly oriented rules are moved into the weak component. We are left with following problem, upon which TcT provides the certificate YES(O(1),O(1)). Weak DPs: { sum^#(++(xs, :(x, :(y, ys)))) -> c_3(sum^#(++(xs, sum(:(x, :(y, ys))))), sum^#(:(x, :(y, ys)))) , avg^#(xs) -> c_5(sum^#(xs)) } Weak Trs: { +(0(), y) -> y , +(s(x), y) -> s(+(x, y)) , ++(nil(), ys) -> ys , ++(:(x, xs), ys) -> :(x, ++(xs, ys)) , sum(++(xs, :(x, :(y, ys)))) -> sum(++(xs, sum(:(x, :(y, ys))))) , sum(:(x, nil())) -> :(x, nil()) , sum(:(x, :(y, xs))) -> sum(:(+(x, y), xs)) } 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. { sum^#(++(xs, :(x, :(y, ys)))) -> c_3(sum^#(++(xs, sum(:(x, :(y, ys))))), sum^#(:(x, :(y, ys)))) , avg^#(xs) -> c_5(sum^#(xs)) } We are left with following problem, upon which TcT provides the certificate YES(O(1),O(1)). Weak Trs: { +(0(), y) -> y , +(s(x), y) -> s(+(x, y)) , ++(nil(), ys) -> ys , ++(:(x, xs), ys) -> :(x, ++(xs, ys)) , sum(++(xs, :(x, :(y, ys)))) -> sum(++(xs, sum(:(x, :(y, ys))))) , sum(:(x, nil())) -> :(x, nil()) , sum(:(x, :(y, xs))) -> sum(:(+(x, y), xs)) } Obligation: innermost runtime complexity Answer: YES(O(1),O(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(1)). Rules: Empty Obligation: innermost runtime complexity Answer: YES(O(1),O(1)) Empty rules are trivially bounded We return to the main proof. We are left with following problem, upon which TcT provides the certificate YES(O(1),O(n^2)). Strict DPs: { +^#(s(x), y) -> c_1(+^#(x, y)) , sum^#(:(x, :(y, xs))) -> c_4(sum^#(:(+(x, y), xs)), +^#(x, y)) } Weak DPs: { sum^#(++(xs, :(x, :(y, ys)))) -> sum^#(++(xs, sum(:(x, :(y, ys))))) , sum^#(++(xs, :(x, :(y, ys)))) -> sum^#(:(x, :(y, ys))) , avg^#(xs) -> sum^#(xs) } Weak Trs: { +(0(), y) -> y , +(s(x), y) -> s(+(x, y)) , ++(nil(), ys) -> ys , ++(:(x, xs), ys) -> :(x, ++(xs, ys)) , sum(++(xs, :(x, :(y, ys)))) -> sum(++(xs, sum(:(x, :(y, ys))))) , sum(:(x, nil())) -> :(x, nil()) , sum(:(x, :(y, xs))) -> sum(:(+(x, y), xs)) } Obligation: innermost runtime complexity Answer: YES(O(1),O(n^2)) We decompose the input problem according to the dependency graph into the upper component { sum^#(++(xs, :(x, :(y, ys)))) -> sum^#(++(xs, sum(:(x, :(y, ys))))) , sum^#(++(xs, :(x, :(y, ys)))) -> sum^#(:(x, :(y, ys))) , sum^#(:(x, :(y, xs))) -> c_4(sum^#(:(+(x, y), xs)), +^#(x, y)) , avg^#(xs) -> sum^#(xs) } and lower component { +^#(s(x), y) -> c_1(+^#(x, y)) } Further, following extension rules are added to the lower component. { sum^#(++(xs, :(x, :(y, ys)))) -> sum^#(++(xs, sum(:(x, :(y, ys))))) , sum^#(++(xs, :(x, :(y, ys)))) -> sum^#(:(x, :(y, ys))) , sum^#(:(x, :(y, xs))) -> +^#(x, y) , sum^#(:(x, :(y, xs))) -> sum^#(:(+(x, y), xs)) , avg^#(xs) -> sum^#(xs) } TcT solves the upper component with certificate YES(O(1),O(n^1)). Sub-proof: ---------- We are left with following problem, upon which TcT provides the certificate YES(O(1),O(n^1)). Strict DPs: { sum^#(:(x, :(y, xs))) -> c_4(sum^#(:(+(x, y), xs)), +^#(x, y)) } Weak DPs: { sum^#(++(xs, :(x, :(y, ys)))) -> sum^#(++(xs, sum(:(x, :(y, ys))))) , sum^#(++(xs, :(x, :(y, ys)))) -> sum^#(:(x, :(y, ys))) , avg^#(xs) -> sum^#(xs) } Weak Trs: { +(0(), y) -> y , +(s(x), y) -> s(+(x, y)) , ++(nil(), ys) -> ys , ++(:(x, xs), ys) -> :(x, ++(xs, ys)) , sum(++(xs, :(x, :(y, ys)))) -> sum(++(xs, sum(:(x, :(y, ys))))) , sum(:(x, nil())) -> :(x, nil()) , sum(:(x, :(y, xs))) -> sum(:(+(x, y), xs)) } Obligation: innermost runtime complexity Answer: YES(O(1),O(n^1)) We use the processor 'matrix interpretation of dimension 1' to orient following rules strictly. DPs: { 1: sum^#(:(x, :(y, xs))) -> c_4(sum^#(:(+(x, y), xs)), +^#(x, y)) , 2: sum^#(++(xs, :(x, :(y, ys)))) -> sum^#(++(xs, sum(:(x, :(y, ys))))) , 3: sum^#(++(xs, :(x, :(y, ys)))) -> sum^#(:(x, :(y, ys))) , 4: avg^#(xs) -> sum^#(xs) } Trs: { +(0(), y) -> y , +(s(x), y) -> s(+(x, y)) , ++(nil(), ys) -> ys , ++(:(x, xs), ys) -> :(x, ++(xs, ys)) } Sub-proof: ---------- The following argument positions are usable: Uargs(c_4) = {1} TcT has computed the following constructor-based matrix interpretation satisfying not(EDA). [+](x1, x2) = [4] x2 + [1] [0] = [0] [s](x1) = [0] [++](x1, x2) = [2] x1 + [1] x2 + [2] [nil] = [0] [:](x1, x2) = [1] x2 + [6] [sum](x1) = [6] [+^#](x1, x2) = [0] [sum^#](x1) = [1] x1 + [0] [avg^#](x1) = [7] x1 + [7] [c_4](x1, x2) = [1] x1 + [1] x2 + [1] The order satisfies the following ordering constraints: [+(0(), y)] = [4] y + [1] > [1] y + [0] = [y] [+(s(x), y)] = [4] y + [1] > [0] = [s(+(x, y))] [++(nil(), ys)] = [1] ys + [2] > [1] ys + [0] = [ys] [++(:(x, xs), ys)] = [1] ys + [2] xs + [14] > [1] ys + [2] xs + [8] = [:(x, ++(xs, ys))] [sum(++(xs, :(x, :(y, ys))))] = [6] >= [6] = [sum(++(xs, sum(:(x, :(y, ys)))))] [sum(:(x, nil()))] = [6] >= [6] = [:(x, nil())] [sum(:(x, :(y, xs)))] = [6] >= [6] = [sum(:(+(x, y), xs))] [sum^#(++(xs, :(x, :(y, ys))))] = [1] ys + [2] xs + [14] > [2] xs + [8] = [sum^#(++(xs, sum(:(x, :(y, ys)))))] [sum^#(++(xs, :(x, :(y, ys))))] = [1] ys + [2] xs + [14] > [1] ys + [12] = [sum^#(:(x, :(y, ys)))] [sum^#(:(x, :(y, xs)))] = [1] xs + [12] > [1] xs + [7] = [c_4(sum^#(:(+(x, y), xs)), +^#(x, y))] [avg^#(xs)] = [7] xs + [7] > [1] xs + [0] = [sum^#(xs)] The strictly oriented rules are moved into the weak component. We are left with following problem, upon which TcT provides the certificate YES(O(1),O(1)). Weak DPs: { sum^#(++(xs, :(x, :(y, ys)))) -> sum^#(++(xs, sum(:(x, :(y, ys))))) , sum^#(++(xs, :(x, :(y, ys)))) -> sum^#(:(x, :(y, ys))) , sum^#(:(x, :(y, xs))) -> c_4(sum^#(:(+(x, y), xs)), +^#(x, y)) , avg^#(xs) -> sum^#(xs) } Weak Trs: { +(0(), y) -> y , +(s(x), y) -> s(+(x, y)) , ++(nil(), ys) -> ys , ++(:(x, xs), ys) -> :(x, ++(xs, ys)) , sum(++(xs, :(x, :(y, ys)))) -> sum(++(xs, sum(:(x, :(y, ys))))) , sum(:(x, nil())) -> :(x, nil()) , sum(:(x, :(y, xs))) -> sum(:(+(x, y), xs)) } 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. { sum^#(++(xs, :(x, :(y, ys)))) -> sum^#(++(xs, sum(:(x, :(y, ys))))) , sum^#(++(xs, :(x, :(y, ys)))) -> sum^#(:(x, :(y, ys))) , sum^#(:(x, :(y, xs))) -> c_4(sum^#(:(+(x, y), xs)), +^#(x, y)) , avg^#(xs) -> sum^#(xs) } We are left with following problem, upon which TcT provides the certificate YES(O(1),O(1)). Weak Trs: { +(0(), y) -> y , +(s(x), y) -> s(+(x, y)) , ++(nil(), ys) -> ys , ++(:(x, xs), ys) -> :(x, ++(xs, ys)) , sum(++(xs, :(x, :(y, ys)))) -> sum(++(xs, sum(:(x, :(y, ys))))) , sum(:(x, nil())) -> :(x, nil()) , sum(:(x, :(y, xs))) -> sum(:(+(x, y), xs)) } Obligation: innermost runtime complexity Answer: YES(O(1),O(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(1)). Rules: Empty Obligation: innermost runtime complexity Answer: YES(O(1),O(1)) Empty rules are trivially bounded We return to the main proof. We are left with following problem, upon which TcT provides the certificate YES(O(1),O(n^1)). Strict DPs: { +^#(s(x), y) -> c_1(+^#(x, y)) } Weak DPs: { sum^#(++(xs, :(x, :(y, ys)))) -> sum^#(++(xs, sum(:(x, :(y, ys))))) , sum^#(++(xs, :(x, :(y, ys)))) -> sum^#(:(x, :(y, ys))) , sum^#(:(x, :(y, xs))) -> +^#(x, y) , sum^#(:(x, :(y, xs))) -> sum^#(:(+(x, y), xs)) , avg^#(xs) -> sum^#(xs) } Weak Trs: { +(0(), y) -> y , +(s(x), y) -> s(+(x, y)) , ++(nil(), ys) -> ys , ++(:(x, xs), ys) -> :(x, ++(xs, ys)) , sum(++(xs, :(x, :(y, ys)))) -> sum(++(xs, sum(:(x, :(y, ys))))) , sum(:(x, nil())) -> :(x, nil()) , sum(:(x, :(y, xs))) -> sum(:(+(x, y), xs)) } Obligation: innermost runtime complexity Answer: YES(O(1),O(n^1)) We use the processor 'matrix interpretation of dimension 1' to orient following rules strictly. DPs: { 1: +^#(s(x), y) -> c_1(+^#(x, y)) , 3: sum^#(++(xs, :(x, :(y, ys)))) -> sum^#(:(x, :(y, ys))) , 6: avg^#(xs) -> sum^#(xs) } Trs: { ++(nil(), ys) -> ys } Sub-proof: ---------- The following argument positions are usable: Uargs(c_1) = {1} TcT has computed the following constructor-based matrix interpretation satisfying not(EDA). [+](x1, x2) = [1] x1 + [1] x2 + [0] [0] = [0] [s](x1) = [1] x1 + [2] [++](x1, x2) = [2] x1 + [1] x2 + [1] [nil] = [5] [:](x1, x2) = [1] x1 + [1] x2 + [0] [sum](x1) = [1] x1 + [0] [+^#](x1, x2) = [1] x1 + [5] [sum^#](x1) = [4] x1 + [5] [avg^#](x1) = [7] x1 + [7] [c_1](x1) = [1] x1 + [0] The order satisfies the following ordering constraints: [+(0(), y)] = [1] y + [0] >= [1] y + [0] = [y] [+(s(x), y)] = [1] y + [1] x + [2] >= [1] y + [1] x + [2] = [s(+(x, y))] [++(nil(), ys)] = [1] ys + [11] > [1] ys + [0] = [ys] [++(:(x, xs), ys)] = [2] x + [1] ys + [2] xs + [1] >= [1] x + [1] ys + [2] xs + [1] = [:(x, ++(xs, ys))] [sum(++(xs, :(x, :(y, ys))))] = [1] y + [1] x + [1] ys + [2] xs + [1] >= [1] y + [1] x + [1] ys + [2] xs + [1] = [sum(++(xs, sum(:(x, :(y, ys)))))] [sum(:(x, nil()))] = [1] x + [5] >= [1] x + [5] = [:(x, nil())] [sum(:(x, :(y, xs)))] = [1] y + [1] x + [1] xs + [0] >= [1] y + [1] x + [1] xs + [0] = [sum(:(+(x, y), xs))] [+^#(s(x), y)] = [1] x + [7] > [1] x + [5] = [c_1(+^#(x, y))] [sum^#(++(xs, :(x, :(y, ys))))] = [4] y + [4] x + [4] ys + [8] xs + [9] >= [4] y + [4] x + [4] ys + [8] xs + [9] = [sum^#(++(xs, sum(:(x, :(y, ys)))))] [sum^#(++(xs, :(x, :(y, ys))))] = [4] y + [4] x + [4] ys + [8] xs + [9] > [4] y + [4] x + [4] ys + [5] = [sum^#(:(x, :(y, ys)))] [sum^#(:(x, :(y, xs)))] = [4] y + [4] x + [4] xs + [5] >= [1] x + [5] = [+^#(x, y)] [sum^#(:(x, :(y, xs)))] = [4] y + [4] x + [4] xs + [5] >= [4] y + [4] x + [4] xs + [5] = [sum^#(:(+(x, y), xs))] [avg^#(xs)] = [7] xs + [7] > [4] xs + [5] = [sum^#(xs)] The strictly oriented rules are moved into the weak component. We are left with following problem, upon which TcT provides the certificate YES(O(1),O(1)). Weak DPs: { +^#(s(x), y) -> c_1(+^#(x, y)) , sum^#(++(xs, :(x, :(y, ys)))) -> sum^#(++(xs, sum(:(x, :(y, ys))))) , sum^#(++(xs, :(x, :(y, ys)))) -> sum^#(:(x, :(y, ys))) , sum^#(:(x, :(y, xs))) -> +^#(x, y) , sum^#(:(x, :(y, xs))) -> sum^#(:(+(x, y), xs)) , avg^#(xs) -> sum^#(xs) } Weak Trs: { +(0(), y) -> y , +(s(x), y) -> s(+(x, y)) , ++(nil(), ys) -> ys , ++(:(x, xs), ys) -> :(x, ++(xs, ys)) , sum(++(xs, :(x, :(y, ys)))) -> sum(++(xs, sum(:(x, :(y, ys))))) , sum(:(x, nil())) -> :(x, nil()) , sum(:(x, :(y, xs))) -> sum(:(+(x, y), xs)) } 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. { +^#(s(x), y) -> c_1(+^#(x, y)) , sum^#(++(xs, :(x, :(y, ys)))) -> sum^#(++(xs, sum(:(x, :(y, ys))))) , sum^#(++(xs, :(x, :(y, ys)))) -> sum^#(:(x, :(y, ys))) , sum^#(:(x, :(y, xs))) -> +^#(x, y) , sum^#(:(x, :(y, xs))) -> sum^#(:(+(x, y), xs)) , avg^#(xs) -> sum^#(xs) } We are left with following problem, upon which TcT provides the certificate YES(O(1),O(1)). Weak Trs: { +(0(), y) -> y , +(s(x), y) -> s(+(x, y)) , ++(nil(), ys) -> ys , ++(:(x, xs), ys) -> :(x, ++(xs, ys)) , sum(++(xs, :(x, :(y, ys)))) -> sum(++(xs, sum(:(x, :(y, ys))))) , sum(:(x, nil())) -> :(x, nil()) , sum(:(x, :(y, xs))) -> sum(:(+(x, y), xs)) } Obligation: innermost runtime complexity Answer: YES(O(1),O(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(1)). Rules: Empty Obligation: innermost runtime complexity Answer: YES(O(1),O(1)) Empty rules are trivially bounded S) We are left with following problem, upon which TcT provides the certificate YES(O(1),O(n^1)). Strict DPs: { ++^#(:(x, xs), ys) -> c_2(++^#(xs, ys)) , sum^#(++(xs, :(x, :(y, ys)))) -> c_3(sum^#(++(xs, sum(:(x, :(y, ys))))), sum^#(:(x, :(y, ys)))) } Weak DPs: { +^#(s(x), y) -> c_1(+^#(x, y)) , sum^#(:(x, :(y, xs))) -> c_4(sum^#(:(+(x, y), xs)), +^#(x, y)) , avg^#(xs) -> c_5(sum^#(xs)) } Weak Trs: { +(0(), y) -> y , +(s(x), y) -> s(+(x, y)) , ++(nil(), ys) -> ys , ++(:(x, xs), ys) -> :(x, ++(xs, ys)) , sum(++(xs, :(x, :(y, ys)))) -> sum(++(xs, sum(:(x, :(y, ys))))) , sum(:(x, nil())) -> :(x, nil()) , sum(:(x, :(y, xs))) -> sum(:(+(x, y), xs)) } Obligation: innermost runtime complexity Answer: YES(O(1),O(n^1)) The following weak DPs constitute a sub-graph of the DG that is closed under successors. The DPs are removed. { +^#(s(x), y) -> c_1(+^#(x, y)) , sum^#(:(x, :(y, xs))) -> c_4(sum^#(:(+(x, y), xs)), +^#(x, y)) } We are left with following problem, upon which TcT provides the certificate YES(O(1),O(n^1)). Strict DPs: { ++^#(:(x, xs), ys) -> c_2(++^#(xs, ys)) , sum^#(++(xs, :(x, :(y, ys)))) -> c_3(sum^#(++(xs, sum(:(x, :(y, ys))))), sum^#(:(x, :(y, ys)))) } Weak DPs: { avg^#(xs) -> c_5(sum^#(xs)) } Weak Trs: { +(0(), y) -> y , +(s(x), y) -> s(+(x, y)) , ++(nil(), ys) -> ys , ++(:(x, xs), ys) -> :(x, ++(xs, ys)) , sum(++(xs, :(x, :(y, ys)))) -> sum(++(xs, sum(:(x, :(y, ys))))) , sum(:(x, nil())) -> :(x, nil()) , sum(:(x, :(y, xs))) -> sum(:(+(x, y), xs)) } Obligation: innermost runtime complexity Answer: YES(O(1),O(n^1)) Due to missing edges in the dependency-graph, the right-hand sides of following rules could be simplified: { sum^#(++(xs, :(x, :(y, ys)))) -> c_3(sum^#(++(xs, sum(:(x, :(y, ys))))), sum^#(:(x, :(y, ys)))) } We are left with following problem, upon which TcT provides the certificate YES(O(1),O(n^1)). Strict DPs: { ++^#(:(x, xs), ys) -> c_1(++^#(xs, ys)) , sum^#(++(xs, :(x, :(y, ys)))) -> c_2(sum^#(++(xs, sum(:(x, :(y, ys)))))) } Weak DPs: { avg^#(xs) -> c_3(sum^#(xs)) } Weak Trs: { +(0(), y) -> y , +(s(x), y) -> s(+(x, y)) , ++(nil(), ys) -> ys , ++(:(x, xs), ys) -> :(x, ++(xs, ys)) , sum(++(xs, :(x, :(y, ys)))) -> sum(++(xs, sum(:(x, :(y, ys))))) , sum(:(x, nil())) -> :(x, nil()) , sum(:(x, :(y, xs))) -> sum(:(+(x, y), xs)) } Obligation: innermost runtime complexity Answer: YES(O(1),O(n^1)) We analyse the complexity of following sub-problems (R) and (S). Problem (S) is obtained from the input problem by shifting strict rules from (R) into the weak component: Problem (R): ------------ Strict DPs: { sum^#(++(xs, :(x, :(y, ys)))) -> c_2(sum^#(++(xs, sum(:(x, :(y, ys)))))) } Weak DPs: { ++^#(:(x, xs), ys) -> c_1(++^#(xs, ys)) , avg^#(xs) -> c_3(sum^#(xs)) } Weak Trs: { +(0(), y) -> y , +(s(x), y) -> s(+(x, y)) , ++(nil(), ys) -> ys , ++(:(x, xs), ys) -> :(x, ++(xs, ys)) , sum(++(xs, :(x, :(y, ys)))) -> sum(++(xs, sum(:(x, :(y, ys))))) , sum(:(x, nil())) -> :(x, nil()) , sum(:(x, :(y, xs))) -> sum(:(+(x, y), xs)) } StartTerms: basic terms Strategy: innermost Problem (S): ------------ Strict DPs: { ++^#(:(x, xs), ys) -> c_1(++^#(xs, ys)) } Weak DPs: { sum^#(++(xs, :(x, :(y, ys)))) -> c_2(sum^#(++(xs, sum(:(x, :(y, ys)))))) , avg^#(xs) -> c_3(sum^#(xs)) } Weak Trs: { +(0(), y) -> y , +(s(x), y) -> s(+(x, y)) , ++(nil(), ys) -> ys , ++(:(x, xs), ys) -> :(x, ++(xs, ys)) , sum(++(xs, :(x, :(y, ys)))) -> sum(++(xs, sum(:(x, :(y, ys))))) , sum(:(x, nil())) -> :(x, nil()) , sum(:(x, :(y, xs))) -> sum(:(+(x, y), xs)) } StartTerms: basic terms Strategy: innermost Overall, the transformation results in the following sub-problem(s): Generated new problems: ----------------------- R) Strict DPs: { sum^#(++(xs, :(x, :(y, ys)))) -> c_2(sum^#(++(xs, sum(:(x, :(y, ys)))))) } Weak DPs: { ++^#(:(x, xs), ys) -> c_1(++^#(xs, ys)) , avg^#(xs) -> c_3(sum^#(xs)) } Weak Trs: { +(0(), y) -> y , +(s(x), y) -> s(+(x, y)) , ++(nil(), ys) -> ys , ++(:(x, xs), ys) -> :(x, ++(xs, ys)) , sum(++(xs, :(x, :(y, ys)))) -> sum(++(xs, sum(:(x, :(y, ys))))) , sum(:(x, nil())) -> :(x, nil()) , sum(:(x, :(y, xs))) -> sum(:(+(x, y), xs)) } StartTerms: basic terms Strategy: innermost This problem was proven YES(O(1),O(n^1)). S) Strict DPs: { ++^#(:(x, xs), ys) -> c_1(++^#(xs, ys)) } Weak DPs: { sum^#(++(xs, :(x, :(y, ys)))) -> c_2(sum^#(++(xs, sum(:(x, :(y, ys)))))) , avg^#(xs) -> c_3(sum^#(xs)) } Weak Trs: { +(0(), y) -> y , +(s(x), y) -> s(+(x, y)) , ++(nil(), ys) -> ys , ++(:(x, xs), ys) -> :(x, ++(xs, ys)) , sum(++(xs, :(x, :(y, ys)))) -> sum(++(xs, sum(:(x, :(y, ys))))) , sum(:(x, nil())) -> :(x, nil()) , sum(:(x, :(y, xs))) -> sum(:(+(x, y), xs)) } StartTerms: basic terms Strategy: innermost This problem was proven YES(O(1),O(n^1)). Proofs for generated problems: ------------------------------ R) We are left with following problem, upon which TcT provides the certificate YES(O(1),O(n^1)). Strict DPs: { sum^#(++(xs, :(x, :(y, ys)))) -> c_2(sum^#(++(xs, sum(:(x, :(y, ys)))))) } Weak DPs: { ++^#(:(x, xs), ys) -> c_1(++^#(xs, ys)) , avg^#(xs) -> c_3(sum^#(xs)) } Weak Trs: { +(0(), y) -> y , +(s(x), y) -> s(+(x, y)) , ++(nil(), ys) -> ys , ++(:(x, xs), ys) -> :(x, ++(xs, ys)) , sum(++(xs, :(x, :(y, ys)))) -> sum(++(xs, sum(:(x, :(y, ys))))) , sum(:(x, nil())) -> :(x, nil()) , sum(:(x, :(y, xs))) -> sum(:(+(x, y), xs)) } Obligation: innermost runtime complexity Answer: YES(O(1),O(n^1)) The following weak DPs constitute a sub-graph of the DG that is closed under successors. The DPs are removed. { ++^#(:(x, xs), ys) -> c_1(++^#(xs, ys)) } We are left with following problem, upon which TcT provides the certificate YES(O(1),O(n^1)). Strict DPs: { sum^#(++(xs, :(x, :(y, ys)))) -> c_2(sum^#(++(xs, sum(:(x, :(y, ys)))))) } Weak DPs: { avg^#(xs) -> c_3(sum^#(xs)) } Weak Trs: { +(0(), y) -> y , +(s(x), y) -> s(+(x, y)) , ++(nil(), ys) -> ys , ++(:(x, xs), ys) -> :(x, ++(xs, ys)) , sum(++(xs, :(x, :(y, ys)))) -> sum(++(xs, sum(:(x, :(y, ys))))) , sum(:(x, nil())) -> :(x, nil()) , sum(:(x, :(y, xs))) -> sum(:(+(x, y), xs)) } Obligation: innermost runtime complexity Answer: YES(O(1),O(n^1)) We use the processor 'matrix interpretation of dimension 1' to orient following rules strictly. DPs: { 1: sum^#(++(xs, :(x, :(y, ys)))) -> c_2(sum^#(++(xs, sum(:(x, :(y, ys)))))) } Trs: { ++(:(x, xs), ys) -> :(x, ++(xs, ys)) } Sub-proof: ---------- The following argument positions are usable: Uargs(c_2) = {1}, Uargs(c_3) = {1} TcT has computed the following constructor-based matrix interpretation satisfying not(EDA). [+](x1, x2) = [2] x2 + [0] [0] = [0] [s](x1) = [0] [++](x1, x2) = [2] x1 + [5] x2 + [0] [nil] = [0] [:](x1, x2) = [1] x2 + [1] [sum](x1) = [1] [sum^#](x1) = [1] x1 + [3] [avg^#](x1) = [7] x1 + [7] [c_2](x1) = [1] x1 + [0] [c_3](x1) = [1] x1 + [4] The order satisfies the following ordering constraints: [+(0(), y)] = [2] y + [0] >= [1] y + [0] = [y] [+(s(x), y)] = [2] y + [0] >= [0] = [s(+(x, y))] [++(nil(), ys)] = [5] ys + [0] >= [1] ys + [0] = [ys] [++(:(x, xs), ys)] = [5] ys + [2] xs + [2] > [5] ys + [2] xs + [1] = [:(x, ++(xs, ys))] [sum(++(xs, :(x, :(y, ys))))] = [1] >= [1] = [sum(++(xs, sum(:(x, :(y, ys)))))] [sum(:(x, nil()))] = [1] >= [1] = [:(x, nil())] [sum(:(x, :(y, xs)))] = [1] >= [1] = [sum(:(+(x, y), xs))] [sum^#(++(xs, :(x, :(y, ys))))] = [5] ys + [2] xs + [13] > [2] xs + [8] = [c_2(sum^#(++(xs, sum(:(x, :(y, ys))))))] [avg^#(xs)] = [7] xs + [7] >= [1] xs + [7] = [c_3(sum^#(xs))] We return to the main proof. Consider the set of all dependency pairs : { 1: sum^#(++(xs, :(x, :(y, ys)))) -> c_2(sum^#(++(xs, sum(:(x, :(y, ys)))))) , 2: avg^#(xs) -> c_3(sum^#(xs)) } Processor 'matrix interpretation of dimension 1' induces the complexity certificate YES(?,O(n^1)) on application of dependency pairs {1}. These cover all (indirect) predecessors of dependency pairs {1,2}, their number of application is equally bounded. The dependency pairs are shifted into the weak component. We are left with following problem, upon which TcT provides the certificate YES(O(1),O(1)). Weak DPs: { sum^#(++(xs, :(x, :(y, ys)))) -> c_2(sum^#(++(xs, sum(:(x, :(y, ys)))))) , avg^#(xs) -> c_3(sum^#(xs)) } Weak Trs: { +(0(), y) -> y , +(s(x), y) -> s(+(x, y)) , ++(nil(), ys) -> ys , ++(:(x, xs), ys) -> :(x, ++(xs, ys)) , sum(++(xs, :(x, :(y, ys)))) -> sum(++(xs, sum(:(x, :(y, ys))))) , sum(:(x, nil())) -> :(x, nil()) , sum(:(x, :(y, xs))) -> sum(:(+(x, y), xs)) } 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. { sum^#(++(xs, :(x, :(y, ys)))) -> c_2(sum^#(++(xs, sum(:(x, :(y, ys)))))) , avg^#(xs) -> c_3(sum^#(xs)) } We are left with following problem, upon which TcT provides the certificate YES(O(1),O(1)). Weak Trs: { +(0(), y) -> y , +(s(x), y) -> s(+(x, y)) , ++(nil(), ys) -> ys , ++(:(x, xs), ys) -> :(x, ++(xs, ys)) , sum(++(xs, :(x, :(y, ys)))) -> sum(++(xs, sum(:(x, :(y, ys))))) , sum(:(x, nil())) -> :(x, nil()) , sum(:(x, :(y, xs))) -> sum(:(+(x, y), xs)) } Obligation: innermost runtime complexity Answer: YES(O(1),O(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(1)). Rules: Empty Obligation: innermost runtime complexity Answer: YES(O(1),O(1)) Empty rules are trivially bounded S) We are left with following problem, upon which TcT provides the certificate YES(O(1),O(n^1)). Strict DPs: { ++^#(:(x, xs), ys) -> c_1(++^#(xs, ys)) } Weak DPs: { sum^#(++(xs, :(x, :(y, ys)))) -> c_2(sum^#(++(xs, sum(:(x, :(y, ys)))))) , avg^#(xs) -> c_3(sum^#(xs)) } Weak Trs: { +(0(), y) -> y , +(s(x), y) -> s(+(x, y)) , ++(nil(), ys) -> ys , ++(:(x, xs), ys) -> :(x, ++(xs, ys)) , sum(++(xs, :(x, :(y, ys)))) -> sum(++(xs, sum(:(x, :(y, ys))))) , sum(:(x, nil())) -> :(x, nil()) , sum(:(x, :(y, xs))) -> sum(:(+(x, y), xs)) } Obligation: innermost runtime complexity Answer: YES(O(1),O(n^1)) The following weak DPs constitute a sub-graph of the DG that is closed under successors. The DPs are removed. { sum^#(++(xs, :(x, :(y, ys)))) -> c_2(sum^#(++(xs, sum(:(x, :(y, ys)))))) , avg^#(xs) -> c_3(sum^#(xs)) } We are left with following problem, upon which TcT provides the certificate YES(O(1),O(n^1)). Strict DPs: { ++^#(:(x, xs), ys) -> c_1(++^#(xs, ys)) } Weak Trs: { +(0(), y) -> y , +(s(x), y) -> s(+(x, y)) , ++(nil(), ys) -> ys , ++(:(x, xs), ys) -> :(x, ++(xs, ys)) , sum(++(xs, :(x, :(y, ys)))) -> sum(++(xs, sum(:(x, :(y, ys))))) , sum(:(x, nil())) -> :(x, nil()) , sum(:(x, :(y, xs))) -> sum(:(+(x, y), xs)) } 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: { ++^#(:(x, xs), ys) -> c_1(++^#(xs, ys)) } Obligation: innermost runtime complexity Answer: YES(O(1),O(n^1)) We use the processor 'Small Polynomial Path Order (PS,1-bounded)' to orient following rules strictly. DPs: { 1: ++^#(:(x, xs), ys) -> c_1(++^#(xs, ys)) } Sub-proof: ---------- The input was oriented with the instance of 'Small Polynomial Path Order (PS,1-bounded)' as induced by the safe mapping safe(:) = {1, 2}, safe(++^#) = {}, safe(c_1) = {} and precedence empty . Following symbols are considered recursive: {++^#} The recursion depth is 1. Further, following argument filtering is employed: pi(:) = [2], pi(++^#) = [1, 2], pi(c_1) = [1] Usable defined function symbols are a subset of: {++^#} For your convenience, here are the satisfied ordering constraints: pi(++^#(:(x, xs), ys)) = ++^#(:(; xs), ys;) > c_1(++^#(xs, ys;);) = pi(c_1(++^#(xs, ys))) The strictly oriented rules are moved into the weak component. We are left with following problem, upon which TcT provides the certificate YES(O(1),O(1)). Weak DPs: { ++^#(:(x, xs), ys) -> c_1(++^#(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. { ++^#(:(x, xs), ys) -> c_1(++^#(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^3))