MAYBE * Step 1: DependencyPairs MAYBE + Considered Problem: - Strict TRS: filter(s(s(X)),cons(Y,Z)) -> if(divides(s(s(X)),Y),filter(s(s(X)),Z),cons(Y,filter(X,sieve(Y)))) from(X) -> cons(X,from(s(X))) head(cons(X,Y)) -> X if(false(),X,Y) -> Y if(true(),X,Y) -> X primes() -> sieve(from(s(s(0())))) sieve(cons(X,Y)) -> cons(X,filter(X,sieve(Y))) tail(cons(X,Y)) -> Y - Signature: {filter/2,from/1,head/1,if/3,primes/0,sieve/1,tail/1} / {0/0,cons/2,divides/2,false/0,s/1,true/0} - Obligation: innermost runtime complexity wrt. defined symbols {filter,from,head,if,primes,sieve ,tail} and constructors {0,cons,divides,false,s,true} + Applied Processor: DependencyPairs {dpKind_ = DT} + Details: We add the following dependency tuples: Strict DPs filter#(s(s(X)),cons(Y,Z)) -> c_1(if#(divides(s(s(X)),Y),filter(s(s(X)),Z),cons(Y,filter(X,sieve(Y)))) ,filter#(s(s(X)),Z) ,filter#(X,sieve(Y)) ,sieve#(Y)) from#(X) -> c_2(from#(s(X))) head#(cons(X,Y)) -> c_3() if#(false(),X,Y) -> c_4() if#(true(),X,Y) -> c_5() primes#() -> c_6(sieve#(from(s(s(0())))),from#(s(s(0())))) sieve#(cons(X,Y)) -> c_7(filter#(X,sieve(Y)),sieve#(Y)) tail#(cons(X,Y)) -> c_8() Weak DPs and mark the set of starting terms. * Step 2: UsableRules MAYBE + Considered Problem: - Strict DPs: filter#(s(s(X)),cons(Y,Z)) -> c_1(if#(divides(s(s(X)),Y),filter(s(s(X)),Z),cons(Y,filter(X,sieve(Y)))) ,filter#(s(s(X)),Z) ,filter#(X,sieve(Y)) ,sieve#(Y)) from#(X) -> c_2(from#(s(X))) head#(cons(X,Y)) -> c_3() if#(false(),X,Y) -> c_4() if#(true(),X,Y) -> c_5() primes#() -> c_6(sieve#(from(s(s(0())))),from#(s(s(0())))) sieve#(cons(X,Y)) -> c_7(filter#(X,sieve(Y)),sieve#(Y)) tail#(cons(X,Y)) -> c_8() - Weak TRS: filter(s(s(X)),cons(Y,Z)) -> if(divides(s(s(X)),Y),filter(s(s(X)),Z),cons(Y,filter(X,sieve(Y)))) from(X) -> cons(X,from(s(X))) head(cons(X,Y)) -> X if(false(),X,Y) -> Y if(true(),X,Y) -> X primes() -> sieve(from(s(s(0())))) sieve(cons(X,Y)) -> cons(X,filter(X,sieve(Y))) tail(cons(X,Y)) -> Y - Signature: {filter/2,from/1,head/1,if/3,primes/0,sieve/1,tail/1,filter#/2,from#/1,head#/1,if#/3,primes#/0,sieve#/1 ,tail#/1} / {0/0,cons/2,divides/2,false/0,s/1,true/0,c_1/4,c_2/1,c_3/0,c_4/0,c_5/0,c_6/2,c_7/2,c_8/0} - Obligation: innermost runtime complexity wrt. defined symbols {filter#,from#,head#,if#,primes#,sieve# ,tail#} and constructors {0,cons,divides,false,s,true} + Applied Processor: UsableRules + Details: We replace rewrite rules by usable rules: filter(s(s(X)),cons(Y,Z)) -> if(divides(s(s(X)),Y),filter(s(s(X)),Z),cons(Y,filter(X,sieve(Y)))) from(X) -> cons(X,from(s(X))) sieve(cons(X,Y)) -> cons(X,filter(X,sieve(Y))) filter#(s(s(X)),cons(Y,Z)) -> c_1(if#(divides(s(s(X)),Y),filter(s(s(X)),Z),cons(Y,filter(X,sieve(Y)))) ,filter#(s(s(X)),Z) ,filter#(X,sieve(Y)) ,sieve#(Y)) from#(X) -> c_2(from#(s(X))) head#(cons(X,Y)) -> c_3() if#(false(),X,Y) -> c_4() if#(true(),X,Y) -> c_5() primes#() -> c_6(sieve#(from(s(s(0())))),from#(s(s(0())))) sieve#(cons(X,Y)) -> c_7(filter#(X,sieve(Y)),sieve#(Y)) tail#(cons(X,Y)) -> c_8() * Step 3: PredecessorEstimation MAYBE + Considered Problem: - Strict DPs: filter#(s(s(X)),cons(Y,Z)) -> c_1(if#(divides(s(s(X)),Y),filter(s(s(X)),Z),cons(Y,filter(X,sieve(Y)))) ,filter#(s(s(X)),Z) ,filter#(X,sieve(Y)) ,sieve#(Y)) from#(X) -> c_2(from#(s(X))) head#(cons(X,Y)) -> c_3() if#(false(),X,Y) -> c_4() if#(true(),X,Y) -> c_5() primes#() -> c_6(sieve#(from(s(s(0())))),from#(s(s(0())))) sieve#(cons(X,Y)) -> c_7(filter#(X,sieve(Y)),sieve#(Y)) tail#(cons(X,Y)) -> c_8() - Weak TRS: filter(s(s(X)),cons(Y,Z)) -> if(divides(s(s(X)),Y),filter(s(s(X)),Z),cons(Y,filter(X,sieve(Y)))) from(X) -> cons(X,from(s(X))) sieve(cons(X,Y)) -> cons(X,filter(X,sieve(Y))) - Signature: {filter/2,from/1,head/1,if/3,primes/0,sieve/1,tail/1,filter#/2,from#/1,head#/1,if#/3,primes#/0,sieve#/1 ,tail#/1} / {0/0,cons/2,divides/2,false/0,s/1,true/0,c_1/4,c_2/1,c_3/0,c_4/0,c_5/0,c_6/2,c_7/2,c_8/0} - Obligation: innermost runtime complexity wrt. defined symbols {filter#,from#,head#,if#,primes#,sieve# ,tail#} and constructors {0,cons,divides,false,s,true} + Applied Processor: PredecessorEstimation {onSelection = all simple predecessor estimation selector} + Details: We estimate the number of application of {3,4,5,8} by application of Pre({3,4,5,8}) = {}. Here rules are labelled as follows: 1: filter#(s(s(X)),cons(Y,Z)) -> c_1(if#(divides(s(s(X)),Y),filter(s(s(X)),Z),cons(Y,filter(X,sieve(Y)))) ,filter#(s(s(X)),Z) ,filter#(X,sieve(Y)) ,sieve#(Y)) 2: from#(X) -> c_2(from#(s(X))) 3: head#(cons(X,Y)) -> c_3() 4: if#(false(),X,Y) -> c_4() 5: if#(true(),X,Y) -> c_5() 6: primes#() -> c_6(sieve#(from(s(s(0())))),from#(s(s(0())))) 7: sieve#(cons(X,Y)) -> c_7(filter#(X,sieve(Y)),sieve#(Y)) 8: tail#(cons(X,Y)) -> c_8() * Step 4: RemoveWeakSuffixes MAYBE + Considered Problem: - Strict DPs: filter#(s(s(X)),cons(Y,Z)) -> c_1(if#(divides(s(s(X)),Y),filter(s(s(X)),Z),cons(Y,filter(X,sieve(Y)))) ,filter#(s(s(X)),Z) ,filter#(X,sieve(Y)) ,sieve#(Y)) from#(X) -> c_2(from#(s(X))) primes#() -> c_6(sieve#(from(s(s(0())))),from#(s(s(0())))) sieve#(cons(X,Y)) -> c_7(filter#(X,sieve(Y)),sieve#(Y)) - Weak DPs: head#(cons(X,Y)) -> c_3() if#(false(),X,Y) -> c_4() if#(true(),X,Y) -> c_5() tail#(cons(X,Y)) -> c_8() - Weak TRS: filter(s(s(X)),cons(Y,Z)) -> if(divides(s(s(X)),Y),filter(s(s(X)),Z),cons(Y,filter(X,sieve(Y)))) from(X) -> cons(X,from(s(X))) sieve(cons(X,Y)) -> cons(X,filter(X,sieve(Y))) - Signature: {filter/2,from/1,head/1,if/3,primes/0,sieve/1,tail/1,filter#/2,from#/1,head#/1,if#/3,primes#/0,sieve#/1 ,tail#/1} / {0/0,cons/2,divides/2,false/0,s/1,true/0,c_1/4,c_2/1,c_3/0,c_4/0,c_5/0,c_6/2,c_7/2,c_8/0} - Obligation: innermost runtime complexity wrt. defined symbols {filter#,from#,head#,if#,primes#,sieve# ,tail#} and constructors {0,cons,divides,false,s,true} + Applied Processor: RemoveWeakSuffixes + Details: Consider the dependency graph 1:S:filter#(s(s(X)),cons(Y,Z)) -> c_1(if#(divides(s(s(X)),Y),filter(s(s(X)),Z),cons(Y,filter(X,sieve(Y)))) ,filter#(s(s(X)),Z) ,filter#(X,sieve(Y)) ,sieve#(Y)) -->_4 sieve#(cons(X,Y)) -> c_7(filter#(X,sieve(Y)),sieve#(Y)):4 -->_3 filter#(s(s(X)),cons(Y,Z)) -> c_1(if#(divides(s(s(X)),Y) ,filter(s(s(X)),Z) ,cons(Y,filter(X,sieve(Y)))) ,filter#(s(s(X)),Z) ,filter#(X,sieve(Y)) ,sieve#(Y)):1 -->_2 filter#(s(s(X)),cons(Y,Z)) -> c_1(if#(divides(s(s(X)),Y) ,filter(s(s(X)),Z) ,cons(Y,filter(X,sieve(Y)))) ,filter#(s(s(X)),Z) ,filter#(X,sieve(Y)) ,sieve#(Y)):1 2:S:from#(X) -> c_2(from#(s(X))) -->_1 from#(X) -> c_2(from#(s(X))):2 3:S:primes#() -> c_6(sieve#(from(s(s(0())))),from#(s(s(0())))) -->_1 sieve#(cons(X,Y)) -> c_7(filter#(X,sieve(Y)),sieve#(Y)):4 -->_2 from#(X) -> c_2(from#(s(X))):2 4:S:sieve#(cons(X,Y)) -> c_7(filter#(X,sieve(Y)),sieve#(Y)) -->_2 sieve#(cons(X,Y)) -> c_7(filter#(X,sieve(Y)),sieve#(Y)):4 -->_1 filter#(s(s(X)),cons(Y,Z)) -> c_1(if#(divides(s(s(X)),Y) ,filter(s(s(X)),Z) ,cons(Y,filter(X,sieve(Y)))) ,filter#(s(s(X)),Z) ,filter#(X,sieve(Y)) ,sieve#(Y)):1 5:W:head#(cons(X,Y)) -> c_3() 6:W:if#(false(),X,Y) -> c_4() 7:W:if#(true(),X,Y) -> c_5() 8:W:tail#(cons(X,Y)) -> c_8() The following weak DPs constitute a sub-graph of the DG that is closed under successors. The DPs are removed. 8: tail#(cons(X,Y)) -> c_8() 7: if#(true(),X,Y) -> c_5() 6: if#(false(),X,Y) -> c_4() 5: head#(cons(X,Y)) -> c_3() * Step 5: SimplifyRHS MAYBE + Considered Problem: - Strict DPs: filter#(s(s(X)),cons(Y,Z)) -> c_1(if#(divides(s(s(X)),Y),filter(s(s(X)),Z),cons(Y,filter(X,sieve(Y)))) ,filter#(s(s(X)),Z) ,filter#(X,sieve(Y)) ,sieve#(Y)) from#(X) -> c_2(from#(s(X))) primes#() -> c_6(sieve#(from(s(s(0())))),from#(s(s(0())))) sieve#(cons(X,Y)) -> c_7(filter#(X,sieve(Y)),sieve#(Y)) - Weak TRS: filter(s(s(X)),cons(Y,Z)) -> if(divides(s(s(X)),Y),filter(s(s(X)),Z),cons(Y,filter(X,sieve(Y)))) from(X) -> cons(X,from(s(X))) sieve(cons(X,Y)) -> cons(X,filter(X,sieve(Y))) - Signature: {filter/2,from/1,head/1,if/3,primes/0,sieve/1,tail/1,filter#/2,from#/1,head#/1,if#/3,primes#/0,sieve#/1 ,tail#/1} / {0/0,cons/2,divides/2,false/0,s/1,true/0,c_1/4,c_2/1,c_3/0,c_4/0,c_5/0,c_6/2,c_7/2,c_8/0} - Obligation: innermost runtime complexity wrt. defined symbols {filter#,from#,head#,if#,primes#,sieve# ,tail#} and constructors {0,cons,divides,false,s,true} + Applied Processor: SimplifyRHS + Details: Consider the dependency graph 1:S:filter#(s(s(X)),cons(Y,Z)) -> c_1(if#(divides(s(s(X)),Y),filter(s(s(X)),Z),cons(Y,filter(X,sieve(Y)))) ,filter#(s(s(X)),Z) ,filter#(X,sieve(Y)) ,sieve#(Y)) -->_4 sieve#(cons(X,Y)) -> c_7(filter#(X,sieve(Y)),sieve#(Y)):4 -->_3 filter#(s(s(X)),cons(Y,Z)) -> c_1(if#(divides(s(s(X)),Y) ,filter(s(s(X)),Z) ,cons(Y,filter(X,sieve(Y)))) ,filter#(s(s(X)),Z) ,filter#(X,sieve(Y)) ,sieve#(Y)):1 -->_2 filter#(s(s(X)),cons(Y,Z)) -> c_1(if#(divides(s(s(X)),Y) ,filter(s(s(X)),Z) ,cons(Y,filter(X,sieve(Y)))) ,filter#(s(s(X)),Z) ,filter#(X,sieve(Y)) ,sieve#(Y)):1 2:S:from#(X) -> c_2(from#(s(X))) -->_1 from#(X) -> c_2(from#(s(X))):2 3:S:primes#() -> c_6(sieve#(from(s(s(0())))),from#(s(s(0())))) -->_1 sieve#(cons(X,Y)) -> c_7(filter#(X,sieve(Y)),sieve#(Y)):4 -->_2 from#(X) -> c_2(from#(s(X))):2 4:S:sieve#(cons(X,Y)) -> c_7(filter#(X,sieve(Y)),sieve#(Y)) -->_2 sieve#(cons(X,Y)) -> c_7(filter#(X,sieve(Y)),sieve#(Y)):4 -->_1 filter#(s(s(X)),cons(Y,Z)) -> c_1(if#(divides(s(s(X)),Y) ,filter(s(s(X)),Z) ,cons(Y,filter(X,sieve(Y)))) ,filter#(s(s(X)),Z) ,filter#(X,sieve(Y)) ,sieve#(Y)):1 Due to missing edges in the depndency graph, the right-hand sides of following rules could be simplified: filter#(s(s(X)),cons(Y,Z)) -> c_1(filter#(s(s(X)),Z),filter#(X,sieve(Y)),sieve#(Y)) * Step 6: Decompose MAYBE + Considered Problem: - Strict DPs: filter#(s(s(X)),cons(Y,Z)) -> c_1(filter#(s(s(X)),Z),filter#(X,sieve(Y)),sieve#(Y)) from#(X) -> c_2(from#(s(X))) primes#() -> c_6(sieve#(from(s(s(0())))),from#(s(s(0())))) sieve#(cons(X,Y)) -> c_7(filter#(X,sieve(Y)),sieve#(Y)) - Weak TRS: filter(s(s(X)),cons(Y,Z)) -> if(divides(s(s(X)),Y),filter(s(s(X)),Z),cons(Y,filter(X,sieve(Y)))) from(X) -> cons(X,from(s(X))) sieve(cons(X,Y)) -> cons(X,filter(X,sieve(Y))) - Signature: {filter/2,from/1,head/1,if/3,primes/0,sieve/1,tail/1,filter#/2,from#/1,head#/1,if#/3,primes#/0,sieve#/1 ,tail#/1} / {0/0,cons/2,divides/2,false/0,s/1,true/0,c_1/3,c_2/1,c_3/0,c_4/0,c_5/0,c_6/2,c_7/2,c_8/0} - Obligation: innermost runtime complexity wrt. defined symbols {filter#,from#,head#,if#,primes#,sieve# ,tail#} and constructors {0,cons,divides,false,s,true} + Applied Processor: Decompose {onSelection = all cycle independent sub-graph, withBound = RelativeAdd} + Details: We analyse the complexity of following sub-problems (R) and (S). Problem (S) is obtained from the input problem by shifting strict rules from (R) into the weak component. Problem (R) - Strict DPs: filter#(s(s(X)),cons(Y,Z)) -> c_1(filter#(s(s(X)),Z),filter#(X,sieve(Y)),sieve#(Y)) sieve#(cons(X,Y)) -> c_7(filter#(X,sieve(Y)),sieve#(Y)) - Weak DPs: from#(X) -> c_2(from#(s(X))) primes#() -> c_6(sieve#(from(s(s(0())))),from#(s(s(0())))) - Weak TRS: filter(s(s(X)),cons(Y,Z)) -> if(divides(s(s(X)),Y),filter(s(s(X)),Z),cons(Y,filter(X,sieve(Y)))) from(X) -> cons(X,from(s(X))) sieve(cons(X,Y)) -> cons(X,filter(X,sieve(Y))) - Signature: {filter/2,from/1,head/1,if/3,primes/0,sieve/1,tail/1,filter#/2,from#/1,head#/1,if#/3,primes#/0,sieve#/1 ,tail#/1} / {0/0,cons/2,divides/2,false/0,s/1,true/0,c_1/3,c_2/1,c_3/0,c_4/0,c_5/0,c_6/2,c_7/2,c_8/0} - Obligation: innermost runtime complexity wrt. defined symbols {filter#,from#,head#,if#,primes#,sieve# ,tail#} and constructors {0,cons,divides,false,s,true} Problem (S) - Strict DPs: from#(X) -> c_2(from#(s(X))) primes#() -> c_6(sieve#(from(s(s(0())))),from#(s(s(0())))) - Weak DPs: filter#(s(s(X)),cons(Y,Z)) -> c_1(filter#(s(s(X)),Z),filter#(X,sieve(Y)),sieve#(Y)) sieve#(cons(X,Y)) -> c_7(filter#(X,sieve(Y)),sieve#(Y)) - Weak TRS: filter(s(s(X)),cons(Y,Z)) -> if(divides(s(s(X)),Y),filter(s(s(X)),Z),cons(Y,filter(X,sieve(Y)))) from(X) -> cons(X,from(s(X))) sieve(cons(X,Y)) -> cons(X,filter(X,sieve(Y))) - Signature: {filter/2,from/1,head/1,if/3,primes/0,sieve/1,tail/1,filter#/2,from#/1,head#/1,if#/3,primes#/0,sieve#/1 ,tail#/1} / {0/0,cons/2,divides/2,false/0,s/1,true/0,c_1/3,c_2/1,c_3/0,c_4/0,c_5/0,c_6/2,c_7/2,c_8/0} - Obligation: innermost runtime complexity wrt. defined symbols {filter#,from#,head#,if#,primes#,sieve# ,tail#} and constructors {0,cons,divides,false,s,true} ** Step 6.a:1: RemoveWeakSuffixes MAYBE + Considered Problem: - Strict DPs: filter#(s(s(X)),cons(Y,Z)) -> c_1(filter#(s(s(X)),Z),filter#(X,sieve(Y)),sieve#(Y)) sieve#(cons(X,Y)) -> c_7(filter#(X,sieve(Y)),sieve#(Y)) - Weak DPs: from#(X) -> c_2(from#(s(X))) primes#() -> c_6(sieve#(from(s(s(0())))),from#(s(s(0())))) - Weak TRS: filter(s(s(X)),cons(Y,Z)) -> if(divides(s(s(X)),Y),filter(s(s(X)),Z),cons(Y,filter(X,sieve(Y)))) from(X) -> cons(X,from(s(X))) sieve(cons(X,Y)) -> cons(X,filter(X,sieve(Y))) - Signature: {filter/2,from/1,head/1,if/3,primes/0,sieve/1,tail/1,filter#/2,from#/1,head#/1,if#/3,primes#/0,sieve#/1 ,tail#/1} / {0/0,cons/2,divides/2,false/0,s/1,true/0,c_1/3,c_2/1,c_3/0,c_4/0,c_5/0,c_6/2,c_7/2,c_8/0} - Obligation: innermost runtime complexity wrt. defined symbols {filter#,from#,head#,if#,primes#,sieve# ,tail#} and constructors {0,cons,divides,false,s,true} + Applied Processor: RemoveWeakSuffixes + Details: Consider the dependency graph 1:S:filter#(s(s(X)),cons(Y,Z)) -> c_1(filter#(s(s(X)),Z),filter#(X,sieve(Y)),sieve#(Y)) -->_3 sieve#(cons(X,Y)) -> c_7(filter#(X,sieve(Y)),sieve#(Y)):4 -->_2 filter#(s(s(X)),cons(Y,Z)) -> c_1(filter#(s(s(X)),Z),filter#(X,sieve(Y)),sieve#(Y)):1 -->_1 filter#(s(s(X)),cons(Y,Z)) -> c_1(filter#(s(s(X)),Z),filter#(X,sieve(Y)),sieve#(Y)):1 2:W:from#(X) -> c_2(from#(s(X))) -->_1 from#(X) -> c_2(from#(s(X))):2 3:W:primes#() -> c_6(sieve#(from(s(s(0())))),from#(s(s(0())))) -->_2 from#(X) -> c_2(from#(s(X))):2 -->_1 sieve#(cons(X,Y)) -> c_7(filter#(X,sieve(Y)),sieve#(Y)):4 4:S:sieve#(cons(X,Y)) -> c_7(filter#(X,sieve(Y)),sieve#(Y)) -->_1 filter#(s(s(X)),cons(Y,Z)) -> c_1(filter#(s(s(X)),Z),filter#(X,sieve(Y)),sieve#(Y)):1 -->_2 sieve#(cons(X,Y)) -> c_7(filter#(X,sieve(Y)),sieve#(Y)):4 The following weak DPs constitute a sub-graph of the DG that is closed under successors. The DPs are removed. 2: from#(X) -> c_2(from#(s(X))) ** Step 6.a:2: SimplifyRHS MAYBE + Considered Problem: - Strict DPs: filter#(s(s(X)),cons(Y,Z)) -> c_1(filter#(s(s(X)),Z),filter#(X,sieve(Y)),sieve#(Y)) sieve#(cons(X,Y)) -> c_7(filter#(X,sieve(Y)),sieve#(Y)) - Weak DPs: primes#() -> c_6(sieve#(from(s(s(0())))),from#(s(s(0())))) - Weak TRS: filter(s(s(X)),cons(Y,Z)) -> if(divides(s(s(X)),Y),filter(s(s(X)),Z),cons(Y,filter(X,sieve(Y)))) from(X) -> cons(X,from(s(X))) sieve(cons(X,Y)) -> cons(X,filter(X,sieve(Y))) - Signature: {filter/2,from/1,head/1,if/3,primes/0,sieve/1,tail/1,filter#/2,from#/1,head#/1,if#/3,primes#/0,sieve#/1 ,tail#/1} / {0/0,cons/2,divides/2,false/0,s/1,true/0,c_1/3,c_2/1,c_3/0,c_4/0,c_5/0,c_6/2,c_7/2,c_8/0} - Obligation: innermost runtime complexity wrt. defined symbols {filter#,from#,head#,if#,primes#,sieve# ,tail#} and constructors {0,cons,divides,false,s,true} + Applied Processor: SimplifyRHS + Details: Consider the dependency graph 1:S:filter#(s(s(X)),cons(Y,Z)) -> c_1(filter#(s(s(X)),Z),filter#(X,sieve(Y)),sieve#(Y)) -->_3 sieve#(cons(X,Y)) -> c_7(filter#(X,sieve(Y)),sieve#(Y)):4 -->_2 filter#(s(s(X)),cons(Y,Z)) -> c_1(filter#(s(s(X)),Z),filter#(X,sieve(Y)),sieve#(Y)):1 -->_1 filter#(s(s(X)),cons(Y,Z)) -> c_1(filter#(s(s(X)),Z),filter#(X,sieve(Y)),sieve#(Y)):1 3:W:primes#() -> c_6(sieve#(from(s(s(0())))),from#(s(s(0())))) -->_1 sieve#(cons(X,Y)) -> c_7(filter#(X,sieve(Y)),sieve#(Y)):4 4:S:sieve#(cons(X,Y)) -> c_7(filter#(X,sieve(Y)),sieve#(Y)) -->_1 filter#(s(s(X)),cons(Y,Z)) -> c_1(filter#(s(s(X)),Z),filter#(X,sieve(Y)),sieve#(Y)):1 -->_2 sieve#(cons(X,Y)) -> c_7(filter#(X,sieve(Y)),sieve#(Y)):4 Due to missing edges in the depndency graph, the right-hand sides of following rules could be simplified: primes#() -> c_6(sieve#(from(s(s(0()))))) ** Step 6.a:3: Failure MAYBE + Considered Problem: - Strict DPs: filter#(s(s(X)),cons(Y,Z)) -> c_1(filter#(s(s(X)),Z),filter#(X,sieve(Y)),sieve#(Y)) sieve#(cons(X,Y)) -> c_7(filter#(X,sieve(Y)),sieve#(Y)) - Weak DPs: primes#() -> c_6(sieve#(from(s(s(0()))))) - Weak TRS: filter(s(s(X)),cons(Y,Z)) -> if(divides(s(s(X)),Y),filter(s(s(X)),Z),cons(Y,filter(X,sieve(Y)))) from(X) -> cons(X,from(s(X))) sieve(cons(X,Y)) -> cons(X,filter(X,sieve(Y))) - Signature: {filter/2,from/1,head/1,if/3,primes/0,sieve/1,tail/1,filter#/2,from#/1,head#/1,if#/3,primes#/0,sieve#/1 ,tail#/1} / {0/0,cons/2,divides/2,false/0,s/1,true/0,c_1/3,c_2/1,c_3/0,c_4/0,c_5/0,c_6/1,c_7/2,c_8/0} - Obligation: innermost runtime complexity wrt. defined symbols {filter#,from#,head#,if#,primes#,sieve# ,tail#} and constructors {0,cons,divides,false,s,true} + Applied Processor: EmptyProcessor + Details: The problem is still open. ** Step 6.b:1: RemoveWeakSuffixes MAYBE + Considered Problem: - Strict DPs: from#(X) -> c_2(from#(s(X))) primes#() -> c_6(sieve#(from(s(s(0())))),from#(s(s(0())))) - Weak DPs: filter#(s(s(X)),cons(Y,Z)) -> c_1(filter#(s(s(X)),Z),filter#(X,sieve(Y)),sieve#(Y)) sieve#(cons(X,Y)) -> c_7(filter#(X,sieve(Y)),sieve#(Y)) - Weak TRS: filter(s(s(X)),cons(Y,Z)) -> if(divides(s(s(X)),Y),filter(s(s(X)),Z),cons(Y,filter(X,sieve(Y)))) from(X) -> cons(X,from(s(X))) sieve(cons(X,Y)) -> cons(X,filter(X,sieve(Y))) - Signature: {filter/2,from/1,head/1,if/3,primes/0,sieve/1,tail/1,filter#/2,from#/1,head#/1,if#/3,primes#/0,sieve#/1 ,tail#/1} / {0/0,cons/2,divides/2,false/0,s/1,true/0,c_1/3,c_2/1,c_3/0,c_4/0,c_5/0,c_6/2,c_7/2,c_8/0} - Obligation: innermost runtime complexity wrt. defined symbols {filter#,from#,head#,if#,primes#,sieve# ,tail#} and constructors {0,cons,divides,false,s,true} + Applied Processor: RemoveWeakSuffixes + Details: Consider the dependency graph 1:S:from#(X) -> c_2(from#(s(X))) -->_1 from#(X) -> c_2(from#(s(X))):1 2:S:primes#() -> c_6(sieve#(from(s(s(0())))),from#(s(s(0())))) -->_1 sieve#(cons(X,Y)) -> c_7(filter#(X,sieve(Y)),sieve#(Y)):4 -->_2 from#(X) -> c_2(from#(s(X))):1 3:W:filter#(s(s(X)),cons(Y,Z)) -> c_1(filter#(s(s(X)),Z),filter#(X,sieve(Y)),sieve#(Y)) -->_3 sieve#(cons(X,Y)) -> c_7(filter#(X,sieve(Y)),sieve#(Y)):4 -->_2 filter#(s(s(X)),cons(Y,Z)) -> c_1(filter#(s(s(X)),Z),filter#(X,sieve(Y)),sieve#(Y)):3 -->_1 filter#(s(s(X)),cons(Y,Z)) -> c_1(filter#(s(s(X)),Z),filter#(X,sieve(Y)),sieve#(Y)):3 4:W:sieve#(cons(X,Y)) -> c_7(filter#(X,sieve(Y)),sieve#(Y)) -->_2 sieve#(cons(X,Y)) -> c_7(filter#(X,sieve(Y)),sieve#(Y)):4 -->_1 filter#(s(s(X)),cons(Y,Z)) -> c_1(filter#(s(s(X)),Z),filter#(X,sieve(Y)),sieve#(Y)):3 The following weak DPs constitute a sub-graph of the DG that is closed under successors. The DPs are removed. 4: sieve#(cons(X,Y)) -> c_7(filter#(X,sieve(Y)),sieve#(Y)) 3: filter#(s(s(X)),cons(Y,Z)) -> c_1(filter#(s(s(X)),Z),filter#(X,sieve(Y)),sieve#(Y)) ** Step 6.b:2: SimplifyRHS MAYBE + Considered Problem: - Strict DPs: from#(X) -> c_2(from#(s(X))) primes#() -> c_6(sieve#(from(s(s(0())))),from#(s(s(0())))) - Weak TRS: filter(s(s(X)),cons(Y,Z)) -> if(divides(s(s(X)),Y),filter(s(s(X)),Z),cons(Y,filter(X,sieve(Y)))) from(X) -> cons(X,from(s(X))) sieve(cons(X,Y)) -> cons(X,filter(X,sieve(Y))) - Signature: {filter/2,from/1,head/1,if/3,primes/0,sieve/1,tail/1,filter#/2,from#/1,head#/1,if#/3,primes#/0,sieve#/1 ,tail#/1} / {0/0,cons/2,divides/2,false/0,s/1,true/0,c_1/3,c_2/1,c_3/0,c_4/0,c_5/0,c_6/2,c_7/2,c_8/0} - Obligation: innermost runtime complexity wrt. defined symbols {filter#,from#,head#,if#,primes#,sieve# ,tail#} and constructors {0,cons,divides,false,s,true} + Applied Processor: SimplifyRHS + Details: Consider the dependency graph 1:S:from#(X) -> c_2(from#(s(X))) -->_1 from#(X) -> c_2(from#(s(X))):1 2:S:primes#() -> c_6(sieve#(from(s(s(0())))),from#(s(s(0())))) -->_2 from#(X) -> c_2(from#(s(X))):1 Due to missing edges in the depndency graph, the right-hand sides of following rules could be simplified: primes#() -> c_6(from#(s(s(0())))) ** Step 6.b:3: UsableRules MAYBE + Considered Problem: - Strict DPs: from#(X) -> c_2(from#(s(X))) primes#() -> c_6(from#(s(s(0())))) - Weak TRS: filter(s(s(X)),cons(Y,Z)) -> if(divides(s(s(X)),Y),filter(s(s(X)),Z),cons(Y,filter(X,sieve(Y)))) from(X) -> cons(X,from(s(X))) sieve(cons(X,Y)) -> cons(X,filter(X,sieve(Y))) - Signature: {filter/2,from/1,head/1,if/3,primes/0,sieve/1,tail/1,filter#/2,from#/1,head#/1,if#/3,primes#/0,sieve#/1 ,tail#/1} / {0/0,cons/2,divides/2,false/0,s/1,true/0,c_1/3,c_2/1,c_3/0,c_4/0,c_5/0,c_6/1,c_7/2,c_8/0} - Obligation: innermost runtime complexity wrt. defined symbols {filter#,from#,head#,if#,primes#,sieve# ,tail#} and constructors {0,cons,divides,false,s,true} + Applied Processor: UsableRules + Details: We replace rewrite rules by usable rules: from#(X) -> c_2(from#(s(X))) primes#() -> c_6(from#(s(s(0())))) ** Step 6.b:4: Decompose MAYBE + Considered Problem: - Strict DPs: from#(X) -> c_2(from#(s(X))) primes#() -> c_6(from#(s(s(0())))) - Signature: {filter/2,from/1,head/1,if/3,primes/0,sieve/1,tail/1,filter#/2,from#/1,head#/1,if#/3,primes#/0,sieve#/1 ,tail#/1} / {0/0,cons/2,divides/2,false/0,s/1,true/0,c_1/3,c_2/1,c_3/0,c_4/0,c_5/0,c_6/1,c_7/2,c_8/0} - Obligation: innermost runtime complexity wrt. defined symbols {filter#,from#,head#,if#,primes#,sieve# ,tail#} and constructors {0,cons,divides,false,s,true} + Applied Processor: Decompose {onSelection = all cycle independent sub-graph, withBound = RelativeAdd} + Details: We analyse the complexity of following sub-problems (R) and (S). Problem (S) is obtained from the input problem by shifting strict rules from (R) into the weak component. Problem (R) - Strict DPs: from#(X) -> c_2(from#(s(X))) - Weak DPs: primes#() -> c_6(from#(s(s(0())))) - Signature: {filter/2,from/1,head/1,if/3,primes/0,sieve/1,tail/1,filter#/2,from#/1,head#/1,if#/3,primes#/0,sieve#/1 ,tail#/1} / {0/0,cons/2,divides/2,false/0,s/1,true/0,c_1/3,c_2/1,c_3/0,c_4/0,c_5/0,c_6/1,c_7/2,c_8/0} - Obligation: innermost runtime complexity wrt. defined symbols {filter#,from#,head#,if#,primes#,sieve# ,tail#} and constructors {0,cons,divides,false,s,true} Problem (S) - Strict DPs: primes#() -> c_6(from#(s(s(0())))) - Weak DPs: from#(X) -> c_2(from#(s(X))) - Signature: {filter/2,from/1,head/1,if/3,primes/0,sieve/1,tail/1,filter#/2,from#/1,head#/1,if#/3,primes#/0,sieve#/1 ,tail#/1} / {0/0,cons/2,divides/2,false/0,s/1,true/0,c_1/3,c_2/1,c_3/0,c_4/0,c_5/0,c_6/1,c_7/2,c_8/0} - Obligation: innermost runtime complexity wrt. defined symbols {filter#,from#,head#,if#,primes#,sieve# ,tail#} and constructors {0,cons,divides,false,s,true} *** Step 6.b:4.a:1: Failure MAYBE + Considered Problem: - Strict DPs: from#(X) -> c_2(from#(s(X))) - Weak DPs: primes#() -> c_6(from#(s(s(0())))) - Signature: {filter/2,from/1,head/1,if/3,primes/0,sieve/1,tail/1,filter#/2,from#/1,head#/1,if#/3,primes#/0,sieve#/1 ,tail#/1} / {0/0,cons/2,divides/2,false/0,s/1,true/0,c_1/3,c_2/1,c_3/0,c_4/0,c_5/0,c_6/1,c_7/2,c_8/0} - Obligation: innermost runtime complexity wrt. defined symbols {filter#,from#,head#,if#,primes#,sieve# ,tail#} and constructors {0,cons,divides,false,s,true} + Applied Processor: EmptyProcessor + Details: The problem is still open. *** Step 6.b:4.b:1: PredecessorEstimation WORST_CASE(?,O(1)) + Considered Problem: - Strict DPs: primes#() -> c_6(from#(s(s(0())))) - Weak DPs: from#(X) -> c_2(from#(s(X))) - Signature: {filter/2,from/1,head/1,if/3,primes/0,sieve/1,tail/1,filter#/2,from#/1,head#/1,if#/3,primes#/0,sieve#/1 ,tail#/1} / {0/0,cons/2,divides/2,false/0,s/1,true/0,c_1/3,c_2/1,c_3/0,c_4/0,c_5/0,c_6/1,c_7/2,c_8/0} - Obligation: innermost runtime complexity wrt. defined symbols {filter#,from#,head#,if#,primes#,sieve# ,tail#} and constructors {0,cons,divides,false,s,true} + Applied Processor: PredecessorEstimation {onSelection = all simple predecessor estimation selector} + Details: We estimate the number of application of {1} by application of Pre({1}) = {}. Here rules are labelled as follows: 1: primes#() -> c_6(from#(s(s(0())))) 2: from#(X) -> c_2(from#(s(X))) *** Step 6.b:4.b:2: RemoveWeakSuffixes WORST_CASE(?,O(1)) + Considered Problem: - Weak DPs: from#(X) -> c_2(from#(s(X))) primes#() -> c_6(from#(s(s(0())))) - Signature: {filter/2,from/1,head/1,if/3,primes/0,sieve/1,tail/1,filter#/2,from#/1,head#/1,if#/3,primes#/0,sieve#/1 ,tail#/1} / {0/0,cons/2,divides/2,false/0,s/1,true/0,c_1/3,c_2/1,c_3/0,c_4/0,c_5/0,c_6/1,c_7/2,c_8/0} - Obligation: innermost runtime complexity wrt. defined symbols {filter#,from#,head#,if#,primes#,sieve# ,tail#} and constructors {0,cons,divides,false,s,true} + Applied Processor: RemoveWeakSuffixes + Details: Consider the dependency graph 1:W:from#(X) -> c_2(from#(s(X))) -->_1 from#(X) -> c_2(from#(s(X))):1 2:W:primes#() -> c_6(from#(s(s(0())))) -->_1 from#(X) -> c_2(from#(s(X))):1 The following weak DPs constitute a sub-graph of the DG that is closed under successors. The DPs are removed. 2: primes#() -> c_6(from#(s(s(0())))) 1: from#(X) -> c_2(from#(s(X))) *** Step 6.b:4.b:3: EmptyProcessor WORST_CASE(?,O(1)) + Considered Problem: - Signature: {filter/2,from/1,head/1,if/3,primes/0,sieve/1,tail/1,filter#/2,from#/1,head#/1,if#/3,primes#/0,sieve#/1 ,tail#/1} / {0/0,cons/2,divides/2,false/0,s/1,true/0,c_1/3,c_2/1,c_3/0,c_4/0,c_5/0,c_6/1,c_7/2,c_8/0} - Obligation: innermost runtime complexity wrt. defined symbols {filter#,from#,head#,if#,primes#,sieve# ,tail#} and constructors {0,cons,divides,false,s,true} + Applied Processor: EmptyProcessor + Details: The problem is already closed. The intended complexity is O(1). MAYBE