WORST_CASE(?,O(n^1)) * Step 1: InnermostRuleRemoval WORST_CASE(?,O(n^1)) + Considered Problem: - Strict TRS: activate(X) -> X activate(n__first(X1,X2)) -> first(activate(X1),activate(X2)) activate(n__s(X)) -> s(activate(X)) activate(n__terms(X)) -> terms(activate(X)) add(0(),X) -> X add(s(X),Y) -> s(add(X,Y)) dbl(0()) -> 0() dbl(s(X)) -> s(s(dbl(X))) first(X1,X2) -> n__first(X1,X2) first(0(),X) -> nil() first(s(X),cons(Y,Z)) -> cons(Y,n__first(X,activate(Z))) s(X) -> n__s(X) sqr(0()) -> 0() sqr(s(X)) -> s(add(sqr(X),dbl(X))) terms(N) -> cons(recip(sqr(N)),n__terms(n__s(N))) terms(X) -> n__terms(X) - Signature: {activate/1,add/2,dbl/1,first/2,s/1,sqr/1,terms/1} / {0/0,cons/2,n__first/2,n__s/1,n__terms/1,nil/0,recip/1} - Obligation: innermost runtime complexity wrt. defined symbols {activate,add,dbl,first,s,sqr,terms} and constructors {0 ,cons,n__first,n__s,n__terms,nil,recip} + Applied Processor: InnermostRuleRemoval + Details: Arguments of following rules are not normal-forms. add(s(X),Y) -> s(add(X,Y)) dbl(s(X)) -> s(s(dbl(X))) first(s(X),cons(Y,Z)) -> cons(Y,n__first(X,activate(Z))) sqr(s(X)) -> s(add(sqr(X),dbl(X))) All above mentioned rules can be savely removed. * Step 2: DependencyPairs WORST_CASE(?,O(n^1)) + Considered Problem: - Strict TRS: activate(X) -> X activate(n__first(X1,X2)) -> first(activate(X1),activate(X2)) activate(n__s(X)) -> s(activate(X)) activate(n__terms(X)) -> terms(activate(X)) add(0(),X) -> X dbl(0()) -> 0() first(X1,X2) -> n__first(X1,X2) first(0(),X) -> nil() s(X) -> n__s(X) sqr(0()) -> 0() terms(N) -> cons(recip(sqr(N)),n__terms(n__s(N))) terms(X) -> n__terms(X) - Signature: {activate/1,add/2,dbl/1,first/2,s/1,sqr/1,terms/1} / {0/0,cons/2,n__first/2,n__s/1,n__terms/1,nil/0,recip/1} - Obligation: innermost runtime complexity wrt. defined symbols {activate,add,dbl,first,s,sqr,terms} and constructors {0 ,cons,n__first,n__s,n__terms,nil,recip} + Applied Processor: DependencyPairs {dpKind_ = WIDP} + Details: We add the following weak innermost dependency pairs: Strict DPs activate#(X) -> c_1() activate#(n__first(X1,X2)) -> c_2(first#(activate(X1),activate(X2))) activate#(n__s(X)) -> c_3(s#(activate(X))) activate#(n__terms(X)) -> c_4(terms#(activate(X))) add#(0(),X) -> c_5() dbl#(0()) -> c_6() first#(X1,X2) -> c_7() first#(0(),X) -> c_8() s#(X) -> c_9() sqr#(0()) -> c_10() terms#(N) -> c_11(sqr#(N)) terms#(X) -> c_12() Weak DPs and mark the set of starting terms. * Step 3: UsableRules WORST_CASE(?,O(n^1)) + Considered Problem: - Strict DPs: activate#(X) -> c_1() activate#(n__first(X1,X2)) -> c_2(first#(activate(X1),activate(X2))) activate#(n__s(X)) -> c_3(s#(activate(X))) activate#(n__terms(X)) -> c_4(terms#(activate(X))) add#(0(),X) -> c_5() dbl#(0()) -> c_6() first#(X1,X2) -> c_7() first#(0(),X) -> c_8() s#(X) -> c_9() sqr#(0()) -> c_10() terms#(N) -> c_11(sqr#(N)) terms#(X) -> c_12() - Strict TRS: activate(X) -> X activate(n__first(X1,X2)) -> first(activate(X1),activate(X2)) activate(n__s(X)) -> s(activate(X)) activate(n__terms(X)) -> terms(activate(X)) add(0(),X) -> X dbl(0()) -> 0() first(X1,X2) -> n__first(X1,X2) first(0(),X) -> nil() s(X) -> n__s(X) sqr(0()) -> 0() terms(N) -> cons(recip(sqr(N)),n__terms(n__s(N))) terms(X) -> n__terms(X) - Signature: {activate/1,add/2,dbl/1,first/2,s/1,sqr/1,terms/1,activate#/1,add#/2,dbl#/1,first#/2,s#/1,sqr#/1 ,terms#/1} / {0/0,cons/2,n__first/2,n__s/1,n__terms/1,nil/0,recip/1,c_1/0,c_2/1,c_3/1,c_4/1,c_5/0,c_6/0 ,c_7/0,c_8/0,c_9/0,c_10/0,c_11/1,c_12/0} - Obligation: innermost runtime complexity wrt. defined symbols {activate#,add#,dbl#,first#,s#,sqr# ,terms#} and constructors {0,cons,n__first,n__s,n__terms,nil,recip} + Applied Processor: UsableRules + Details: We replace rewrite rules by usable rules: activate(X) -> X activate(n__first(X1,X2)) -> first(activate(X1),activate(X2)) activate(n__s(X)) -> s(activate(X)) activate(n__terms(X)) -> terms(activate(X)) first(X1,X2) -> n__first(X1,X2) first(0(),X) -> nil() s(X) -> n__s(X) sqr(0()) -> 0() terms(N) -> cons(recip(sqr(N)),n__terms(n__s(N))) terms(X) -> n__terms(X) activate#(X) -> c_1() activate#(n__first(X1,X2)) -> c_2(first#(activate(X1),activate(X2))) activate#(n__s(X)) -> c_3(s#(activate(X))) activate#(n__terms(X)) -> c_4(terms#(activate(X))) add#(0(),X) -> c_5() dbl#(0()) -> c_6() first#(X1,X2) -> c_7() first#(0(),X) -> c_8() s#(X) -> c_9() sqr#(0()) -> c_10() terms#(N) -> c_11(sqr#(N)) terms#(X) -> c_12() * Step 4: WeightGap WORST_CASE(?,O(n^1)) + Considered Problem: - Strict DPs: activate#(X) -> c_1() activate#(n__first(X1,X2)) -> c_2(first#(activate(X1),activate(X2))) activate#(n__s(X)) -> c_3(s#(activate(X))) activate#(n__terms(X)) -> c_4(terms#(activate(X))) add#(0(),X) -> c_5() dbl#(0()) -> c_6() first#(X1,X2) -> c_7() first#(0(),X) -> c_8() s#(X) -> c_9() sqr#(0()) -> c_10() terms#(N) -> c_11(sqr#(N)) terms#(X) -> c_12() - Strict TRS: activate(X) -> X activate(n__first(X1,X2)) -> first(activate(X1),activate(X2)) activate(n__s(X)) -> s(activate(X)) activate(n__terms(X)) -> terms(activate(X)) first(X1,X2) -> n__first(X1,X2) first(0(),X) -> nil() s(X) -> n__s(X) sqr(0()) -> 0() terms(N) -> cons(recip(sqr(N)),n__terms(n__s(N))) terms(X) -> n__terms(X) - Signature: {activate/1,add/2,dbl/1,first/2,s/1,sqr/1,terms/1,activate#/1,add#/2,dbl#/1,first#/2,s#/1,sqr#/1 ,terms#/1} / {0/0,cons/2,n__first/2,n__s/1,n__terms/1,nil/0,recip/1,c_1/0,c_2/1,c_3/1,c_4/1,c_5/0,c_6/0 ,c_7/0,c_8/0,c_9/0,c_10/0,c_11/1,c_12/0} - Obligation: innermost runtime complexity wrt. defined symbols {activate#,add#,dbl#,first#,s#,sqr# ,terms#} and constructors {0,cons,n__first,n__s,n__terms,nil,recip} + Applied Processor: WeightGap {wgDimension = 1, wgDegree = 1, wgKind = Algebraic, wgUArgs = UArgs, wgOn = WgOnTrs} + 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(cons) = {1}, uargs(first) = {1,2}, uargs(recip) = {1}, uargs(s) = {1}, uargs(terms) = {1}, uargs(first#) = {1,2}, uargs(s#) = {1}, uargs(terms#) = {1}, uargs(c_2) = {1}, uargs(c_3) = {1}, uargs(c_4) = {1}, uargs(c_11) = {1} Following symbols are considered usable: all TcT has computed the following interpretation: p(0) = [1] p(activate) = [4] x1 + [2] p(add) = [1] x2 + [1] p(cons) = [1] x1 + [0] p(dbl) = [2] x1 + [0] p(first) = [1] x1 + [1] x2 + [6] p(n__first) = [1] x1 + [1] x2 + [3] p(n__s) = [1] x1 + [4] p(n__terms) = [1] x1 + [4] p(nil) = [0] p(recip) = [1] x1 + [2] p(s) = [1] x1 + [10] p(sqr) = [8] p(terms) = [1] x1 + [14] p(activate#) = [4] x1 + [4] p(add#) = [8] x1 + [1] x2 + [0] p(dbl#) = [0] p(first#) = [1] x1 + [1] x2 + [10] p(s#) = [1] x1 + [1] p(sqr#) = [4] p(terms#) = [1] x1 + [14] p(c_1) = [1] p(c_2) = [1] x1 + [2] p(c_3) = [1] x1 + [13] p(c_4) = [1] x1 + [12] p(c_5) = [0] p(c_6) = [1] p(c_7) = [1] p(c_8) = [0] p(c_9) = [0] p(c_10) = [0] p(c_11) = [1] x1 + [6] p(c_12) = [1] Following rules are strictly oriented: activate#(X) = [4] X + [4] > [1] = c_1() activate#(n__s(X)) = [4] X + [20] > [4] X + [16] = c_3(s#(activate(X))) add#(0(),X) = [1] X + [8] > [0] = c_5() first#(X1,X2) = [1] X1 + [1] X2 + [10] > [1] = c_7() first#(0(),X) = [1] X + [11] > [0] = c_8() s#(X) = [1] X + [1] > [0] = c_9() sqr#(0()) = [4] > [0] = c_10() terms#(N) = [1] N + [14] > [10] = c_11(sqr#(N)) terms#(X) = [1] X + [14] > [1] = c_12() activate(X) = [4] X + [2] > [1] X + [0] = X activate(n__first(X1,X2)) = [4] X1 + [4] X2 + [14] > [4] X1 + [4] X2 + [10] = first(activate(X1),activate(X2)) activate(n__s(X)) = [4] X + [18] > [4] X + [12] = s(activate(X)) activate(n__terms(X)) = [4] X + [18] > [4] X + [16] = terms(activate(X)) first(X1,X2) = [1] X1 + [1] X2 + [6] > [1] X1 + [1] X2 + [3] = n__first(X1,X2) first(0(),X) = [1] X + [7] > [0] = nil() s(X) = [1] X + [10] > [1] X + [4] = n__s(X) sqr(0()) = [8] > [1] = 0() terms(N) = [1] N + [14] > [10] = cons(recip(sqr(N)),n__terms(n__s(N))) terms(X) = [1] X + [14] > [1] X + [4] = n__terms(X) Following rules are (at-least) weakly oriented: activate#(n__first(X1,X2)) = [4] X1 + [4] X2 + [16] >= [4] X1 + [4] X2 + [16] = c_2(first#(activate(X1),activate(X2))) activate#(n__terms(X)) = [4] X + [20] >= [4] X + [28] = c_4(terms#(activate(X))) dbl#(0()) = [0] >= [1] = c_6() Further, it can be verified that all rules not oriented are covered by the weightgap condition. * Step 5: PredecessorEstimation WORST_CASE(?,O(1)) + Considered Problem: - Strict DPs: activate#(n__first(X1,X2)) -> c_2(first#(activate(X1),activate(X2))) activate#(n__terms(X)) -> c_4(terms#(activate(X))) dbl#(0()) -> c_6() - Weak DPs: activate#(X) -> c_1() activate#(n__s(X)) -> c_3(s#(activate(X))) add#(0(),X) -> c_5() first#(X1,X2) -> c_7() first#(0(),X) -> c_8() s#(X) -> c_9() sqr#(0()) -> c_10() terms#(N) -> c_11(sqr#(N)) terms#(X) -> c_12() - Weak TRS: activate(X) -> X activate(n__first(X1,X2)) -> first(activate(X1),activate(X2)) activate(n__s(X)) -> s(activate(X)) activate(n__terms(X)) -> terms(activate(X)) first(X1,X2) -> n__first(X1,X2) first(0(),X) -> nil() s(X) -> n__s(X) sqr(0()) -> 0() terms(N) -> cons(recip(sqr(N)),n__terms(n__s(N))) terms(X) -> n__terms(X) - Signature: {activate/1,add/2,dbl/1,first/2,s/1,sqr/1,terms/1,activate#/1,add#/2,dbl#/1,first#/2,s#/1,sqr#/1 ,terms#/1} / {0/0,cons/2,n__first/2,n__s/1,n__terms/1,nil/0,recip/1,c_1/0,c_2/1,c_3/1,c_4/1,c_5/0,c_6/0 ,c_7/0,c_8/0,c_9/0,c_10/0,c_11/1,c_12/0} - Obligation: innermost runtime complexity wrt. defined symbols {activate#,add#,dbl#,first#,s#,sqr# ,terms#} and constructors {0,cons,n__first,n__s,n__terms,nil,recip} + Applied Processor: PredecessorEstimation {onSelection = all simple predecessor estimation selector} + Details: We estimate the number of application of {1,2,3} by application of Pre({1,2,3}) = {}. Here rules are labelled as follows: 1: activate#(n__first(X1,X2)) -> c_2(first#(activate(X1),activate(X2))) 2: activate#(n__terms(X)) -> c_4(terms#(activate(X))) 3: dbl#(0()) -> c_6() 4: activate#(X) -> c_1() 5: activate#(n__s(X)) -> c_3(s#(activate(X))) 6: add#(0(),X) -> c_5() 7: first#(X1,X2) -> c_7() 8: first#(0(),X) -> c_8() 9: s#(X) -> c_9() 10: sqr#(0()) -> c_10() 11: terms#(N) -> c_11(sqr#(N)) 12: terms#(X) -> c_12() * Step 6: RemoveWeakSuffixes WORST_CASE(?,O(1)) + Considered Problem: - Weak DPs: activate#(X) -> c_1() activate#(n__first(X1,X2)) -> c_2(first#(activate(X1),activate(X2))) activate#(n__s(X)) -> c_3(s#(activate(X))) activate#(n__terms(X)) -> c_4(terms#(activate(X))) add#(0(),X) -> c_5() dbl#(0()) -> c_6() first#(X1,X2) -> c_7() first#(0(),X) -> c_8() s#(X) -> c_9() sqr#(0()) -> c_10() terms#(N) -> c_11(sqr#(N)) terms#(X) -> c_12() - Weak TRS: activate(X) -> X activate(n__first(X1,X2)) -> first(activate(X1),activate(X2)) activate(n__s(X)) -> s(activate(X)) activate(n__terms(X)) -> terms(activate(X)) first(X1,X2) -> n__first(X1,X2) first(0(),X) -> nil() s(X) -> n__s(X) sqr(0()) -> 0() terms(N) -> cons(recip(sqr(N)),n__terms(n__s(N))) terms(X) -> n__terms(X) - Signature: {activate/1,add/2,dbl/1,first/2,s/1,sqr/1,terms/1,activate#/1,add#/2,dbl#/1,first#/2,s#/1,sqr#/1 ,terms#/1} / {0/0,cons/2,n__first/2,n__s/1,n__terms/1,nil/0,recip/1,c_1/0,c_2/1,c_3/1,c_4/1,c_5/0,c_6/0 ,c_7/0,c_8/0,c_9/0,c_10/0,c_11/1,c_12/0} - Obligation: innermost runtime complexity wrt. defined symbols {activate#,add#,dbl#,first#,s#,sqr# ,terms#} and constructors {0,cons,n__first,n__s,n__terms,nil,recip} + Applied Processor: RemoveWeakSuffixes + Details: Consider the dependency graph 1:W:activate#(X) -> c_1() 2:W:activate#(n__first(X1,X2)) -> c_2(first#(activate(X1),activate(X2))) -->_1 first#(0(),X) -> c_8():8 -->_1 first#(X1,X2) -> c_7():7 3:W:activate#(n__s(X)) -> c_3(s#(activate(X))) -->_1 s#(X) -> c_9():9 4:W:activate#(n__terms(X)) -> c_4(terms#(activate(X))) -->_1 terms#(N) -> c_11(sqr#(N)):11 -->_1 terms#(X) -> c_12():12 5:W:add#(0(),X) -> c_5() 6:W:dbl#(0()) -> c_6() 7:W:first#(X1,X2) -> c_7() 8:W:first#(0(),X) -> c_8() 9:W:s#(X) -> c_9() 10:W:sqr#(0()) -> c_10() 11:W:terms#(N) -> c_11(sqr#(N)) -->_1 sqr#(0()) -> c_10():10 12:W:terms#(X) -> c_12() The following weak DPs constitute a sub-graph of the DG that is closed under successors. The DPs are removed. 6: dbl#(0()) -> c_6() 5: add#(0(),X) -> c_5() 4: activate#(n__terms(X)) -> c_4(terms#(activate(X))) 12: terms#(X) -> c_12() 11: terms#(N) -> c_11(sqr#(N)) 10: sqr#(0()) -> c_10() 3: activate#(n__s(X)) -> c_3(s#(activate(X))) 9: s#(X) -> c_9() 2: activate#(n__first(X1,X2)) -> c_2(first#(activate(X1),activate(X2))) 7: first#(X1,X2) -> c_7() 8: first#(0(),X) -> c_8() 1: activate#(X) -> c_1() * Step 7: EmptyProcessor WORST_CASE(?,O(1)) + Considered Problem: - Weak TRS: activate(X) -> X activate(n__first(X1,X2)) -> first(activate(X1),activate(X2)) activate(n__s(X)) -> s(activate(X)) activate(n__terms(X)) -> terms(activate(X)) first(X1,X2) -> n__first(X1,X2) first(0(),X) -> nil() s(X) -> n__s(X) sqr(0()) -> 0() terms(N) -> cons(recip(sqr(N)),n__terms(n__s(N))) terms(X) -> n__terms(X) - Signature: {activate/1,add/2,dbl/1,first/2,s/1,sqr/1,terms/1,activate#/1,add#/2,dbl#/1,first#/2,s#/1,sqr#/1 ,terms#/1} / {0/0,cons/2,n__first/2,n__s/1,n__terms/1,nil/0,recip/1,c_1/0,c_2/1,c_3/1,c_4/1,c_5/0,c_6/0 ,c_7/0,c_8/0,c_9/0,c_10/0,c_11/1,c_12/0} - Obligation: innermost runtime complexity wrt. defined symbols {activate#,add#,dbl#,first#,s#,sqr# ,terms#} and constructors {0,cons,n__first,n__s,n__terms,nil,recip} + Applied Processor: EmptyProcessor + Details: The problem is already closed. The intended complexity is O(1). WORST_CASE(?,O(n^1))