WORST_CASE(?,O(n^2)) * Step 1: DependencyPairs WORST_CASE(?,O(n^2)) + Considered Problem: - Strict TRS: +(x,0()) -> x +(x,s(y)) -> s(+(x,y)) f(0()) -> 1() f(s(x)) -> g(x,s(x)) g(0(),y) -> y g(s(x),y) -> g(x,+(y,s(x))) g(s(x),y) -> g(x,s(+(y,x))) - Signature: {+/2,f/1,g/2} / {0/0,1/0,s/1} - Obligation: innermost runtime complexity wrt. defined symbols {+,f,g} and constructors {0,1,s} + Applied Processor: DependencyPairs {dpKind_ = DT} + Details: We add the following dependency tuples: Strict DPs +#(x,0()) -> c_1() +#(x,s(y)) -> c_2(+#(x,y)) f#(0()) -> c_3() f#(s(x)) -> c_4(g#(x,s(x))) g#(0(),y) -> c_5() g#(s(x),y) -> c_6(g#(x,+(y,s(x))),+#(y,s(x))) g#(s(x),y) -> c_7(g#(x,s(+(y,x))),+#(y,x)) Weak DPs and mark the set of starting terms. * Step 2: PredecessorEstimation WORST_CASE(?,O(n^2)) + Considered Problem: - Strict DPs: +#(x,0()) -> c_1() +#(x,s(y)) -> c_2(+#(x,y)) f#(0()) -> c_3() f#(s(x)) -> c_4(g#(x,s(x))) g#(0(),y) -> c_5() g#(s(x),y) -> c_6(g#(x,+(y,s(x))),+#(y,s(x))) g#(s(x),y) -> c_7(g#(x,s(+(y,x))),+#(y,x)) - Weak TRS: +(x,0()) -> x +(x,s(y)) -> s(+(x,y)) f(0()) -> 1() f(s(x)) -> g(x,s(x)) g(0(),y) -> y g(s(x),y) -> g(x,+(y,s(x))) g(s(x),y) -> g(x,s(+(y,x))) - Signature: {+/2,f/1,g/2,+#/2,f#/1,g#/2} / {0/0,1/0,s/1,c_1/0,c_2/1,c_3/0,c_4/1,c_5/0,c_6/2,c_7/2} - Obligation: innermost runtime complexity wrt. defined symbols {+#,f#,g#} and constructors {0,1,s} + Applied Processor: PredecessorEstimation {onSelection = all simple predecessor estimation selector} + Details: We estimate the number of application of {1,3,5} by application of Pre({1,3,5}) = {2,4,6,7}. Here rules are labelled as follows: 1: +#(x,0()) -> c_1() 2: +#(x,s(y)) -> c_2(+#(x,y)) 3: f#(0()) -> c_3() 4: f#(s(x)) -> c_4(g#(x,s(x))) 5: g#(0(),y) -> c_5() 6: g#(s(x),y) -> c_6(g#(x,+(y,s(x))),+#(y,s(x))) 7: g#(s(x),y) -> c_7(g#(x,s(+(y,x))),+#(y,x)) * Step 3: RemoveWeakSuffixes WORST_CASE(?,O(n^2)) + Considered Problem: - Strict DPs: +#(x,s(y)) -> c_2(+#(x,y)) f#(s(x)) -> c_4(g#(x,s(x))) g#(s(x),y) -> c_6(g#(x,+(y,s(x))),+#(y,s(x))) g#(s(x),y) -> c_7(g#(x,s(+(y,x))),+#(y,x)) - Weak DPs: +#(x,0()) -> c_1() f#(0()) -> c_3() g#(0(),y) -> c_5() - Weak TRS: +(x,0()) -> x +(x,s(y)) -> s(+(x,y)) f(0()) -> 1() f(s(x)) -> g(x,s(x)) g(0(),y) -> y g(s(x),y) -> g(x,+(y,s(x))) g(s(x),y) -> g(x,s(+(y,x))) - Signature: {+/2,f/1,g/2,+#/2,f#/1,g#/2} / {0/0,1/0,s/1,c_1/0,c_2/1,c_3/0,c_4/1,c_5/0,c_6/2,c_7/2} - Obligation: innermost runtime complexity wrt. defined symbols {+#,f#,g#} and constructors {0,1,s} + Applied Processor: RemoveWeakSuffixes + Details: Consider the dependency graph 1:S:+#(x,s(y)) -> c_2(+#(x,y)) -->_1 +#(x,0()) -> c_1():5 -->_1 +#(x,s(y)) -> c_2(+#(x,y)):1 2:S:f#(s(x)) -> c_4(g#(x,s(x))) -->_1 g#(s(x),y) -> c_7(g#(x,s(+(y,x))),+#(y,x)):4 -->_1 g#(s(x),y) -> c_6(g#(x,+(y,s(x))),+#(y,s(x))):3 -->_1 g#(0(),y) -> c_5():7 3:S:g#(s(x),y) -> c_6(g#(x,+(y,s(x))),+#(y,s(x))) -->_1 g#(s(x),y) -> c_7(g#(x,s(+(y,x))),+#(y,x)):4 -->_1 g#(0(),y) -> c_5():7 -->_1 g#(s(x),y) -> c_6(g#(x,+(y,s(x))),+#(y,s(x))):3 -->_2 +#(x,s(y)) -> c_2(+#(x,y)):1 4:S:g#(s(x),y) -> c_7(g#(x,s(+(y,x))),+#(y,x)) -->_1 g#(0(),y) -> c_5():7 -->_2 +#(x,0()) -> c_1():5 -->_1 g#(s(x),y) -> c_7(g#(x,s(+(y,x))),+#(y,x)):4 -->_1 g#(s(x),y) -> c_6(g#(x,+(y,s(x))),+#(y,s(x))):3 -->_2 +#(x,s(y)) -> c_2(+#(x,y)):1 5:W:+#(x,0()) -> c_1() 6:W:f#(0()) -> c_3() 7:W:g#(0(),y) -> c_5() The following weak DPs constitute a sub-graph of the DG that is closed under successors. The DPs are removed. 6: f#(0()) -> c_3() 7: g#(0(),y) -> c_5() 5: +#(x,0()) -> c_1() * Step 4: RemoveHeads WORST_CASE(?,O(n^2)) + Considered Problem: - Strict DPs: +#(x,s(y)) -> c_2(+#(x,y)) f#(s(x)) -> c_4(g#(x,s(x))) g#(s(x),y) -> c_6(g#(x,+(y,s(x))),+#(y,s(x))) g#(s(x),y) -> c_7(g#(x,s(+(y,x))),+#(y,x)) - Weak TRS: +(x,0()) -> x +(x,s(y)) -> s(+(x,y)) f(0()) -> 1() f(s(x)) -> g(x,s(x)) g(0(),y) -> y g(s(x),y) -> g(x,+(y,s(x))) g(s(x),y) -> g(x,s(+(y,x))) - Signature: {+/2,f/1,g/2,+#/2,f#/1,g#/2} / {0/0,1/0,s/1,c_1/0,c_2/1,c_3/0,c_4/1,c_5/0,c_6/2,c_7/2} - Obligation: innermost runtime complexity wrt. defined symbols {+#,f#,g#} and constructors {0,1,s} + Applied Processor: RemoveHeads + Details: Consider the dependency graph 1:S:+#(x,s(y)) -> c_2(+#(x,y)) -->_1 +#(x,s(y)) -> c_2(+#(x,y)):1 2:S:f#(s(x)) -> c_4(g#(x,s(x))) -->_1 g#(s(x),y) -> c_7(g#(x,s(+(y,x))),+#(y,x)):4 -->_1 g#(s(x),y) -> c_6(g#(x,+(y,s(x))),+#(y,s(x))):3 3:S:g#(s(x),y) -> c_6(g#(x,+(y,s(x))),+#(y,s(x))) -->_1 g#(s(x),y) -> c_7(g#(x,s(+(y,x))),+#(y,x)):4 -->_1 g#(s(x),y) -> c_6(g#(x,+(y,s(x))),+#(y,s(x))):3 -->_2 +#(x,s(y)) -> c_2(+#(x,y)):1 4:S:g#(s(x),y) -> c_7(g#(x,s(+(y,x))),+#(y,x)) -->_1 g#(s(x),y) -> c_7(g#(x,s(+(y,x))),+#(y,x)):4 -->_1 g#(s(x),y) -> c_6(g#(x,+(y,s(x))),+#(y,s(x))):3 -->_2 +#(x,s(y)) -> c_2(+#(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). [(2,f#(s(x)) -> c_4(g#(x,s(x))))] * Step 5: UsableRules WORST_CASE(?,O(n^2)) + Considered Problem: - Strict DPs: +#(x,s(y)) -> c_2(+#(x,y)) g#(s(x),y) -> c_6(g#(x,+(y,s(x))),+#(y,s(x))) g#(s(x),y) -> c_7(g#(x,s(+(y,x))),+#(y,x)) - Weak TRS: +(x,0()) -> x +(x,s(y)) -> s(+(x,y)) f(0()) -> 1() f(s(x)) -> g(x,s(x)) g(0(),y) -> y g(s(x),y) -> g(x,+(y,s(x))) g(s(x),y) -> g(x,s(+(y,x))) - Signature: {+/2,f/1,g/2,+#/2,f#/1,g#/2} / {0/0,1/0,s/1,c_1/0,c_2/1,c_3/0,c_4/1,c_5/0,c_6/2,c_7/2} - Obligation: innermost runtime complexity wrt. defined symbols {+#,f#,g#} and constructors {0,1,s} + Applied Processor: UsableRules + Details: We replace rewrite rules by usable rules: +(x,0()) -> x +(x,s(y)) -> s(+(x,y)) +#(x,s(y)) -> c_2(+#(x,y)) g#(s(x),y) -> c_6(g#(x,+(y,s(x))),+#(y,s(x))) g#(s(x),y) -> c_7(g#(x,s(+(y,x))),+#(y,x)) * Step 6: DecomposeDG WORST_CASE(?,O(n^2)) + Considered Problem: - Strict DPs: +#(x,s(y)) -> c_2(+#(x,y)) g#(s(x),y) -> c_6(g#(x,+(y,s(x))),+#(y,s(x))) g#(s(x),y) -> c_7(g#(x,s(+(y,x))),+#(y,x)) - Weak TRS: +(x,0()) -> x +(x,s(y)) -> s(+(x,y)) - Signature: {+/2,f/1,g/2,+#/2,f#/1,g#/2} / {0/0,1/0,s/1,c_1/0,c_2/1,c_3/0,c_4/1,c_5/0,c_6/2,c_7/2} - Obligation: innermost runtime complexity wrt. defined symbols {+#,f#,g#} and constructors {0,1,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 g#(s(x),y) -> c_6(g#(x,+(y,s(x))),+#(y,s(x))) g#(s(x),y) -> c_7(g#(x,s(+(y,x))),+#(y,x)) and a lower component +#(x,s(y)) -> c_2(+#(x,y)) Further, following extension rules are added to the lower component. g#(s(x),y) -> +#(y,x) g#(s(x),y) -> +#(y,s(x)) g#(s(x),y) -> g#(x,+(y,s(x))) g#(s(x),y) -> g#(x,s(+(y,x))) ** Step 6.a:1: SimplifyRHS WORST_CASE(?,O(n^1)) + Considered Problem: - Strict DPs: g#(s(x),y) -> c_6(g#(x,+(y,s(x))),+#(y,s(x))) g#(s(x),y) -> c_7(g#(x,s(+(y,x))),+#(y,x)) - Weak TRS: +(x,0()) -> x +(x,s(y)) -> s(+(x,y)) - Signature: {+/2,f/1,g/2,+#/2,f#/1,g#/2} / {0/0,1/0,s/1,c_1/0,c_2/1,c_3/0,c_4/1,c_5/0,c_6/2,c_7/2} - Obligation: innermost runtime complexity wrt. defined symbols {+#,f#,g#} and constructors {0,1,s} + Applied Processor: SimplifyRHS + Details: Consider the dependency graph 1:S:g#(s(x),y) -> c_6(g#(x,+(y,s(x))),+#(y,s(x))) -->_1 g#(s(x),y) -> c_7(g#(x,s(+(y,x))),+#(y,x)):2 -->_1 g#(s(x),y) -> c_6(g#(x,+(y,s(x))),+#(y,s(x))):1 2:S:g#(s(x),y) -> c_7(g#(x,s(+(y,x))),+#(y,x)) -->_1 g#(s(x),y) -> c_7(g#(x,s(+(y,x))),+#(y,x)):2 -->_1 g#(s(x),y) -> c_6(g#(x,+(y,s(x))),+#(y,s(x))):1 Due to missing edges in the depndency graph, the right-hand sides of following rules could be simplified: g#(s(x),y) -> c_6(g#(x,+(y,s(x)))) g#(s(x),y) -> c_7(g#(x,s(+(y,x)))) ** Step 6.a:2: NaturalMI WORST_CASE(?,O(n^1)) + Considered Problem: - Strict DPs: g#(s(x),y) -> c_6(g#(x,+(y,s(x)))) g#(s(x),y) -> c_7(g#(x,s(+(y,x)))) - Weak TRS: +(x,0()) -> x +(x,s(y)) -> s(+(x,y)) - Signature: {+/2,f/1,g/2,+#/2,f#/1,g#/2} / {0/0,1/0,s/1,c_1/0,c_2/1,c_3/0,c_4/1,c_5/0,c_6/1,c_7/1} - Obligation: innermost runtime complexity wrt. defined symbols {+#,f#,g#} and constructors {0,1,s} + Applied Processor: NaturalMI {miDimension = 1, miDegree = 1, miKind = Algebraic, uargs = UArgs, urules = URules, selector = Just any strict-rules} + Details: We apply a matrix interpretation of kind constructor based matrix interpretation: The following argument positions are considered usable: uargs(c_6) = {1}, uargs(c_7) = {1} Following symbols are considered usable: {+#,f#,g#} TcT has computed the following interpretation: p(+) = [2] x1 + [0] p(0) = [0] p(1) = [0] p(f) = [1] p(g) = [1] x1 + [1] x2 + [2] p(s) = [1] x1 + [1] p(+#) = [8] x1 + [0] p(f#) = [1] x1 + [8] p(g#) = [3] x1 + [0] p(c_1) = [0] p(c_2) = [1] x1 + [8] p(c_3) = [0] p(c_4) = [1] x1 + [8] p(c_5) = [1] p(c_6) = [1] x1 + [3] p(c_7) = [1] x1 + [2] Following rules are strictly oriented: g#(s(x),y) = [3] x + [3] > [3] x + [2] = c_7(g#(x,s(+(y,x)))) Following rules are (at-least) weakly oriented: g#(s(x),y) = [3] x + [3] >= [3] x + [3] = c_6(g#(x,+(y,s(x)))) ** Step 6.a:3: NaturalMI WORST_CASE(?,O(n^1)) + Considered Problem: - Strict DPs: g#(s(x),y) -> c_6(g#(x,+(y,s(x)))) - Weak DPs: g#(s(x),y) -> c_7(g#(x,s(+(y,x)))) - Weak TRS: +(x,0()) -> x +(x,s(y)) -> s(+(x,y)) - Signature: {+/2,f/1,g/2,+#/2,f#/1,g#/2} / {0/0,1/0,s/1,c_1/0,c_2/1,c_3/0,c_4/1,c_5/0,c_6/1,c_7/1} - Obligation: innermost runtime complexity wrt. defined symbols {+#,f#,g#} and constructors {0,1,s} + Applied Processor: NaturalMI {miDimension = 1, miDegree = 1, miKind = Algebraic, uargs = UArgs, urules = URules, selector = Just any strict-rules} + Details: We apply a matrix interpretation of kind constructor based matrix interpretation: The following argument positions are considered usable: uargs(c_6) = {1}, uargs(c_7) = {1} Following symbols are considered usable: {+#,f#,g#} TcT has computed the following interpretation: p(+) = [8] p(0) = [2] p(1) = [2] p(f) = [2] x1 + [1] p(g) = [2] x1 + [1] x2 + [0] p(s) = [1] x1 + [8] p(+#) = [2] x2 + [2] p(f#) = [1] p(g#) = [2] x1 + [1] p(c_1) = [0] p(c_2) = [1] p(c_3) = [0] p(c_4) = [1] x1 + [0] p(c_5) = [2] p(c_6) = [1] x1 + [14] p(c_7) = [1] x1 + [15] Following rules are strictly oriented: g#(s(x),y) = [2] x + [17] > [2] x + [15] = c_6(g#(x,+(y,s(x)))) Following rules are (at-least) weakly oriented: g#(s(x),y) = [2] x + [17] >= [2] x + [16] = c_7(g#(x,s(+(y,x)))) ** Step 6.a:4: EmptyProcessor WORST_CASE(?,O(1)) + Considered Problem: - Weak DPs: g#(s(x),y) -> c_6(g#(x,+(y,s(x)))) g#(s(x),y) -> c_7(g#(x,s(+(y,x)))) - Weak TRS: +(x,0()) -> x +(x,s(y)) -> s(+(x,y)) - Signature: {+/2,f/1,g/2,+#/2,f#/1,g#/2} / {0/0,1/0,s/1,c_1/0,c_2/1,c_3/0,c_4/1,c_5/0,c_6/1,c_7/1} - Obligation: innermost runtime complexity wrt. defined symbols {+#,f#,g#} and constructors {0,1,s} + Applied Processor: EmptyProcessor + Details: The problem is already closed. The intended complexity is O(1). ** Step 6.b:1: NaturalMI WORST_CASE(?,O(n^1)) + Considered Problem: - Strict DPs: +#(x,s(y)) -> c_2(+#(x,y)) - Weak DPs: g#(s(x),y) -> +#(y,x) g#(s(x),y) -> +#(y,s(x)) g#(s(x),y) -> g#(x,+(y,s(x))) g#(s(x),y) -> g#(x,s(+(y,x))) - Weak TRS: +(x,0()) -> x +(x,s(y)) -> s(+(x,y)) - Signature: {+/2,f/1,g/2,+#/2,f#/1,g#/2} / {0/0,1/0,s/1,c_1/0,c_2/1,c_3/0,c_4/1,c_5/0,c_6/2,c_7/2} - Obligation: innermost runtime complexity wrt. defined symbols {+#,f#,g#} and constructors {0,1,s} + Applied Processor: NaturalMI {miDimension = 1, miDegree = 1, miKind = Algebraic, uargs = UArgs, urules = URules, selector = Just any strict-rules} + Details: We apply a matrix interpretation of kind constructor based matrix interpretation: The following argument positions are considered usable: uargs(c_2) = {1} Following symbols are considered usable: {+#,f#,g#} TcT has computed the following interpretation: p(+) = [8] x1 + [0] p(0) = [0] p(1) = [4] p(f) = [1] p(g) = [2] p(s) = [1] x1 + [8] p(+#) = [1] x2 + [8] p(f#) = [2] x1 + [0] p(g#) = [1] x1 + [9] p(c_1) = [0] p(c_2) = [1] x1 + [6] p(c_3) = [1] p(c_4) = [0] p(c_5) = [1] p(c_6) = [1] x1 + [1] x2 + [0] p(c_7) = [2] x1 + [8] x2 + [1] Following rules are strictly oriented: +#(x,s(y)) = [1] y + [16] > [1] y + [14] = c_2(+#(x,y)) Following rules are (at-least) weakly oriented: g#(s(x),y) = [1] x + [17] >= [1] x + [8] = +#(y,x) g#(s(x),y) = [1] x + [17] >= [1] x + [16] = +#(y,s(x)) g#(s(x),y) = [1] x + [17] >= [1] x + [9] = g#(x,+(y,s(x))) g#(s(x),y) = [1] x + [17] >= [1] x + [9] = g#(x,s(+(y,x))) ** Step 6.b:2: EmptyProcessor WORST_CASE(?,O(1)) + Considered Problem: - Weak DPs: +#(x,s(y)) -> c_2(+#(x,y)) g#(s(x),y) -> +#(y,x) g#(s(x),y) -> +#(y,s(x)) g#(s(x),y) -> g#(x,+(y,s(x))) g#(s(x),y) -> g#(x,s(+(y,x))) - Weak TRS: +(x,0()) -> x +(x,s(y)) -> s(+(x,y)) - Signature: {+/2,f/1,g/2,+#/2,f#/1,g#/2} / {0/0,1/0,s/1,c_1/0,c_2/1,c_3/0,c_4/1,c_5/0,c_6/2,c_7/2} - Obligation: innermost runtime complexity wrt. defined symbols {+#,f#,g#} and constructors {0,1,s} + Applied Processor: EmptyProcessor + Details: The problem is already closed. The intended complexity is O(1). WORST_CASE(?,O(n^2))