WORST_CASE(Omega(n^1),O(n^3)) * Step 1: Sum WORST_CASE(Omega(n^1),O(n^3)) + Considered Problem: - Strict TRS: activate(X) -> X activate(n__first(X1,X2)) -> first(X1,X2) activate(n__terms(X)) -> terms(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))) half(0()) -> 0() half(dbl(X)) -> X half(s(0())) -> 0() half(s(s(X))) -> s(half(X)) sqr(0()) -> 0() sqr(s(X)) -> s(add(sqr(X),dbl(X))) terms(N) -> cons(recip(sqr(N)),n__terms(s(N))) terms(X) -> n__terms(X) - Signature: {activate/1,add/2,dbl/1,first/2,half/1,sqr/1,terms/1} / {0/0,cons/2,n__first/2,n__terms/1,nil/0,recip/1,s/1} - Obligation: innermost runtime complexity wrt. defined symbols {activate,add,dbl,first,half,sqr ,terms} and constructors {0,cons,n__first,n__terms,nil,recip,s} + Applied Processor: Sum {left = someStrategy, right = someStrategy} + Details: () ** Step 1.a:1: DecreasingLoops WORST_CASE(Omega(n^1),?) + Considered Problem: - Strict TRS: activate(X) -> X activate(n__first(X1,X2)) -> first(X1,X2) activate(n__terms(X)) -> terms(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))) half(0()) -> 0() half(dbl(X)) -> X half(s(0())) -> 0() half(s(s(X))) -> s(half(X)) sqr(0()) -> 0() sqr(s(X)) -> s(add(sqr(X),dbl(X))) terms(N) -> cons(recip(sqr(N)),n__terms(s(N))) terms(X) -> n__terms(X) - Signature: {activate/1,add/2,dbl/1,first/2,half/1,sqr/1,terms/1} / {0/0,cons/2,n__first/2,n__terms/1,nil/0,recip/1,s/1} - Obligation: innermost runtime complexity wrt. defined symbols {activate,add,dbl,first,half,sqr ,terms} and constructors {0,cons,n__first,n__terms,nil,recip,s} + Applied Processor: DecreasingLoops {bound = AnyLoop, narrow = 10} + Details: The system has following decreasing Loops: add(x,y){x -> s(x)} = add(s(x),y) ->^+ s(add(x,y)) = C[add(x,y) = add(x,y){}] ** Step 1.b:1: DependencyPairs WORST_CASE(?,O(n^3)) + Considered Problem: - Strict TRS: activate(X) -> X activate(n__first(X1,X2)) -> first(X1,X2) activate(n__terms(X)) -> terms(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))) half(0()) -> 0() half(dbl(X)) -> X half(s(0())) -> 0() half(s(s(X))) -> s(half(X)) sqr(0()) -> 0() sqr(s(X)) -> s(add(sqr(X),dbl(X))) terms(N) -> cons(recip(sqr(N)),n__terms(s(N))) terms(X) -> n__terms(X) - Signature: {activate/1,add/2,dbl/1,first/2,half/1,sqr/1,terms/1} / {0/0,cons/2,n__first/2,n__terms/1,nil/0,recip/1,s/1} - Obligation: innermost runtime complexity wrt. defined symbols {activate,add,dbl,first,half,sqr ,terms} and constructors {0,cons,n__first,n__terms,nil,recip,s} + Applied Processor: DependencyPairs {dpKind_ = DT} + Details: We add the following dependency tuples: Strict DPs activate#(X) -> c_1() activate#(n__first(X1,X2)) -> c_2(first#(X1,X2)) activate#(n__terms(X)) -> c_3(terms#(X)) add#(0(),X) -> c_4() add#(s(X),Y) -> c_5(add#(X,Y)) dbl#(0()) -> c_6() dbl#(s(X)) -> c_7(dbl#(X)) first#(X1,X2) -> c_8() first#(0(),X) -> c_9() first#(s(X),cons(Y,Z)) -> c_10(activate#(Z)) half#(0()) -> c_11() half#(dbl(X)) -> c_12() half#(s(0())) -> c_13() half#(s(s(X))) -> c_14(half#(X)) sqr#(0()) -> c_15() sqr#(s(X)) -> c_16(add#(sqr(X),dbl(X)),sqr#(X),dbl#(X)) terms#(N) -> c_17(sqr#(N)) terms#(X) -> c_18() Weak DPs and mark the set of starting terms. ** Step 1.b:2: PredecessorEstimation WORST_CASE(?,O(n^3)) + Considered Problem: - Strict DPs: activate#(X) -> c_1() activate#(n__first(X1,X2)) -> c_2(first#(X1,X2)) activate#(n__terms(X)) -> c_3(terms#(X)) add#(0(),X) -> c_4() add#(s(X),Y) -> c_5(add#(X,Y)) dbl#(0()) -> c_6() dbl#(s(X)) -> c_7(dbl#(X)) first#(X1,X2) -> c_8() first#(0(),X) -> c_9() first#(s(X),cons(Y,Z)) -> c_10(activate#(Z)) half#(0()) -> c_11() half#(dbl(X)) -> c_12() half#(s(0())) -> c_13() half#(s(s(X))) -> c_14(half#(X)) sqr#(0()) -> c_15() sqr#(s(X)) -> c_16(add#(sqr(X),dbl(X)),sqr#(X),dbl#(X)) terms#(N) -> c_17(sqr#(N)) terms#(X) -> c_18() - Weak TRS: activate(X) -> X activate(n__first(X1,X2)) -> first(X1,X2) activate(n__terms(X)) -> terms(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))) half(0()) -> 0() half(dbl(X)) -> X half(s(0())) -> 0() half(s(s(X))) -> s(half(X)) sqr(0()) -> 0() sqr(s(X)) -> s(add(sqr(X),dbl(X))) terms(N) -> cons(recip(sqr(N)),n__terms(s(N))) terms(X) -> n__terms(X) - Signature: {activate/1,add/2,dbl/1,first/2,half/1,sqr/1,terms/1,activate#/1,add#/2,dbl#/1,first#/2,half#/1,sqr#/1 ,terms#/1} / {0/0,cons/2,n__first/2,n__terms/1,nil/0,recip/1,s/1,c_1/0,c_2/1,c_3/1,c_4/0,c_5/1,c_6/0,c_7/1 ,c_8/0,c_9/0,c_10/1,c_11/0,c_12/0,c_13/0,c_14/1,c_15/0,c_16/3,c_17/1,c_18/0} - Obligation: innermost runtime complexity wrt. defined symbols {activate#,add#,dbl#,first#,half#,sqr# ,terms#} and constructors {0,cons,n__first,n__terms,nil,recip,s} + Applied Processor: PredecessorEstimation {onSelection = all simple predecessor estimation selector} + Details: We estimate the number of application of {1,4,6,8,9,11,12,13,15,18} by application of Pre({1,4,6,8,9,11,12,13,15,18}) = {2,3,5,7,10,14,16,17}. Here rules are labelled as follows: 1: activate#(X) -> c_1() 2: activate#(n__first(X1,X2)) -> c_2(first#(X1,X2)) 3: activate#(n__terms(X)) -> c_3(terms#(X)) 4: add#(0(),X) -> c_4() 5: add#(s(X),Y) -> c_5(add#(X,Y)) 6: dbl#(0()) -> c_6() 7: dbl#(s(X)) -> c_7(dbl#(X)) 8: first#(X1,X2) -> c_8() 9: first#(0(),X) -> c_9() 10: first#(s(X),cons(Y,Z)) -> c_10(activate#(Z)) 11: half#(0()) -> c_11() 12: half#(dbl(X)) -> c_12() 13: half#(s(0())) -> c_13() 14: half#(s(s(X))) -> c_14(half#(X)) 15: sqr#(0()) -> c_15() 16: sqr#(s(X)) -> c_16(add#(sqr(X),dbl(X)),sqr#(X),dbl#(X)) 17: terms#(N) -> c_17(sqr#(N)) 18: terms#(X) -> c_18() ** Step 1.b:3: RemoveWeakSuffixes WORST_CASE(?,O(n^3)) + Considered Problem: - Strict DPs: activate#(n__first(X1,X2)) -> c_2(first#(X1,X2)) activate#(n__terms(X)) -> c_3(terms#(X)) add#(s(X),Y) -> c_5(add#(X,Y)) dbl#(s(X)) -> c_7(dbl#(X)) first#(s(X),cons(Y,Z)) -> c_10(activate#(Z)) half#(s(s(X))) -> c_14(half#(X)) sqr#(s(X)) -> c_16(add#(sqr(X),dbl(X)),sqr#(X),dbl#(X)) terms#(N) -> c_17(sqr#(N)) - Weak DPs: activate#(X) -> c_1() add#(0(),X) -> c_4() dbl#(0()) -> c_6() first#(X1,X2) -> c_8() first#(0(),X) -> c_9() half#(0()) -> c_11() half#(dbl(X)) -> c_12() half#(s(0())) -> c_13() sqr#(0()) -> c_15() terms#(X) -> c_18() - Weak TRS: activate(X) -> X activate(n__first(X1,X2)) -> first(X1,X2) activate(n__terms(X)) -> terms(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))) half(0()) -> 0() half(dbl(X)) -> X half(s(0())) -> 0() half(s(s(X))) -> s(half(X)) sqr(0()) -> 0() sqr(s(X)) -> s(add(sqr(X),dbl(X))) terms(N) -> cons(recip(sqr(N)),n__terms(s(N))) terms(X) -> n__terms(X) - Signature: {activate/1,add/2,dbl/1,first/2,half/1,sqr/1,terms/1,activate#/1,add#/2,dbl#/1,first#/2,half#/1,sqr#/1 ,terms#/1} / {0/0,cons/2,n__first/2,n__terms/1,nil/0,recip/1,s/1,c_1/0,c_2/1,c_3/1,c_4/0,c_5/1,c_6/0,c_7/1 ,c_8/0,c_9/0,c_10/1,c_11/0,c_12/0,c_13/0,c_14/1,c_15/0,c_16/3,c_17/1,c_18/0} - Obligation: innermost runtime complexity wrt. defined symbols {activate#,add#,dbl#,first#,half#,sqr# ,terms#} and constructors {0,cons,n__first,n__terms,nil,recip,s} + Applied Processor: RemoveWeakSuffixes + Details: Consider the dependency graph 1:S:activate#(n__first(X1,X2)) -> c_2(first#(X1,X2)) -->_1 first#(s(X),cons(Y,Z)) -> c_10(activate#(Z)):5 -->_1 first#(0(),X) -> c_9():13 -->_1 first#(X1,X2) -> c_8():12 2:S:activate#(n__terms(X)) -> c_3(terms#(X)) -->_1 terms#(N) -> c_17(sqr#(N)):8 -->_1 terms#(X) -> c_18():18 3:S:add#(s(X),Y) -> c_5(add#(X,Y)) -->_1 add#(0(),X) -> c_4():10 -->_1 add#(s(X),Y) -> c_5(add#(X,Y)):3 4:S:dbl#(s(X)) -> c_7(dbl#(X)) -->_1 dbl#(0()) -> c_6():11 -->_1 dbl#(s(X)) -> c_7(dbl#(X)):4 5:S:first#(s(X),cons(Y,Z)) -> c_10(activate#(Z)) -->_1 activate#(X) -> c_1():9 -->_1 activate#(n__terms(X)) -> c_3(terms#(X)):2 -->_1 activate#(n__first(X1,X2)) -> c_2(first#(X1,X2)):1 6:S:half#(s(s(X))) -> c_14(half#(X)) -->_1 half#(s(0())) -> c_13():16 -->_1 half#(dbl(X)) -> c_12():15 -->_1 half#(0()) -> c_11():14 -->_1 half#(s(s(X))) -> c_14(half#(X)):6 7:S:sqr#(s(X)) -> c_16(add#(sqr(X),dbl(X)),sqr#(X),dbl#(X)) -->_2 sqr#(0()) -> c_15():17 -->_3 dbl#(0()) -> c_6():11 -->_1 add#(0(),X) -> c_4():10 -->_2 sqr#(s(X)) -> c_16(add#(sqr(X),dbl(X)),sqr#(X),dbl#(X)):7 -->_3 dbl#(s(X)) -> c_7(dbl#(X)):4 -->_1 add#(s(X),Y) -> c_5(add#(X,Y)):3 8:S:terms#(N) -> c_17(sqr#(N)) -->_1 sqr#(0()) -> c_15():17 -->_1 sqr#(s(X)) -> c_16(add#(sqr(X),dbl(X)),sqr#(X),dbl#(X)):7 9:W:activate#(X) -> c_1() 10:W:add#(0(),X) -> c_4() 11:W:dbl#(0()) -> c_6() 12:W:first#(X1,X2) -> c_8() 13:W:first#(0(),X) -> c_9() 14:W:half#(0()) -> c_11() 15:W:half#(dbl(X)) -> c_12() 16:W:half#(s(0())) -> c_13() 17:W:sqr#(0()) -> c_15() 18:W:terms#(X) -> c_18() The following weak DPs constitute a sub-graph of the DG that is closed under successors. The DPs are removed. 14: half#(0()) -> c_11() 15: half#(dbl(X)) -> c_12() 16: half#(s(0())) -> c_13() 12: first#(X1,X2) -> c_8() 13: first#(0(),X) -> c_9() 18: terms#(X) -> c_18() 10: add#(0(),X) -> c_4() 11: dbl#(0()) -> c_6() 17: sqr#(0()) -> c_15() 9: activate#(X) -> c_1() ** Step 1.b:4: UsableRules WORST_CASE(?,O(n^3)) + Considered Problem: - Strict DPs: activate#(n__first(X1,X2)) -> c_2(first#(X1,X2)) activate#(n__terms(X)) -> c_3(terms#(X)) add#(s(X),Y) -> c_5(add#(X,Y)) dbl#(s(X)) -> c_7(dbl#(X)) first#(s(X),cons(Y,Z)) -> c_10(activate#(Z)) half#(s(s(X))) -> c_14(half#(X)) sqr#(s(X)) -> c_16(add#(sqr(X),dbl(X)),sqr#(X),dbl#(X)) terms#(N) -> c_17(sqr#(N)) - Weak TRS: activate(X) -> X activate(n__first(X1,X2)) -> first(X1,X2) activate(n__terms(X)) -> terms(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))) half(0()) -> 0() half(dbl(X)) -> X half(s(0())) -> 0() half(s(s(X))) -> s(half(X)) sqr(0()) -> 0() sqr(s(X)) -> s(add(sqr(X),dbl(X))) terms(N) -> cons(recip(sqr(N)),n__terms(s(N))) terms(X) -> n__terms(X) - Signature: {activate/1,add/2,dbl/1,first/2,half/1,sqr/1,terms/1,activate#/1,add#/2,dbl#/1,first#/2,half#/1,sqr#/1 ,terms#/1} / {0/0,cons/2,n__first/2,n__terms/1,nil/0,recip/1,s/1,c_1/0,c_2/1,c_3/1,c_4/0,c_5/1,c_6/0,c_7/1 ,c_8/0,c_9/0,c_10/1,c_11/0,c_12/0,c_13/0,c_14/1,c_15/0,c_16/3,c_17/1,c_18/0} - Obligation: innermost runtime complexity wrt. defined symbols {activate#,add#,dbl#,first#,half#,sqr# ,terms#} and constructors {0,cons,n__first,n__terms,nil,recip,s} + Applied Processor: UsableRules + Details: We replace rewrite rules by usable rules: add(0(),X) -> X add(s(X),Y) -> s(add(X,Y)) dbl(0()) -> 0() dbl(s(X)) -> s(s(dbl(X))) sqr(0()) -> 0() sqr(s(X)) -> s(add(sqr(X),dbl(X))) activate#(n__first(X1,X2)) -> c_2(first#(X1,X2)) activate#(n__terms(X)) -> c_3(terms#(X)) add#(s(X),Y) -> c_5(add#(X,Y)) dbl#(s(X)) -> c_7(dbl#(X)) first#(s(X),cons(Y,Z)) -> c_10(activate#(Z)) half#(s(s(X))) -> c_14(half#(X)) sqr#(s(X)) -> c_16(add#(sqr(X),dbl(X)),sqr#(X),dbl#(X)) terms#(N) -> c_17(sqr#(N)) ** Step 1.b:5: DecomposeDG WORST_CASE(?,O(n^3)) + Considered Problem: - Strict DPs: activate#(n__first(X1,X2)) -> c_2(first#(X1,X2)) activate#(n__terms(X)) -> c_3(terms#(X)) add#(s(X),Y) -> c_5(add#(X,Y)) dbl#(s(X)) -> c_7(dbl#(X)) first#(s(X),cons(Y,Z)) -> c_10(activate#(Z)) half#(s(s(X))) -> c_14(half#(X)) sqr#(s(X)) -> c_16(add#(sqr(X),dbl(X)),sqr#(X),dbl#(X)) terms#(N) -> c_17(sqr#(N)) - Weak TRS: add(0(),X) -> X add(s(X),Y) -> s(add(X,Y)) dbl(0()) -> 0() dbl(s(X)) -> s(s(dbl(X))) sqr(0()) -> 0() sqr(s(X)) -> s(add(sqr(X),dbl(X))) - Signature: {activate/1,add/2,dbl/1,first/2,half/1,sqr/1,terms/1,activate#/1,add#/2,dbl#/1,first#/2,half#/1,sqr#/1 ,terms#/1} / {0/0,cons/2,n__first/2,n__terms/1,nil/0,recip/1,s/1,c_1/0,c_2/1,c_3/1,c_4/0,c_5/1,c_6/0,c_7/1 ,c_8/0,c_9/0,c_10/1,c_11/0,c_12/0,c_13/0,c_14/1,c_15/0,c_16/3,c_17/1,c_18/0} - Obligation: innermost runtime complexity wrt. defined symbols {activate#,add#,dbl#,first#,half#,sqr# ,terms#} and constructors {0,cons,n__first,n__terms,nil,recip,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 activate#(n__first(X1,X2)) -> c_2(first#(X1,X2)) activate#(n__terms(X)) -> c_3(terms#(X)) first#(s(X),cons(Y,Z)) -> c_10(activate#(Z)) half#(s(s(X))) -> c_14(half#(X)) sqr#(s(X)) -> c_16(add#(sqr(X),dbl(X)),sqr#(X),dbl#(X)) terms#(N) -> c_17(sqr#(N)) and a lower component add#(s(X),Y) -> c_5(add#(X,Y)) dbl#(s(X)) -> c_7(dbl#(X)) Further, following extension rules are added to the lower component. activate#(n__first(X1,X2)) -> first#(X1,X2) activate#(n__terms(X)) -> terms#(X) first#(s(X),cons(Y,Z)) -> activate#(Z) half#(s(s(X))) -> half#(X) sqr#(s(X)) -> add#(sqr(X),dbl(X)) sqr#(s(X)) -> dbl#(X) sqr#(s(X)) -> sqr#(X) terms#(N) -> sqr#(N) *** Step 1.b:5.a:1: SimplifyRHS WORST_CASE(?,O(n^1)) + Considered Problem: - Strict DPs: activate#(n__first(X1,X2)) -> c_2(first#(X1,X2)) activate#(n__terms(X)) -> c_3(terms#(X)) first#(s(X),cons(Y,Z)) -> c_10(activate#(Z)) half#(s(s(X))) -> c_14(half#(X)) sqr#(s(X)) -> c_16(add#(sqr(X),dbl(X)),sqr#(X),dbl#(X)) terms#(N) -> c_17(sqr#(N)) - Weak TRS: add(0(),X) -> X add(s(X),Y) -> s(add(X,Y)) dbl(0()) -> 0() dbl(s(X)) -> s(s(dbl(X))) sqr(0()) -> 0() sqr(s(X)) -> s(add(sqr(X),dbl(X))) - Signature: {activate/1,add/2,dbl/1,first/2,half/1,sqr/1,terms/1,activate#/1,add#/2,dbl#/1,first#/2,half#/1,sqr#/1 ,terms#/1} / {0/0,cons/2,n__first/2,n__terms/1,nil/0,recip/1,s/1,c_1/0,c_2/1,c_3/1,c_4/0,c_5/1,c_6/0,c_7/1 ,c_8/0,c_9/0,c_10/1,c_11/0,c_12/0,c_13/0,c_14/1,c_15/0,c_16/3,c_17/1,c_18/0} - Obligation: innermost runtime complexity wrt. defined symbols {activate#,add#,dbl#,first#,half#,sqr# ,terms#} and constructors {0,cons,n__first,n__terms,nil,recip,s} + Applied Processor: SimplifyRHS + Details: Consider the dependency graph 1:S:activate#(n__first(X1,X2)) -> c_2(first#(X1,X2)) -->_1 first#(s(X),cons(Y,Z)) -> c_10(activate#(Z)):3 2:S:activate#(n__terms(X)) -> c_3(terms#(X)) -->_1 terms#(N) -> c_17(sqr#(N)):6 3:S:first#(s(X),cons(Y,Z)) -> c_10(activate#(Z)) -->_1 activate#(n__terms(X)) -> c_3(terms#(X)):2 -->_1 activate#(n__first(X1,X2)) -> c_2(first#(X1,X2)):1 4:S:half#(s(s(X))) -> c_14(half#(X)) -->_1 half#(s(s(X))) -> c_14(half#(X)):4 5:S:sqr#(s(X)) -> c_16(add#(sqr(X),dbl(X)),sqr#(X),dbl#(X)) -->_2 sqr#(s(X)) -> c_16(add#(sqr(X),dbl(X)),sqr#(X),dbl#(X)):5 6:S:terms#(N) -> c_17(sqr#(N)) -->_1 sqr#(s(X)) -> c_16(add#(sqr(X),dbl(X)),sqr#(X),dbl#(X)):5 Due to missing edges in the depndency graph, the right-hand sides of following rules could be simplified: sqr#(s(X)) -> c_16(sqr#(X)) *** Step 1.b:5.a:2: UsableRules WORST_CASE(?,O(n^1)) + Considered Problem: - Strict DPs: activate#(n__first(X1,X2)) -> c_2(first#(X1,X2)) activate#(n__terms(X)) -> c_3(terms#(X)) first#(s(X),cons(Y,Z)) -> c_10(activate#(Z)) half#(s(s(X))) -> c_14(half#(X)) sqr#(s(X)) -> c_16(sqr#(X)) terms#(N) -> c_17(sqr#(N)) - Weak TRS: add(0(),X) -> X add(s(X),Y) -> s(add(X,Y)) dbl(0()) -> 0() dbl(s(X)) -> s(s(dbl(X))) sqr(0()) -> 0() sqr(s(X)) -> s(add(sqr(X),dbl(X))) - Signature: {activate/1,add/2,dbl/1,first/2,half/1,sqr/1,terms/1,activate#/1,add#/2,dbl#/1,first#/2,half#/1,sqr#/1 ,terms#/1} / {0/0,cons/2,n__first/2,n__terms/1,nil/0,recip/1,s/1,c_1/0,c_2/1,c_3/1,c_4/0,c_5/1,c_6/0,c_7/1 ,c_8/0,c_9/0,c_10/1,c_11/0,c_12/0,c_13/0,c_14/1,c_15/0,c_16/1,c_17/1,c_18/0} - Obligation: innermost runtime complexity wrt. defined symbols {activate#,add#,dbl#,first#,half#,sqr# ,terms#} and constructors {0,cons,n__first,n__terms,nil,recip,s} + Applied Processor: UsableRules + Details: We replace rewrite rules by usable rules: activate#(n__first(X1,X2)) -> c_2(first#(X1,X2)) activate#(n__terms(X)) -> c_3(terms#(X)) first#(s(X),cons(Y,Z)) -> c_10(activate#(Z)) half#(s(s(X))) -> c_14(half#(X)) sqr#(s(X)) -> c_16(sqr#(X)) terms#(N) -> c_17(sqr#(N)) *** Step 1.b:5.a:3: WeightGap WORST_CASE(?,O(n^1)) + Considered Problem: - Strict DPs: activate#(n__first(X1,X2)) -> c_2(first#(X1,X2)) activate#(n__terms(X)) -> c_3(terms#(X)) first#(s(X),cons(Y,Z)) -> c_10(activate#(Z)) half#(s(s(X))) -> c_14(half#(X)) sqr#(s(X)) -> c_16(sqr#(X)) terms#(N) -> c_17(sqr#(N)) - Signature: {activate/1,add/2,dbl/1,first/2,half/1,sqr/1,terms/1,activate#/1,add#/2,dbl#/1,first#/2,half#/1,sqr#/1 ,terms#/1} / {0/0,cons/2,n__first/2,n__terms/1,nil/0,recip/1,s/1,c_1/0,c_2/1,c_3/1,c_4/0,c_5/1,c_6/0,c_7/1 ,c_8/0,c_9/0,c_10/1,c_11/0,c_12/0,c_13/0,c_14/1,c_15/0,c_16/1,c_17/1,c_18/0} - Obligation: innermost runtime complexity wrt. defined symbols {activate#,add#,dbl#,first#,half#,sqr# ,terms#} and constructors {0,cons,n__first,n__terms,nil,recip,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_2) = {1}, uargs(c_3) = {1}, uargs(c_10) = {1}, uargs(c_14) = {1}, uargs(c_16) = {1}, uargs(c_17) = {1} Following symbols are considered usable: all TcT has computed the following interpretation: p(0) = [0] p(activate) = [0] p(add) = [0] p(cons) = [1] x1 + [1] x2 + [1] p(dbl) = [0] p(first) = [0] p(half) = [0] p(n__first) = [1] x1 + [1] x2 + [1] p(n__terms) = [0] p(nil) = [0] p(recip) = [1] x1 + [0] p(s) = [8] p(sqr) = [0] p(terms) = [0] p(activate#) = [11] p(add#) = [0] p(dbl#) = [0] p(first#) = [9] p(half#) = [11] p(sqr#) = [12] p(terms#) = [1] p(c_1) = [0] p(c_2) = [1] x1 + [0] p(c_3) = [1] x1 + [0] p(c_4) = [0] p(c_5) = [0] p(c_6) = [0] p(c_7) = [0] p(c_8) = [0] p(c_9) = [0] p(c_10) = [1] x1 + [0] p(c_11) = [0] p(c_12) = [0] p(c_13) = [0] p(c_14) = [1] x1 + [0] p(c_15) = [0] p(c_16) = [1] x1 + [4] p(c_17) = [1] x1 + [0] p(c_18) = [0] Following rules are strictly oriented: activate#(n__first(X1,X2)) = [11] > [9] = c_2(first#(X1,X2)) activate#(n__terms(X)) = [11] > [1] = c_3(terms#(X)) Following rules are (at-least) weakly oriented: first#(s(X),cons(Y,Z)) = [9] >= [11] = c_10(activate#(Z)) half#(s(s(X))) = [11] >= [11] = c_14(half#(X)) sqr#(s(X)) = [12] >= [16] = c_16(sqr#(X)) terms#(N) = [1] >= [12] = c_17(sqr#(N)) Further, it can be verified that all rules not oriented are covered by the weightgap condition. *** Step 1.b:5.a:4: WeightGap WORST_CASE(?,O(n^1)) + Considered Problem: - Strict DPs: first#(s(X),cons(Y,Z)) -> c_10(activate#(Z)) half#(s(s(X))) -> c_14(half#(X)) sqr#(s(X)) -> c_16(sqr#(X)) terms#(N) -> c_17(sqr#(N)) - Weak DPs: activate#(n__first(X1,X2)) -> c_2(first#(X1,X2)) activate#(n__terms(X)) -> c_3(terms#(X)) - Signature: {activate/1,add/2,dbl/1,first/2,half/1,sqr/1,terms/1,activate#/1,add#/2,dbl#/1,first#/2,half#/1,sqr#/1 ,terms#/1} / {0/0,cons/2,n__first/2,n__terms/1,nil/0,recip/1,s/1,c_1/0,c_2/1,c_3/1,c_4/0,c_5/1,c_6/0,c_7/1 ,c_8/0,c_9/0,c_10/1,c_11/0,c_12/0,c_13/0,c_14/1,c_15/0,c_16/1,c_17/1,c_18/0} - Obligation: innermost runtime complexity wrt. defined symbols {activate#,add#,dbl#,first#,half#,sqr# ,terms#} and constructors {0,cons,n__first,n__terms,nil,recip,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_2) = {1}, uargs(c_3) = {1}, uargs(c_10) = {1}, uargs(c_14) = {1}, uargs(c_16) = {1}, uargs(c_17) = {1} Following symbols are considered usable: all TcT has computed the following interpretation: p(0) = [0] p(activate) = [0] p(add) = [0] p(cons) = [1] x1 + [1] x2 + [0] p(dbl) = [0] p(first) = [0] p(half) = [0] p(n__first) = [1] x2 + [0] p(n__terms) = [1] x1 + [4] p(nil) = [0] p(recip) = [1] x1 + [0] p(s) = [1] x1 + [2] p(sqr) = [1] p(terms) = [1] x1 + [2] p(activate#) = [4] x1 + [0] p(add#) = [0] p(dbl#) = [0] p(first#) = [4] x2 + [0] p(half#) = [0] p(sqr#) = [1] x1 + [0] p(terms#) = [4] x1 + [5] p(c_1) = [0] p(c_2) = [1] x1 + [0] p(c_3) = [1] x1 + [0] p(c_4) = [0] p(c_5) = [0] p(c_6) = [0] p(c_7) = [0] p(c_8) = [0] p(c_9) = [0] p(c_10) = [1] x1 + [0] p(c_11) = [0] p(c_12) = [0] p(c_13) = [0] p(c_14) = [1] x1 + [0] p(c_15) = [0] p(c_16) = [1] x1 + [0] p(c_17) = [1] x1 + [0] p(c_18) = [0] Following rules are strictly oriented: sqr#(s(X)) = [1] X + [2] > [1] X + [0] = c_16(sqr#(X)) terms#(N) = [4] N + [5] > [1] N + [0] = c_17(sqr#(N)) Following rules are (at-least) weakly oriented: activate#(n__first(X1,X2)) = [4] X2 + [0] >= [4] X2 + [0] = c_2(first#(X1,X2)) activate#(n__terms(X)) = [4] X + [16] >= [4] X + [5] = c_3(terms#(X)) first#(s(X),cons(Y,Z)) = [4] Y + [4] Z + [0] >= [4] Z + [0] = c_10(activate#(Z)) half#(s(s(X))) = [0] >= [0] = c_14(half#(X)) Further, it can be verified that all rules not oriented are covered by the weightgap condition. *** Step 1.b:5.a:5: WeightGap WORST_CASE(?,O(n^1)) + Considered Problem: - Strict DPs: first#(s(X),cons(Y,Z)) -> c_10(activate#(Z)) half#(s(s(X))) -> c_14(half#(X)) - Weak DPs: activate#(n__first(X1,X2)) -> c_2(first#(X1,X2)) activate#(n__terms(X)) -> c_3(terms#(X)) sqr#(s(X)) -> c_16(sqr#(X)) terms#(N) -> c_17(sqr#(N)) - Signature: {activate/1,add/2,dbl/1,first/2,half/1,sqr/1,terms/1,activate#/1,add#/2,dbl#/1,first#/2,half#/1,sqr#/1 ,terms#/1} / {0/0,cons/2,n__first/2,n__terms/1,nil/0,recip/1,s/1,c_1/0,c_2/1,c_3/1,c_4/0,c_5/1,c_6/0,c_7/1 ,c_8/0,c_9/0,c_10/1,c_11/0,c_12/0,c_13/0,c_14/1,c_15/0,c_16/1,c_17/1,c_18/0} - Obligation: innermost runtime complexity wrt. defined symbols {activate#,add#,dbl#,first#,half#,sqr# ,terms#} and constructors {0,cons,n__first,n__terms,nil,recip,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_2) = {1}, uargs(c_3) = {1}, uargs(c_10) = {1}, uargs(c_14) = {1}, uargs(c_16) = {1}, uargs(c_17) = {1} Following symbols are considered usable: all TcT has computed the following interpretation: p(0) = [1] p(activate) = [0] p(add) = [4] p(cons) = [1] x2 + [4] p(dbl) = [1] p(first) = [1] x1 + [8] x2 + [2] p(half) = [1] p(n__first) = [1] x1 + [1] x2 + [0] p(n__terms) = [1] x1 + [10] p(nil) = [0] p(recip) = [1] x1 + [8] p(s) = [4] p(sqr) = [2] p(terms) = [1] p(activate#) = [2] x1 + [0] p(add#) = [8] x1 + [2] x2 + [1] p(dbl#) = [2] x1 + [2] p(first#) = [2] x2 + [0] p(half#) = [0] p(sqr#) = [2] p(terms#) = [1] x1 + [9] p(c_1) = [1] p(c_2) = [1] x1 + [0] p(c_3) = [1] x1 + [11] p(c_4) = [2] p(c_5) = [2] x1 + [4] p(c_6) = [1] p(c_7) = [4] p(c_8) = [1] p(c_9) = [1] p(c_10) = [1] x1 + [1] p(c_11) = [4] p(c_12) = [1] p(c_13) = [1] p(c_14) = [1] x1 + [12] p(c_15) = [1] p(c_16) = [1] x1 + [0] p(c_17) = [1] x1 + [7] p(c_18) = [0] Following rules are strictly oriented: first#(s(X),cons(Y,Z)) = [2] Z + [8] > [2] Z + [1] = c_10(activate#(Z)) Following rules are (at-least) weakly oriented: activate#(n__first(X1,X2)) = [2] X1 + [2] X2 + [0] >= [2] X2 + [0] = c_2(first#(X1,X2)) activate#(n__terms(X)) = [2] X + [20] >= [1] X + [20] = c_3(terms#(X)) half#(s(s(X))) = [0] >= [12] = c_14(half#(X)) sqr#(s(X)) = [2] >= [2] = c_16(sqr#(X)) terms#(N) = [1] N + [9] >= [9] = c_17(sqr#(N)) Further, it can be verified that all rules not oriented are covered by the weightgap condition. *** Step 1.b:5.a:6: WeightGap WORST_CASE(?,O(n^1)) + Considered Problem: - Strict DPs: half#(s(s(X))) -> c_14(half#(X)) - Weak DPs: activate#(n__first(X1,X2)) -> c_2(first#(X1,X2)) activate#(n__terms(X)) -> c_3(terms#(X)) first#(s(X),cons(Y,Z)) -> c_10(activate#(Z)) sqr#(s(X)) -> c_16(sqr#(X)) terms#(N) -> c_17(sqr#(N)) - Signature: {activate/1,add/2,dbl/1,first/2,half/1,sqr/1,terms/1,activate#/1,add#/2,dbl#/1,first#/2,half#/1,sqr#/1 ,terms#/1} / {0/0,cons/2,n__first/2,n__terms/1,nil/0,recip/1,s/1,c_1/0,c_2/1,c_3/1,c_4/0,c_5/1,c_6/0,c_7/1 ,c_8/0,c_9/0,c_10/1,c_11/0,c_12/0,c_13/0,c_14/1,c_15/0,c_16/1,c_17/1,c_18/0} - Obligation: innermost runtime complexity wrt. defined symbols {activate#,add#,dbl#,first#,half#,sqr# ,terms#} and constructors {0,cons,n__first,n__terms,nil,recip,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_2) = {1}, uargs(c_3) = {1}, uargs(c_10) = {1}, uargs(c_14) = {1}, uargs(c_16) = {1}, uargs(c_17) = {1} Following symbols are considered usable: all TcT has computed the following interpretation: p(0) = [1] p(activate) = [8] p(add) = [1] x1 + [2] x2 + [1] p(cons) = [0] p(dbl) = [1] x1 + [0] p(first) = [4] x1 + [2] x2 + [0] p(half) = [1] x1 + [0] p(n__first) = [0] p(n__terms) = [2] p(nil) = [1] p(recip) = [1] p(s) = [1] x1 + [5] p(sqr) = [1] x1 + [0] p(terms) = [1] x1 + [0] p(activate#) = [0] p(add#) = [1] x2 + [1] p(dbl#) = [2] x1 + [0] p(first#) = [0] p(half#) = [2] x1 + [1] p(sqr#) = [0] p(terms#) = [0] p(c_1) = [1] p(c_2) = [1] x1 + [0] p(c_3) = [1] x1 + [0] p(c_4) = [0] p(c_5) = [1] x1 + [1] p(c_6) = [8] p(c_7) = [1] x1 + [0] p(c_8) = [1] p(c_9) = [0] p(c_10) = [1] x1 + [0] p(c_11) = [2] p(c_12) = [1] p(c_13) = [1] p(c_14) = [1] x1 + [3] p(c_15) = [2] p(c_16) = [1] x1 + [0] p(c_17) = [1] x1 + [0] p(c_18) = [0] Following rules are strictly oriented: half#(s(s(X))) = [2] X + [21] > [2] X + [4] = c_14(half#(X)) Following rules are (at-least) weakly oriented: activate#(n__first(X1,X2)) = [0] >= [0] = c_2(first#(X1,X2)) activate#(n__terms(X)) = [0] >= [0] = c_3(terms#(X)) first#(s(X),cons(Y,Z)) = [0] >= [0] = c_10(activate#(Z)) sqr#(s(X)) = [0] >= [0] = c_16(sqr#(X)) terms#(N) = [0] >= [0] = c_17(sqr#(N)) Further, it can be verified that all rules not oriented are covered by the weightgap condition. *** Step 1.b:5.a:7: EmptyProcessor WORST_CASE(?,O(1)) + Considered Problem: - Weak DPs: activate#(n__first(X1,X2)) -> c_2(first#(X1,X2)) activate#(n__terms(X)) -> c_3(terms#(X)) first#(s(X),cons(Y,Z)) -> c_10(activate#(Z)) half#(s(s(X))) -> c_14(half#(X)) sqr#(s(X)) -> c_16(sqr#(X)) terms#(N) -> c_17(sqr#(N)) - Signature: {activate/1,add/2,dbl/1,first/2,half/1,sqr/1,terms/1,activate#/1,add#/2,dbl#/1,first#/2,half#/1,sqr#/1 ,terms#/1} / {0/0,cons/2,n__first/2,n__terms/1,nil/0,recip/1,s/1,c_1/0,c_2/1,c_3/1,c_4/0,c_5/1,c_6/0,c_7/1 ,c_8/0,c_9/0,c_10/1,c_11/0,c_12/0,c_13/0,c_14/1,c_15/0,c_16/1,c_17/1,c_18/0} - Obligation: innermost runtime complexity wrt. defined symbols {activate#,add#,dbl#,first#,half#,sqr# ,terms#} and constructors {0,cons,n__first,n__terms,nil,recip,s} + Applied Processor: EmptyProcessor + Details: The problem is already closed. The intended complexity is O(1). *** Step 1.b:5.b:1: RemoveWeakSuffixes WORST_CASE(?,O(n^2)) + Considered Problem: - Strict DPs: add#(s(X),Y) -> c_5(add#(X,Y)) dbl#(s(X)) -> c_7(dbl#(X)) - Weak DPs: activate#(n__first(X1,X2)) -> first#(X1,X2) activate#(n__terms(X)) -> terms#(X) first#(s(X),cons(Y,Z)) -> activate#(Z) half#(s(s(X))) -> half#(X) sqr#(s(X)) -> add#(sqr(X),dbl(X)) sqr#(s(X)) -> dbl#(X) sqr#(s(X)) -> sqr#(X) terms#(N) -> sqr#(N) - Weak TRS: add(0(),X) -> X add(s(X),Y) -> s(add(X,Y)) dbl(0()) -> 0() dbl(s(X)) -> s(s(dbl(X))) sqr(0()) -> 0() sqr(s(X)) -> s(add(sqr(X),dbl(X))) - Signature: {activate/1,add/2,dbl/1,first/2,half/1,sqr/1,terms/1,activate#/1,add#/2,dbl#/1,first#/2,half#/1,sqr#/1 ,terms#/1} / {0/0,cons/2,n__first/2,n__terms/1,nil/0,recip/1,s/1,c_1/0,c_2/1,c_3/1,c_4/0,c_5/1,c_6/0,c_7/1 ,c_8/0,c_9/0,c_10/1,c_11/0,c_12/0,c_13/0,c_14/1,c_15/0,c_16/3,c_17/1,c_18/0} - Obligation: innermost runtime complexity wrt. defined symbols {activate#,add#,dbl#,first#,half#,sqr# ,terms#} and constructors {0,cons,n__first,n__terms,nil,recip,s} + Applied Processor: RemoveWeakSuffixes + Details: Consider the dependency graph 1:S:add#(s(X),Y) -> c_5(add#(X,Y)) -->_1 add#(s(X),Y) -> c_5(add#(X,Y)):1 2:S:dbl#(s(X)) -> c_7(dbl#(X)) -->_1 dbl#(s(X)) -> c_7(dbl#(X)):2 3:W:activate#(n__first(X1,X2)) -> first#(X1,X2) -->_1 first#(s(X),cons(Y,Z)) -> activate#(Z):5 4:W:activate#(n__terms(X)) -> terms#(X) -->_1 terms#(N) -> sqr#(N):10 5:W:first#(s(X),cons(Y,Z)) -> activate#(Z) -->_1 activate#(n__terms(X)) -> terms#(X):4 -->_1 activate#(n__first(X1,X2)) -> first#(X1,X2):3 6:W:half#(s(s(X))) -> half#(X) -->_1 half#(s(s(X))) -> half#(X):6 7:W:sqr#(s(X)) -> add#(sqr(X),dbl(X)) -->_1 add#(s(X),Y) -> c_5(add#(X,Y)):1 8:W:sqr#(s(X)) -> dbl#(X) -->_1 dbl#(s(X)) -> c_7(dbl#(X)):2 9:W:sqr#(s(X)) -> sqr#(X) -->_1 sqr#(s(X)) -> sqr#(X):9 -->_1 sqr#(s(X)) -> dbl#(X):8 -->_1 sqr#(s(X)) -> add#(sqr(X),dbl(X)):7 10:W:terms#(N) -> sqr#(N) -->_1 sqr#(s(X)) -> sqr#(X):9 -->_1 sqr#(s(X)) -> dbl#(X):8 -->_1 sqr#(s(X)) -> add#(sqr(X),dbl(X)):7 The following weak DPs constitute a sub-graph of the DG that is closed under successors. The DPs are removed. 6: half#(s(s(X))) -> half#(X) *** Step 1.b:5.b:2: NaturalMI WORST_CASE(?,O(n^2)) + Considered Problem: - Strict DPs: add#(s(X),Y) -> c_5(add#(X,Y)) dbl#(s(X)) -> c_7(dbl#(X)) - Weak DPs: activate#(n__first(X1,X2)) -> first#(X1,X2) activate#(n__terms(X)) -> terms#(X) first#(s(X),cons(Y,Z)) -> activate#(Z) sqr#(s(X)) -> add#(sqr(X),dbl(X)) sqr#(s(X)) -> dbl#(X) sqr#(s(X)) -> sqr#(X) terms#(N) -> sqr#(N) - Weak TRS: add(0(),X) -> X add(s(X),Y) -> s(add(X,Y)) dbl(0()) -> 0() dbl(s(X)) -> s(s(dbl(X))) sqr(0()) -> 0() sqr(s(X)) -> s(add(sqr(X),dbl(X))) - Signature: {activate/1,add/2,dbl/1,first/2,half/1,sqr/1,terms/1,activate#/1,add#/2,dbl#/1,first#/2,half#/1,sqr#/1 ,terms#/1} / {0/0,cons/2,n__first/2,n__terms/1,nil/0,recip/1,s/1,c_1/0,c_2/1,c_3/1,c_4/0,c_5/1,c_6/0,c_7/1 ,c_8/0,c_9/0,c_10/1,c_11/0,c_12/0,c_13/0,c_14/1,c_15/0,c_16/3,c_17/1,c_18/0} - Obligation: innermost runtime complexity wrt. defined symbols {activate#,add#,dbl#,first#,half#,sqr# ,terms#} and constructors {0,cons,n__first,n__terms,nil,recip,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_5) = {1}, uargs(c_7) = {1} Following symbols are considered usable: {activate#,add#,dbl#,first#,half#,sqr#,terms#} TcT has computed the following interpretation: p(0) = [2] p(activate) = [0] p(add) = [0] p(cons) = [1] x2 + [0] p(dbl) = [0] p(first) = [1] x1 + [2] p(half) = [2] x1 + [2] p(n__first) = [1] x2 + [8] p(n__terms) = [1] x1 + [3] p(nil) = [1] p(recip) = [0] p(s) = [1] x1 + [7] p(sqr) = [7] p(terms) = [4] p(activate#) = [2] x1 + [0] p(add#) = [0] p(dbl#) = [2] x1 + [0] p(first#) = [2] x2 + [3] p(half#) = [1] x1 + [8] p(sqr#) = [2] x1 + [1] p(terms#) = [2] x1 + [4] p(c_1) = [1] p(c_2) = [8] x1 + [1] p(c_3) = [1] x1 + [1] p(c_4) = [2] p(c_5) = [8] x1 + [0] p(c_6) = [2] p(c_7) = [1] x1 + [13] p(c_8) = [1] p(c_9) = [4] p(c_10) = [1] p(c_11) = [0] p(c_12) = [0] p(c_13) = [0] p(c_14) = [1] x1 + [2] p(c_15) = [1] p(c_16) = [2] x2 + [1] x3 + [4] p(c_17) = [1] x1 + [1] p(c_18) = [1] Following rules are strictly oriented: dbl#(s(X)) = [2] X + [14] > [2] X + [13] = c_7(dbl#(X)) Following rules are (at-least) weakly oriented: activate#(n__first(X1,X2)) = [2] X2 + [16] >= [2] X2 + [3] = first#(X1,X2) activate#(n__terms(X)) = [2] X + [6] >= [2] X + [4] = terms#(X) add#(s(X),Y) = [0] >= [0] = c_5(add#(X,Y)) first#(s(X),cons(Y,Z)) = [2] Z + [3] >= [2] Z + [0] = activate#(Z) sqr#(s(X)) = [2] X + [15] >= [0] = add#(sqr(X),dbl(X)) sqr#(s(X)) = [2] X + [15] >= [2] X + [0] = dbl#(X) sqr#(s(X)) = [2] X + [15] >= [2] X + [1] = sqr#(X) terms#(N) = [2] N + [4] >= [2] N + [1] = sqr#(N) *** Step 1.b:5.b:3: NaturalPI WORST_CASE(?,O(n^2)) + Considered Problem: - Strict DPs: add#(s(X),Y) -> c_5(add#(X,Y)) - Weak DPs: activate#(n__first(X1,X2)) -> first#(X1,X2) activate#(n__terms(X)) -> terms#(X) dbl#(s(X)) -> c_7(dbl#(X)) first#(s(X),cons(Y,Z)) -> activate#(Z) sqr#(s(X)) -> add#(sqr(X),dbl(X)) sqr#(s(X)) -> dbl#(X) sqr#(s(X)) -> sqr#(X) terms#(N) -> sqr#(N) - Weak TRS: add(0(),X) -> X add(s(X),Y) -> s(add(X,Y)) dbl(0()) -> 0() dbl(s(X)) -> s(s(dbl(X))) sqr(0()) -> 0() sqr(s(X)) -> s(add(sqr(X),dbl(X))) - Signature: {activate/1,add/2,dbl/1,first/2,half/1,sqr/1,terms/1,activate#/1,add#/2,dbl#/1,first#/2,half#/1,sqr#/1 ,terms#/1} / {0/0,cons/2,n__first/2,n__terms/1,nil/0,recip/1,s/1,c_1/0,c_2/1,c_3/1,c_4/0,c_5/1,c_6/0,c_7/1 ,c_8/0,c_9/0,c_10/1,c_11/0,c_12/0,c_13/0,c_14/1,c_15/0,c_16/3,c_17/1,c_18/0} - Obligation: innermost runtime complexity wrt. defined symbols {activate#,add#,dbl#,first#,half#,sqr# ,terms#} and constructors {0,cons,n__first,n__terms,nil,recip,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_5) = {1}, uargs(c_7) = {1} Following symbols are considered usable: {add,dbl,sqr,activate#,add#,dbl#,first#,half#,sqr#,terms#} TcT has computed the following interpretation: p(0) = 0 p(activate) = 2 + x1^2 p(add) = 2 + x1 + 2*x2 p(cons) = 1 + x2 p(dbl) = 1 + 2*x1 p(first) = 1 + x1*x2 + x2 + x2^2 p(half) = x1 + 4*x1^2 p(n__first) = x2 p(n__terms) = x1 p(nil) = 0 p(recip) = 1 + x1 p(s) = 2 + x1 p(sqr) = 2*x1^2 p(terms) = 1 + x1^2 p(activate#) = 2 + 4*x1 + 2*x1^2 p(add#) = x1 p(dbl#) = 0 p(first#) = 2 + 2*x2^2 p(half#) = 1 + 4*x1 + x1^2 p(sqr#) = 2*x1^2 p(terms#) = 1 + 2*x1 + 2*x1^2 p(c_1) = 2 p(c_2) = 0 p(c_3) = 4 + x1 p(c_4) = 0 p(c_5) = x1 p(c_6) = 1 p(c_7) = x1 p(c_8) = 0 p(c_9) = 0 p(c_10) = 1 p(c_11) = 0 p(c_12) = 1 p(c_13) = 1 p(c_14) = x1 p(c_15) = 1 p(c_16) = x2 + x3 p(c_17) = 1 p(c_18) = 0 Following rules are strictly oriented: add#(s(X),Y) = 2 + X > X = c_5(add#(X,Y)) Following rules are (at-least) weakly oriented: activate#(n__first(X1,X2)) = 2 + 4*X2 + 2*X2^2 >= 2 + 2*X2^2 = first#(X1,X2) activate#(n__terms(X)) = 2 + 4*X + 2*X^2 >= 1 + 2*X + 2*X^2 = terms#(X) dbl#(s(X)) = 0 >= 0 = c_7(dbl#(X)) first#(s(X),cons(Y,Z)) = 4 + 4*Z + 2*Z^2 >= 2 + 4*Z + 2*Z^2 = activate#(Z) sqr#(s(X)) = 8 + 8*X + 2*X^2 >= 2*X^2 = add#(sqr(X),dbl(X)) sqr#(s(X)) = 8 + 8*X + 2*X^2 >= 0 = dbl#(X) sqr#(s(X)) = 8 + 8*X + 2*X^2 >= 2*X^2 = sqr#(X) terms#(N) = 1 + 2*N + 2*N^2 >= 2*N^2 = sqr#(N) add(0(),X) = 2 + 2*X >= X = X add(s(X),Y) = 4 + X + 2*Y >= 4 + X + 2*Y = s(add(X,Y)) dbl(0()) = 1 >= 0 = 0() dbl(s(X)) = 5 + 2*X >= 5 + 2*X = s(s(dbl(X))) sqr(0()) = 0 >= 0 = 0() sqr(s(X)) = 8 + 8*X + 2*X^2 >= 6 + 4*X + 2*X^2 = s(add(sqr(X),dbl(X))) *** Step 1.b:5.b:4: EmptyProcessor WORST_CASE(?,O(1)) + Considered Problem: - Weak DPs: activate#(n__first(X1,X2)) -> first#(X1,X2) activate#(n__terms(X)) -> terms#(X) add#(s(X),Y) -> c_5(add#(X,Y)) dbl#(s(X)) -> c_7(dbl#(X)) first#(s(X),cons(Y,Z)) -> activate#(Z) sqr#(s(X)) -> add#(sqr(X),dbl(X)) sqr#(s(X)) -> dbl#(X) sqr#(s(X)) -> sqr#(X) terms#(N) -> sqr#(N) - Weak TRS: add(0(),X) -> X add(s(X),Y) -> s(add(X,Y)) dbl(0()) -> 0() dbl(s(X)) -> s(s(dbl(X))) sqr(0()) -> 0() sqr(s(X)) -> s(add(sqr(X),dbl(X))) - Signature: {activate/1,add/2,dbl/1,first/2,half/1,sqr/1,terms/1,activate#/1,add#/2,dbl#/1,first#/2,half#/1,sqr#/1 ,terms#/1} / {0/0,cons/2,n__first/2,n__terms/1,nil/0,recip/1,s/1,c_1/0,c_2/1,c_3/1,c_4/0,c_5/1,c_6/0,c_7/1 ,c_8/0,c_9/0,c_10/1,c_11/0,c_12/0,c_13/0,c_14/1,c_15/0,c_16/3,c_17/1,c_18/0} - Obligation: innermost runtime complexity wrt. defined symbols {activate#,add#,dbl#,first#,half#,sqr# ,terms#} and constructors {0,cons,n__first,n__terms,nil,recip,s} + Applied Processor: EmptyProcessor + Details: The problem is already closed. The intended complexity is O(1). WORST_CASE(Omega(n^1),O(n^3))