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)) double(0()) -> 0() double(s(x)) -> s(s(double(x))) sqr(0()) -> 0() sqr(s(x)) -> +(sqr(x),s(double(x))) sqr(s(x)) -> s(+(sqr(x),double(x))) - Signature: {+/2,double/1,sqr/1} / {0/0,s/1} - Obligation: innermost runtime complexity wrt. defined symbols {+,double,sqr} and constructors {0,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)) double#(0()) -> c_3() double#(s(x)) -> c_4(double#(x)) sqr#(0()) -> c_5() sqr#(s(x)) -> c_6(+#(sqr(x),s(double(x))),sqr#(x),double#(x)) sqr#(s(x)) -> c_7(+#(sqr(x),double(x)),sqr#(x),double#(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)) double#(0()) -> c_3() double#(s(x)) -> c_4(double#(x)) sqr#(0()) -> c_5() sqr#(s(x)) -> c_6(+#(sqr(x),s(double(x))),sqr#(x),double#(x)) sqr#(s(x)) -> c_7(+#(sqr(x),double(x)),sqr#(x),double#(x)) - Weak TRS: +(x,0()) -> x +(x,s(y)) -> s(+(x,y)) double(0()) -> 0() double(s(x)) -> s(s(double(x))) sqr(0()) -> 0() sqr(s(x)) -> +(sqr(x),s(double(x))) sqr(s(x)) -> s(+(sqr(x),double(x))) - Signature: {+/2,double/1,sqr/1,+#/2,double#/1,sqr#/1} / {0/0,s/1,c_1/0,c_2/1,c_3/0,c_4/1,c_5/0,c_6/3,c_7/3} - Obligation: innermost runtime complexity wrt. defined symbols {+#,double#,sqr#} and constructors {0,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: double#(0()) -> c_3() 4: double#(s(x)) -> c_4(double#(x)) 5: sqr#(0()) -> c_5() 6: sqr#(s(x)) -> c_6(+#(sqr(x),s(double(x))),sqr#(x),double#(x)) 7: sqr#(s(x)) -> c_7(+#(sqr(x),double(x)),sqr#(x),double#(x)) * Step 3: RemoveWeakSuffixes WORST_CASE(?,O(n^2)) + Considered Problem: - Strict DPs: +#(x,s(y)) -> c_2(+#(x,y)) double#(s(x)) -> c_4(double#(x)) sqr#(s(x)) -> c_6(+#(sqr(x),s(double(x))),sqr#(x),double#(x)) sqr#(s(x)) -> c_7(+#(sqr(x),double(x)),sqr#(x),double#(x)) - Weak DPs: +#(x,0()) -> c_1() double#(0()) -> c_3() sqr#(0()) -> c_5() - Weak TRS: +(x,0()) -> x +(x,s(y)) -> s(+(x,y)) double(0()) -> 0() double(s(x)) -> s(s(double(x))) sqr(0()) -> 0() sqr(s(x)) -> +(sqr(x),s(double(x))) sqr(s(x)) -> s(+(sqr(x),double(x))) - Signature: {+/2,double/1,sqr/1,+#/2,double#/1,sqr#/1} / {0/0,s/1,c_1/0,c_2/1,c_3/0,c_4/1,c_5/0,c_6/3,c_7/3} - Obligation: innermost runtime complexity wrt. defined symbols {+#,double#,sqr#} and constructors {0,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:double#(s(x)) -> c_4(double#(x)) -->_1 double#(0()) -> c_3():6 -->_1 double#(s(x)) -> c_4(double#(x)):2 3:S:sqr#(s(x)) -> c_6(+#(sqr(x),s(double(x))),sqr#(x),double#(x)) -->_2 sqr#(s(x)) -> c_7(+#(sqr(x),double(x)),sqr#(x),double#(x)):4 -->_2 sqr#(0()) -> c_5():7 -->_3 double#(0()) -> c_3():6 -->_2 sqr#(s(x)) -> c_6(+#(sqr(x),s(double(x))),sqr#(x),double#(x)):3 -->_3 double#(s(x)) -> c_4(double#(x)):2 -->_1 +#(x,s(y)) -> c_2(+#(x,y)):1 4:S:sqr#(s(x)) -> c_7(+#(sqr(x),double(x)),sqr#(x),double#(x)) -->_2 sqr#(0()) -> c_5():7 -->_3 double#(0()) -> c_3():6 -->_1 +#(x,0()) -> c_1():5 -->_2 sqr#(s(x)) -> c_7(+#(sqr(x),double(x)),sqr#(x),double#(x)):4 -->_2 sqr#(s(x)) -> c_6(+#(sqr(x),s(double(x))),sqr#(x),double#(x)):3 -->_3 double#(s(x)) -> c_4(double#(x)):2 -->_1 +#(x,s(y)) -> c_2(+#(x,y)):1 5:W:+#(x,0()) -> c_1() 6:W:double#(0()) -> c_3() 7:W:sqr#(0()) -> c_5() The following weak DPs constitute a sub-graph of the DG that is closed under successors. The DPs are removed. 7: sqr#(0()) -> c_5() 6: double#(0()) -> c_3() 5: +#(x,0()) -> c_1() * Step 4: DecomposeDG WORST_CASE(?,O(n^2)) + Considered Problem: - Strict DPs: +#(x,s(y)) -> c_2(+#(x,y)) double#(s(x)) -> c_4(double#(x)) sqr#(s(x)) -> c_6(+#(sqr(x),s(double(x))),sqr#(x),double#(x)) sqr#(s(x)) -> c_7(+#(sqr(x),double(x)),sqr#(x),double#(x)) - Weak TRS: +(x,0()) -> x +(x,s(y)) -> s(+(x,y)) double(0()) -> 0() double(s(x)) -> s(s(double(x))) sqr(0()) -> 0() sqr(s(x)) -> +(sqr(x),s(double(x))) sqr(s(x)) -> s(+(sqr(x),double(x))) - Signature: {+/2,double/1,sqr/1,+#/2,double#/1,sqr#/1} / {0/0,s/1,c_1/0,c_2/1,c_3/0,c_4/1,c_5/0,c_6/3,c_7/3} - Obligation: innermost runtime complexity wrt. defined symbols {+#,double#,sqr#} and constructors {0,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 sqr#(s(x)) -> c_6(+#(sqr(x),s(double(x))),sqr#(x),double#(x)) sqr#(s(x)) -> c_7(+#(sqr(x),double(x)),sqr#(x),double#(x)) and a lower component +#(x,s(y)) -> c_2(+#(x,y)) double#(s(x)) -> c_4(double#(x)) Further, following extension rules are added to the lower component. sqr#(s(x)) -> +#(sqr(x),double(x)) sqr#(s(x)) -> +#(sqr(x),s(double(x))) sqr#(s(x)) -> double#(x) sqr#(s(x)) -> sqr#(x) ** Step 4.a:1: SimplifyRHS WORST_CASE(?,O(n^1)) + Considered Problem: - Strict DPs: sqr#(s(x)) -> c_6(+#(sqr(x),s(double(x))),sqr#(x),double#(x)) sqr#(s(x)) -> c_7(+#(sqr(x),double(x)),sqr#(x),double#(x)) - Weak TRS: +(x,0()) -> x +(x,s(y)) -> s(+(x,y)) double(0()) -> 0() double(s(x)) -> s(s(double(x))) sqr(0()) -> 0() sqr(s(x)) -> +(sqr(x),s(double(x))) sqr(s(x)) -> s(+(sqr(x),double(x))) - Signature: {+/2,double/1,sqr/1,+#/2,double#/1,sqr#/1} / {0/0,s/1,c_1/0,c_2/1,c_3/0,c_4/1,c_5/0,c_6/3,c_7/3} - Obligation: innermost runtime complexity wrt. defined symbols {+#,double#,sqr#} and constructors {0,s} + Applied Processor: SimplifyRHS + Details: Consider the dependency graph 1:S:sqr#(s(x)) -> c_6(+#(sqr(x),s(double(x))),sqr#(x),double#(x)) -->_2 sqr#(s(x)) -> c_7(+#(sqr(x),double(x)),sqr#(x),double#(x)):2 -->_2 sqr#(s(x)) -> c_6(+#(sqr(x),s(double(x))),sqr#(x),double#(x)):1 2:S:sqr#(s(x)) -> c_7(+#(sqr(x),double(x)),sqr#(x),double#(x)) -->_2 sqr#(s(x)) -> c_7(+#(sqr(x),double(x)),sqr#(x),double#(x)):2 -->_2 sqr#(s(x)) -> c_6(+#(sqr(x),s(double(x))),sqr#(x),double#(x)):1 Due to missing edges in the depndency graph, the right-hand sides of following rules could be simplified: sqr#(s(x)) -> c_6(sqr#(x)) sqr#(s(x)) -> c_7(sqr#(x)) ** Step 4.a:2: UsableRules WORST_CASE(?,O(n^1)) + Considered Problem: - Strict DPs: sqr#(s(x)) -> c_6(sqr#(x)) sqr#(s(x)) -> c_7(sqr#(x)) - Weak TRS: +(x,0()) -> x +(x,s(y)) -> s(+(x,y)) double(0()) -> 0() double(s(x)) -> s(s(double(x))) sqr(0()) -> 0() sqr(s(x)) -> +(sqr(x),s(double(x))) sqr(s(x)) -> s(+(sqr(x),double(x))) - Signature: {+/2,double/1,sqr/1,+#/2,double#/1,sqr#/1} / {0/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 {+#,double#,sqr#} and constructors {0,s} + Applied Processor: UsableRules + Details: We replace rewrite rules by usable rules: sqr#(s(x)) -> c_6(sqr#(x)) sqr#(s(x)) -> c_7(sqr#(x)) ** Step 4.a:3: WeightGap WORST_CASE(?,O(n^1)) + Considered Problem: - Strict DPs: sqr#(s(x)) -> c_6(sqr#(x)) sqr#(s(x)) -> c_7(sqr#(x)) - Signature: {+/2,double/1,sqr/1,+#/2,double#/1,sqr#/1} / {0/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 {+#,double#,sqr#} and constructors {0,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(c_6) = {1}, uargs(c_7) = {1} Following symbols are considered usable: all TcT has computed the following interpretation: p(+) = [0] p(0) = [0] p(double) = [0] p(s) = [1] x1 + [1] p(sqr) = [0] p(+#) = [0] p(double#) = [0] p(sqr#) = [1] x1 + [9] p(c_1) = [0] p(c_2) = [0] p(c_3) = [0] p(c_4) = [2] p(c_5) = [1] p(c_6) = [1] x1 + [1] p(c_7) = [1] x1 + [0] Following rules are strictly oriented: sqr#(s(x)) = [1] x + [10] > [1] x + [9] = c_7(sqr#(x)) Following rules are (at-least) weakly oriented: sqr#(s(x)) = [1] x + [10] >= [1] x + [10] = c_6(sqr#(x)) Further, it can be verified that all rules not oriented are covered by the weightgap condition. ** Step 4.a:4: WeightGap WORST_CASE(?,O(n^1)) + Considered Problem: - Strict DPs: sqr#(s(x)) -> c_6(sqr#(x)) - Weak DPs: sqr#(s(x)) -> c_7(sqr#(x)) - Signature: {+/2,double/1,sqr/1,+#/2,double#/1,sqr#/1} / {0/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 {+#,double#,sqr#} and constructors {0,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(c_6) = {1}, uargs(c_7) = {1} Following symbols are considered usable: all TcT has computed the following interpretation: p(+) = [0] p(0) = [0] p(double) = [0] p(s) = [1] x1 + [1] p(sqr) = [0] p(+#) = [0] p(double#) = [0] p(sqr#) = [1] x1 + [6] p(c_1) = [1] p(c_2) = [1] x1 + [4] p(c_3) = [4] p(c_4) = [1] p(c_5) = [1] p(c_6) = [1] x1 + [0] p(c_7) = [1] x1 + [1] Following rules are strictly oriented: sqr#(s(x)) = [1] x + [7] > [1] x + [6] = c_6(sqr#(x)) Following rules are (at-least) weakly oriented: sqr#(s(x)) = [1] x + [7] >= [1] x + [7] = c_7(sqr#(x)) Further, it can be verified that all rules not oriented are covered by the weightgap condition. ** Step 4.a:5: EmptyProcessor WORST_CASE(?,O(1)) + Considered Problem: - Weak DPs: sqr#(s(x)) -> c_6(sqr#(x)) sqr#(s(x)) -> c_7(sqr#(x)) - Signature: {+/2,double/1,sqr/1,+#/2,double#/1,sqr#/1} / {0/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 {+#,double#,sqr#} and constructors {0,s} + Applied Processor: EmptyProcessor + Details: The problem is already closed. The intended complexity is O(1). ** Step 4.b:1: NaturalMI WORST_CASE(?,O(n^1)) + Considered Problem: - Strict DPs: +#(x,s(y)) -> c_2(+#(x,y)) double#(s(x)) -> c_4(double#(x)) - Weak DPs: sqr#(s(x)) -> +#(sqr(x),double(x)) sqr#(s(x)) -> +#(sqr(x),s(double(x))) sqr#(s(x)) -> double#(x) sqr#(s(x)) -> sqr#(x) - Weak TRS: +(x,0()) -> x +(x,s(y)) -> s(+(x,y)) double(0()) -> 0() double(s(x)) -> s(s(double(x))) sqr(0()) -> 0() sqr(s(x)) -> +(sqr(x),s(double(x))) sqr(s(x)) -> s(+(sqr(x),double(x))) - Signature: {+/2,double/1,sqr/1,+#/2,double#/1,sqr#/1} / {0/0,s/1,c_1/0,c_2/1,c_3/0,c_4/1,c_5/0,c_6/3,c_7/3} - Obligation: innermost runtime complexity wrt. defined symbols {+#,double#,sqr#} and constructors {0,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}, uargs(c_4) = {1} Following symbols are considered usable: {+#,double#,sqr#} TcT has computed the following interpretation: p(+) = [8] x1 + [0] p(0) = [2] p(double) = [4] x1 + [0] p(s) = [1] x1 + [1] p(sqr) = [3] x1 + [1] p(+#) = [0] p(double#) = [4] x1 + [0] p(sqr#) = [10] x1 + [12] p(c_1) = [1] p(c_2) = [8] x1 + [0] p(c_3) = [2] p(c_4) = [1] x1 + [3] p(c_5) = [0] p(c_6) = [1] x1 + [2] x2 + [8] x3 + [1] p(c_7) = [1] x1 + [4] x2 + [1] x3 + [2] Following rules are strictly oriented: double#(s(x)) = [4] x + [4] > [4] x + [3] = c_4(double#(x)) Following rules are (at-least) weakly oriented: +#(x,s(y)) = [0] >= [0] = c_2(+#(x,y)) sqr#(s(x)) = [10] x + [22] >= [0] = +#(sqr(x),double(x)) sqr#(s(x)) = [10] x + [22] >= [0] = +#(sqr(x),s(double(x))) sqr#(s(x)) = [10] x + [22] >= [4] x + [0] = double#(x) sqr#(s(x)) = [10] x + [22] >= [10] x + [12] = sqr#(x) ** Step 4.b:2: NaturalMI WORST_CASE(?,O(n^1)) + Considered Problem: - Strict DPs: +#(x,s(y)) -> c_2(+#(x,y)) - Weak DPs: double#(s(x)) -> c_4(double#(x)) sqr#(s(x)) -> +#(sqr(x),double(x)) sqr#(s(x)) -> +#(sqr(x),s(double(x))) sqr#(s(x)) -> double#(x) sqr#(s(x)) -> sqr#(x) - Weak TRS: +(x,0()) -> x +(x,s(y)) -> s(+(x,y)) double(0()) -> 0() double(s(x)) -> s(s(double(x))) sqr(0()) -> 0() sqr(s(x)) -> +(sqr(x),s(double(x))) sqr(s(x)) -> s(+(sqr(x),double(x))) - Signature: {+/2,double/1,sqr/1,+#/2,double#/1,sqr#/1} / {0/0,s/1,c_1/0,c_2/1,c_3/0,c_4/1,c_5/0,c_6/3,c_7/3} - Obligation: innermost runtime complexity wrt. defined symbols {+#,double#,sqr#} and constructors {0,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}, uargs(c_4) = {1} Following symbols are considered usable: {double,+#,double#,sqr#} TcT has computed the following interpretation: p(+) = [1] x2 + [6] p(0) = [7] p(double) = [3] x1 + [2] p(s) = [1] x1 + [2] p(sqr) = [0] p(+#) = [4] x2 + [0] p(double#) = [0] p(sqr#) = [12] x1 + [0] p(c_1) = [1] p(c_2) = [1] x1 + [4] p(c_3) = [0] p(c_4) = [1] x1 + [0] p(c_5) = [1] p(c_6) = [1] x1 + [4] x2 + [4] p(c_7) = [2] x2 + [1] x3 + [2] Following rules are strictly oriented: +#(x,s(y)) = [4] y + [8] > [4] y + [4] = c_2(+#(x,y)) Following rules are (at-least) weakly oriented: double#(s(x)) = [0] >= [0] = c_4(double#(x)) sqr#(s(x)) = [12] x + [24] >= [12] x + [8] = +#(sqr(x),double(x)) sqr#(s(x)) = [12] x + [24] >= [12] x + [16] = +#(sqr(x),s(double(x))) sqr#(s(x)) = [12] x + [24] >= [0] = double#(x) sqr#(s(x)) = [12] x + [24] >= [12] x + [0] = sqr#(x) double(0()) = [23] >= [7] = 0() double(s(x)) = [3] x + [8] >= [3] x + [6] = s(s(double(x))) ** Step 4.b:3: EmptyProcessor WORST_CASE(?,O(1)) + Considered Problem: - Weak DPs: +#(x,s(y)) -> c_2(+#(x,y)) double#(s(x)) -> c_4(double#(x)) sqr#(s(x)) -> +#(sqr(x),double(x)) sqr#(s(x)) -> +#(sqr(x),s(double(x))) sqr#(s(x)) -> double#(x) sqr#(s(x)) -> sqr#(x) - Weak TRS: +(x,0()) -> x +(x,s(y)) -> s(+(x,y)) double(0()) -> 0() double(s(x)) -> s(s(double(x))) sqr(0()) -> 0() sqr(s(x)) -> +(sqr(x),s(double(x))) sqr(s(x)) -> s(+(sqr(x),double(x))) - Signature: {+/2,double/1,sqr/1,+#/2,double#/1,sqr#/1} / {0/0,s/1,c_1/0,c_2/1,c_3/0,c_4/1,c_5/0,c_6/3,c_7/3} - Obligation: innermost runtime complexity wrt. defined symbols {+#,double#,sqr#} and constructors {0,s} + Applied Processor: EmptyProcessor + Details: The problem is already closed. The intended complexity is O(1). WORST_CASE(?,O(n^2))