MAYBE * Step 1: DependencyPairs MAYBE + Considered Problem: - Strict TRS: main(0()) -> 0() main(S(x1)) -> sum#1(map#2(Cons(S(x1),unfoldr#2(S(x1))))) map#2(Cons(x2,x5)) -> Cons(mult#2(x2,x2),map#2(x5)) map#2(Nil()) -> Nil() mult#2(0(),x2) -> 0() mult#2(S(x4),x2) -> plus#2(x2,mult#2(x4,x2)) plus#2(0(),x8) -> x8 plus#2(S(x4),x2) -> S(plus#2(x4,x2)) sum#1(Cons(x2,x1)) -> plus#2(x2,sum#1(x1)) sum#1(Nil()) -> 0() unfoldr#2(0()) -> Nil() unfoldr#2(S(x2)) -> Cons(x2,unfoldr#2(x2)) - Signature: {main/1,map#2/1,mult#2/2,plus#2/2,sum#1/1,unfoldr#2/1} / {0/0,Cons/2,Nil/0,S/1} - Obligation: innermost runtime complexity wrt. defined symbols {main,map#2,mult#2,plus#2,sum#1 ,unfoldr#2} and constructors {0,Cons,Nil,S} + Applied Processor: DependencyPairs {dpKind_ = DT} + Details: We add the following dependency tuples: Strict DPs main#(0()) -> c_1() main#(S(x1)) -> c_2(sum#1#(map#2(Cons(S(x1),unfoldr#2(S(x1))))) ,map#2#(Cons(S(x1),unfoldr#2(S(x1)))) ,unfoldr#2#(S(x1))) map#2#(Cons(x2,x5)) -> c_3(mult#2#(x2,x2),map#2#(x5)) map#2#(Nil()) -> c_4() mult#2#(0(),x2) -> c_5() mult#2#(S(x4),x2) -> c_6(plus#2#(x2,mult#2(x4,x2)),mult#2#(x4,x2)) plus#2#(0(),x8) -> c_7() plus#2#(S(x4),x2) -> c_8(plus#2#(x4,x2)) sum#1#(Cons(x2,x1)) -> c_9(plus#2#(x2,sum#1(x1)),sum#1#(x1)) sum#1#(Nil()) -> c_10() unfoldr#2#(0()) -> c_11() unfoldr#2#(S(x2)) -> c_12(unfoldr#2#(x2)) Weak DPs and mark the set of starting terms. * Step 2: UsableRules MAYBE + Considered Problem: - Strict DPs: main#(0()) -> c_1() main#(S(x1)) -> c_2(sum#1#(map#2(Cons(S(x1),unfoldr#2(S(x1))))) ,map#2#(Cons(S(x1),unfoldr#2(S(x1)))) ,unfoldr#2#(S(x1))) map#2#(Cons(x2,x5)) -> c_3(mult#2#(x2,x2),map#2#(x5)) map#2#(Nil()) -> c_4() mult#2#(0(),x2) -> c_5() mult#2#(S(x4),x2) -> c_6(plus#2#(x2,mult#2(x4,x2)),mult#2#(x4,x2)) plus#2#(0(),x8) -> c_7() plus#2#(S(x4),x2) -> c_8(plus#2#(x4,x2)) sum#1#(Cons(x2,x1)) -> c_9(plus#2#(x2,sum#1(x1)),sum#1#(x1)) sum#1#(Nil()) -> c_10() unfoldr#2#(0()) -> c_11() unfoldr#2#(S(x2)) -> c_12(unfoldr#2#(x2)) - Weak TRS: main(0()) -> 0() main(S(x1)) -> sum#1(map#2(Cons(S(x1),unfoldr#2(S(x1))))) map#2(Cons(x2,x5)) -> Cons(mult#2(x2,x2),map#2(x5)) map#2(Nil()) -> Nil() mult#2(0(),x2) -> 0() mult#2(S(x4),x2) -> plus#2(x2,mult#2(x4,x2)) plus#2(0(),x8) -> x8 plus#2(S(x4),x2) -> S(plus#2(x4,x2)) sum#1(Cons(x2,x1)) -> plus#2(x2,sum#1(x1)) sum#1(Nil()) -> 0() unfoldr#2(0()) -> Nil() unfoldr#2(S(x2)) -> Cons(x2,unfoldr#2(x2)) - Signature: {main/1,map#2/1,mult#2/2,plus#2/2,sum#1/1,unfoldr#2/1,main#/1,map#2#/1,mult#2#/2,plus#2#/2,sum#1#/1 ,unfoldr#2#/1} / {0/0,Cons/2,Nil/0,S/1,c_1/0,c_2/3,c_3/2,c_4/0,c_5/0,c_6/2,c_7/0,c_8/1,c_9/2,c_10/0,c_11/0 ,c_12/1} - Obligation: innermost runtime complexity wrt. defined symbols {main#,map#2#,mult#2#,plus#2#,sum#1# ,unfoldr#2#} and constructors {0,Cons,Nil,S} + Applied Processor: UsableRules + Details: We replace rewrite rules by usable rules: map#2(Cons(x2,x5)) -> Cons(mult#2(x2,x2),map#2(x5)) map#2(Nil()) -> Nil() mult#2(0(),x2) -> 0() mult#2(S(x4),x2) -> plus#2(x2,mult#2(x4,x2)) plus#2(0(),x8) -> x8 plus#2(S(x4),x2) -> S(plus#2(x4,x2)) sum#1(Cons(x2,x1)) -> plus#2(x2,sum#1(x1)) sum#1(Nil()) -> 0() unfoldr#2(0()) -> Nil() unfoldr#2(S(x2)) -> Cons(x2,unfoldr#2(x2)) main#(0()) -> c_1() main#(S(x1)) -> c_2(sum#1#(map#2(Cons(S(x1),unfoldr#2(S(x1))))) ,map#2#(Cons(S(x1),unfoldr#2(S(x1)))) ,unfoldr#2#(S(x1))) map#2#(Cons(x2,x5)) -> c_3(mult#2#(x2,x2),map#2#(x5)) map#2#(Nil()) -> c_4() mult#2#(0(),x2) -> c_5() mult#2#(S(x4),x2) -> c_6(plus#2#(x2,mult#2(x4,x2)),mult#2#(x4,x2)) plus#2#(0(),x8) -> c_7() plus#2#(S(x4),x2) -> c_8(plus#2#(x4,x2)) sum#1#(Cons(x2,x1)) -> c_9(plus#2#(x2,sum#1(x1)),sum#1#(x1)) sum#1#(Nil()) -> c_10() unfoldr#2#(0()) -> c_11() unfoldr#2#(S(x2)) -> c_12(unfoldr#2#(x2)) * Step 3: PredecessorEstimation MAYBE + Considered Problem: - Strict DPs: main#(0()) -> c_1() main#(S(x1)) -> c_2(sum#1#(map#2(Cons(S(x1),unfoldr#2(S(x1))))) ,map#2#(Cons(S(x1),unfoldr#2(S(x1)))) ,unfoldr#2#(S(x1))) map#2#(Cons(x2,x5)) -> c_3(mult#2#(x2,x2),map#2#(x5)) map#2#(Nil()) -> c_4() mult#2#(0(),x2) -> c_5() mult#2#(S(x4),x2) -> c_6(plus#2#(x2,mult#2(x4,x2)),mult#2#(x4,x2)) plus#2#(0(),x8) -> c_7() plus#2#(S(x4),x2) -> c_8(plus#2#(x4,x2)) sum#1#(Cons(x2,x1)) -> c_9(plus#2#(x2,sum#1(x1)),sum#1#(x1)) sum#1#(Nil()) -> c_10() unfoldr#2#(0()) -> c_11() unfoldr#2#(S(x2)) -> c_12(unfoldr#2#(x2)) - Weak TRS: map#2(Cons(x2,x5)) -> Cons(mult#2(x2,x2),map#2(x5)) map#2(Nil()) -> Nil() mult#2(0(),x2) -> 0() mult#2(S(x4),x2) -> plus#2(x2,mult#2(x4,x2)) plus#2(0(),x8) -> x8 plus#2(S(x4),x2) -> S(plus#2(x4,x2)) sum#1(Cons(x2,x1)) -> plus#2(x2,sum#1(x1)) sum#1(Nil()) -> 0() unfoldr#2(0()) -> Nil() unfoldr#2(S(x2)) -> Cons(x2,unfoldr#2(x2)) - Signature: {main/1,map#2/1,mult#2/2,plus#2/2,sum#1/1,unfoldr#2/1,main#/1,map#2#/1,mult#2#/2,plus#2#/2,sum#1#/1 ,unfoldr#2#/1} / {0/0,Cons/2,Nil/0,S/1,c_1/0,c_2/3,c_3/2,c_4/0,c_5/0,c_6/2,c_7/0,c_8/1,c_9/2,c_10/0,c_11/0 ,c_12/1} - Obligation: innermost runtime complexity wrt. defined symbols {main#,map#2#,mult#2#,plus#2#,sum#1# ,unfoldr#2#} and constructors {0,Cons,Nil,S} + Applied Processor: PredecessorEstimation {onSelection = all simple predecessor estimation selector} + Details: We estimate the number of application of {1,4,5,7,10,11} by application of Pre({1,4,5,7,10,11}) = {2,3,6,8,9,12}. Here rules are labelled as follows: 1: main#(0()) -> c_1() 2: main#(S(x1)) -> c_2(sum#1#(map#2(Cons(S(x1),unfoldr#2(S(x1))))) ,map#2#(Cons(S(x1),unfoldr#2(S(x1)))) ,unfoldr#2#(S(x1))) 3: map#2#(Cons(x2,x5)) -> c_3(mult#2#(x2,x2),map#2#(x5)) 4: map#2#(Nil()) -> c_4() 5: mult#2#(0(),x2) -> c_5() 6: mult#2#(S(x4),x2) -> c_6(plus#2#(x2,mult#2(x4,x2)),mult#2#(x4,x2)) 7: plus#2#(0(),x8) -> c_7() 8: plus#2#(S(x4),x2) -> c_8(plus#2#(x4,x2)) 9: sum#1#(Cons(x2,x1)) -> c_9(plus#2#(x2,sum#1(x1)),sum#1#(x1)) 10: sum#1#(Nil()) -> c_10() 11: unfoldr#2#(0()) -> c_11() 12: unfoldr#2#(S(x2)) -> c_12(unfoldr#2#(x2)) * Step 4: RemoveWeakSuffixes MAYBE + Considered Problem: - Strict DPs: main#(S(x1)) -> c_2(sum#1#(map#2(Cons(S(x1),unfoldr#2(S(x1))))) ,map#2#(Cons(S(x1),unfoldr#2(S(x1)))) ,unfoldr#2#(S(x1))) map#2#(Cons(x2,x5)) -> c_3(mult#2#(x2,x2),map#2#(x5)) mult#2#(S(x4),x2) -> c_6(plus#2#(x2,mult#2(x4,x2)),mult#2#(x4,x2)) plus#2#(S(x4),x2) -> c_8(plus#2#(x4,x2)) sum#1#(Cons(x2,x1)) -> c_9(plus#2#(x2,sum#1(x1)),sum#1#(x1)) unfoldr#2#(S(x2)) -> c_12(unfoldr#2#(x2)) - Weak DPs: main#(0()) -> c_1() map#2#(Nil()) -> c_4() mult#2#(0(),x2) -> c_5() plus#2#(0(),x8) -> c_7() sum#1#(Nil()) -> c_10() unfoldr#2#(0()) -> c_11() - Weak TRS: map#2(Cons(x2,x5)) -> Cons(mult#2(x2,x2),map#2(x5)) map#2(Nil()) -> Nil() mult#2(0(),x2) -> 0() mult#2(S(x4),x2) -> plus#2(x2,mult#2(x4,x2)) plus#2(0(),x8) -> x8 plus#2(S(x4),x2) -> S(plus#2(x4,x2)) sum#1(Cons(x2,x1)) -> plus#2(x2,sum#1(x1)) sum#1(Nil()) -> 0() unfoldr#2(0()) -> Nil() unfoldr#2(S(x2)) -> Cons(x2,unfoldr#2(x2)) - Signature: {main/1,map#2/1,mult#2/2,plus#2/2,sum#1/1,unfoldr#2/1,main#/1,map#2#/1,mult#2#/2,plus#2#/2,sum#1#/1 ,unfoldr#2#/1} / {0/0,Cons/2,Nil/0,S/1,c_1/0,c_2/3,c_3/2,c_4/0,c_5/0,c_6/2,c_7/0,c_8/1,c_9/2,c_10/0,c_11/0 ,c_12/1} - Obligation: innermost runtime complexity wrt. defined symbols {main#,map#2#,mult#2#,plus#2#,sum#1# ,unfoldr#2#} and constructors {0,Cons,Nil,S} + Applied Processor: RemoveWeakSuffixes + Details: Consider the dependency graph 1:S:main#(S(x1)) -> c_2(sum#1#(map#2(Cons(S(x1),unfoldr#2(S(x1))))) ,map#2#(Cons(S(x1),unfoldr#2(S(x1)))) ,unfoldr#2#(S(x1))) -->_3 unfoldr#2#(S(x2)) -> c_12(unfoldr#2#(x2)):6 -->_1 sum#1#(Cons(x2,x1)) -> c_9(plus#2#(x2,sum#1(x1)),sum#1#(x1)):5 -->_2 map#2#(Cons(x2,x5)) -> c_3(mult#2#(x2,x2),map#2#(x5)):2 -->_1 sum#1#(Nil()) -> c_10():11 2:S:map#2#(Cons(x2,x5)) -> c_3(mult#2#(x2,x2),map#2#(x5)) -->_1 mult#2#(S(x4),x2) -> c_6(plus#2#(x2,mult#2(x4,x2)),mult#2#(x4,x2)):3 -->_1 mult#2#(0(),x2) -> c_5():9 -->_2 map#2#(Nil()) -> c_4():8 -->_2 map#2#(Cons(x2,x5)) -> c_3(mult#2#(x2,x2),map#2#(x5)):2 3:S:mult#2#(S(x4),x2) -> c_6(plus#2#(x2,mult#2(x4,x2)),mult#2#(x4,x2)) -->_1 plus#2#(S(x4),x2) -> c_8(plus#2#(x4,x2)):4 -->_1 plus#2#(0(),x8) -> c_7():10 -->_2 mult#2#(0(),x2) -> c_5():9 -->_2 mult#2#(S(x4),x2) -> c_6(plus#2#(x2,mult#2(x4,x2)),mult#2#(x4,x2)):3 4:S:plus#2#(S(x4),x2) -> c_8(plus#2#(x4,x2)) -->_1 plus#2#(0(),x8) -> c_7():10 -->_1 plus#2#(S(x4),x2) -> c_8(plus#2#(x4,x2)):4 5:S:sum#1#(Cons(x2,x1)) -> c_9(plus#2#(x2,sum#1(x1)),sum#1#(x1)) -->_2 sum#1#(Nil()) -> c_10():11 -->_1 plus#2#(0(),x8) -> c_7():10 -->_2 sum#1#(Cons(x2,x1)) -> c_9(plus#2#(x2,sum#1(x1)),sum#1#(x1)):5 -->_1 plus#2#(S(x4),x2) -> c_8(plus#2#(x4,x2)):4 6:S:unfoldr#2#(S(x2)) -> c_12(unfoldr#2#(x2)) -->_1 unfoldr#2#(0()) -> c_11():12 -->_1 unfoldr#2#(S(x2)) -> c_12(unfoldr#2#(x2)):6 7:W:main#(0()) -> c_1() 8:W:map#2#(Nil()) -> c_4() 9:W:mult#2#(0(),x2) -> c_5() 10:W:plus#2#(0(),x8) -> c_7() 11:W:sum#1#(Nil()) -> c_10() 12:W:unfoldr#2#(0()) -> c_11() The following weak DPs constitute a sub-graph of the DG that is closed under successors. The DPs are removed. 7: main#(0()) -> c_1() 8: map#2#(Nil()) -> c_4() 9: mult#2#(0(),x2) -> c_5() 10: plus#2#(0(),x8) -> c_7() 11: sum#1#(Nil()) -> c_10() 12: unfoldr#2#(0()) -> c_11() * Step 5: Decompose MAYBE + Considered Problem: - Strict DPs: main#(S(x1)) -> c_2(sum#1#(map#2(Cons(S(x1),unfoldr#2(S(x1))))) ,map#2#(Cons(S(x1),unfoldr#2(S(x1)))) ,unfoldr#2#(S(x1))) map#2#(Cons(x2,x5)) -> c_3(mult#2#(x2,x2),map#2#(x5)) mult#2#(S(x4),x2) -> c_6(plus#2#(x2,mult#2(x4,x2)),mult#2#(x4,x2)) plus#2#(S(x4),x2) -> c_8(plus#2#(x4,x2)) sum#1#(Cons(x2,x1)) -> c_9(plus#2#(x2,sum#1(x1)),sum#1#(x1)) unfoldr#2#(S(x2)) -> c_12(unfoldr#2#(x2)) - Weak TRS: map#2(Cons(x2,x5)) -> Cons(mult#2(x2,x2),map#2(x5)) map#2(Nil()) -> Nil() mult#2(0(),x2) -> 0() mult#2(S(x4),x2) -> plus#2(x2,mult#2(x4,x2)) plus#2(0(),x8) -> x8 plus#2(S(x4),x2) -> S(plus#2(x4,x2)) sum#1(Cons(x2,x1)) -> plus#2(x2,sum#1(x1)) sum#1(Nil()) -> 0() unfoldr#2(0()) -> Nil() unfoldr#2(S(x2)) -> Cons(x2,unfoldr#2(x2)) - Signature: {main/1,map#2/1,mult#2/2,plus#2/2,sum#1/1,unfoldr#2/1,main#/1,map#2#/1,mult#2#/2,plus#2#/2,sum#1#/1 ,unfoldr#2#/1} / {0/0,Cons/2,Nil/0,S/1,c_1/0,c_2/3,c_3/2,c_4/0,c_5/0,c_6/2,c_7/0,c_8/1,c_9/2,c_10/0,c_11/0 ,c_12/1} - Obligation: innermost runtime complexity wrt. defined symbols {main#,map#2#,mult#2#,plus#2#,sum#1# ,unfoldr#2#} and constructors {0,Cons,Nil,S} + 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: main#(S(x1)) -> c_2(sum#1#(map#2(Cons(S(x1),unfoldr#2(S(x1))))) ,map#2#(Cons(S(x1),unfoldr#2(S(x1)))) ,unfoldr#2#(S(x1))) unfoldr#2#(S(x2)) -> c_12(unfoldr#2#(x2)) - Weak DPs: map#2#(Cons(x2,x5)) -> c_3(mult#2#(x2,x2),map#2#(x5)) mult#2#(S(x4),x2) -> c_6(plus#2#(x2,mult#2(x4,x2)),mult#2#(x4,x2)) plus#2#(S(x4),x2) -> c_8(plus#2#(x4,x2)) sum#1#(Cons(x2,x1)) -> c_9(plus#2#(x2,sum#1(x1)),sum#1#(x1)) - Weak TRS: map#2(Cons(x2,x5)) -> Cons(mult#2(x2,x2),map#2(x5)) map#2(Nil()) -> Nil() mult#2(0(),x2) -> 0() mult#2(S(x4),x2) -> plus#2(x2,mult#2(x4,x2)) plus#2(0(),x8) -> x8 plus#2(S(x4),x2) -> S(plus#2(x4,x2)) sum#1(Cons(x2,x1)) -> plus#2(x2,sum#1(x1)) sum#1(Nil()) -> 0() unfoldr#2(0()) -> Nil() unfoldr#2(S(x2)) -> Cons(x2,unfoldr#2(x2)) - Signature: {main/1,map#2/1,mult#2/2,plus#2/2,sum#1/1,unfoldr#2/1,main#/1,map#2#/1,mult#2#/2,plus#2#/2,sum#1#/1 ,unfoldr#2#/1} / {0/0,Cons/2,Nil/0,S/1,c_1/0,c_2/3,c_3/2,c_4/0,c_5/0,c_6/2,c_7/0,c_8/1,c_9/2,c_10/0,c_11/0 ,c_12/1} - Obligation: innermost runtime complexity wrt. defined symbols {main#,map#2#,mult#2#,plus#2#,sum#1# ,unfoldr#2#} and constructors {0,Cons,Nil,S} Problem (S) - Strict DPs: map#2#(Cons(x2,x5)) -> c_3(mult#2#(x2,x2),map#2#(x5)) mult#2#(S(x4),x2) -> c_6(plus#2#(x2,mult#2(x4,x2)),mult#2#(x4,x2)) plus#2#(S(x4),x2) -> c_8(plus#2#(x4,x2)) sum#1#(Cons(x2,x1)) -> c_9(plus#2#(x2,sum#1(x1)),sum#1#(x1)) - Weak DPs: main#(S(x1)) -> c_2(sum#1#(map#2(Cons(S(x1),unfoldr#2(S(x1))))) ,map#2#(Cons(S(x1),unfoldr#2(S(x1)))) ,unfoldr#2#(S(x1))) unfoldr#2#(S(x2)) -> c_12(unfoldr#2#(x2)) - Weak TRS: map#2(Cons(x2,x5)) -> Cons(mult#2(x2,x2),map#2(x5)) map#2(Nil()) -> Nil() mult#2(0(),x2) -> 0() mult#2(S(x4),x2) -> plus#2(x2,mult#2(x4,x2)) plus#2(0(),x8) -> x8 plus#2(S(x4),x2) -> S(plus#2(x4,x2)) sum#1(Cons(x2,x1)) -> plus#2(x2,sum#1(x1)) sum#1(Nil()) -> 0() unfoldr#2(0()) -> Nil() unfoldr#2(S(x2)) -> Cons(x2,unfoldr#2(x2)) - Signature: {main/1,map#2/1,mult#2/2,plus#2/2,sum#1/1,unfoldr#2/1,main#/1,map#2#/1,mult#2#/2,plus#2#/2,sum#1#/1 ,unfoldr#2#/1} / {0/0,Cons/2,Nil/0,S/1,c_1/0,c_2/3,c_3/2,c_4/0,c_5/0,c_6/2,c_7/0,c_8/1,c_9/2,c_10/0,c_11/0 ,c_12/1} - Obligation: innermost runtime complexity wrt. defined symbols {main#,map#2#,mult#2#,plus#2#,sum#1# ,unfoldr#2#} and constructors {0,Cons,Nil,S} ** Step 5.a:1: RemoveWeakSuffixes WORST_CASE(?,O(n^1)) + Considered Problem: - Strict DPs: main#(S(x1)) -> c_2(sum#1#(map#2(Cons(S(x1),unfoldr#2(S(x1))))) ,map#2#(Cons(S(x1),unfoldr#2(S(x1)))) ,unfoldr#2#(S(x1))) unfoldr#2#(S(x2)) -> c_12(unfoldr#2#(x2)) - Weak DPs: map#2#(Cons(x2,x5)) -> c_3(mult#2#(x2,x2),map#2#(x5)) mult#2#(S(x4),x2) -> c_6(plus#2#(x2,mult#2(x4,x2)),mult#2#(x4,x2)) plus#2#(S(x4),x2) -> c_8(plus#2#(x4,x2)) sum#1#(Cons(x2,x1)) -> c_9(plus#2#(x2,sum#1(x1)),sum#1#(x1)) - Weak TRS: map#2(Cons(x2,x5)) -> Cons(mult#2(x2,x2),map#2(x5)) map#2(Nil()) -> Nil() mult#2(0(),x2) -> 0() mult#2(S(x4),x2) -> plus#2(x2,mult#2(x4,x2)) plus#2(0(),x8) -> x8 plus#2(S(x4),x2) -> S(plus#2(x4,x2)) sum#1(Cons(x2,x1)) -> plus#2(x2,sum#1(x1)) sum#1(Nil()) -> 0() unfoldr#2(0()) -> Nil() unfoldr#2(S(x2)) -> Cons(x2,unfoldr#2(x2)) - Signature: {main/1,map#2/1,mult#2/2,plus#2/2,sum#1/1,unfoldr#2/1,main#/1,map#2#/1,mult#2#/2,plus#2#/2,sum#1#/1 ,unfoldr#2#/1} / {0/0,Cons/2,Nil/0,S/1,c_1/0,c_2/3,c_3/2,c_4/0,c_5/0,c_6/2,c_7/0,c_8/1,c_9/2,c_10/0,c_11/0 ,c_12/1} - Obligation: innermost runtime complexity wrt. defined symbols {main#,map#2#,mult#2#,plus#2#,sum#1# ,unfoldr#2#} and constructors {0,Cons,Nil,S} + Applied Processor: RemoveWeakSuffixes + Details: Consider the dependency graph 1:S:main#(S(x1)) -> c_2(sum#1#(map#2(Cons(S(x1),unfoldr#2(S(x1))))) ,map#2#(Cons(S(x1),unfoldr#2(S(x1)))) ,unfoldr#2#(S(x1))) -->_3 unfoldr#2#(S(x2)) -> c_12(unfoldr#2#(x2)):6 -->_1 sum#1#(Cons(x2,x1)) -> c_9(plus#2#(x2,sum#1(x1)),sum#1#(x1)):5 -->_2 map#2#(Cons(x2,x5)) -> c_3(mult#2#(x2,x2),map#2#(x5)):2 2:W:map#2#(Cons(x2,x5)) -> c_3(mult#2#(x2,x2),map#2#(x5)) -->_1 mult#2#(S(x4),x2) -> c_6(plus#2#(x2,mult#2(x4,x2)),mult#2#(x4,x2)):3 -->_2 map#2#(Cons(x2,x5)) -> c_3(mult#2#(x2,x2),map#2#(x5)):2 3:W:mult#2#(S(x4),x2) -> c_6(plus#2#(x2,mult#2(x4,x2)),mult#2#(x4,x2)) -->_1 plus#2#(S(x4),x2) -> c_8(plus#2#(x4,x2)):4 -->_2 mult#2#(S(x4),x2) -> c_6(plus#2#(x2,mult#2(x4,x2)),mult#2#(x4,x2)):3 4:W:plus#2#(S(x4),x2) -> c_8(plus#2#(x4,x2)) -->_1 plus#2#(S(x4),x2) -> c_8(plus#2#(x4,x2)):4 5:W:sum#1#(Cons(x2,x1)) -> c_9(plus#2#(x2,sum#1(x1)),sum#1#(x1)) -->_1 plus#2#(S(x4),x2) -> c_8(plus#2#(x4,x2)):4 -->_2 sum#1#(Cons(x2,x1)) -> c_9(plus#2#(x2,sum#1(x1)),sum#1#(x1)):5 6:S:unfoldr#2#(S(x2)) -> c_12(unfoldr#2#(x2)) -->_1 unfoldr#2#(S(x2)) -> c_12(unfoldr#2#(x2)):6 The following weak DPs constitute a sub-graph of the DG that is closed under successors. The DPs are removed. 2: map#2#(Cons(x2,x5)) -> c_3(mult#2#(x2,x2),map#2#(x5)) 3: mult#2#(S(x4),x2) -> c_6(plus#2#(x2,mult#2(x4,x2)),mult#2#(x4,x2)) 5: sum#1#(Cons(x2,x1)) -> c_9(plus#2#(x2,sum#1(x1)),sum#1#(x1)) 4: plus#2#(S(x4),x2) -> c_8(plus#2#(x4,x2)) ** Step 5.a:2: SimplifyRHS WORST_CASE(?,O(n^1)) + Considered Problem: - Strict DPs: main#(S(x1)) -> c_2(sum#1#(map#2(Cons(S(x1),unfoldr#2(S(x1))))) ,map#2#(Cons(S(x1),unfoldr#2(S(x1)))) ,unfoldr#2#(S(x1))) unfoldr#2#(S(x2)) -> c_12(unfoldr#2#(x2)) - Weak TRS: map#2(Cons(x2,x5)) -> Cons(mult#2(x2,x2),map#2(x5)) map#2(Nil()) -> Nil() mult#2(0(),x2) -> 0() mult#2(S(x4),x2) -> plus#2(x2,mult#2(x4,x2)) plus#2(0(),x8) -> x8 plus#2(S(x4),x2) -> S(plus#2(x4,x2)) sum#1(Cons(x2,x1)) -> plus#2(x2,sum#1(x1)) sum#1(Nil()) -> 0() unfoldr#2(0()) -> Nil() unfoldr#2(S(x2)) -> Cons(x2,unfoldr#2(x2)) - Signature: {main/1,map#2/1,mult#2/2,plus#2/2,sum#1/1,unfoldr#2/1,main#/1,map#2#/1,mult#2#/2,plus#2#/2,sum#1#/1 ,unfoldr#2#/1} / {0/0,Cons/2,Nil/0,S/1,c_1/0,c_2/3,c_3/2,c_4/0,c_5/0,c_6/2,c_7/0,c_8/1,c_9/2,c_10/0,c_11/0 ,c_12/1} - Obligation: innermost runtime complexity wrt. defined symbols {main#,map#2#,mult#2#,plus#2#,sum#1# ,unfoldr#2#} and constructors {0,Cons,Nil,S} + Applied Processor: SimplifyRHS + Details: Consider the dependency graph 1:S:main#(S(x1)) -> c_2(sum#1#(map#2(Cons(S(x1),unfoldr#2(S(x1))))) ,map#2#(Cons(S(x1),unfoldr#2(S(x1)))) ,unfoldr#2#(S(x1))) -->_3 unfoldr#2#(S(x2)) -> c_12(unfoldr#2#(x2)):6 6:S:unfoldr#2#(S(x2)) -> c_12(unfoldr#2#(x2)) -->_1 unfoldr#2#(S(x2)) -> c_12(unfoldr#2#(x2)):6 Due to missing edges in the depndency graph, the right-hand sides of following rules could be simplified: main#(S(x1)) -> c_2(unfoldr#2#(S(x1))) ** Step 5.a:3: UsableRules WORST_CASE(?,O(n^1)) + Considered Problem: - Strict DPs: main#(S(x1)) -> c_2(unfoldr#2#(S(x1))) unfoldr#2#(S(x2)) -> c_12(unfoldr#2#(x2)) - Weak TRS: map#2(Cons(x2,x5)) -> Cons(mult#2(x2,x2),map#2(x5)) map#2(Nil()) -> Nil() mult#2(0(),x2) -> 0() mult#2(S(x4),x2) -> plus#2(x2,mult#2(x4,x2)) plus#2(0(),x8) -> x8 plus#2(S(x4),x2) -> S(plus#2(x4,x2)) sum#1(Cons(x2,x1)) -> plus#2(x2,sum#1(x1)) sum#1(Nil()) -> 0() unfoldr#2(0()) -> Nil() unfoldr#2(S(x2)) -> Cons(x2,unfoldr#2(x2)) - Signature: {main/1,map#2/1,mult#2/2,plus#2/2,sum#1/1,unfoldr#2/1,main#/1,map#2#/1,mult#2#/2,plus#2#/2,sum#1#/1 ,unfoldr#2#/1} / {0/0,Cons/2,Nil/0,S/1,c_1/0,c_2/1,c_3/2,c_4/0,c_5/0,c_6/2,c_7/0,c_8/1,c_9/2,c_10/0,c_11/0 ,c_12/1} - Obligation: innermost runtime complexity wrt. defined symbols {main#,map#2#,mult#2#,plus#2#,sum#1# ,unfoldr#2#} and constructors {0,Cons,Nil,S} + Applied Processor: UsableRules + Details: We replace rewrite rules by usable rules: main#(S(x1)) -> c_2(unfoldr#2#(S(x1))) unfoldr#2#(S(x2)) -> c_12(unfoldr#2#(x2)) ** Step 5.a:4: PredecessorEstimationCP WORST_CASE(?,O(n^1)) + Considered Problem: - Strict DPs: main#(S(x1)) -> c_2(unfoldr#2#(S(x1))) unfoldr#2#(S(x2)) -> c_12(unfoldr#2#(x2)) - Signature: {main/1,map#2/1,mult#2/2,plus#2/2,sum#1/1,unfoldr#2/1,main#/1,map#2#/1,mult#2#/2,plus#2#/2,sum#1#/1 ,unfoldr#2#/1} / {0/0,Cons/2,Nil/0,S/1,c_1/0,c_2/1,c_3/2,c_4/0,c_5/0,c_6/2,c_7/0,c_8/1,c_9/2,c_10/0,c_11/0 ,c_12/1} - Obligation: innermost runtime complexity wrt. defined symbols {main#,map#2#,mult#2#,plus#2#,sum#1# ,unfoldr#2#} and constructors {0,Cons,Nil,S} + Applied Processor: PredecessorEstimationCP {onSelectionCP = any intersect of rules of CDG leaf and strict-rules, withComplexityPair = NaturalMI {miDimension = 1, miDegree = 1, miKind = Algebraic, uargs = UArgs, urules = URules, selector = Nothing}} + Details: We first use the processor NaturalMI {miDimension = 1, miDegree = 1, miKind = Algebraic, uargs = UArgs, urules = URules, selector = Nothing} to orient following rules strictly: 2: unfoldr#2#(S(x2)) -> c_12(unfoldr#2#(x2)) Consider the set of all dependency pairs 1: main#(S(x1)) -> c_2(unfoldr#2#(S(x1))) 2: unfoldr#2#(S(x2)) -> c_12(unfoldr#2#(x2)) Processor NaturalMI {miDimension = 1, miDegree = 1, miKind = Algebraic, uargs = UArgs, urules = URules, selector = Nothing}induces the complexity certificateTIME (?,O(n^1)) SPACE(?,?)on application of the dependency pairs {2} These cover all (indirect) predecessors of dependency pairs {1,2} their number of applications is equally bounded. The dependency pairs are shifted into the weak component. *** Step 5.a:4.a:1: NaturalMI WORST_CASE(?,O(n^1)) + Considered Problem: - Strict DPs: main#(S(x1)) -> c_2(unfoldr#2#(S(x1))) unfoldr#2#(S(x2)) -> c_12(unfoldr#2#(x2)) - Signature: {main/1,map#2/1,mult#2/2,plus#2/2,sum#1/1,unfoldr#2/1,main#/1,map#2#/1,mult#2#/2,plus#2#/2,sum#1#/1 ,unfoldr#2#/1} / {0/0,Cons/2,Nil/0,S/1,c_1/0,c_2/1,c_3/2,c_4/0,c_5/0,c_6/2,c_7/0,c_8/1,c_9/2,c_10/0,c_11/0 ,c_12/1} - Obligation: innermost runtime complexity wrt. defined symbols {main#,map#2#,mult#2#,plus#2#,sum#1# ,unfoldr#2#} and constructors {0,Cons,Nil,S} + Applied Processor: NaturalMI {miDimension = 1, miDegree = 1, miKind = Algebraic, uargs = UArgs, urules = URules, selector = Just first alternative for predecessorEstimation on any intersect of rules of CDG leaf and 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_12) = {1} Following symbols are considered usable: {main#,map#2#,mult#2#,plus#2#,sum#1#,unfoldr#2#} TcT has computed the following interpretation: p(0) = [4] p(Cons) = [0] p(Nil) = [0] p(S) = [1] x1 + [8] p(main) = [1] x1 + [1] p(map#2) = [0] p(mult#2) = [1] x2 + [1] p(plus#2) = [0] p(sum#1) = [1] x1 + [0] p(unfoldr#2) = [1] x1 + [2] p(main#) = [3] x1 + [0] p(map#2#) = [1] p(mult#2#) = [1] x1 + [8] x2 + [0] p(plus#2#) = [1] x1 + [1] x2 + [8] p(sum#1#) = [1] x1 + [2] p(unfoldr#2#) = [1] x1 + [0] p(c_1) = [0] p(c_2) = [2] x1 + [8] p(c_3) = [2] x2 + [1] p(c_4) = [2] p(c_5) = [2] p(c_6) = [2] p(c_7) = [4] p(c_8) = [2] x1 + [1] p(c_9) = [0] p(c_10) = [0] p(c_11) = [1] p(c_12) = [1] x1 + [5] Following rules are strictly oriented: unfoldr#2#(S(x2)) = [1] x2 + [8] > [1] x2 + [5] = c_12(unfoldr#2#(x2)) Following rules are (at-least) weakly oriented: main#(S(x1)) = [3] x1 + [24] >= [2] x1 + [24] = c_2(unfoldr#2#(S(x1))) *** Step 5.a:4.a:2: Assumption WORST_CASE(?,O(1)) + Considered Problem: - Strict DPs: main#(S(x1)) -> c_2(unfoldr#2#(S(x1))) - Weak DPs: unfoldr#2#(S(x2)) -> c_12(unfoldr#2#(x2)) - Signature: {main/1,map#2/1,mult#2/2,plus#2/2,sum#1/1,unfoldr#2/1,main#/1,map#2#/1,mult#2#/2,plus#2#/2,sum#1#/1 ,unfoldr#2#/1} / {0/0,Cons/2,Nil/0,S/1,c_1/0,c_2/1,c_3/2,c_4/0,c_5/0,c_6/2,c_7/0,c_8/1,c_9/2,c_10/0,c_11/0 ,c_12/1} - Obligation: innermost runtime complexity wrt. defined symbols {main#,map#2#,mult#2#,plus#2#,sum#1# ,unfoldr#2#} and constructors {0,Cons,Nil,S} + Applied Processor: Assumption {assumed = Certificate {spaceUB = Unknown, spaceLB = Unknown, timeUB = Poly (Just 0), timeLB = Unknown}} + Details: () *** Step 5.a:4.b:1: RemoveWeakSuffixes WORST_CASE(?,O(1)) + Considered Problem: - Weak DPs: main#(S(x1)) -> c_2(unfoldr#2#(S(x1))) unfoldr#2#(S(x2)) -> c_12(unfoldr#2#(x2)) - Signature: {main/1,map#2/1,mult#2/2,plus#2/2,sum#1/1,unfoldr#2/1,main#/1,map#2#/1,mult#2#/2,plus#2#/2,sum#1#/1 ,unfoldr#2#/1} / {0/0,Cons/2,Nil/0,S/1,c_1/0,c_2/1,c_3/2,c_4/0,c_5/0,c_6/2,c_7/0,c_8/1,c_9/2,c_10/0,c_11/0 ,c_12/1} - Obligation: innermost runtime complexity wrt. defined symbols {main#,map#2#,mult#2#,plus#2#,sum#1# ,unfoldr#2#} and constructors {0,Cons,Nil,S} + Applied Processor: RemoveWeakSuffixes + Details: Consider the dependency graph 1:W:main#(S(x1)) -> c_2(unfoldr#2#(S(x1))) -->_1 unfoldr#2#(S(x2)) -> c_12(unfoldr#2#(x2)):2 2:W:unfoldr#2#(S(x2)) -> c_12(unfoldr#2#(x2)) -->_1 unfoldr#2#(S(x2)) -> c_12(unfoldr#2#(x2)):2 The following weak DPs constitute a sub-graph of the DG that is closed under successors. The DPs are removed. 1: main#(S(x1)) -> c_2(unfoldr#2#(S(x1))) 2: unfoldr#2#(S(x2)) -> c_12(unfoldr#2#(x2)) *** Step 5.a:4.b:2: EmptyProcessor WORST_CASE(?,O(1)) + Considered Problem: - Signature: {main/1,map#2/1,mult#2/2,plus#2/2,sum#1/1,unfoldr#2/1,main#/1,map#2#/1,mult#2#/2,plus#2#/2,sum#1#/1 ,unfoldr#2#/1} / {0/0,Cons/2,Nil/0,S/1,c_1/0,c_2/1,c_3/2,c_4/0,c_5/0,c_6/2,c_7/0,c_8/1,c_9/2,c_10/0,c_11/0 ,c_12/1} - Obligation: innermost runtime complexity wrt. defined symbols {main#,map#2#,mult#2#,plus#2#,sum#1# ,unfoldr#2#} and constructors {0,Cons,Nil,S} + Applied Processor: EmptyProcessor + Details: The problem is already closed. The intended complexity is O(1). ** Step 5.b:1: RemoveWeakSuffixes MAYBE + Considered Problem: - Strict DPs: map#2#(Cons(x2,x5)) -> c_3(mult#2#(x2,x2),map#2#(x5)) mult#2#(S(x4),x2) -> c_6(plus#2#(x2,mult#2(x4,x2)),mult#2#(x4,x2)) plus#2#(S(x4),x2) -> c_8(plus#2#(x4,x2)) sum#1#(Cons(x2,x1)) -> c_9(plus#2#(x2,sum#1(x1)),sum#1#(x1)) - Weak DPs: main#(S(x1)) -> c_2(sum#1#(map#2(Cons(S(x1),unfoldr#2(S(x1))))) ,map#2#(Cons(S(x1),unfoldr#2(S(x1)))) ,unfoldr#2#(S(x1))) unfoldr#2#(S(x2)) -> c_12(unfoldr#2#(x2)) - Weak TRS: map#2(Cons(x2,x5)) -> Cons(mult#2(x2,x2),map#2(x5)) map#2(Nil()) -> Nil() mult#2(0(),x2) -> 0() mult#2(S(x4),x2) -> plus#2(x2,mult#2(x4,x2)) plus#2(0(),x8) -> x8 plus#2(S(x4),x2) -> S(plus#2(x4,x2)) sum#1(Cons(x2,x1)) -> plus#2(x2,sum#1(x1)) sum#1(Nil()) -> 0() unfoldr#2(0()) -> Nil() unfoldr#2(S(x2)) -> Cons(x2,unfoldr#2(x2)) - Signature: {main/1,map#2/1,mult#2/2,plus#2/2,sum#1/1,unfoldr#2/1,main#/1,map#2#/1,mult#2#/2,plus#2#/2,sum#1#/1 ,unfoldr#2#/1} / {0/0,Cons/2,Nil/0,S/1,c_1/0,c_2/3,c_3/2,c_4/0,c_5/0,c_6/2,c_7/0,c_8/1,c_9/2,c_10/0,c_11/0 ,c_12/1} - Obligation: innermost runtime complexity wrt. defined symbols {main#,map#2#,mult#2#,plus#2#,sum#1# ,unfoldr#2#} and constructors {0,Cons,Nil,S} + Applied Processor: RemoveWeakSuffixes + Details: Consider the dependency graph 1:S:map#2#(Cons(x2,x5)) -> c_3(mult#2#(x2,x2),map#2#(x5)) -->_1 mult#2#(S(x4),x2) -> c_6(plus#2#(x2,mult#2(x4,x2)),mult#2#(x4,x2)):2 -->_2 map#2#(Cons(x2,x5)) -> c_3(mult#2#(x2,x2),map#2#(x5)):1 2:S:mult#2#(S(x4),x2) -> c_6(plus#2#(x2,mult#2(x4,x2)),mult#2#(x4,x2)) -->_1 plus#2#(S(x4),x2) -> c_8(plus#2#(x4,x2)):3 -->_2 mult#2#(S(x4),x2) -> c_6(plus#2#(x2,mult#2(x4,x2)),mult#2#(x4,x2)):2 3:S:plus#2#(S(x4),x2) -> c_8(plus#2#(x4,x2)) -->_1 plus#2#(S(x4),x2) -> c_8(plus#2#(x4,x2)):3 4:S:sum#1#(Cons(x2,x1)) -> c_9(plus#2#(x2,sum#1(x1)),sum#1#(x1)) -->_2 sum#1#(Cons(x2,x1)) -> c_9(plus#2#(x2,sum#1(x1)),sum#1#(x1)):4 -->_1 plus#2#(S(x4),x2) -> c_8(plus#2#(x4,x2)):3 5:W:main#(S(x1)) -> c_2(sum#1#(map#2(Cons(S(x1),unfoldr#2(S(x1))))) ,map#2#(Cons(S(x1),unfoldr#2(S(x1)))) ,unfoldr#2#(S(x1))) -->_3 unfoldr#2#(S(x2)) -> c_12(unfoldr#2#(x2)):6 -->_1 sum#1#(Cons(x2,x1)) -> c_9(plus#2#(x2,sum#1(x1)),sum#1#(x1)):4 -->_2 map#2#(Cons(x2,x5)) -> c_3(mult#2#(x2,x2),map#2#(x5)):1 6:W:unfoldr#2#(S(x2)) -> c_12(unfoldr#2#(x2)) -->_1 unfoldr#2#(S(x2)) -> c_12(unfoldr#2#(x2)):6 The following weak DPs constitute a sub-graph of the DG that is closed under successors. The DPs are removed. 6: unfoldr#2#(S(x2)) -> c_12(unfoldr#2#(x2)) ** Step 5.b:2: SimplifyRHS MAYBE + Considered Problem: - Strict DPs: map#2#(Cons(x2,x5)) -> c_3(mult#2#(x2,x2),map#2#(x5)) mult#2#(S(x4),x2) -> c_6(plus#2#(x2,mult#2(x4,x2)),mult#2#(x4,x2)) plus#2#(S(x4),x2) -> c_8(plus#2#(x4,x2)) sum#1#(Cons(x2,x1)) -> c_9(plus#2#(x2,sum#1(x1)),sum#1#(x1)) - Weak DPs: main#(S(x1)) -> c_2(sum#1#(map#2(Cons(S(x1),unfoldr#2(S(x1))))) ,map#2#(Cons(S(x1),unfoldr#2(S(x1)))) ,unfoldr#2#(S(x1))) - Weak TRS: map#2(Cons(x2,x5)) -> Cons(mult#2(x2,x2),map#2(x5)) map#2(Nil()) -> Nil() mult#2(0(),x2) -> 0() mult#2(S(x4),x2) -> plus#2(x2,mult#2(x4,x2)) plus#2(0(),x8) -> x8 plus#2(S(x4),x2) -> S(plus#2(x4,x2)) sum#1(Cons(x2,x1)) -> plus#2(x2,sum#1(x1)) sum#1(Nil()) -> 0() unfoldr#2(0()) -> Nil() unfoldr#2(S(x2)) -> Cons(x2,unfoldr#2(x2)) - Signature: {main/1,map#2/1,mult#2/2,plus#2/2,sum#1/1,unfoldr#2/1,main#/1,map#2#/1,mult#2#/2,plus#2#/2,sum#1#/1 ,unfoldr#2#/1} / {0/0,Cons/2,Nil/0,S/1,c_1/0,c_2/3,c_3/2,c_4/0,c_5/0,c_6/2,c_7/0,c_8/1,c_9/2,c_10/0,c_11/0 ,c_12/1} - Obligation: innermost runtime complexity wrt. defined symbols {main#,map#2#,mult#2#,plus#2#,sum#1# ,unfoldr#2#} and constructors {0,Cons,Nil,S} + Applied Processor: SimplifyRHS + Details: Consider the dependency graph 1:S:map#2#(Cons(x2,x5)) -> c_3(mult#2#(x2,x2),map#2#(x5)) -->_1 mult#2#(S(x4),x2) -> c_6(plus#2#(x2,mult#2(x4,x2)),mult#2#(x4,x2)):2 -->_2 map#2#(Cons(x2,x5)) -> c_3(mult#2#(x2,x2),map#2#(x5)):1 2:S:mult#2#(S(x4),x2) -> c_6(plus#2#(x2,mult#2(x4,x2)),mult#2#(x4,x2)) -->_1 plus#2#(S(x4),x2) -> c_8(plus#2#(x4,x2)):3 -->_2 mult#2#(S(x4),x2) -> c_6(plus#2#(x2,mult#2(x4,x2)),mult#2#(x4,x2)):2 3:S:plus#2#(S(x4),x2) -> c_8(plus#2#(x4,x2)) -->_1 plus#2#(S(x4),x2) -> c_8(plus#2#(x4,x2)):3 4:S:sum#1#(Cons(x2,x1)) -> c_9(plus#2#(x2,sum#1(x1)),sum#1#(x1)) -->_2 sum#1#(Cons(x2,x1)) -> c_9(plus#2#(x2,sum#1(x1)),sum#1#(x1)):4 -->_1 plus#2#(S(x4),x2) -> c_8(plus#2#(x4,x2)):3 5:W:main#(S(x1)) -> c_2(sum#1#(map#2(Cons(S(x1),unfoldr#2(S(x1))))) ,map#2#(Cons(S(x1),unfoldr#2(S(x1)))) ,unfoldr#2#(S(x1))) -->_1 sum#1#(Cons(x2,x1)) -> c_9(plus#2#(x2,sum#1(x1)),sum#1#(x1)):4 -->_2 map#2#(Cons(x2,x5)) -> c_3(mult#2#(x2,x2),map#2#(x5)):1 Due to missing edges in the depndency graph, the right-hand sides of following rules could be simplified: main#(S(x1)) -> c_2(sum#1#(map#2(Cons(S(x1),unfoldr#2(S(x1))))),map#2#(Cons(S(x1),unfoldr#2(S(x1))))) ** Step 5.b:3: Decompose MAYBE + Considered Problem: - Strict DPs: map#2#(Cons(x2,x5)) -> c_3(mult#2#(x2,x2),map#2#(x5)) mult#2#(S(x4),x2) -> c_6(plus#2#(x2,mult#2(x4,x2)),mult#2#(x4,x2)) plus#2#(S(x4),x2) -> c_8(plus#2#(x4,x2)) sum#1#(Cons(x2,x1)) -> c_9(plus#2#(x2,sum#1(x1)),sum#1#(x1)) - Weak DPs: main#(S(x1)) -> c_2(sum#1#(map#2(Cons(S(x1),unfoldr#2(S(x1))))),map#2#(Cons(S(x1),unfoldr#2(S(x1))))) - Weak TRS: map#2(Cons(x2,x5)) -> Cons(mult#2(x2,x2),map#2(x5)) map#2(Nil()) -> Nil() mult#2(0(),x2) -> 0() mult#2(S(x4),x2) -> plus#2(x2,mult#2(x4,x2)) plus#2(0(),x8) -> x8 plus#2(S(x4),x2) -> S(plus#2(x4,x2)) sum#1(Cons(x2,x1)) -> plus#2(x2,sum#1(x1)) sum#1(Nil()) -> 0() unfoldr#2(0()) -> Nil() unfoldr#2(S(x2)) -> Cons(x2,unfoldr#2(x2)) - Signature: {main/1,map#2/1,mult#2/2,plus#2/2,sum#1/1,unfoldr#2/1,main#/1,map#2#/1,mult#2#/2,plus#2#/2,sum#1#/1 ,unfoldr#2#/1} / {0/0,Cons/2,Nil/0,S/1,c_1/0,c_2/2,c_3/2,c_4/0,c_5/0,c_6/2,c_7/0,c_8/1,c_9/2,c_10/0,c_11/0 ,c_12/1} - Obligation: innermost runtime complexity wrt. defined symbols {main#,map#2#,mult#2#,plus#2#,sum#1# ,unfoldr#2#} and constructors {0,Cons,Nil,S} + 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: map#2#(Cons(x2,x5)) -> c_3(mult#2#(x2,x2),map#2#(x5)) mult#2#(S(x4),x2) -> c_6(plus#2#(x2,mult#2(x4,x2)),mult#2#(x4,x2)) plus#2#(S(x4),x2) -> c_8(plus#2#(x4,x2)) - Weak DPs: main#(S(x1)) -> c_2(sum#1#(map#2(Cons(S(x1),unfoldr#2(S(x1))))),map#2#(Cons(S(x1),unfoldr#2(S(x1))))) sum#1#(Cons(x2,x1)) -> c_9(plus#2#(x2,sum#1(x1)),sum#1#(x1)) - Weak TRS: map#2(Cons(x2,x5)) -> Cons(mult#2(x2,x2),map#2(x5)) map#2(Nil()) -> Nil() mult#2(0(),x2) -> 0() mult#2(S(x4),x2) -> plus#2(x2,mult#2(x4,x2)) plus#2(0(),x8) -> x8 plus#2(S(x4),x2) -> S(plus#2(x4,x2)) sum#1(Cons(x2,x1)) -> plus#2(x2,sum#1(x1)) sum#1(Nil()) -> 0() unfoldr#2(0()) -> Nil() unfoldr#2(S(x2)) -> Cons(x2,unfoldr#2(x2)) - Signature: {main/1,map#2/1,mult#2/2,plus#2/2,sum#1/1,unfoldr#2/1,main#/1,map#2#/1,mult#2#/2,plus#2#/2,sum#1#/1 ,unfoldr#2#/1} / {0/0,Cons/2,Nil/0,S/1,c_1/0,c_2/2,c_3/2,c_4/0,c_5/0,c_6/2,c_7/0,c_8/1,c_9/2,c_10/0,c_11/0 ,c_12/1} - Obligation: innermost runtime complexity wrt. defined symbols {main#,map#2#,mult#2#,plus#2#,sum#1# ,unfoldr#2#} and constructors {0,Cons,Nil,S} Problem (S) - Strict DPs: sum#1#(Cons(x2,x1)) -> c_9(plus#2#(x2,sum#1(x1)),sum#1#(x1)) - Weak DPs: main#(S(x1)) -> c_2(sum#1#(map#2(Cons(S(x1),unfoldr#2(S(x1))))),map#2#(Cons(S(x1),unfoldr#2(S(x1))))) map#2#(Cons(x2,x5)) -> c_3(mult#2#(x2,x2),map#2#(x5)) mult#2#(S(x4),x2) -> c_6(plus#2#(x2,mult#2(x4,x2)),mult#2#(x4,x2)) plus#2#(S(x4),x2) -> c_8(plus#2#(x4,x2)) - Weak TRS: map#2(Cons(x2,x5)) -> Cons(mult#2(x2,x2),map#2(x5)) map#2(Nil()) -> Nil() mult#2(0(),x2) -> 0() mult#2(S(x4),x2) -> plus#2(x2,mult#2(x4,x2)) plus#2(0(),x8) -> x8 plus#2(S(x4),x2) -> S(plus#2(x4,x2)) sum#1(Cons(x2,x1)) -> plus#2(x2,sum#1(x1)) sum#1(Nil()) -> 0() unfoldr#2(0()) -> Nil() unfoldr#2(S(x2)) -> Cons(x2,unfoldr#2(x2)) - Signature: {main/1,map#2/1,mult#2/2,plus#2/2,sum#1/1,unfoldr#2/1,main#/1,map#2#/1,mult#2#/2,plus#2#/2,sum#1#/1 ,unfoldr#2#/1} / {0/0,Cons/2,Nil/0,S/1,c_1/0,c_2/2,c_3/2,c_4/0,c_5/0,c_6/2,c_7/0,c_8/1,c_9/2,c_10/0,c_11/0 ,c_12/1} - Obligation: innermost runtime complexity wrt. defined symbols {main#,map#2#,mult#2#,plus#2#,sum#1# ,unfoldr#2#} and constructors {0,Cons,Nil,S} *** Step 5.b:3.a:1: DecomposeDG MAYBE + Considered Problem: - Strict DPs: map#2#(Cons(x2,x5)) -> c_3(mult#2#(x2,x2),map#2#(x5)) mult#2#(S(x4),x2) -> c_6(plus#2#(x2,mult#2(x4,x2)),mult#2#(x4,x2)) plus#2#(S(x4),x2) -> c_8(plus#2#(x4,x2)) - Weak DPs: main#(S(x1)) -> c_2(sum#1#(map#2(Cons(S(x1),unfoldr#2(S(x1))))),map#2#(Cons(S(x1),unfoldr#2(S(x1))))) sum#1#(Cons(x2,x1)) -> c_9(plus#2#(x2,sum#1(x1)),sum#1#(x1)) - Weak TRS: map#2(Cons(x2,x5)) -> Cons(mult#2(x2,x2),map#2(x5)) map#2(Nil()) -> Nil() mult#2(0(),x2) -> 0() mult#2(S(x4),x2) -> plus#2(x2,mult#2(x4,x2)) plus#2(0(),x8) -> x8 plus#2(S(x4),x2) -> S(plus#2(x4,x2)) sum#1(Cons(x2,x1)) -> plus#2(x2,sum#1(x1)) sum#1(Nil()) -> 0() unfoldr#2(0()) -> Nil() unfoldr#2(S(x2)) -> Cons(x2,unfoldr#2(x2)) - Signature: {main/1,map#2/1,mult#2/2,plus#2/2,sum#1/1,unfoldr#2/1,main#/1,map#2#/1,mult#2#/2,plus#2#/2,sum#1#/1 ,unfoldr#2#/1} / {0/0,Cons/2,Nil/0,S/1,c_1/0,c_2/2,c_3/2,c_4/0,c_5/0,c_6/2,c_7/0,c_8/1,c_9/2,c_10/0,c_11/0 ,c_12/1} - Obligation: innermost runtime complexity wrt. defined symbols {main#,map#2#,mult#2#,plus#2#,sum#1# ,unfoldr#2#} and constructors {0,Cons,Nil,S} + Applied Processor: DecomposeDG {onSelection = all below first cut in WDG, onUpper = Just someStrategy, onLower = Nothing} + Details: We decompose the input problem according to the dependency graph into the upper component main#(S(x1)) -> c_2(sum#1#(map#2(Cons(S(x1),unfoldr#2(S(x1))))),map#2#(Cons(S(x1),unfoldr#2(S(x1))))) map#2#(Cons(x2,x5)) -> c_3(mult#2#(x2,x2),map#2#(x5)) sum#1#(Cons(x2,x1)) -> c_9(plus#2#(x2,sum#1(x1)),sum#1#(x1)) and a lower component mult#2#(S(x4),x2) -> c_6(plus#2#(x2,mult#2(x4,x2)),mult#2#(x4,x2)) plus#2#(S(x4),x2) -> c_8(plus#2#(x4,x2)) Further, following extension rules are added to the lower component. main#(S(x1)) -> map#2#(Cons(S(x1),unfoldr#2(S(x1)))) main#(S(x1)) -> sum#1#(map#2(Cons(S(x1),unfoldr#2(S(x1))))) map#2#(Cons(x2,x5)) -> map#2#(x5) map#2#(Cons(x2,x5)) -> mult#2#(x2,x2) sum#1#(Cons(x2,x1)) -> plus#2#(x2,sum#1(x1)) sum#1#(Cons(x2,x1)) -> sum#1#(x1) **** Step 5.b:3.a:1.a:1: PredecessorEstimationCP WORST_CASE(?,O(n^1)) + Considered Problem: - Strict DPs: map#2#(Cons(x2,x5)) -> c_3(mult#2#(x2,x2),map#2#(x5)) sum#1#(Cons(x2,x1)) -> c_9(plus#2#(x2,sum#1(x1)),sum#1#(x1)) - Weak DPs: main#(S(x1)) -> c_2(sum#1#(map#2(Cons(S(x1),unfoldr#2(S(x1))))),map#2#(Cons(S(x1),unfoldr#2(S(x1))))) - Weak TRS: map#2(Cons(x2,x5)) -> Cons(mult#2(x2,x2),map#2(x5)) map#2(Nil()) -> Nil() mult#2(0(),x2) -> 0() mult#2(S(x4),x2) -> plus#2(x2,mult#2(x4,x2)) plus#2(0(),x8) -> x8 plus#2(S(x4),x2) -> S(plus#2(x4,x2)) sum#1(Cons(x2,x1)) -> plus#2(x2,sum#1(x1)) sum#1(Nil()) -> 0() unfoldr#2(0()) -> Nil() unfoldr#2(S(x2)) -> Cons(x2,unfoldr#2(x2)) - Signature: {main/1,map#2/1,mult#2/2,plus#2/2,sum#1/1,unfoldr#2/1,main#/1,map#2#/1,mult#2#/2,plus#2#/2,sum#1#/1 ,unfoldr#2#/1} / {0/0,Cons/2,Nil/0,S/1,c_1/0,c_2/2,c_3/2,c_4/0,c_5/0,c_6/2,c_7/0,c_8/1,c_9/2,c_10/0,c_11/0 ,c_12/1} - Obligation: innermost runtime complexity wrt. defined symbols {main#,map#2#,mult#2#,plus#2#,sum#1# ,unfoldr#2#} and constructors {0,Cons,Nil,S} + Applied Processor: PredecessorEstimationCP {onSelectionCP = any intersect of rules of CDG leaf and strict-rules, withComplexityPair = NaturalMI {miDimension = 1, miDegree = 1, miKind = Algebraic, uargs = UArgs, urules = URules, selector = Nothing}} + Details: We first use the processor NaturalMI {miDimension = 1, miDegree = 1, miKind = Algebraic, uargs = UArgs, urules = URules, selector = Nothing} to orient following rules strictly: 1: map#2#(Cons(x2,x5)) -> c_3(mult#2#(x2,x2),map#2#(x5)) Consider the set of all dependency pairs 1: map#2#(Cons(x2,x5)) -> c_3(mult#2#(x2,x2),map#2#(x5)) 2: sum#1#(Cons(x2,x1)) -> c_9(plus#2#(x2,sum#1(x1)),sum#1#(x1)) 3: main#(S(x1)) -> c_2(sum#1#(map#2(Cons(S(x1),unfoldr#2(S(x1))))),map#2#(Cons(S(x1),unfoldr#2(S(x1))))) Processor NaturalMI {miDimension = 1, miDegree = 1, miKind = Algebraic, uargs = UArgs, urules = URules, selector = Nothing}induces the complexity certificateTIME (?,O(n^1)) SPACE(?,?)on application of the dependency pairs {1} These cover all (indirect) predecessors of dependency pairs {1,3} their number of applications is equally bounded. The dependency pairs are shifted into the weak component. ***** Step 5.b:3.a:1.a:1.a:1: NaturalMI WORST_CASE(?,O(n^1)) + Considered Problem: - Strict DPs: map#2#(Cons(x2,x5)) -> c_3(mult#2#(x2,x2),map#2#(x5)) sum#1#(Cons(x2,x1)) -> c_9(plus#2#(x2,sum#1(x1)),sum#1#(x1)) - Weak DPs: main#(S(x1)) -> c_2(sum#1#(map#2(Cons(S(x1),unfoldr#2(S(x1))))),map#2#(Cons(S(x1),unfoldr#2(S(x1))))) - Weak TRS: map#2(Cons(x2,x5)) -> Cons(mult#2(x2,x2),map#2(x5)) map#2(Nil()) -> Nil() mult#2(0(),x2) -> 0() mult#2(S(x4),x2) -> plus#2(x2,mult#2(x4,x2)) plus#2(0(),x8) -> x8 plus#2(S(x4),x2) -> S(plus#2(x4,x2)) sum#1(Cons(x2,x1)) -> plus#2(x2,sum#1(x1)) sum#1(Nil()) -> 0() unfoldr#2(0()) -> Nil() unfoldr#2(S(x2)) -> Cons(x2,unfoldr#2(x2)) - Signature: {main/1,map#2/1,mult#2/2,plus#2/2,sum#1/1,unfoldr#2/1,main#/1,map#2#/1,mult#2#/2,plus#2#/2,sum#1#/1 ,unfoldr#2#/1} / {0/0,Cons/2,Nil/0,S/1,c_1/0,c_2/2,c_3/2,c_4/0,c_5/0,c_6/2,c_7/0,c_8/1,c_9/2,c_10/0,c_11/0 ,c_12/1} - Obligation: innermost runtime complexity wrt. defined symbols {main#,map#2#,mult#2#,plus#2#,sum#1# ,unfoldr#2#} and constructors {0,Cons,Nil,S} + Applied Processor: NaturalMI {miDimension = 1, miDegree = 1, miKind = Algebraic, uargs = UArgs, urules = URules, selector = Just first alternative for predecessorEstimation on any intersect of rules of CDG leaf and 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,2}, uargs(c_3) = {2}, uargs(c_9) = {1,2} Following symbols are considered usable: {unfoldr#2,main#,map#2#,mult#2#,plus#2#,sum#1#,unfoldr#2#} TcT has computed the following interpretation: p(0) = [1] p(Cons) = [1] x2 + [2] p(Nil) = [3] p(S) = [1] x1 + [2] p(main) = [0] p(map#2) = [0] p(mult#2) = [2] x2 + [0] p(plus#2) = [12] x1 + [2] x2 + [0] p(sum#1) = [8] x1 + [1] p(unfoldr#2) = [1] x1 + [2] p(main#) = [9] x1 + [2] p(map#2#) = [2] x1 + [0] p(mult#2#) = [8] x1 + [0] p(plus#2#) = [0] p(sum#1#) = [0] p(unfoldr#2#) = [1] p(c_1) = [1] p(c_2) = [1] x1 + [1] x2 + [0] p(c_3) = [1] x2 + [2] p(c_4) = [2] p(c_5) = [1] p(c_6) = [8] x1 + [1] x2 + [1] p(c_7) = [4] p(c_8) = [0] p(c_9) = [1] x1 + [8] x2 + [0] p(c_10) = [1] p(c_11) = [4] p(c_12) = [8] x1 + [0] Following rules are strictly oriented: map#2#(Cons(x2,x5)) = [2] x5 + [4] > [2] x5 + [2] = c_3(mult#2#(x2,x2),map#2#(x5)) Following rules are (at-least) weakly oriented: main#(S(x1)) = [9] x1 + [20] >= [2] x1 + [12] = c_2(sum#1#(map#2(Cons(S(x1),unfoldr#2(S(x1))))),map#2#(Cons(S(x1),unfoldr#2(S(x1))))) sum#1#(Cons(x2,x1)) = [0] >= [0] = c_9(plus#2#(x2,sum#1(x1)),sum#1#(x1)) unfoldr#2(0()) = [3] >= [3] = Nil() unfoldr#2(S(x2)) = [1] x2 + [4] >= [1] x2 + [4] = Cons(x2,unfoldr#2(x2)) ***** Step 5.b:3.a:1.a:1.a:2: Assumption WORST_CASE(?,O(1)) + Considered Problem: - Strict DPs: sum#1#(Cons(x2,x1)) -> c_9(plus#2#(x2,sum#1(x1)),sum#1#(x1)) - Weak DPs: main#(S(x1)) -> c_2(sum#1#(map#2(Cons(S(x1),unfoldr#2(S(x1))))),map#2#(Cons(S(x1),unfoldr#2(S(x1))))) map#2#(Cons(x2,x5)) -> c_3(mult#2#(x2,x2),map#2#(x5)) - Weak TRS: map#2(Cons(x2,x5)) -> Cons(mult#2(x2,x2),map#2(x5)) map#2(Nil()) -> Nil() mult#2(0(),x2) -> 0() mult#2(S(x4),x2) -> plus#2(x2,mult#2(x4,x2)) plus#2(0(),x8) -> x8 plus#2(S(x4),x2) -> S(plus#2(x4,x2)) sum#1(Cons(x2,x1)) -> plus#2(x2,sum#1(x1)) sum#1(Nil()) -> 0() unfoldr#2(0()) -> Nil() unfoldr#2(S(x2)) -> Cons(x2,unfoldr#2(x2)) - Signature: {main/1,map#2/1,mult#2/2,plus#2/2,sum#1/1,unfoldr#2/1,main#/1,map#2#/1,mult#2#/2,plus#2#/2,sum#1#/1 ,unfoldr#2#/1} / {0/0,Cons/2,Nil/0,S/1,c_1/0,c_2/2,c_3/2,c_4/0,c_5/0,c_6/2,c_7/0,c_8/1,c_9/2,c_10/0,c_11/0 ,c_12/1} - Obligation: innermost runtime complexity wrt. defined symbols {main#,map#2#,mult#2#,plus#2#,sum#1# ,unfoldr#2#} and constructors {0,Cons,Nil,S} + Applied Processor: Assumption {assumed = Certificate {spaceUB = Unknown, spaceLB = Unknown, timeUB = Poly (Just 0), timeLB = Unknown}} + Details: () ***** Step 5.b:3.a:1.a:1.b:1: RemoveWeakSuffixes WORST_CASE(?,O(n^1)) + Considered Problem: - Strict DPs: sum#1#(Cons(x2,x1)) -> c_9(plus#2#(x2,sum#1(x1)),sum#1#(x1)) - Weak DPs: main#(S(x1)) -> c_2(sum#1#(map#2(Cons(S(x1),unfoldr#2(S(x1))))),map#2#(Cons(S(x1),unfoldr#2(S(x1))))) map#2#(Cons(x2,x5)) -> c_3(mult#2#(x2,x2),map#2#(x5)) - Weak TRS: map#2(Cons(x2,x5)) -> Cons(mult#2(x2,x2),map#2(x5)) map#2(Nil()) -> Nil() mult#2(0(),x2) -> 0() mult#2(S(x4),x2) -> plus#2(x2,mult#2(x4,x2)) plus#2(0(),x8) -> x8 plus#2(S(x4),x2) -> S(plus#2(x4,x2)) sum#1(Cons(x2,x1)) -> plus#2(x2,sum#1(x1)) sum#1(Nil()) -> 0() unfoldr#2(0()) -> Nil() unfoldr#2(S(x2)) -> Cons(x2,unfoldr#2(x2)) - Signature: {main/1,map#2/1,mult#2/2,plus#2/2,sum#1/1,unfoldr#2/1,main#/1,map#2#/1,mult#2#/2,plus#2#/2,sum#1#/1 ,unfoldr#2#/1} / {0/0,Cons/2,Nil/0,S/1,c_1/0,c_2/2,c_3/2,c_4/0,c_5/0,c_6/2,c_7/0,c_8/1,c_9/2,c_10/0,c_11/0 ,c_12/1} - Obligation: innermost runtime complexity wrt. defined symbols {main#,map#2#,mult#2#,plus#2#,sum#1# ,unfoldr#2#} and constructors {0,Cons,Nil,S} + Applied Processor: RemoveWeakSuffixes + Details: Consider the dependency graph 1:S:sum#1#(Cons(x2,x1)) -> c_9(plus#2#(x2,sum#1(x1)),sum#1#(x1)) -->_2 sum#1#(Cons(x2,x1)) -> c_9(plus#2#(x2,sum#1(x1)),sum#1#(x1)):1 2:W:main#(S(x1)) -> c_2(sum#1#(map#2(Cons(S(x1),unfoldr#2(S(x1))))),map#2#(Cons(S(x1),unfoldr#2(S(x1))))) -->_2 map#2#(Cons(x2,x5)) -> c_3(mult#2#(x2,x2),map#2#(x5)):3 -->_1 sum#1#(Cons(x2,x1)) -> c_9(plus#2#(x2,sum#1(x1)),sum#1#(x1)):1 3:W:map#2#(Cons(x2,x5)) -> c_3(mult#2#(x2,x2),map#2#(x5)) -->_2 map#2#(Cons(x2,x5)) -> c_3(mult#2#(x2,x2),map#2#(x5)):3 The following weak DPs constitute a sub-graph of the DG that is closed under successors. The DPs are removed. 3: map#2#(Cons(x2,x5)) -> c_3(mult#2#(x2,x2),map#2#(x5)) ***** Step 5.b:3.a:1.a:1.b:2: SimplifyRHS WORST_CASE(?,O(n^1)) + Considered Problem: - Strict DPs: sum#1#(Cons(x2,x1)) -> c_9(plus#2#(x2,sum#1(x1)),sum#1#(x1)) - Weak DPs: main#(S(x1)) -> c_2(sum#1#(map#2(Cons(S(x1),unfoldr#2(S(x1))))),map#2#(Cons(S(x1),unfoldr#2(S(x1))))) - Weak TRS: map#2(Cons(x2,x5)) -> Cons(mult#2(x2,x2),map#2(x5)) map#2(Nil()) -> Nil() mult#2(0(),x2) -> 0() mult#2(S(x4),x2) -> plus#2(x2,mult#2(x4,x2)) plus#2(0(),x8) -> x8 plus#2(S(x4),x2) -> S(plus#2(x4,x2)) sum#1(Cons(x2,x1)) -> plus#2(x2,sum#1(x1)) sum#1(Nil()) -> 0() unfoldr#2(0()) -> Nil() unfoldr#2(S(x2)) -> Cons(x2,unfoldr#2(x2)) - Signature: {main/1,map#2/1,mult#2/2,plus#2/2,sum#1/1,unfoldr#2/1,main#/1,map#2#/1,mult#2#/2,plus#2#/2,sum#1#/1 ,unfoldr#2#/1} / {0/0,Cons/2,Nil/0,S/1,c_1/0,c_2/2,c_3/2,c_4/0,c_5/0,c_6/2,c_7/0,c_8/1,c_9/2,c_10/0,c_11/0 ,c_12/1} - Obligation: innermost runtime complexity wrt. defined symbols {main#,map#2#,mult#2#,plus#2#,sum#1# ,unfoldr#2#} and constructors {0,Cons,Nil,S} + Applied Processor: SimplifyRHS + Details: Consider the dependency graph 1:S:sum#1#(Cons(x2,x1)) -> c_9(plus#2#(x2,sum#1(x1)),sum#1#(x1)) -->_2 sum#1#(Cons(x2,x1)) -> c_9(plus#2#(x2,sum#1(x1)),sum#1#(x1)):1 2:W:main#(S(x1)) -> c_2(sum#1#(map#2(Cons(S(x1),unfoldr#2(S(x1))))),map#2#(Cons(S(x1),unfoldr#2(S(x1))))) -->_1 sum#1#(Cons(x2,x1)) -> c_9(plus#2#(x2,sum#1(x1)),sum#1#(x1)):1 Due to missing edges in the depndency graph, the right-hand sides of following rules could be simplified: main#(S(x1)) -> c_2(sum#1#(map#2(Cons(S(x1),unfoldr#2(S(x1)))))) sum#1#(Cons(x2,x1)) -> c_9(sum#1#(x1)) ***** Step 5.b:3.a:1.a:1.b:3: UsableRules WORST_CASE(?,O(n^1)) + Considered Problem: - Strict DPs: sum#1#(Cons(x2,x1)) -> c_9(sum#1#(x1)) - Weak DPs: main#(S(x1)) -> c_2(sum#1#(map#2(Cons(S(x1),unfoldr#2(S(x1)))))) - Weak TRS: map#2(Cons(x2,x5)) -> Cons(mult#2(x2,x2),map#2(x5)) map#2(Nil()) -> Nil() mult#2(0(),x2) -> 0() mult#2(S(x4),x2) -> plus#2(x2,mult#2(x4,x2)) plus#2(0(),x8) -> x8 plus#2(S(x4),x2) -> S(plus#2(x4,x2)) sum#1(Cons(x2,x1)) -> plus#2(x2,sum#1(x1)) sum#1(Nil()) -> 0() unfoldr#2(0()) -> Nil() unfoldr#2(S(x2)) -> Cons(x2,unfoldr#2(x2)) - Signature: {main/1,map#2/1,mult#2/2,plus#2/2,sum#1/1,unfoldr#2/1,main#/1,map#2#/1,mult#2#/2,plus#2#/2,sum#1#/1 ,unfoldr#2#/1} / {0/0,Cons/2,Nil/0,S/1,c_1/0,c_2/1,c_3/2,c_4/0,c_5/0,c_6/2,c_7/0,c_8/1,c_9/1,c_10/0,c_11/0 ,c_12/1} - Obligation: innermost runtime complexity wrt. defined symbols {main#,map#2#,mult#2#,plus#2#,sum#1# ,unfoldr#2#} and constructors {0,Cons,Nil,S} + Applied Processor: UsableRules + Details: We replace rewrite rules by usable rules: map#2(Cons(x2,x5)) -> Cons(mult#2(x2,x2),map#2(x5)) map#2(Nil()) -> Nil() mult#2(0(),x2) -> 0() mult#2(S(x4),x2) -> plus#2(x2,mult#2(x4,x2)) plus#2(0(),x8) -> x8 plus#2(S(x4),x2) -> S(plus#2(x4,x2)) unfoldr#2(0()) -> Nil() unfoldr#2(S(x2)) -> Cons(x2,unfoldr#2(x2)) main#(S(x1)) -> c_2(sum#1#(map#2(Cons(S(x1),unfoldr#2(S(x1)))))) sum#1#(Cons(x2,x1)) -> c_9(sum#1#(x1)) ***** Step 5.b:3.a:1.a:1.b:4: PredecessorEstimationCP WORST_CASE(?,O(n^1)) + Considered Problem: - Strict DPs: sum#1#(Cons(x2,x1)) -> c_9(sum#1#(x1)) - Weak DPs: main#(S(x1)) -> c_2(sum#1#(map#2(Cons(S(x1),unfoldr#2(S(x1)))))) - Weak TRS: map#2(Cons(x2,x5)) -> Cons(mult#2(x2,x2),map#2(x5)) map#2(Nil()) -> Nil() mult#2(0(),x2) -> 0() mult#2(S(x4),x2) -> plus#2(x2,mult#2(x4,x2)) plus#2(0(),x8) -> x8 plus#2(S(x4),x2) -> S(plus#2(x4,x2)) unfoldr#2(0()) -> Nil() unfoldr#2(S(x2)) -> Cons(x2,unfoldr#2(x2)) - Signature: {main/1,map#2/1,mult#2/2,plus#2/2,sum#1/1,unfoldr#2/1,main#/1,map#2#/1,mult#2#/2,plus#2#/2,sum#1#/1 ,unfoldr#2#/1} / {0/0,Cons/2,Nil/0,S/1,c_1/0,c_2/1,c_3/2,c_4/0,c_5/0,c_6/2,c_7/0,c_8/1,c_9/1,c_10/0,c_11/0 ,c_12/1} - Obligation: innermost runtime complexity wrt. defined symbols {main#,map#2#,mult#2#,plus#2#,sum#1# ,unfoldr#2#} and constructors {0,Cons,Nil,S} + Applied Processor: PredecessorEstimationCP {onSelectionCP = any intersect of rules of CDG leaf and strict-rules, withComplexityPair = NaturalMI {miDimension = 1, miDegree = 1, miKind = Algebraic, uargs = UArgs, urules = URules, selector = Nothing}} + Details: We first use the processor NaturalMI {miDimension = 1, miDegree = 1, miKind = Algebraic, uargs = UArgs, urules = URules, selector = Nothing} to orient following rules strictly: 1: sum#1#(Cons(x2,x1)) -> c_9(sum#1#(x1)) Consider the set of all dependency pairs 1: sum#1#(Cons(x2,x1)) -> c_9(sum#1#(x1)) 2: main#(S(x1)) -> c_2(sum#1#(map#2(Cons(S(x1),unfoldr#2(S(x1)))))) Processor NaturalMI {miDimension = 1, miDegree = 1, miKind = Algebraic, uargs = UArgs, urules = URules, selector = Nothing}induces the complexity certificateTIME (?,O(n^1)) SPACE(?,?)on application of the dependency pairs {1} These cover all (indirect) predecessors of dependency pairs {1,2} their number of applications is equally bounded. The dependency pairs are shifted into the weak component. ****** Step 5.b:3.a:1.a:1.b:4.a:1: NaturalMI WORST_CASE(?,O(n^1)) + Considered Problem: - Strict DPs: sum#1#(Cons(x2,x1)) -> c_9(sum#1#(x1)) - Weak DPs: main#(S(x1)) -> c_2(sum#1#(map#2(Cons(S(x1),unfoldr#2(S(x1)))))) - Weak TRS: map#2(Cons(x2,x5)) -> Cons(mult#2(x2,x2),map#2(x5)) map#2(Nil()) -> Nil() mult#2(0(),x2) -> 0() mult#2(S(x4),x2) -> plus#2(x2,mult#2(x4,x2)) plus#2(0(),x8) -> x8 plus#2(S(x4),x2) -> S(plus#2(x4,x2)) unfoldr#2(0()) -> Nil() unfoldr#2(S(x2)) -> Cons(x2,unfoldr#2(x2)) - Signature: {main/1,map#2/1,mult#2/2,plus#2/2,sum#1/1,unfoldr#2/1,main#/1,map#2#/1,mult#2#/2,plus#2#/2,sum#1#/1 ,unfoldr#2#/1} / {0/0,Cons/2,Nil/0,S/1,c_1/0,c_2/1,c_3/2,c_4/0,c_5/0,c_6/2,c_7/0,c_8/1,c_9/1,c_10/0,c_11/0 ,c_12/1} - Obligation: innermost runtime complexity wrt. defined symbols {main#,map#2#,mult#2#,plus#2#,sum#1# ,unfoldr#2#} and constructors {0,Cons,Nil,S} + Applied Processor: NaturalMI {miDimension = 1, miDegree = 1, miKind = Algebraic, uargs = UArgs, urules = URules, selector = Just first alternative for predecessorEstimation on any intersect of rules of CDG leaf and 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_9) = {1} Following symbols are considered usable: {map#2,unfoldr#2,main#,map#2#,mult#2#,plus#2#,sum#1#,unfoldr#2#} TcT has computed the following interpretation: p(0) = [1] p(Cons) = [1] x2 + [8] p(Nil) = [7] p(S) = [1] x1 + [2] p(main) = [0] p(map#2) = [1] x1 + [1] p(mult#2) = [1] x1 + [3] p(plus#2) = [4] x1 + [7] p(sum#1) = [4] x1 + [2] p(unfoldr#2) = [8] x1 + [4] p(main#) = [8] x1 + [14] p(map#2#) = [8] p(mult#2#) = [4] p(plus#2#) = [1] x1 + [1] x2 + [1] p(sum#1#) = [1] x1 + [1] p(unfoldr#2#) = [1] x1 + [8] p(c_1) = [1] p(c_2) = [1] x1 + [0] p(c_3) = [1] x2 + [1] p(c_4) = [0] p(c_5) = [8] p(c_6) = [1] x1 + [1] p(c_7) = [4] p(c_8) = [1] p(c_9) = [1] x1 + [6] p(c_10) = [1] p(c_11) = [8] p(c_12) = [0] Following rules are strictly oriented: sum#1#(Cons(x2,x1)) = [1] x1 + [9] > [1] x1 + [7] = c_9(sum#1#(x1)) Following rules are (at-least) weakly oriented: main#(S(x1)) = [8] x1 + [30] >= [8] x1 + [30] = c_2(sum#1#(map#2(Cons(S(x1),unfoldr#2(S(x1)))))) map#2(Cons(x2,x5)) = [1] x5 + [9] >= [1] x5 + [9] = Cons(mult#2(x2,x2),map#2(x5)) map#2(Nil()) = [8] >= [7] = Nil() unfoldr#2(0()) = [12] >= [7] = Nil() unfoldr#2(S(x2)) = [8] x2 + [20] >= [8] x2 + [12] = Cons(x2,unfoldr#2(x2)) ****** Step 5.b:3.a:1.a:1.b:4.a:2: Assumption WORST_CASE(?,O(1)) + Considered Problem: - Weak DPs: main#(S(x1)) -> c_2(sum#1#(map#2(Cons(S(x1),unfoldr#2(S(x1)))))) sum#1#(Cons(x2,x1)) -> c_9(sum#1#(x1)) - Weak TRS: map#2(Cons(x2,x5)) -> Cons(mult#2(x2,x2),map#2(x5)) map#2(Nil()) -> Nil() mult#2(0(),x2) -> 0() mult#2(S(x4),x2) -> plus#2(x2,mult#2(x4,x2)) plus#2(0(),x8) -> x8 plus#2(S(x4),x2) -> S(plus#2(x4,x2)) unfoldr#2(0()) -> Nil() unfoldr#2(S(x2)) -> Cons(x2,unfoldr#2(x2)) - Signature: {main/1,map#2/1,mult#2/2,plus#2/2,sum#1/1,unfoldr#2/1,main#/1,map#2#/1,mult#2#/2,plus#2#/2,sum#1#/1 ,unfoldr#2#/1} / {0/0,Cons/2,Nil/0,S/1,c_1/0,c_2/1,c_3/2,c_4/0,c_5/0,c_6/2,c_7/0,c_8/1,c_9/1,c_10/0,c_11/0 ,c_12/1} - Obligation: innermost runtime complexity wrt. defined symbols {main#,map#2#,mult#2#,plus#2#,sum#1# ,unfoldr#2#} and constructors {0,Cons,Nil,S} + Applied Processor: Assumption {assumed = Certificate {spaceUB = Unknown, spaceLB = Unknown, timeUB = Poly (Just 0), timeLB = Unknown}} + Details: () ****** Step 5.b:3.a:1.a:1.b:4.b:1: RemoveWeakSuffixes WORST_CASE(?,O(1)) + Considered Problem: - Weak DPs: main#(S(x1)) -> c_2(sum#1#(map#2(Cons(S(x1),unfoldr#2(S(x1)))))) sum#1#(Cons(x2,x1)) -> c_9(sum#1#(x1)) - Weak TRS: map#2(Cons(x2,x5)) -> Cons(mult#2(x2,x2),map#2(x5)) map#2(Nil()) -> Nil() mult#2(0(),x2) -> 0() mult#2(S(x4),x2) -> plus#2(x2,mult#2(x4,x2)) plus#2(0(),x8) -> x8 plus#2(S(x4),x2) -> S(plus#2(x4,x2)) unfoldr#2(0()) -> Nil() unfoldr#2(S(x2)) -> Cons(x2,unfoldr#2(x2)) - Signature: {main/1,map#2/1,mult#2/2,plus#2/2,sum#1/1,unfoldr#2/1,main#/1,map#2#/1,mult#2#/2,plus#2#/2,sum#1#/1 ,unfoldr#2#/1} / {0/0,Cons/2,Nil/0,S/1,c_1/0,c_2/1,c_3/2,c_4/0,c_5/0,c_6/2,c_7/0,c_8/1,c_9/1,c_10/0,c_11/0 ,c_12/1} - Obligation: innermost runtime complexity wrt. defined symbols {main#,map#2#,mult#2#,plus#2#,sum#1# ,unfoldr#2#} and constructors {0,Cons,Nil,S} + Applied Processor: RemoveWeakSuffixes + Details: Consider the dependency graph 1:W:main#(S(x1)) -> c_2(sum#1#(map#2(Cons(S(x1),unfoldr#2(S(x1)))))) -->_1 sum#1#(Cons(x2,x1)) -> c_9(sum#1#(x1)):2 2:W:sum#1#(Cons(x2,x1)) -> c_9(sum#1#(x1)) -->_1 sum#1#(Cons(x2,x1)) -> c_9(sum#1#(x1)):2 The following weak DPs constitute a sub-graph of the DG that is closed under successors. The DPs are removed. 1: main#(S(x1)) -> c_2(sum#1#(map#2(Cons(S(x1),unfoldr#2(S(x1)))))) 2: sum#1#(Cons(x2,x1)) -> c_9(sum#1#(x1)) ****** Step 5.b:3.a:1.a:1.b:4.b:2: EmptyProcessor WORST_CASE(?,O(1)) + Considered Problem: - Weak TRS: map#2(Cons(x2,x5)) -> Cons(mult#2(x2,x2),map#2(x5)) map#2(Nil()) -> Nil() mult#2(0(),x2) -> 0() mult#2(S(x4),x2) -> plus#2(x2,mult#2(x4,x2)) plus#2(0(),x8) -> x8 plus#2(S(x4),x2) -> S(plus#2(x4,x2)) unfoldr#2(0()) -> Nil() unfoldr#2(S(x2)) -> Cons(x2,unfoldr#2(x2)) - Signature: {main/1,map#2/1,mult#2/2,plus#2/2,sum#1/1,unfoldr#2/1,main#/1,map#2#/1,mult#2#/2,plus#2#/2,sum#1#/1 ,unfoldr#2#/1} / {0/0,Cons/2,Nil/0,S/1,c_1/0,c_2/1,c_3/2,c_4/0,c_5/0,c_6/2,c_7/0,c_8/1,c_9/1,c_10/0,c_11/0 ,c_12/1} - Obligation: innermost runtime complexity wrt. defined symbols {main#,map#2#,mult#2#,plus#2#,sum#1# ,unfoldr#2#} and constructors {0,Cons,Nil,S} + Applied Processor: EmptyProcessor + Details: The problem is already closed. The intended complexity is O(1). **** Step 5.b:3.a:1.b:1: DecomposeDG MAYBE + Considered Problem: - Strict DPs: mult#2#(S(x4),x2) -> c_6(plus#2#(x2,mult#2(x4,x2)),mult#2#(x4,x2)) plus#2#(S(x4),x2) -> c_8(plus#2#(x4,x2)) - Weak DPs: main#(S(x1)) -> map#2#(Cons(S(x1),unfoldr#2(S(x1)))) main#(S(x1)) -> sum#1#(map#2(Cons(S(x1),unfoldr#2(S(x1))))) map#2#(Cons(x2,x5)) -> map#2#(x5) map#2#(Cons(x2,x5)) -> mult#2#(x2,x2) sum#1#(Cons(x2,x1)) -> plus#2#(x2,sum#1(x1)) sum#1#(Cons(x2,x1)) -> sum#1#(x1) - Weak TRS: map#2(Cons(x2,x5)) -> Cons(mult#2(x2,x2),map#2(x5)) map#2(Nil()) -> Nil() mult#2(0(),x2) -> 0() mult#2(S(x4),x2) -> plus#2(x2,mult#2(x4,x2)) plus#2(0(),x8) -> x8 plus#2(S(x4),x2) -> S(plus#2(x4,x2)) sum#1(Cons(x2,x1)) -> plus#2(x2,sum#1(x1)) sum#1(Nil()) -> 0() unfoldr#2(0()) -> Nil() unfoldr#2(S(x2)) -> Cons(x2,unfoldr#2(x2)) - Signature: {main/1,map#2/1,mult#2/2,plus#2/2,sum#1/1,unfoldr#2/1,main#/1,map#2#/1,mult#2#/2,plus#2#/2,sum#1#/1 ,unfoldr#2#/1} / {0/0,Cons/2,Nil/0,S/1,c_1/0,c_2/2,c_3/2,c_4/0,c_5/0,c_6/2,c_7/0,c_8/1,c_9/2,c_10/0,c_11/0 ,c_12/1} - Obligation: innermost runtime complexity wrt. defined symbols {main#,map#2#,mult#2#,plus#2#,sum#1# ,unfoldr#2#} and constructors {0,Cons,Nil,S} + Applied Processor: DecomposeDG {onSelection = all below first cut in WDG, onUpper = Just someStrategy, onLower = Nothing} + Details: We decompose the input problem according to the dependency graph into the upper component main#(S(x1)) -> map#2#(Cons(S(x1),unfoldr#2(S(x1)))) main#(S(x1)) -> sum#1#(map#2(Cons(S(x1),unfoldr#2(S(x1))))) map#2#(Cons(x2,x5)) -> map#2#(x5) map#2#(Cons(x2,x5)) -> mult#2#(x2,x2) mult#2#(S(x4),x2) -> c_6(plus#2#(x2,mult#2(x4,x2)),mult#2#(x4,x2)) sum#1#(Cons(x2,x1)) -> plus#2#(x2,sum#1(x1)) sum#1#(Cons(x2,x1)) -> sum#1#(x1) and a lower component plus#2#(S(x4),x2) -> c_8(plus#2#(x4,x2)) Further, following extension rules are added to the lower component. main#(S(x1)) -> map#2#(Cons(S(x1),unfoldr#2(S(x1)))) main#(S(x1)) -> sum#1#(map#2(Cons(S(x1),unfoldr#2(S(x1))))) map#2#(Cons(x2,x5)) -> map#2#(x5) map#2#(Cons(x2,x5)) -> mult#2#(x2,x2) mult#2#(S(x4),x2) -> mult#2#(x4,x2) mult#2#(S(x4),x2) -> plus#2#(x2,mult#2(x4,x2)) sum#1#(Cons(x2,x1)) -> plus#2#(x2,sum#1(x1)) sum#1#(Cons(x2,x1)) -> sum#1#(x1) ***** Step 5.b:3.a:1.b:1.a:1: PredecessorEstimationCP WORST_CASE(?,O(n^2)) + Considered Problem: - Strict DPs: mult#2#(S(x4),x2) -> c_6(plus#2#(x2,mult#2(x4,x2)),mult#2#(x4,x2)) sum#1#(Cons(x2,x1)) -> plus#2#(x2,sum#1(x1)) - Weak DPs: main#(S(x1)) -> map#2#(Cons(S(x1),unfoldr#2(S(x1)))) main#(S(x1)) -> sum#1#(map#2(Cons(S(x1),unfoldr#2(S(x1))))) map#2#(Cons(x2,x5)) -> map#2#(x5) map#2#(Cons(x2,x5)) -> mult#2#(x2,x2) sum#1#(Cons(x2,x1)) -> sum#1#(x1) - Weak TRS: map#2(Cons(x2,x5)) -> Cons(mult#2(x2,x2),map#2(x5)) map#2(Nil()) -> Nil() mult#2(0(),x2) -> 0() mult#2(S(x4),x2) -> plus#2(x2,mult#2(x4,x2)) plus#2(0(),x8) -> x8 plus#2(S(x4),x2) -> S(plus#2(x4,x2)) sum#1(Cons(x2,x1)) -> plus#2(x2,sum#1(x1)) sum#1(Nil()) -> 0() unfoldr#2(0()) -> Nil() unfoldr#2(S(x2)) -> Cons(x2,unfoldr#2(x2)) - Signature: {main/1,map#2/1,mult#2/2,plus#2/2,sum#1/1,unfoldr#2/1,main#/1,map#2#/1,mult#2#/2,plus#2#/2,sum#1#/1 ,unfoldr#2#/1} / {0/0,Cons/2,Nil/0,S/1,c_1/0,c_2/2,c_3/2,c_4/0,c_5/0,c_6/2,c_7/0,c_8/1,c_9/2,c_10/0,c_11/0 ,c_12/1} - Obligation: innermost runtime complexity wrt. defined symbols {main#,map#2#,mult#2#,plus#2#,sum#1# ,unfoldr#2#} and constructors {0,Cons,Nil,S} + Applied Processor: PredecessorEstimationCP {onSelectionCP = any intersect of rules of CDG leaf and strict-rules, withComplexityPair = NaturalMI {miDimension = 1, miDegree = 1, miKind = Algebraic, uargs = UArgs, urules = URules, selector = Nothing}} + Details: We first use the processor NaturalMI {miDimension = 1, miDegree = 1, miKind = Algebraic, uargs = UArgs, urules = URules, selector = Nothing} to orient following rules strictly: 2: sum#1#(Cons(x2,x1)) -> plus#2#(x2,sum#1(x1)) Consider the set of all dependency pairs 1: mult#2#(S(x4),x2) -> c_6(plus#2#(x2,mult#2(x4,x2)),mult#2#(x4,x2)) 2: sum#1#(Cons(x2,x1)) -> plus#2#(x2,sum#1(x1)) 3: main#(S(x1)) -> map#2#(Cons(S(x1),unfoldr#2(S(x1)))) 4: main#(S(x1)) -> sum#1#(map#2(Cons(S(x1),unfoldr#2(S(x1))))) 5: map#2#(Cons(x2,x5)) -> map#2#(x5) 6: map#2#(Cons(x2,x5)) -> mult#2#(x2,x2) 7: sum#1#(Cons(x2,x1)) -> sum#1#(x1) Processor NaturalMI {miDimension = 1, miDegree = 1, miKind = Algebraic, uargs = UArgs, urules = URules, selector = Nothing}induces the complexity certificateTIME (?,O(1)) SPACE(?,?)on application of the dependency pairs {2} These cover all (indirect) predecessors of dependency pairs {2,3,4} their number of applications is equally bounded. The dependency pairs are shifted into the weak component. ****** Step 5.b:3.a:1.b:1.a:1.a:1: NaturalMI WORST_CASE(?,O(1)) + Considered Problem: - Strict DPs: mult#2#(S(x4),x2) -> c_6(plus#2#(x2,mult#2(x4,x2)),mult#2#(x4,x2)) sum#1#(Cons(x2,x1)) -> plus#2#(x2,sum#1(x1)) - Weak DPs: main#(S(x1)) -> map#2#(Cons(S(x1),unfoldr#2(S(x1)))) main#(S(x1)) -> sum#1#(map#2(Cons(S(x1),unfoldr#2(S(x1))))) map#2#(Cons(x2,x5)) -> map#2#(x5) map#2#(Cons(x2,x5)) -> mult#2#(x2,x2) sum#1#(Cons(x2,x1)) -> sum#1#(x1) - Weak TRS: map#2(Cons(x2,x5)) -> Cons(mult#2(x2,x2),map#2(x5)) map#2(Nil()) -> Nil() mult#2(0(),x2) -> 0() mult#2(S(x4),x2) -> plus#2(x2,mult#2(x4,x2)) plus#2(0(),x8) -> x8 plus#2(S(x4),x2) -> S(plus#2(x4,x2)) sum#1(Cons(x2,x1)) -> plus#2(x2,sum#1(x1)) sum#1(Nil()) -> 0() unfoldr#2(0()) -> Nil() unfoldr#2(S(x2)) -> Cons(x2,unfoldr#2(x2)) - Signature: {main/1,map#2/1,mult#2/2,plus#2/2,sum#1/1,unfoldr#2/1,main#/1,map#2#/1,mult#2#/2,plus#2#/2,sum#1#/1 ,unfoldr#2#/1} / {0/0,Cons/2,Nil/0,S/1,c_1/0,c_2/2,c_3/2,c_4/0,c_5/0,c_6/2,c_7/0,c_8/1,c_9/2,c_10/0,c_11/0 ,c_12/1} - Obligation: innermost runtime complexity wrt. defined symbols {main#,map#2#,mult#2#,plus#2#,sum#1# ,unfoldr#2#} and constructors {0,Cons,Nil,S} + Applied Processor: NaturalMI {miDimension = 1, miDegree = 1, miKind = Algebraic, uargs = UArgs, urules = URules, selector = Just first alternative for predecessorEstimation on any intersect of rules of CDG leaf and 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,2} Following symbols are considered usable: {main#,map#2#,mult#2#,plus#2#,sum#1#,unfoldr#2#} TcT has computed the following interpretation: p(0) = [1] p(Cons) = [5] p(Nil) = [3] p(S) = [0] p(main) = [8] x1 + [0] p(map#2) = [5] x1 + [5] p(mult#2) = [8] x1 + [1] x2 + [1] p(plus#2) = [4] x1 + [2] x2 + [4] p(sum#1) = [6] x1 + [1] p(unfoldr#2) = [6] p(main#) = [9] p(map#2#) = [5] p(mult#2#) = [0] p(plus#2#) = [0] p(sum#1#) = [7] p(unfoldr#2#) = [0] p(c_1) = [0] p(c_2) = [2] x1 + [1] x2 + [0] p(c_3) = [4] x2 + [0] p(c_4) = [0] p(c_5) = [0] p(c_6) = [8] x1 + [1] x2 + [0] p(c_7) = [0] p(c_8) = [0] p(c_9) = [1] x2 + [2] p(c_10) = [0] p(c_11) = [4] p(c_12) = [0] Following rules are strictly oriented: sum#1#(Cons(x2,x1)) = [7] > [0] = plus#2#(x2,sum#1(x1)) Following rules are (at-least) weakly oriented: main#(S(x1)) = [9] >= [5] = map#2#(Cons(S(x1),unfoldr#2(S(x1)))) main#(S(x1)) = [9] >= [7] = sum#1#(map#2(Cons(S(x1),unfoldr#2(S(x1))))) map#2#(Cons(x2,x5)) = [5] >= [5] = map#2#(x5) map#2#(Cons(x2,x5)) = [5] >= [0] = mult#2#(x2,x2) mult#2#(S(x4),x2) = [0] >= [0] = c_6(plus#2#(x2,mult#2(x4,x2)),mult#2#(x4,x2)) sum#1#(Cons(x2,x1)) = [7] >= [7] = sum#1#(x1) ****** Step 5.b:3.a:1.b:1.a:1.a:2: Assumption WORST_CASE(?,O(1)) + Considered Problem: - Strict DPs: mult#2#(S(x4),x2) -> c_6(plus#2#(x2,mult#2(x4,x2)),mult#2#(x4,x2)) - Weak DPs: main#(S(x1)) -> map#2#(Cons(S(x1),unfoldr#2(S(x1)))) main#(S(x1)) -> sum#1#(map#2(Cons(S(x1),unfoldr#2(S(x1))))) map#2#(Cons(x2,x5)) -> map#2#(x5) map#2#(Cons(x2,x5)) -> mult#2#(x2,x2) sum#1#(Cons(x2,x1)) -> plus#2#(x2,sum#1(x1)) sum#1#(Cons(x2,x1)) -> sum#1#(x1) - Weak TRS: map#2(Cons(x2,x5)) -> Cons(mult#2(x2,x2),map#2(x5)) map#2(Nil()) -> Nil() mult#2(0(),x2) -> 0() mult#2(S(x4),x2) -> plus#2(x2,mult#2(x4,x2)) plus#2(0(),x8) -> x8 plus#2(S(x4),x2) -> S(plus#2(x4,x2)) sum#1(Cons(x2,x1)) -> plus#2(x2,sum#1(x1)) sum#1(Nil()) -> 0() unfoldr#2(0()) -> Nil() unfoldr#2(S(x2)) -> Cons(x2,unfoldr#2(x2)) - Signature: {main/1,map#2/1,mult#2/2,plus#2/2,sum#1/1,unfoldr#2/1,main#/1,map#2#/1,mult#2#/2,plus#2#/2,sum#1#/1 ,unfoldr#2#/1} / {0/0,Cons/2,Nil/0,S/1,c_1/0,c_2/2,c_3/2,c_4/0,c_5/0,c_6/2,c_7/0,c_8/1,c_9/2,c_10/0,c_11/0 ,c_12/1} - Obligation: innermost runtime complexity wrt. defined symbols {main#,map#2#,mult#2#,plus#2#,sum#1# ,unfoldr#2#} and constructors {0,Cons,Nil,S} + Applied Processor: Assumption {assumed = Certificate {spaceUB = Unknown, spaceLB = Unknown, timeUB = Poly (Just 0), timeLB = Unknown}} + Details: () ****** Step 5.b:3.a:1.b:1.a:1.b:1: RemoveWeakSuffixes WORST_CASE(?,O(n^2)) + Considered Problem: - Strict DPs: mult#2#(S(x4),x2) -> c_6(plus#2#(x2,mult#2(x4,x2)),mult#2#(x4,x2)) - Weak DPs: main#(S(x1)) -> map#2#(Cons(S(x1),unfoldr#2(S(x1)))) main#(S(x1)) -> sum#1#(map#2(Cons(S(x1),unfoldr#2(S(x1))))) map#2#(Cons(x2,x5)) -> map#2#(x5) map#2#(Cons(x2,x5)) -> mult#2#(x2,x2) sum#1#(Cons(x2,x1)) -> plus#2#(x2,sum#1(x1)) sum#1#(Cons(x2,x1)) -> sum#1#(x1) - Weak TRS: map#2(Cons(x2,x5)) -> Cons(mult#2(x2,x2),map#2(x5)) map#2(Nil()) -> Nil() mult#2(0(),x2) -> 0() mult#2(S(x4),x2) -> plus#2(x2,mult#2(x4,x2)) plus#2(0(),x8) -> x8 plus#2(S(x4),x2) -> S(plus#2(x4,x2)) sum#1(Cons(x2,x1)) -> plus#2(x2,sum#1(x1)) sum#1(Nil()) -> 0() unfoldr#2(0()) -> Nil() unfoldr#2(S(x2)) -> Cons(x2,unfoldr#2(x2)) - Signature: {main/1,map#2/1,mult#2/2,plus#2/2,sum#1/1,unfoldr#2/1,main#/1,map#2#/1,mult#2#/2,plus#2#/2,sum#1#/1 ,unfoldr#2#/1} / {0/0,Cons/2,Nil/0,S/1,c_1/0,c_2/2,c_3/2,c_4/0,c_5/0,c_6/2,c_7/0,c_8/1,c_9/2,c_10/0,c_11/0 ,c_12/1} - Obligation: innermost runtime complexity wrt. defined symbols {main#,map#2#,mult#2#,plus#2#,sum#1# ,unfoldr#2#} and constructors {0,Cons,Nil,S} + Applied Processor: RemoveWeakSuffixes + Details: Consider the dependency graph 1:S:mult#2#(S(x4),x2) -> c_6(plus#2#(x2,mult#2(x4,x2)),mult#2#(x4,x2)) -->_2 mult#2#(S(x4),x2) -> c_6(plus#2#(x2,mult#2(x4,x2)),mult#2#(x4,x2)):1 2:W:main#(S(x1)) -> map#2#(Cons(S(x1),unfoldr#2(S(x1)))) -->_1 map#2#(Cons(x2,x5)) -> mult#2#(x2,x2):5 -->_1 map#2#(Cons(x2,x5)) -> map#2#(x5):4 3:W:main#(S(x1)) -> sum#1#(map#2(Cons(S(x1),unfoldr#2(S(x1))))) -->_1 sum#1#(Cons(x2,x1)) -> sum#1#(x1):7 -->_1 sum#1#(Cons(x2,x1)) -> plus#2#(x2,sum#1(x1)):6 4:W:map#2#(Cons(x2,x5)) -> map#2#(x5) -->_1 map#2#(Cons(x2,x5)) -> mult#2#(x2,x2):5 -->_1 map#2#(Cons(x2,x5)) -> map#2#(x5):4 5:W:map#2#(Cons(x2,x5)) -> mult#2#(x2,x2) -->_1 mult#2#(S(x4),x2) -> c_6(plus#2#(x2,mult#2(x4,x2)),mult#2#(x4,x2)):1 6:W:sum#1#(Cons(x2,x1)) -> plus#2#(x2,sum#1(x1)) 7:W:sum#1#(Cons(x2,x1)) -> sum#1#(x1) -->_1 sum#1#(Cons(x2,x1)) -> sum#1#(x1):7 -->_1 sum#1#(Cons(x2,x1)) -> plus#2#(x2,sum#1(x1)):6 The following weak DPs constitute a sub-graph of the DG that is closed under successors. The DPs are removed. 3: main#(S(x1)) -> sum#1#(map#2(Cons(S(x1),unfoldr#2(S(x1))))) 7: sum#1#(Cons(x2,x1)) -> sum#1#(x1) 6: sum#1#(Cons(x2,x1)) -> plus#2#(x2,sum#1(x1)) ****** Step 5.b:3.a:1.b:1.a:1.b:2: SimplifyRHS WORST_CASE(?,O(n^2)) + Considered Problem: - Strict DPs: mult#2#(S(x4),x2) -> c_6(plus#2#(x2,mult#2(x4,x2)),mult#2#(x4,x2)) - Weak DPs: main#(S(x1)) -> map#2#(Cons(S(x1),unfoldr#2(S(x1)))) map#2#(Cons(x2,x5)) -> map#2#(x5) map#2#(Cons(x2,x5)) -> mult#2#(x2,x2) - Weak TRS: map#2(Cons(x2,x5)) -> Cons(mult#2(x2,x2),map#2(x5)) map#2(Nil()) -> Nil() mult#2(0(),x2) -> 0() mult#2(S(x4),x2) -> plus#2(x2,mult#2(x4,x2)) plus#2(0(),x8) -> x8 plus#2(S(x4),x2) -> S(plus#2(x4,x2)) sum#1(Cons(x2,x1)) -> plus#2(x2,sum#1(x1)) sum#1(Nil()) -> 0() unfoldr#2(0()) -> Nil() unfoldr#2(S(x2)) -> Cons(x2,unfoldr#2(x2)) - Signature: {main/1,map#2/1,mult#2/2,plus#2/2,sum#1/1,unfoldr#2/1,main#/1,map#2#/1,mult#2#/2,plus#2#/2,sum#1#/1 ,unfoldr#2#/1} / {0/0,Cons/2,Nil/0,S/1,c_1/0,c_2/2,c_3/2,c_4/0,c_5/0,c_6/2,c_7/0,c_8/1,c_9/2,c_10/0,c_11/0 ,c_12/1} - Obligation: innermost runtime complexity wrt. defined symbols {main#,map#2#,mult#2#,plus#2#,sum#1# ,unfoldr#2#} and constructors {0,Cons,Nil,S} + Applied Processor: SimplifyRHS + Details: Consider the dependency graph 1:S:mult#2#(S(x4),x2) -> c_6(plus#2#(x2,mult#2(x4,x2)),mult#2#(x4,x2)) -->_2 mult#2#(S(x4),x2) -> c_6(plus#2#(x2,mult#2(x4,x2)),mult#2#(x4,x2)):1 2:W:main#(S(x1)) -> map#2#(Cons(S(x1),unfoldr#2(S(x1)))) -->_1 map#2#(Cons(x2,x5)) -> mult#2#(x2,x2):5 -->_1 map#2#(Cons(x2,x5)) -> map#2#(x5):4 4:W:map#2#(Cons(x2,x5)) -> map#2#(x5) -->_1 map#2#(Cons(x2,x5)) -> mult#2#(x2,x2):5 -->_1 map#2#(Cons(x2,x5)) -> map#2#(x5):4 5:W:map#2#(Cons(x2,x5)) -> mult#2#(x2,x2) -->_1 mult#2#(S(x4),x2) -> c_6(plus#2#(x2,mult#2(x4,x2)),mult#2#(x4,x2)):1 Due to missing edges in the depndency graph, the right-hand sides of following rules could be simplified: mult#2#(S(x4),x2) -> c_6(mult#2#(x4,x2)) ****** Step 5.b:3.a:1.b:1.a:1.b:3: UsableRules WORST_CASE(?,O(n^2)) + Considered Problem: - Strict DPs: mult#2#(S(x4),x2) -> c_6(mult#2#(x4,x2)) - Weak DPs: main#(S(x1)) -> map#2#(Cons(S(x1),unfoldr#2(S(x1)))) map#2#(Cons(x2,x5)) -> map#2#(x5) map#2#(Cons(x2,x5)) -> mult#2#(x2,x2) - Weak TRS: map#2(Cons(x2,x5)) -> Cons(mult#2(x2,x2),map#2(x5)) map#2(Nil()) -> Nil() mult#2(0(),x2) -> 0() mult#2(S(x4),x2) -> plus#2(x2,mult#2(x4,x2)) plus#2(0(),x8) -> x8 plus#2(S(x4),x2) -> S(plus#2(x4,x2)) sum#1(Cons(x2,x1)) -> plus#2(x2,sum#1(x1)) sum#1(Nil()) -> 0() unfoldr#2(0()) -> Nil() unfoldr#2(S(x2)) -> Cons(x2,unfoldr#2(x2)) - Signature: {main/1,map#2/1,mult#2/2,plus#2/2,sum#1/1,unfoldr#2/1,main#/1,map#2#/1,mult#2#/2,plus#2#/2,sum#1#/1 ,unfoldr#2#/1} / {0/0,Cons/2,Nil/0,S/1,c_1/0,c_2/2,c_3/2,c_4/0,c_5/0,c_6/1,c_7/0,c_8/1,c_9/2,c_10/0,c_11/0 ,c_12/1} - Obligation: innermost runtime complexity wrt. defined symbols {main#,map#2#,mult#2#,plus#2#,sum#1# ,unfoldr#2#} and constructors {0,Cons,Nil,S} + Applied Processor: UsableRules + Details: We replace rewrite rules by usable rules: unfoldr#2(0()) -> Nil() unfoldr#2(S(x2)) -> Cons(x2,unfoldr#2(x2)) main#(S(x1)) -> map#2#(Cons(S(x1),unfoldr#2(S(x1)))) map#2#(Cons(x2,x5)) -> map#2#(x5) map#2#(Cons(x2,x5)) -> mult#2#(x2,x2) mult#2#(S(x4),x2) -> c_6(mult#2#(x4,x2)) ****** Step 5.b:3.a:1.b:1.a:1.b:4: PredecessorEstimationCP WORST_CASE(?,O(n^2)) + Considered Problem: - Strict DPs: mult#2#(S(x4),x2) -> c_6(mult#2#(x4,x2)) - Weak DPs: main#(S(x1)) -> map#2#(Cons(S(x1),unfoldr#2(S(x1)))) map#2#(Cons(x2,x5)) -> map#2#(x5) map#2#(Cons(x2,x5)) -> mult#2#(x2,x2) - Weak TRS: unfoldr#2(0()) -> Nil() unfoldr#2(S(x2)) -> Cons(x2,unfoldr#2(x2)) - Signature: {main/1,map#2/1,mult#2/2,plus#2/2,sum#1/1,unfoldr#2/1,main#/1,map#2#/1,mult#2#/2,plus#2#/2,sum#1#/1 ,unfoldr#2#/1} / {0/0,Cons/2,Nil/0,S/1,c_1/0,c_2/2,c_3/2,c_4/0,c_5/0,c_6/1,c_7/0,c_8/1,c_9/2,c_10/0,c_11/0 ,c_12/1} - Obligation: innermost runtime complexity wrt. defined symbols {main#,map#2#,mult#2#,plus#2#,sum#1# ,unfoldr#2#} and constructors {0,Cons,Nil,S} + Applied Processor: PredecessorEstimationCP {onSelectionCP = any intersect of rules of CDG leaf and strict-rules, withComplexityPair = NaturalPI {shape = Mixed 2, restrict = Restrict, uargs = UArgs, urules = URules, selector = Nothing}} + Details: We first use the processor NaturalPI {shape = Mixed 2, restrict = Restrict, uargs = UArgs, urules = URules, selector = Nothing} to orient following rules strictly: 1: mult#2#(S(x4),x2) -> c_6(mult#2#(x4,x2)) Consider the set of all dependency pairs 1: mult#2#(S(x4),x2) -> c_6(mult#2#(x4,x2)) 2: main#(S(x1)) -> map#2#(Cons(S(x1),unfoldr#2(S(x1)))) 3: map#2#(Cons(x2,x5)) -> map#2#(x5) 4: map#2#(Cons(x2,x5)) -> mult#2#(x2,x2) Processor NaturalPI {shape = Mixed 2, restrict = Restrict, uargs = UArgs, urules = URules, selector = Nothing}induces the complexity certificateTIME (?,O(n^2)) SPACE(?,?)on application of the dependency pairs {1} These cover all (indirect) predecessors of dependency pairs {1,2} their number of applications is equally bounded. The dependency pairs are shifted into the weak component. ******* Step 5.b:3.a:1.b:1.a:1.b:4.a:1: NaturalPI WORST_CASE(?,O(n^2)) + Considered Problem: - Strict DPs: mult#2#(S(x4),x2) -> c_6(mult#2#(x4,x2)) - Weak DPs: main#(S(x1)) -> map#2#(Cons(S(x1),unfoldr#2(S(x1)))) map#2#(Cons(x2,x5)) -> map#2#(x5) map#2#(Cons(x2,x5)) -> mult#2#(x2,x2) - Weak TRS: unfoldr#2(0()) -> Nil() unfoldr#2(S(x2)) -> Cons(x2,unfoldr#2(x2)) - Signature: {main/1,map#2/1,mult#2/2,plus#2/2,sum#1/1,unfoldr#2/1,main#/1,map#2#/1,mult#2#/2,plus#2#/2,sum#1#/1 ,unfoldr#2#/1} / {0/0,Cons/2,Nil/0,S/1,c_1/0,c_2/2,c_3/2,c_4/0,c_5/0,c_6/1,c_7/0,c_8/1,c_9/2,c_10/0,c_11/0 ,c_12/1} - Obligation: innermost runtime complexity wrt. defined symbols {main#,map#2#,mult#2#,plus#2#,sum#1# ,unfoldr#2#} and constructors {0,Cons,Nil,S} + Applied Processor: NaturalPI {shape = Mixed 2, restrict = Restrict, uargs = UArgs, urules = URules, selector = Just first alternative for predecessorEstimation on any intersect of rules of CDG leaf and strict-rules} + Details: We apply a polynomial interpretation of kind constructor-based(mixed(2)): The following argument positions are considered usable: uargs(c_6) = {1} Following symbols are considered usable: {unfoldr#2,main#,map#2#,mult#2#,plus#2#,sum#1#,unfoldr#2#} TcT has computed the following interpretation: p(0) = 2 p(Cons) = x1 + x2 p(Nil) = 2 p(S) = 1 + x1 p(main) = 1 p(map#2) = 0 p(mult#2) = 4*x1^2 + x2 + 2*x2^2 p(plus#2) = 4 + 2*x2 p(sum#1) = 2 p(unfoldr#2) = x1^2 p(main#) = 4 + 6*x1 + 3*x1^2 p(map#2#) = 6 + x1 p(mult#2#) = 3 + x1 p(plus#2#) = 1 + x1 + x1*x2 + x2 + 4*x2^2 p(sum#1#) = 1 + x1 + 2*x1^2 p(unfoldr#2#) = 2*x1 + 4*x1^2 p(c_1) = 0 p(c_2) = 2 p(c_3) = 0 p(c_4) = 0 p(c_5) = 0 p(c_6) = x1 p(c_7) = 1 p(c_8) = 0 p(c_9) = x1 p(c_10) = 0 p(c_11) = 1 p(c_12) = 0 Following rules are strictly oriented: mult#2#(S(x4),x2) = 4 + x4 > 3 + x4 = c_6(mult#2#(x4,x2)) Following rules are (at-least) weakly oriented: main#(S(x1)) = 13 + 12*x1 + 3*x1^2 >= 8 + 3*x1 + x1^2 = map#2#(Cons(S(x1),unfoldr#2(S(x1)))) map#2#(Cons(x2,x5)) = 6 + x2 + x5 >= 6 + x5 = map#2#(x5) map#2#(Cons(x2,x5)) = 6 + x2 + x5 >= 3 + x2 = mult#2#(x2,x2) unfoldr#2(0()) = 4 >= 2 = Nil() unfoldr#2(S(x2)) = 1 + 2*x2 + x2^2 >= x2 + x2^2 = Cons(x2,unfoldr#2(x2)) ******* Step 5.b:3.a:1.b:1.a:1.b:4.a:2: Assumption WORST_CASE(?,O(1)) + Considered Problem: - Weak DPs: main#(S(x1)) -> map#2#(Cons(S(x1),unfoldr#2(S(x1)))) map#2#(Cons(x2,x5)) -> map#2#(x5) map#2#(Cons(x2,x5)) -> mult#2#(x2,x2) mult#2#(S(x4),x2) -> c_6(mult#2#(x4,x2)) - Weak TRS: unfoldr#2(0()) -> Nil() unfoldr#2(S(x2)) -> Cons(x2,unfoldr#2(x2)) - Signature: {main/1,map#2/1,mult#2/2,plus#2/2,sum#1/1,unfoldr#2/1,main#/1,map#2#/1,mult#2#/2,plus#2#/2,sum#1#/1 ,unfoldr#2#/1} / {0/0,Cons/2,Nil/0,S/1,c_1/0,c_2/2,c_3/2,c_4/0,c_5/0,c_6/1,c_7/0,c_8/1,c_9/2,c_10/0,c_11/0 ,c_12/1} - Obligation: innermost runtime complexity wrt. defined symbols {main#,map#2#,mult#2#,plus#2#,sum#1# ,unfoldr#2#} and constructors {0,Cons,Nil,S} + Applied Processor: Assumption {assumed = Certificate {spaceUB = Unknown, spaceLB = Unknown, timeUB = Poly (Just 0), timeLB = Unknown}} + Details: () ******* Step 5.b:3.a:1.b:1.a:1.b:4.b:1: RemoveWeakSuffixes WORST_CASE(?,O(1)) + Considered Problem: - Weak DPs: main#(S(x1)) -> map#2#(Cons(S(x1),unfoldr#2(S(x1)))) map#2#(Cons(x2,x5)) -> map#2#(x5) map#2#(Cons(x2,x5)) -> mult#2#(x2,x2) mult#2#(S(x4),x2) -> c_6(mult#2#(x4,x2)) - Weak TRS: unfoldr#2(0()) -> Nil() unfoldr#2(S(x2)) -> Cons(x2,unfoldr#2(x2)) - Signature: {main/1,map#2/1,mult#2/2,plus#2/2,sum#1/1,unfoldr#2/1,main#/1,map#2#/1,mult#2#/2,plus#2#/2,sum#1#/1 ,unfoldr#2#/1} / {0/0,Cons/2,Nil/0,S/1,c_1/0,c_2/2,c_3/2,c_4/0,c_5/0,c_6/1,c_7/0,c_8/1,c_9/2,c_10/0,c_11/0 ,c_12/1} - Obligation: innermost runtime complexity wrt. defined symbols {main#,map#2#,mult#2#,plus#2#,sum#1# ,unfoldr#2#} and constructors {0,Cons,Nil,S} + Applied Processor: RemoveWeakSuffixes + Details: Consider the dependency graph 1:W:main#(S(x1)) -> map#2#(Cons(S(x1),unfoldr#2(S(x1)))) -->_1 map#2#(Cons(x2,x5)) -> mult#2#(x2,x2):3 -->_1 map#2#(Cons(x2,x5)) -> map#2#(x5):2 2:W:map#2#(Cons(x2,x5)) -> map#2#(x5) -->_1 map#2#(Cons(x2,x5)) -> mult#2#(x2,x2):3 -->_1 map#2#(Cons(x2,x5)) -> map#2#(x5):2 3:W:map#2#(Cons(x2,x5)) -> mult#2#(x2,x2) -->_1 mult#2#(S(x4),x2) -> c_6(mult#2#(x4,x2)):4 4:W:mult#2#(S(x4),x2) -> c_6(mult#2#(x4,x2)) -->_1 mult#2#(S(x4),x2) -> c_6(mult#2#(x4,x2)):4 The following weak DPs constitute a sub-graph of the DG that is closed under successors. The DPs are removed. 1: main#(S(x1)) -> map#2#(Cons(S(x1),unfoldr#2(S(x1)))) 2: map#2#(Cons(x2,x5)) -> map#2#(x5) 3: map#2#(Cons(x2,x5)) -> mult#2#(x2,x2) 4: mult#2#(S(x4),x2) -> c_6(mult#2#(x4,x2)) ******* Step 5.b:3.a:1.b:1.a:1.b:4.b:2: EmptyProcessor WORST_CASE(?,O(1)) + Considered Problem: - Weak TRS: unfoldr#2(0()) -> Nil() unfoldr#2(S(x2)) -> Cons(x2,unfoldr#2(x2)) - Signature: {main/1,map#2/1,mult#2/2,plus#2/2,sum#1/1,unfoldr#2/1,main#/1,map#2#/1,mult#2#/2,plus#2#/2,sum#1#/1 ,unfoldr#2#/1} / {0/0,Cons/2,Nil/0,S/1,c_1/0,c_2/2,c_3/2,c_4/0,c_5/0,c_6/1,c_7/0,c_8/1,c_9/2,c_10/0,c_11/0 ,c_12/1} - Obligation: innermost runtime complexity wrt. defined symbols {main#,map#2#,mult#2#,plus#2#,sum#1# ,unfoldr#2#} and constructors {0,Cons,Nil,S} + Applied Processor: EmptyProcessor + Details: The problem is already closed. The intended complexity is O(1). ***** Step 5.b:3.a:1.b:1.b:1: Failure MAYBE + Considered Problem: - Strict DPs: plus#2#(S(x4),x2) -> c_8(plus#2#(x4,x2)) - Weak DPs: main#(S(x1)) -> map#2#(Cons(S(x1),unfoldr#2(S(x1)))) main#(S(x1)) -> sum#1#(map#2(Cons(S(x1),unfoldr#2(S(x1))))) map#2#(Cons(x2,x5)) -> map#2#(x5) map#2#(Cons(x2,x5)) -> mult#2#(x2,x2) mult#2#(S(x4),x2) -> mult#2#(x4,x2) mult#2#(S(x4),x2) -> plus#2#(x2,mult#2(x4,x2)) sum#1#(Cons(x2,x1)) -> plus#2#(x2,sum#1(x1)) sum#1#(Cons(x2,x1)) -> sum#1#(x1) - Weak TRS: map#2(Cons(x2,x5)) -> Cons(mult#2(x2,x2),map#2(x5)) map#2(Nil()) -> Nil() mult#2(0(),x2) -> 0() mult#2(S(x4),x2) -> plus#2(x2,mult#2(x4,x2)) plus#2(0(),x8) -> x8 plus#2(S(x4),x2) -> S(plus#2(x4,x2)) sum#1(Cons(x2,x1)) -> plus#2(x2,sum#1(x1)) sum#1(Nil()) -> 0() unfoldr#2(0()) -> Nil() unfoldr#2(S(x2)) -> Cons(x2,unfoldr#2(x2)) - Signature: {main/1,map#2/1,mult#2/2,plus#2/2,sum#1/1,unfoldr#2/1,main#/1,map#2#/1,mult#2#/2,plus#2#/2,sum#1#/1 ,unfoldr#2#/1} / {0/0,Cons/2,Nil/0,S/1,c_1/0,c_2/2,c_3/2,c_4/0,c_5/0,c_6/2,c_7/0,c_8/1,c_9/2,c_10/0,c_11/0 ,c_12/1} - Obligation: innermost runtime complexity wrt. defined symbols {main#,map#2#,mult#2#,plus#2#,sum#1# ,unfoldr#2#} and constructors {0,Cons,Nil,S} + Applied Processor: EmptyProcessor + Details: The problem is still open. *** Step 5.b:3.b:1: RemoveWeakSuffixes WORST_CASE(?,O(n^1)) + Considered Problem: - Strict DPs: sum#1#(Cons(x2,x1)) -> c_9(plus#2#(x2,sum#1(x1)),sum#1#(x1)) - Weak DPs: main#(S(x1)) -> c_2(sum#1#(map#2(Cons(S(x1),unfoldr#2(S(x1))))),map#2#(Cons(S(x1),unfoldr#2(S(x1))))) map#2#(Cons(x2,x5)) -> c_3(mult#2#(x2,x2),map#2#(x5)) mult#2#(S(x4),x2) -> c_6(plus#2#(x2,mult#2(x4,x2)),mult#2#(x4,x2)) plus#2#(S(x4),x2) -> c_8(plus#2#(x4,x2)) - Weak TRS: map#2(Cons(x2,x5)) -> Cons(mult#2(x2,x2),map#2(x5)) map#2(Nil()) -> Nil() mult#2(0(),x2) -> 0() mult#2(S(x4),x2) -> plus#2(x2,mult#2(x4,x2)) plus#2(0(),x8) -> x8 plus#2(S(x4),x2) -> S(plus#2(x4,x2)) sum#1(Cons(x2,x1)) -> plus#2(x2,sum#1(x1)) sum#1(Nil()) -> 0() unfoldr#2(0()) -> Nil() unfoldr#2(S(x2)) -> Cons(x2,unfoldr#2(x2)) - Signature: {main/1,map#2/1,mult#2/2,plus#2/2,sum#1/1,unfoldr#2/1,main#/1,map#2#/1,mult#2#/2,plus#2#/2,sum#1#/1 ,unfoldr#2#/1} / {0/0,Cons/2,Nil/0,S/1,c_1/0,c_2/2,c_3/2,c_4/0,c_5/0,c_6/2,c_7/0,c_8/1,c_9/2,c_10/0,c_11/0 ,c_12/1} - Obligation: innermost runtime complexity wrt. defined symbols {main#,map#2#,mult#2#,plus#2#,sum#1# ,unfoldr#2#} and constructors {0,Cons,Nil,S} + Applied Processor: RemoveWeakSuffixes + Details: Consider the dependency graph 1:S:sum#1#(Cons(x2,x1)) -> c_9(plus#2#(x2,sum#1(x1)),sum#1#(x1)) -->_1 plus#2#(S(x4),x2) -> c_8(plus#2#(x4,x2)):5 -->_2 sum#1#(Cons(x2,x1)) -> c_9(plus#2#(x2,sum#1(x1)),sum#1#(x1)):1 2:W:main#(S(x1)) -> c_2(sum#1#(map#2(Cons(S(x1),unfoldr#2(S(x1))))),map#2#(Cons(S(x1),unfoldr#2(S(x1))))) -->_2 map#2#(Cons(x2,x5)) -> c_3(mult#2#(x2,x2),map#2#(x5)):3 -->_1 sum#1#(Cons(x2,x1)) -> c_9(plus#2#(x2,sum#1(x1)),sum#1#(x1)):1 3:W:map#2#(Cons(x2,x5)) -> c_3(mult#2#(x2,x2),map#2#(x5)) -->_1 mult#2#(S(x4),x2) -> c_6(plus#2#(x2,mult#2(x4,x2)),mult#2#(x4,x2)):4 -->_2 map#2#(Cons(x2,x5)) -> c_3(mult#2#(x2,x2),map#2#(x5)):3 4:W:mult#2#(S(x4),x2) -> c_6(plus#2#(x2,mult#2(x4,x2)),mult#2#(x4,x2)) -->_1 plus#2#(S(x4),x2) -> c_8(plus#2#(x4,x2)):5 -->_2 mult#2#(S(x4),x2) -> c_6(plus#2#(x2,mult#2(x4,x2)),mult#2#(x4,x2)):4 5:W:plus#2#(S(x4),x2) -> c_8(plus#2#(x4,x2)) -->_1 plus#2#(S(x4),x2) -> c_8(plus#2#(x4,x2)):5 The following weak DPs constitute a sub-graph of the DG that is closed under successors. The DPs are removed. 3: map#2#(Cons(x2,x5)) -> c_3(mult#2#(x2,x2),map#2#(x5)) 4: mult#2#(S(x4),x2) -> c_6(plus#2#(x2,mult#2(x4,x2)),mult#2#(x4,x2)) 5: plus#2#(S(x4),x2) -> c_8(plus#2#(x4,x2)) *** Step 5.b:3.b:2: SimplifyRHS WORST_CASE(?,O(n^1)) + Considered Problem: - Strict DPs: sum#1#(Cons(x2,x1)) -> c_9(plus#2#(x2,sum#1(x1)),sum#1#(x1)) - Weak DPs: main#(S(x1)) -> c_2(sum#1#(map#2(Cons(S(x1),unfoldr#2(S(x1))))),map#2#(Cons(S(x1),unfoldr#2(S(x1))))) - Weak TRS: map#2(Cons(x2,x5)) -> Cons(mult#2(x2,x2),map#2(x5)) map#2(Nil()) -> Nil() mult#2(0(),x2) -> 0() mult#2(S(x4),x2) -> plus#2(x2,mult#2(x4,x2)) plus#2(0(),x8) -> x8 plus#2(S(x4),x2) -> S(plus#2(x4,x2)) sum#1(Cons(x2,x1)) -> plus#2(x2,sum#1(x1)) sum#1(Nil()) -> 0() unfoldr#2(0()) -> Nil() unfoldr#2(S(x2)) -> Cons(x2,unfoldr#2(x2)) - Signature: {main/1,map#2/1,mult#2/2,plus#2/2,sum#1/1,unfoldr#2/1,main#/1,map#2#/1,mult#2#/2,plus#2#/2,sum#1#/1 ,unfoldr#2#/1} / {0/0,Cons/2,Nil/0,S/1,c_1/0,c_2/2,c_3/2,c_4/0,c_5/0,c_6/2,c_7/0,c_8/1,c_9/2,c_10/0,c_11/0 ,c_12/1} - Obligation: innermost runtime complexity wrt. defined symbols {main#,map#2#,mult#2#,plus#2#,sum#1# ,unfoldr#2#} and constructors {0,Cons,Nil,S} + Applied Processor: SimplifyRHS + Details: Consider the dependency graph 1:S:sum#1#(Cons(x2,x1)) -> c_9(plus#2#(x2,sum#1(x1)),sum#1#(x1)) -->_2 sum#1#(Cons(x2,x1)) -> c_9(plus#2#(x2,sum#1(x1)),sum#1#(x1)):1 2:W:main#(S(x1)) -> c_2(sum#1#(map#2(Cons(S(x1),unfoldr#2(S(x1))))),map#2#(Cons(S(x1),unfoldr#2(S(x1))))) -->_1 sum#1#(Cons(x2,x1)) -> c_9(plus#2#(x2,sum#1(x1)),sum#1#(x1)):1 Due to missing edges in the depndency graph, the right-hand sides of following rules could be simplified: main#(S(x1)) -> c_2(sum#1#(map#2(Cons(S(x1),unfoldr#2(S(x1)))))) sum#1#(Cons(x2,x1)) -> c_9(sum#1#(x1)) *** Step 5.b:3.b:3: UsableRules WORST_CASE(?,O(n^1)) + Considered Problem: - Strict DPs: sum#1#(Cons(x2,x1)) -> c_9(sum#1#(x1)) - Weak DPs: main#(S(x1)) -> c_2(sum#1#(map#2(Cons(S(x1),unfoldr#2(S(x1)))))) - Weak TRS: map#2(Cons(x2,x5)) -> Cons(mult#2(x2,x2),map#2(x5)) map#2(Nil()) -> Nil() mult#2(0(),x2) -> 0() mult#2(S(x4),x2) -> plus#2(x2,mult#2(x4,x2)) plus#2(0(),x8) -> x8 plus#2(S(x4),x2) -> S(plus#2(x4,x2)) sum#1(Cons(x2,x1)) -> plus#2(x2,sum#1(x1)) sum#1(Nil()) -> 0() unfoldr#2(0()) -> Nil() unfoldr#2(S(x2)) -> Cons(x2,unfoldr#2(x2)) - Signature: {main/1,map#2/1,mult#2/2,plus#2/2,sum#1/1,unfoldr#2/1,main#/1,map#2#/1,mult#2#/2,plus#2#/2,sum#1#/1 ,unfoldr#2#/1} / {0/0,Cons/2,Nil/0,S/1,c_1/0,c_2/1,c_3/2,c_4/0,c_5/0,c_6/2,c_7/0,c_8/1,c_9/1,c_10/0,c_11/0 ,c_12/1} - Obligation: innermost runtime complexity wrt. defined symbols {main#,map#2#,mult#2#,plus#2#,sum#1# ,unfoldr#2#} and constructors {0,Cons,Nil,S} + Applied Processor: UsableRules + Details: We replace rewrite rules by usable rules: map#2(Cons(x2,x5)) -> Cons(mult#2(x2,x2),map#2(x5)) map#2(Nil()) -> Nil() mult#2(0(),x2) -> 0() mult#2(S(x4),x2) -> plus#2(x2,mult#2(x4,x2)) plus#2(0(),x8) -> x8 plus#2(S(x4),x2) -> S(plus#2(x4,x2)) unfoldr#2(0()) -> Nil() unfoldr#2(S(x2)) -> Cons(x2,unfoldr#2(x2)) main#(S(x1)) -> c_2(sum#1#(map#2(Cons(S(x1),unfoldr#2(S(x1)))))) sum#1#(Cons(x2,x1)) -> c_9(sum#1#(x1)) *** Step 5.b:3.b:4: PredecessorEstimationCP WORST_CASE(?,O(n^1)) + Considered Problem: - Strict DPs: sum#1#(Cons(x2,x1)) -> c_9(sum#1#(x1)) - Weak DPs: main#(S(x1)) -> c_2(sum#1#(map#2(Cons(S(x1),unfoldr#2(S(x1)))))) - Weak TRS: map#2(Cons(x2,x5)) -> Cons(mult#2(x2,x2),map#2(x5)) map#2(Nil()) -> Nil() mult#2(0(),x2) -> 0() mult#2(S(x4),x2) -> plus#2(x2,mult#2(x4,x2)) plus#2(0(),x8) -> x8 plus#2(S(x4),x2) -> S(plus#2(x4,x2)) unfoldr#2(0()) -> Nil() unfoldr#2(S(x2)) -> Cons(x2,unfoldr#2(x2)) - Signature: {main/1,map#2/1,mult#2/2,plus#2/2,sum#1/1,unfoldr#2/1,main#/1,map#2#/1,mult#2#/2,plus#2#/2,sum#1#/1 ,unfoldr#2#/1} / {0/0,Cons/2,Nil/0,S/1,c_1/0,c_2/1,c_3/2,c_4/0,c_5/0,c_6/2,c_7/0,c_8/1,c_9/1,c_10/0,c_11/0 ,c_12/1} - Obligation: innermost runtime complexity wrt. defined symbols {main#,map#2#,mult#2#,plus#2#,sum#1# ,unfoldr#2#} and constructors {0,Cons,Nil,S} + Applied Processor: PredecessorEstimationCP {onSelectionCP = any intersect of rules of CDG leaf and strict-rules, withComplexityPair = NaturalMI {miDimension = 1, miDegree = 1, miKind = Algebraic, uargs = UArgs, urules = URules, selector = Nothing}} + Details: We first use the processor NaturalMI {miDimension = 1, miDegree = 1, miKind = Algebraic, uargs = UArgs, urules = URules, selector = Nothing} to orient following rules strictly: 1: sum#1#(Cons(x2,x1)) -> c_9(sum#1#(x1)) Consider the set of all dependency pairs 1: sum#1#(Cons(x2,x1)) -> c_9(sum#1#(x1)) 2: main#(S(x1)) -> c_2(sum#1#(map#2(Cons(S(x1),unfoldr#2(S(x1)))))) Processor NaturalMI {miDimension = 1, miDegree = 1, miKind = Algebraic, uargs = UArgs, urules = URules, selector = Nothing}induces the complexity certificateTIME (?,O(n^1)) SPACE(?,?)on application of the dependency pairs {1} These cover all (indirect) predecessors of dependency pairs {1,2} their number of applications is equally bounded. The dependency pairs are shifted into the weak component. **** Step 5.b:3.b:4.a:1: NaturalMI WORST_CASE(?,O(n^1)) + Considered Problem: - Strict DPs: sum#1#(Cons(x2,x1)) -> c_9(sum#1#(x1)) - Weak DPs: main#(S(x1)) -> c_2(sum#1#(map#2(Cons(S(x1),unfoldr#2(S(x1)))))) - Weak TRS: map#2(Cons(x2,x5)) -> Cons(mult#2(x2,x2),map#2(x5)) map#2(Nil()) -> Nil() mult#2(0(),x2) -> 0() mult#2(S(x4),x2) -> plus#2(x2,mult#2(x4,x2)) plus#2(0(),x8) -> x8 plus#2(S(x4),x2) -> S(plus#2(x4,x2)) unfoldr#2(0()) -> Nil() unfoldr#2(S(x2)) -> Cons(x2,unfoldr#2(x2)) - Signature: {main/1,map#2/1,mult#2/2,plus#2/2,sum#1/1,unfoldr#2/1,main#/1,map#2#/1,mult#2#/2,plus#2#/2,sum#1#/1 ,unfoldr#2#/1} / {0/0,Cons/2,Nil/0,S/1,c_1/0,c_2/1,c_3/2,c_4/0,c_5/0,c_6/2,c_7/0,c_8/1,c_9/1,c_10/0,c_11/0 ,c_12/1} - Obligation: innermost runtime complexity wrt. defined symbols {main#,map#2#,mult#2#,plus#2#,sum#1# ,unfoldr#2#} and constructors {0,Cons,Nil,S} + Applied Processor: NaturalMI {miDimension = 1, miDegree = 1, miKind = Algebraic, uargs = UArgs, urules = URules, selector = Just first alternative for predecessorEstimation on any intersect of rules of CDG leaf and 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_9) = {1} Following symbols are considered usable: {map#2,unfoldr#2,main#,map#2#,mult#2#,plus#2#,sum#1#,unfoldr#2#} TcT has computed the following interpretation: p(0) = [1] p(Cons) = [1] x2 + [8] p(Nil) = [7] p(S) = [1] x1 + [2] p(main) = [0] p(map#2) = [1] x1 + [1] p(mult#2) = [1] x1 + [3] p(plus#2) = [4] x1 + [7] p(sum#1) = [4] x1 + [2] p(unfoldr#2) = [8] x1 + [4] p(main#) = [8] x1 + [14] p(map#2#) = [8] p(mult#2#) = [4] p(plus#2#) = [1] x1 + [1] x2 + [1] p(sum#1#) = [1] x1 + [1] p(unfoldr#2#) = [1] x1 + [8] p(c_1) = [1] p(c_2) = [1] x1 + [0] p(c_3) = [1] x2 + [1] p(c_4) = [0] p(c_5) = [8] p(c_6) = [1] x1 + [1] p(c_7) = [4] p(c_8) = [1] p(c_9) = [1] x1 + [6] p(c_10) = [1] p(c_11) = [8] p(c_12) = [0] Following rules are strictly oriented: sum#1#(Cons(x2,x1)) = [1] x1 + [9] > [1] x1 + [7] = c_9(sum#1#(x1)) Following rules are (at-least) weakly oriented: main#(S(x1)) = [8] x1 + [30] >= [8] x1 + [30] = c_2(sum#1#(map#2(Cons(S(x1),unfoldr#2(S(x1)))))) map#2(Cons(x2,x5)) = [1] x5 + [9] >= [1] x5 + [9] = Cons(mult#2(x2,x2),map#2(x5)) map#2(Nil()) = [8] >= [7] = Nil() unfoldr#2(0()) = [12] >= [7] = Nil() unfoldr#2(S(x2)) = [8] x2 + [20] >= [8] x2 + [12] = Cons(x2,unfoldr#2(x2)) **** Step 5.b:3.b:4.a:2: Assumption WORST_CASE(?,O(1)) + Considered Problem: - Weak DPs: main#(S(x1)) -> c_2(sum#1#(map#2(Cons(S(x1),unfoldr#2(S(x1)))))) sum#1#(Cons(x2,x1)) -> c_9(sum#1#(x1)) - Weak TRS: map#2(Cons(x2,x5)) -> Cons(mult#2(x2,x2),map#2(x5)) map#2(Nil()) -> Nil() mult#2(0(),x2) -> 0() mult#2(S(x4),x2) -> plus#2(x2,mult#2(x4,x2)) plus#2(0(),x8) -> x8 plus#2(S(x4),x2) -> S(plus#2(x4,x2)) unfoldr#2(0()) -> Nil() unfoldr#2(S(x2)) -> Cons(x2,unfoldr#2(x2)) - Signature: {main/1,map#2/1,mult#2/2,plus#2/2,sum#1/1,unfoldr#2/1,main#/1,map#2#/1,mult#2#/2,plus#2#/2,sum#1#/1 ,unfoldr#2#/1} / {0/0,Cons/2,Nil/0,S/1,c_1/0,c_2/1,c_3/2,c_4/0,c_5/0,c_6/2,c_7/0,c_8/1,c_9/1,c_10/0,c_11/0 ,c_12/1} - Obligation: innermost runtime complexity wrt. defined symbols {main#,map#2#,mult#2#,plus#2#,sum#1# ,unfoldr#2#} and constructors {0,Cons,Nil,S} + Applied Processor: Assumption {assumed = Certificate {spaceUB = Unknown, spaceLB = Unknown, timeUB = Poly (Just 0), timeLB = Unknown}} + Details: () **** Step 5.b:3.b:4.b:1: RemoveWeakSuffixes WORST_CASE(?,O(1)) + Considered Problem: - Weak DPs: main#(S(x1)) -> c_2(sum#1#(map#2(Cons(S(x1),unfoldr#2(S(x1)))))) sum#1#(Cons(x2,x1)) -> c_9(sum#1#(x1)) - Weak TRS: map#2(Cons(x2,x5)) -> Cons(mult#2(x2,x2),map#2(x5)) map#2(Nil()) -> Nil() mult#2(0(),x2) -> 0() mult#2(S(x4),x2) -> plus#2(x2,mult#2(x4,x2)) plus#2(0(),x8) -> x8 plus#2(S(x4),x2) -> S(plus#2(x4,x2)) unfoldr#2(0()) -> Nil() unfoldr#2(S(x2)) -> Cons(x2,unfoldr#2(x2)) - Signature: {main/1,map#2/1,mult#2/2,plus#2/2,sum#1/1,unfoldr#2/1,main#/1,map#2#/1,mult#2#/2,plus#2#/2,sum#1#/1 ,unfoldr#2#/1} / {0/0,Cons/2,Nil/0,S/1,c_1/0,c_2/1,c_3/2,c_4/0,c_5/0,c_6/2,c_7/0,c_8/1,c_9/1,c_10/0,c_11/0 ,c_12/1} - Obligation: innermost runtime complexity wrt. defined symbols {main#,map#2#,mult#2#,plus#2#,sum#1# ,unfoldr#2#} and constructors {0,Cons,Nil,S} + Applied Processor: RemoveWeakSuffixes + Details: Consider the dependency graph 1:W:main#(S(x1)) -> c_2(sum#1#(map#2(Cons(S(x1),unfoldr#2(S(x1)))))) -->_1 sum#1#(Cons(x2,x1)) -> c_9(sum#1#(x1)):2 2:W:sum#1#(Cons(x2,x1)) -> c_9(sum#1#(x1)) -->_1 sum#1#(Cons(x2,x1)) -> c_9(sum#1#(x1)):2 The following weak DPs constitute a sub-graph of the DG that is closed under successors. The DPs are removed. 1: main#(S(x1)) -> c_2(sum#1#(map#2(Cons(S(x1),unfoldr#2(S(x1)))))) 2: sum#1#(Cons(x2,x1)) -> c_9(sum#1#(x1)) **** Step 5.b:3.b:4.b:2: EmptyProcessor WORST_CASE(?,O(1)) + Considered Problem: - Weak TRS: map#2(Cons(x2,x5)) -> Cons(mult#2(x2,x2),map#2(x5)) map#2(Nil()) -> Nil() mult#2(0(),x2) -> 0() mult#2(S(x4),x2) -> plus#2(x2,mult#2(x4,x2)) plus#2(0(),x8) -> x8 plus#2(S(x4),x2) -> S(plus#2(x4,x2)) unfoldr#2(0()) -> Nil() unfoldr#2(S(x2)) -> Cons(x2,unfoldr#2(x2)) - Signature: {main/1,map#2/1,mult#2/2,plus#2/2,sum#1/1,unfoldr#2/1,main#/1,map#2#/1,mult#2#/2,plus#2#/2,sum#1#/1 ,unfoldr#2#/1} / {0/0,Cons/2,Nil/0,S/1,c_1/0,c_2/1,c_3/2,c_4/0,c_5/0,c_6/2,c_7/0,c_8/1,c_9/1,c_10/0,c_11/0 ,c_12/1} - Obligation: innermost runtime complexity wrt. defined symbols {main#,map#2#,mult#2#,plus#2#,sum#1# ,unfoldr#2#} and constructors {0,Cons,Nil,S} + Applied Processor: EmptyProcessor + Details: The problem is already closed. The intended complexity is O(1). MAYBE