WORST_CASE(Omega(n^1),O(n^3)) * Step 1: Sum WORST_CASE(Omega(n^1),O(n^3)) + Considered Problem: - Strict TRS: +(x,+(y,z)) -> +(+(x,y),z) +(x,0()) -> x +(x,s(y)) -> s(+(x,y)) +(0(),y) -> y +(s(x),y) -> s(+(x,y)) f(g(f(x))) -> f(h(s(0()),x)) f(g(h(x,y))) -> f(h(s(x),y)) f(h(x,h(y,z))) -> f(h(+(x,y),z)) - Signature: {+/2,f/1} / {0/0,g/1,h/2,s/1} - Obligation: innermost runtime complexity wrt. defined symbols {+,f} and constructors {0,g,h,s} + Applied Processor: Sum {left = someStrategy, right = someStrategy} + Details: () ** Step 1.a:1: DecreasingLoops WORST_CASE(Omega(n^1),?) + Considered Problem: - Strict TRS: +(x,+(y,z)) -> +(+(x,y),z) +(x,0()) -> x +(x,s(y)) -> s(+(x,y)) +(0(),y) -> y +(s(x),y) -> s(+(x,y)) f(g(f(x))) -> f(h(s(0()),x)) f(g(h(x,y))) -> f(h(s(x),y)) f(h(x,h(y,z))) -> f(h(+(x,y),z)) - Signature: {+/2,f/1} / {0/0,g/1,h/2,s/1} - Obligation: innermost runtime complexity wrt. defined symbols {+,f} and constructors {0,g,h,s} + Applied Processor: DecreasingLoops {bound = AnyLoop, narrow = 10} + Details: The system has following decreasing Loops: +(x,y){y -> s(y)} = +(x,s(y)) ->^+ s(+(x,y)) = C[+(x,y) = +(x,y){}] ** Step 1.b:1: DependencyPairs WORST_CASE(?,O(n^3)) + Considered Problem: - Strict TRS: +(x,+(y,z)) -> +(+(x,y),z) +(x,0()) -> x +(x,s(y)) -> s(+(x,y)) +(0(),y) -> y +(s(x),y) -> s(+(x,y)) f(g(f(x))) -> f(h(s(0()),x)) f(g(h(x,y))) -> f(h(s(x),y)) f(h(x,h(y,z))) -> f(h(+(x,y),z)) - Signature: {+/2,f/1} / {0/0,g/1,h/2,s/1} - Obligation: innermost runtime complexity wrt. defined symbols {+,f} and constructors {0,g,h,s} + Applied Processor: DependencyPairs {dpKind_ = DT} + Details: We add the following dependency tuples: Strict DPs +#(x,+(y,z)) -> c_1(+#(+(x,y),z),+#(x,y)) +#(x,0()) -> c_2() +#(x,s(y)) -> c_3(+#(x,y)) +#(0(),y) -> c_4() +#(s(x),y) -> c_5(+#(x,y)) f#(g(f(x))) -> c_6(f#(h(s(0()),x))) f#(g(h(x,y))) -> c_7(f#(h(s(x),y))) f#(h(x,h(y,z))) -> c_8(f#(h(+(x,y),z)),+#(x,y)) Weak DPs and mark the set of starting terms. ** Step 1.b:2: PredecessorEstimation WORST_CASE(?,O(n^3)) + Considered Problem: - Strict DPs: +#(x,+(y,z)) -> c_1(+#(+(x,y),z),+#(x,y)) +#(x,0()) -> c_2() +#(x,s(y)) -> c_3(+#(x,y)) +#(0(),y) -> c_4() +#(s(x),y) -> c_5(+#(x,y)) f#(g(f(x))) -> c_6(f#(h(s(0()),x))) f#(g(h(x,y))) -> c_7(f#(h(s(x),y))) f#(h(x,h(y,z))) -> c_8(f#(h(+(x,y),z)),+#(x,y)) - Weak TRS: +(x,+(y,z)) -> +(+(x,y),z) +(x,0()) -> x +(x,s(y)) -> s(+(x,y)) +(0(),y) -> y +(s(x),y) -> s(+(x,y)) f(g(f(x))) -> f(h(s(0()),x)) f(g(h(x,y))) -> f(h(s(x),y)) f(h(x,h(y,z))) -> f(h(+(x,y),z)) - Signature: {+/2,f/1,+#/2,f#/1} / {0/0,g/1,h/2,s/1,c_1/2,c_2/0,c_3/1,c_4/0,c_5/1,c_6/1,c_7/1,c_8/2} - Obligation: innermost runtime complexity wrt. defined symbols {+#,f#} and constructors {0,g,h,s} + Applied Processor: PredecessorEstimation {onSelection = all simple predecessor estimation selector} + Details: We estimate the number of application of {2,4} by application of Pre({2,4}) = {1,3,5,8}. Here rules are labelled as follows: 1: +#(x,+(y,z)) -> c_1(+#(+(x,y),z),+#(x,y)) 2: +#(x,0()) -> c_2() 3: +#(x,s(y)) -> c_3(+#(x,y)) 4: +#(0(),y) -> c_4() 5: +#(s(x),y) -> c_5(+#(x,y)) 6: f#(g(f(x))) -> c_6(f#(h(s(0()),x))) 7: f#(g(h(x,y))) -> c_7(f#(h(s(x),y))) 8: f#(h(x,h(y,z))) -> c_8(f#(h(+(x,y),z)),+#(x,y)) ** Step 1.b:3: RemoveWeakSuffixes WORST_CASE(?,O(n^3)) + Considered Problem: - Strict DPs: +#(x,+(y,z)) -> c_1(+#(+(x,y),z),+#(x,y)) +#(x,s(y)) -> c_3(+#(x,y)) +#(s(x),y) -> c_5(+#(x,y)) f#(g(f(x))) -> c_6(f#(h(s(0()),x))) f#(g(h(x,y))) -> c_7(f#(h(s(x),y))) f#(h(x,h(y,z))) -> c_8(f#(h(+(x,y),z)),+#(x,y)) - Weak DPs: +#(x,0()) -> c_2() +#(0(),y) -> c_4() - Weak TRS: +(x,+(y,z)) -> +(+(x,y),z) +(x,0()) -> x +(x,s(y)) -> s(+(x,y)) +(0(),y) -> y +(s(x),y) -> s(+(x,y)) f(g(f(x))) -> f(h(s(0()),x)) f(g(h(x,y))) -> f(h(s(x),y)) f(h(x,h(y,z))) -> f(h(+(x,y),z)) - Signature: {+/2,f/1,+#/2,f#/1} / {0/0,g/1,h/2,s/1,c_1/2,c_2/0,c_3/1,c_4/0,c_5/1,c_6/1,c_7/1,c_8/2} - Obligation: innermost runtime complexity wrt. defined symbols {+#,f#} and constructors {0,g,h,s} + Applied Processor: RemoveWeakSuffixes + Details: Consider the dependency graph 1:S:+#(x,+(y,z)) -> c_1(+#(+(x,y),z),+#(x,y)) -->_2 +#(s(x),y) -> c_5(+#(x,y)):3 -->_1 +#(s(x),y) -> c_5(+#(x,y)):3 -->_2 +#(x,s(y)) -> c_3(+#(x,y)):2 -->_1 +#(x,s(y)) -> c_3(+#(x,y)):2 -->_2 +#(0(),y) -> c_4():8 -->_1 +#(0(),y) -> c_4():8 -->_2 +#(x,0()) -> c_2():7 -->_1 +#(x,0()) -> c_2():7 -->_2 +#(x,+(y,z)) -> c_1(+#(+(x,y),z),+#(x,y)):1 -->_1 +#(x,+(y,z)) -> c_1(+#(+(x,y),z),+#(x,y)):1 2:S:+#(x,s(y)) -> c_3(+#(x,y)) -->_1 +#(s(x),y) -> c_5(+#(x,y)):3 -->_1 +#(0(),y) -> c_4():8 -->_1 +#(x,0()) -> c_2():7 -->_1 +#(x,s(y)) -> c_3(+#(x,y)):2 -->_1 +#(x,+(y,z)) -> c_1(+#(+(x,y),z),+#(x,y)):1 3:S:+#(s(x),y) -> c_5(+#(x,y)) -->_1 +#(0(),y) -> c_4():8 -->_1 +#(x,0()) -> c_2():7 -->_1 +#(s(x),y) -> c_5(+#(x,y)):3 -->_1 +#(x,s(y)) -> c_3(+#(x,y)):2 -->_1 +#(x,+(y,z)) -> c_1(+#(+(x,y),z),+#(x,y)):1 4:S:f#(g(f(x))) -> c_6(f#(h(s(0()),x))) -->_1 f#(h(x,h(y,z))) -> c_8(f#(h(+(x,y),z)),+#(x,y)):6 5:S:f#(g(h(x,y))) -> c_7(f#(h(s(x),y))) -->_1 f#(h(x,h(y,z))) -> c_8(f#(h(+(x,y),z)),+#(x,y)):6 6:S:f#(h(x,h(y,z))) -> c_8(f#(h(+(x,y),z)),+#(x,y)) -->_2 +#(0(),y) -> c_4():8 -->_2 +#(x,0()) -> c_2():7 -->_1 f#(h(x,h(y,z))) -> c_8(f#(h(+(x,y),z)),+#(x,y)):6 -->_2 +#(s(x),y) -> c_5(+#(x,y)):3 -->_2 +#(x,s(y)) -> c_3(+#(x,y)):2 -->_2 +#(x,+(y,z)) -> c_1(+#(+(x,y),z),+#(x,y)):1 7:W:+#(x,0()) -> c_2() 8:W:+#(0(),y) -> c_4() The following weak DPs constitute a sub-graph of the DG that is closed under successors. The DPs are removed. 7: +#(x,0()) -> c_2() 8: +#(0(),y) -> c_4() ** Step 1.b:4: RemoveHeads WORST_CASE(?,O(n^3)) + Considered Problem: - Strict DPs: +#(x,+(y,z)) -> c_1(+#(+(x,y),z),+#(x,y)) +#(x,s(y)) -> c_3(+#(x,y)) +#(s(x),y) -> c_5(+#(x,y)) f#(g(f(x))) -> c_6(f#(h(s(0()),x))) f#(g(h(x,y))) -> c_7(f#(h(s(x),y))) f#(h(x,h(y,z))) -> c_8(f#(h(+(x,y),z)),+#(x,y)) - Weak TRS: +(x,+(y,z)) -> +(+(x,y),z) +(x,0()) -> x +(x,s(y)) -> s(+(x,y)) +(0(),y) -> y +(s(x),y) -> s(+(x,y)) f(g(f(x))) -> f(h(s(0()),x)) f(g(h(x,y))) -> f(h(s(x),y)) f(h(x,h(y,z))) -> f(h(+(x,y),z)) - Signature: {+/2,f/1,+#/2,f#/1} / {0/0,g/1,h/2,s/1,c_1/2,c_2/0,c_3/1,c_4/0,c_5/1,c_6/1,c_7/1,c_8/2} - Obligation: innermost runtime complexity wrt. defined symbols {+#,f#} and constructors {0,g,h,s} + Applied Processor: RemoveHeads + Details: Consider the dependency graph 1:S:+#(x,+(y,z)) -> c_1(+#(+(x,y),z),+#(x,y)) -->_2 +#(s(x),y) -> c_5(+#(x,y)):3 -->_1 +#(s(x),y) -> c_5(+#(x,y)):3 -->_2 +#(x,s(y)) -> c_3(+#(x,y)):2 -->_1 +#(x,s(y)) -> c_3(+#(x,y)):2 -->_2 +#(x,+(y,z)) -> c_1(+#(+(x,y),z),+#(x,y)):1 -->_1 +#(x,+(y,z)) -> c_1(+#(+(x,y),z),+#(x,y)):1 2:S:+#(x,s(y)) -> c_3(+#(x,y)) -->_1 +#(s(x),y) -> c_5(+#(x,y)):3 -->_1 +#(x,s(y)) -> c_3(+#(x,y)):2 -->_1 +#(x,+(y,z)) -> c_1(+#(+(x,y),z),+#(x,y)):1 3:S:+#(s(x),y) -> c_5(+#(x,y)) -->_1 +#(s(x),y) -> c_5(+#(x,y)):3 -->_1 +#(x,s(y)) -> c_3(+#(x,y)):2 -->_1 +#(x,+(y,z)) -> c_1(+#(+(x,y),z),+#(x,y)):1 4:S:f#(g(f(x))) -> c_6(f#(h(s(0()),x))) -->_1 f#(h(x,h(y,z))) -> c_8(f#(h(+(x,y),z)),+#(x,y)):6 5:S:f#(g(h(x,y))) -> c_7(f#(h(s(x),y))) -->_1 f#(h(x,h(y,z))) -> c_8(f#(h(+(x,y),z)),+#(x,y)):6 6:S:f#(h(x,h(y,z))) -> c_8(f#(h(+(x,y),z)),+#(x,y)) -->_1 f#(h(x,h(y,z))) -> c_8(f#(h(+(x,y),z)),+#(x,y)):6 -->_2 +#(s(x),y) -> c_5(+#(x,y)):3 -->_2 +#(x,s(y)) -> c_3(+#(x,y)):2 -->_2 +#(x,+(y,z)) -> c_1(+#(+(x,y),z),+#(x,y)):1 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). [(4,f#(g(f(x))) -> c_6(f#(h(s(0()),x)))),(5,f#(g(h(x,y))) -> c_7(f#(h(s(x),y))))] ** Step 1.b:5: UsableRules WORST_CASE(?,O(n^3)) + Considered Problem: - Strict DPs: +#(x,+(y,z)) -> c_1(+#(+(x,y),z),+#(x,y)) +#(x,s(y)) -> c_3(+#(x,y)) +#(s(x),y) -> c_5(+#(x,y)) f#(h(x,h(y,z))) -> c_8(f#(h(+(x,y),z)),+#(x,y)) - Weak TRS: +(x,+(y,z)) -> +(+(x,y),z) +(x,0()) -> x +(x,s(y)) -> s(+(x,y)) +(0(),y) -> y +(s(x),y) -> s(+(x,y)) f(g(f(x))) -> f(h(s(0()),x)) f(g(h(x,y))) -> f(h(s(x),y)) f(h(x,h(y,z))) -> f(h(+(x,y),z)) - Signature: {+/2,f/1,+#/2,f#/1} / {0/0,g/1,h/2,s/1,c_1/2,c_2/0,c_3/1,c_4/0,c_5/1,c_6/1,c_7/1,c_8/2} - Obligation: innermost runtime complexity wrt. defined symbols {+#,f#} and constructors {0,g,h,s} + Applied Processor: UsableRules + Details: We replace rewrite rules by usable rules: +(x,+(y,z)) -> +(+(x,y),z) +(x,0()) -> x +(x,s(y)) -> s(+(x,y)) +(0(),y) -> y +(s(x),y) -> s(+(x,y)) +#(x,+(y,z)) -> c_1(+#(+(x,y),z),+#(x,y)) +#(x,s(y)) -> c_3(+#(x,y)) +#(s(x),y) -> c_5(+#(x,y)) f#(h(x,h(y,z))) -> c_8(f#(h(+(x,y),z)),+#(x,y)) ** Step 1.b:6: DecomposeDG WORST_CASE(?,O(n^3)) + Considered Problem: - Strict DPs: +#(x,+(y,z)) -> c_1(+#(+(x,y),z),+#(x,y)) +#(x,s(y)) -> c_3(+#(x,y)) +#(s(x),y) -> c_5(+#(x,y)) f#(h(x,h(y,z))) -> c_8(f#(h(+(x,y),z)),+#(x,y)) - Weak TRS: +(x,+(y,z)) -> +(+(x,y),z) +(x,0()) -> x +(x,s(y)) -> s(+(x,y)) +(0(),y) -> y +(s(x),y) -> s(+(x,y)) - Signature: {+/2,f/1,+#/2,f#/1} / {0/0,g/1,h/2,s/1,c_1/2,c_2/0,c_3/1,c_4/0,c_5/1,c_6/1,c_7/1,c_8/2} - Obligation: innermost runtime complexity wrt. defined symbols {+#,f#} and constructors {0,g,h,s} + Applied Processor: DecomposeDG {onSelection = all below first cut in WDG, onUpper = Nothing, onLower = Nothing} + Details: We decompose the input problem according to the dependency graph into the upper component f#(h(x,h(y,z))) -> c_8(f#(h(+(x,y),z)),+#(x,y)) and a lower component +#(x,+(y,z)) -> c_1(+#(+(x,y),z),+#(x,y)) +#(x,s(y)) -> c_3(+#(x,y)) +#(s(x),y) -> c_5(+#(x,y)) Further, following extension rules are added to the lower component. f#(h(x,h(y,z))) -> +#(x,y) f#(h(x,h(y,z))) -> f#(h(+(x,y),z)) *** Step 1.b:6.a:1: SimplifyRHS WORST_CASE(?,O(n^1)) + Considered Problem: - Strict DPs: f#(h(x,h(y,z))) -> c_8(f#(h(+(x,y),z)),+#(x,y)) - Weak TRS: +(x,+(y,z)) -> +(+(x,y),z) +(x,0()) -> x +(x,s(y)) -> s(+(x,y)) +(0(),y) -> y +(s(x),y) -> s(+(x,y)) - Signature: {+/2,f/1,+#/2,f#/1} / {0/0,g/1,h/2,s/1,c_1/2,c_2/0,c_3/1,c_4/0,c_5/1,c_6/1,c_7/1,c_8/2} - Obligation: innermost runtime complexity wrt. defined symbols {+#,f#} and constructors {0,g,h,s} + Applied Processor: SimplifyRHS + Details: Consider the dependency graph 1:S:f#(h(x,h(y,z))) -> c_8(f#(h(+(x,y),z)),+#(x,y)) -->_1 f#(h(x,h(y,z))) -> c_8(f#(h(+(x,y),z)),+#(x,y)):1 Due to missing edges in the depndency graph, the right-hand sides of following rules could be simplified: f#(h(x,h(y,z))) -> c_8(f#(h(+(x,y),z))) *** Step 1.b:6.a:2: WeightGap WORST_CASE(?,O(n^1)) + Considered Problem: - Strict DPs: f#(h(x,h(y,z))) -> c_8(f#(h(+(x,y),z))) - Weak TRS: +(x,+(y,z)) -> +(+(x,y),z) +(x,0()) -> x +(x,s(y)) -> s(+(x,y)) +(0(),y) -> y +(s(x),y) -> s(+(x,y)) - Signature: {+/2,f/1,+#/2,f#/1} / {0/0,g/1,h/2,s/1,c_1/2,c_2/0,c_3/1,c_4/0,c_5/1,c_6/1,c_7/1,c_8/1} - Obligation: innermost runtime complexity wrt. defined symbols {+#,f#} and constructors {0,g,h,s} + Applied Processor: WeightGap {wgDimension = 1, wgDegree = 1, wgKind = Algebraic, wgUArgs = UArgs, wgOn = WgOnAny} + Details: The weightgap principle applies using the following constant growth matrix-interpretation: We apply a matrix interpretation of kind constructor based matrix interpretation: The following argument positions are considered usable: uargs(+) = {1}, uargs(h) = {1}, uargs(s) = {1}, uargs(f#) = {1}, uargs(c_8) = {1} Following symbols are considered usable: all TcT has computed the following interpretation: p(+) = [1] x1 + [1] x2 + [0] p(0) = [0] p(f) = [0] p(g) = [1] x1 + [0] p(h) = [1] x1 + [1] x2 + [6] p(s) = [1] x1 + [13] p(+#) = [0] p(f#) = [1] x1 + [4] p(c_1) = [0] p(c_2) = [0] p(c_3) = [0] p(c_4) = [0] p(c_5) = [0] p(c_6) = [0] p(c_7) = [0] p(c_8) = [1] x1 + [2] Following rules are strictly oriented: f#(h(x,h(y,z))) = [1] x + [1] y + [1] z + [16] > [1] x + [1] y + [1] z + [12] = c_8(f#(h(+(x,y),z))) Following rules are (at-least) weakly oriented: +(x,+(y,z)) = [1] x + [1] y + [1] z + [0] >= [1] x + [1] y + [1] z + [0] = +(+(x,y),z) +(x,0()) = [1] x + [0] >= [1] x + [0] = x +(x,s(y)) = [1] x + [1] y + [13] >= [1] x + [1] y + [13] = s(+(x,y)) +(0(),y) = [1] y + [0] >= [1] y + [0] = y +(s(x),y) = [1] x + [1] y + [13] >= [1] x + [1] y + [13] = s(+(x,y)) Further, it can be verified that all rules not oriented are covered by the weightgap condition. *** Step 1.b:6.a:3: EmptyProcessor WORST_CASE(?,O(1)) + Considered Problem: - Weak DPs: f#(h(x,h(y,z))) -> c_8(f#(h(+(x,y),z))) - Weak TRS: +(x,+(y,z)) -> +(+(x,y),z) +(x,0()) -> x +(x,s(y)) -> s(+(x,y)) +(0(),y) -> y +(s(x),y) -> s(+(x,y)) - Signature: {+/2,f/1,+#/2,f#/1} / {0/0,g/1,h/2,s/1,c_1/2,c_2/0,c_3/1,c_4/0,c_5/1,c_6/1,c_7/1,c_8/1} - Obligation: innermost runtime complexity wrt. defined symbols {+#,f#} and constructors {0,g,h,s} + Applied Processor: EmptyProcessor + Details: The problem is already closed. The intended complexity is O(1). *** Step 1.b:6.b:1: NaturalPI WORST_CASE(?,O(n^2)) + Considered Problem: - Strict DPs: +#(x,+(y,z)) -> c_1(+#(+(x,y),z),+#(x,y)) +#(x,s(y)) -> c_3(+#(x,y)) +#(s(x),y) -> c_5(+#(x,y)) - Weak DPs: f#(h(x,h(y,z))) -> +#(x,y) f#(h(x,h(y,z))) -> f#(h(+(x,y),z)) - Weak TRS: +(x,+(y,z)) -> +(+(x,y),z) +(x,0()) -> x +(x,s(y)) -> s(+(x,y)) +(0(),y) -> y +(s(x),y) -> s(+(x,y)) - Signature: {+/2,f/1,+#/2,f#/1} / {0/0,g/1,h/2,s/1,c_1/2,c_2/0,c_3/1,c_4/0,c_5/1,c_6/1,c_7/1,c_8/2} - Obligation: innermost runtime complexity wrt. defined symbols {+#,f#} and constructors {0,g,h,s} + Applied Processor: NaturalPI {shape = Linear, restrict = Restrict, uargs = UArgs, urules = URules, selector = Just any strict-rules} + Details: We apply a polynomial interpretation of kind constructor-based(linear): The following argument positions are considered usable: uargs(c_1) = {1,2}, uargs(c_3) = {1}, uargs(c_5) = {1} Following symbols are considered usable: {+,+#,f#} TcT has computed the following interpretation: p(+) = x1 + x2 p(0) = 2 p(f) = 0 p(g) = 1 + x1 p(h) = x1 + x2 p(s) = 3 + x1 p(+#) = 4*x2 p(f#) = 4*x1 p(c_1) = x1 + x2 p(c_2) = 4 p(c_3) = 5 + x1 p(c_4) = 0 p(c_5) = x1 p(c_6) = 0 p(c_7) = 4 p(c_8) = x1 Following rules are strictly oriented: +#(x,s(y)) = 12 + 4*y > 5 + 4*y = c_3(+#(x,y)) Following rules are (at-least) weakly oriented: +#(x,+(y,z)) = 4*y + 4*z >= 4*y + 4*z = c_1(+#(+(x,y),z),+#(x,y)) +#(s(x),y) = 4*y >= 4*y = c_5(+#(x,y)) f#(h(x,h(y,z))) = 4*x + 4*y + 4*z >= 4*y = +#(x,y) f#(h(x,h(y,z))) = 4*x + 4*y + 4*z >= 4*x + 4*y + 4*z = f#(h(+(x,y),z)) +(x,+(y,z)) = x + y + z >= x + y + z = +(+(x,y),z) +(x,0()) = 2 + x >= x = x +(x,s(y)) = 3 + x + y >= 3 + x + y = s(+(x,y)) +(0(),y) = 2 + y >= y = y +(s(x),y) = 3 + x + y >= 3 + x + y = s(+(x,y)) *** Step 1.b:6.b:2: NaturalPI WORST_CASE(?,O(n^2)) + Considered Problem: - Strict DPs: +#(x,+(y,z)) -> c_1(+#(+(x,y),z),+#(x,y)) +#(s(x),y) -> c_5(+#(x,y)) - Weak DPs: +#(x,s(y)) -> c_3(+#(x,y)) f#(h(x,h(y,z))) -> +#(x,y) f#(h(x,h(y,z))) -> f#(h(+(x,y),z)) - Weak TRS: +(x,+(y,z)) -> +(+(x,y),z) +(x,0()) -> x +(x,s(y)) -> s(+(x,y)) +(0(),y) -> y +(s(x),y) -> s(+(x,y)) - Signature: {+/2,f/1,+#/2,f#/1} / {0/0,g/1,h/2,s/1,c_1/2,c_2/0,c_3/1,c_4/0,c_5/1,c_6/1,c_7/1,c_8/2} - Obligation: innermost runtime complexity wrt. defined symbols {+#,f#} and constructors {0,g,h,s} + Applied Processor: NaturalPI {shape = Linear, restrict = Restrict, uargs = UArgs, urules = URules, selector = Just any strict-rules} + Details: We apply a polynomial interpretation of kind constructor-based(linear): The following argument positions are considered usable: uargs(c_1) = {1,2}, uargs(c_3) = {1}, uargs(c_5) = {1} Following symbols are considered usable: {+,+#,f#} TcT has computed the following interpretation: p(+) = 1 + x1 + x2 p(0) = 2 p(f) = 4 + x1 p(g) = 1 + x1 p(h) = 1 + x1 + x2 p(s) = x1 p(+#) = x2 p(f#) = 1 + 4*x1 p(c_1) = x1 + x2 p(c_2) = 0 p(c_3) = x1 p(c_4) = 0 p(c_5) = x1 p(c_6) = 1 p(c_7) = 1 p(c_8) = 2 Following rules are strictly oriented: +#(x,+(y,z)) = 1 + y + z > y + z = c_1(+#(+(x,y),z),+#(x,y)) Following rules are (at-least) weakly oriented: +#(x,s(y)) = y >= y = c_3(+#(x,y)) +#(s(x),y) = y >= y = c_5(+#(x,y)) f#(h(x,h(y,z))) = 9 + 4*x + 4*y + 4*z >= y = +#(x,y) f#(h(x,h(y,z))) = 9 + 4*x + 4*y + 4*z >= 9 + 4*x + 4*y + 4*z = f#(h(+(x,y),z)) +(x,+(y,z)) = 2 + x + y + z >= 2 + x + y + z = +(+(x,y),z) +(x,0()) = 3 + x >= x = x +(x,s(y)) = 1 + x + y >= 1 + x + y = s(+(x,y)) +(0(),y) = 3 + y >= y = y +(s(x),y) = 1 + x + y >= 1 + x + y = s(+(x,y)) *** Step 1.b:6.b:3: NaturalPI WORST_CASE(?,O(n^2)) + Considered Problem: - Strict DPs: +#(s(x),y) -> c_5(+#(x,y)) - Weak DPs: +#(x,+(y,z)) -> c_1(+#(+(x,y),z),+#(x,y)) +#(x,s(y)) -> c_3(+#(x,y)) f#(h(x,h(y,z))) -> +#(x,y) f#(h(x,h(y,z))) -> f#(h(+(x,y),z)) - Weak TRS: +(x,+(y,z)) -> +(+(x,y),z) +(x,0()) -> x +(x,s(y)) -> s(+(x,y)) +(0(),y) -> y +(s(x),y) -> s(+(x,y)) - Signature: {+/2,f/1,+#/2,f#/1} / {0/0,g/1,h/2,s/1,c_1/2,c_2/0,c_3/1,c_4/0,c_5/1,c_6/1,c_7/1,c_8/2} - Obligation: innermost runtime complexity wrt. defined symbols {+#,f#} and constructors {0,g,h,s} + Applied Processor: NaturalPI {shape = Mixed 2, restrict = Restrict, uargs = UArgs, urules = URules, selector = Just any strict-rules} + Details: We apply a polynomial interpretation of kind constructor-based(mixed(2)): The following argument positions are considered usable: uargs(c_1) = {1,2}, uargs(c_3) = {1}, uargs(c_5) = {1} Following symbols are considered usable: {+,+#,f#} TcT has computed the following interpretation: p(+) = 1 + x1 + x2 p(0) = 0 p(f) = x1 p(g) = 0 p(h) = 1 + x1 + x2 p(s) = 2 + x1 p(+#) = 2*x1 + 2*x1*x2 + x2 + x2^2 p(f#) = x1 + x1^2 p(c_1) = x1 + x2 p(c_2) = 2 p(c_3) = 1 + x1 p(c_4) = 0 p(c_5) = x1 p(c_6) = 2 + x1 p(c_7) = 0 p(c_8) = 1 Following rules are strictly oriented: +#(s(x),y) = 4 + 2*x + 2*x*y + 5*y + y^2 > 2*x + 2*x*y + y + y^2 = c_5(+#(x,y)) Following rules are (at-least) weakly oriented: +#(x,+(y,z)) = 2 + 4*x + 2*x*y + 2*x*z + 3*y + 2*y*z + y^2 + 3*z + z^2 >= 2 + 4*x + 2*x*y + 2*x*z + 3*y + 2*y*z + y^2 + 3*z + z^2 = c_1(+#(+(x,y),z),+#(x,y)) +#(x,s(y)) = 6 + 6*x + 2*x*y + 5*y + y^2 >= 1 + 2*x + 2*x*y + y + y^2 = c_3(+#(x,y)) f#(h(x,h(y,z))) = 6 + 5*x + 2*x*y + 2*x*z + x^2 + 5*y + 2*y*z + y^2 + 5*z + z^2 >= 2*x + 2*x*y + y + y^2 = +#(x,y) f#(h(x,h(y,z))) = 6 + 5*x + 2*x*y + 2*x*z + x^2 + 5*y + 2*y*z + y^2 + 5*z + z^2 >= 6 + 5*x + 2*x*y + 2*x*z + x^2 + 5*y + 2*y*z + y^2 + 5*z + z^2 = f#(h(+(x,y),z)) +(x,+(y,z)) = 2 + x + y + z >= 2 + x + y + z = +(+(x,y),z) +(x,0()) = 1 + x >= x = x +(x,s(y)) = 3 + x + y >= 3 + x + y = s(+(x,y)) +(0(),y) = 1 + y >= y = y +(s(x),y) = 3 + x + y >= 3 + x + y = s(+(x,y)) *** Step 1.b:6.b:4: EmptyProcessor WORST_CASE(?,O(1)) + Considered Problem: - Weak DPs: +#(x,+(y,z)) -> c_1(+#(+(x,y),z),+#(x,y)) +#(x,s(y)) -> c_3(+#(x,y)) +#(s(x),y) -> c_5(+#(x,y)) f#(h(x,h(y,z))) -> +#(x,y) f#(h(x,h(y,z))) -> f#(h(+(x,y),z)) - Weak TRS: +(x,+(y,z)) -> +(+(x,y),z) +(x,0()) -> x +(x,s(y)) -> s(+(x,y)) +(0(),y) -> y +(s(x),y) -> s(+(x,y)) - Signature: {+/2,f/1,+#/2,f#/1} / {0/0,g/1,h/2,s/1,c_1/2,c_2/0,c_3/1,c_4/0,c_5/1,c_6/1,c_7/1,c_8/2} - Obligation: innermost runtime complexity wrt. defined symbols {+#,f#} and constructors {0,g,h,s} + Applied Processor: EmptyProcessor + Details: The problem is already closed. The intended complexity is O(1). WORST_CASE(Omega(n^1),O(n^3))