WORST_CASE(?,O(n^1)) * Step 1: DependencyPairs WORST_CASE(?,O(n^1)) + Considered Problem: - Strict TRS: fold(a,xs) -> Cons(foldl(a,xs),Cons(foldr(a,xs),Nil())) foldl(a,Nil()) -> a foldl(x,Cons(S(0()),xs)) -> foldl(S(x),xs) foldl(S(0()),Cons(x,xs)) -> foldl(S(x),xs) foldr(a,Cons(x,xs)) -> op(x,foldr(a,xs)) foldr(a,Nil()) -> a notEmpty(Cons(x,xs)) -> True() notEmpty(Nil()) -> False() op(x,S(0())) -> S(x) op(S(0()),y) -> S(y) - Signature: {fold/2,foldl/2,foldr/2,notEmpty/1,op/2} / {0/0,Cons/2,False/0,Nil/0,S/1,True/0} - Obligation: innermost runtime complexity wrt. defined symbols {fold,foldl,foldr,notEmpty,op} and constructors {0,Cons ,False,Nil,S,True} + Applied Processor: DependencyPairs {dpKind_ = WIDP} + Details: We add the following weak innermost dependency pairs: Strict DPs fold#(a,xs) -> c_1(foldl#(a,xs),foldr#(a,xs)) foldl#(a,Nil()) -> c_2() foldl#(x,Cons(S(0()),xs)) -> c_3(foldl#(S(x),xs)) foldl#(S(0()),Cons(x,xs)) -> c_4(foldl#(S(x),xs)) foldr#(a,Cons(x,xs)) -> c_5(op#(x,foldr(a,xs))) foldr#(a,Nil()) -> c_6() notEmpty#(Cons(x,xs)) -> c_7() notEmpty#(Nil()) -> c_8() op#(x,S(0())) -> c_9() op#(S(0()),y) -> c_10() Weak DPs and mark the set of starting terms. * Step 2: UsableRules WORST_CASE(?,O(n^1)) + Considered Problem: - Strict DPs: fold#(a,xs) -> c_1(foldl#(a,xs),foldr#(a,xs)) foldl#(a,Nil()) -> c_2() foldl#(x,Cons(S(0()),xs)) -> c_3(foldl#(S(x),xs)) foldl#(S(0()),Cons(x,xs)) -> c_4(foldl#(S(x),xs)) foldr#(a,Cons(x,xs)) -> c_5(op#(x,foldr(a,xs))) foldr#(a,Nil()) -> c_6() notEmpty#(Cons(x,xs)) -> c_7() notEmpty#(Nil()) -> c_8() op#(x,S(0())) -> c_9() op#(S(0()),y) -> c_10() - Strict TRS: fold(a,xs) -> Cons(foldl(a,xs),Cons(foldr(a,xs),Nil())) foldl(a,Nil()) -> a foldl(x,Cons(S(0()),xs)) -> foldl(S(x),xs) foldl(S(0()),Cons(x,xs)) -> foldl(S(x),xs) foldr(a,Cons(x,xs)) -> op(x,foldr(a,xs)) foldr(a,Nil()) -> a notEmpty(Cons(x,xs)) -> True() notEmpty(Nil()) -> False() op(x,S(0())) -> S(x) op(S(0()),y) -> S(y) - Signature: {fold/2,foldl/2,foldr/2,notEmpty/1,op/2,fold#/2,foldl#/2,foldr#/2,notEmpty#/1,op#/2} / {0/0,Cons/2,False/0 ,Nil/0,S/1,True/0,c_1/2,c_2/0,c_3/1,c_4/1,c_5/1,c_6/0,c_7/0,c_8/0,c_9/0,c_10/0} - Obligation: innermost runtime complexity wrt. defined symbols {fold#,foldl#,foldr#,notEmpty#,op#} and constructors {0 ,Cons,False,Nil,S,True} + Applied Processor: UsableRules + Details: We replace rewrite rules by usable rules: foldr(a,Cons(x,xs)) -> op(x,foldr(a,xs)) foldr(a,Nil()) -> a op(x,S(0())) -> S(x) op(S(0()),y) -> S(y) fold#(a,xs) -> c_1(foldl#(a,xs),foldr#(a,xs)) foldl#(a,Nil()) -> c_2() foldl#(x,Cons(S(0()),xs)) -> c_3(foldl#(S(x),xs)) foldl#(S(0()),Cons(x,xs)) -> c_4(foldl#(S(x),xs)) foldr#(a,Cons(x,xs)) -> c_5(op#(x,foldr(a,xs))) foldr#(a,Nil()) -> c_6() notEmpty#(Cons(x,xs)) -> c_7() notEmpty#(Nil()) -> c_8() op#(x,S(0())) -> c_9() op#(S(0()),y) -> c_10() * Step 3: WeightGap WORST_CASE(?,O(n^1)) + Considered Problem: - Strict DPs: fold#(a,xs) -> c_1(foldl#(a,xs),foldr#(a,xs)) foldl#(a,Nil()) -> c_2() foldl#(x,Cons(S(0()),xs)) -> c_3(foldl#(S(x),xs)) foldl#(S(0()),Cons(x,xs)) -> c_4(foldl#(S(x),xs)) foldr#(a,Cons(x,xs)) -> c_5(op#(x,foldr(a,xs))) foldr#(a,Nil()) -> c_6() notEmpty#(Cons(x,xs)) -> c_7() notEmpty#(Nil()) -> c_8() op#(x,S(0())) -> c_9() op#(S(0()),y) -> c_10() - Strict TRS: foldr(a,Cons(x,xs)) -> op(x,foldr(a,xs)) foldr(a,Nil()) -> a op(x,S(0())) -> S(x) op(S(0()),y) -> S(y) - Signature: {fold/2,foldl/2,foldr/2,notEmpty/1,op/2,fold#/2,foldl#/2,foldr#/2,notEmpty#/1,op#/2} / {0/0,Cons/2,False/0 ,Nil/0,S/1,True/0,c_1/2,c_2/0,c_3/1,c_4/1,c_5/1,c_6/0,c_7/0,c_8/0,c_9/0,c_10/0} - Obligation: innermost runtime complexity wrt. defined symbols {fold#,foldl#,foldr#,notEmpty#,op#} and constructors {0 ,Cons,False,Nil,S,True} + Applied Processor: WeightGap {wgDimension = 1, wgDegree = 1, wgKind = Algebraic, wgUArgs = UArgs, wgOn = WgOnTrs} + Details: The weightgap principle applies using the following constant growth matrix-interpretation: We apply a matrix interpretation of kind constructor based matrix interpretation: The following argument positions are considered usable: uargs(op) = {2}, uargs(op#) = {2}, uargs(c_1) = {1,2}, uargs(c_3) = {1}, uargs(c_4) = {1}, uargs(c_5) = {1} Following symbols are considered usable: all TcT has computed the following interpretation: p(0) = [1] p(Cons) = [1] x2 + [4] p(False) = [0] p(Nil) = [2] p(S) = [0] p(True) = [0] p(fold) = [0] p(foldl) = [0] p(foldr) = [2] x1 + [4] x2 + [1] p(notEmpty) = [0] p(op) = [1] x2 + [6] p(fold#) = [5] x1 + [5] x2 + [0] p(foldl#) = [1] x2 + [0] p(foldr#) = [2] x1 + [4] x2 + [0] p(notEmpty#) = [6] x1 + [0] p(op#) = [1] x2 + [0] p(c_1) = [1] x1 + [1] x2 + [0] p(c_2) = [0] p(c_3) = [1] x1 + [0] p(c_4) = [1] x1 + [0] p(c_5) = [1] x1 + [0] p(c_6) = [0] p(c_7) = [0] p(c_8) = [0] p(c_9) = [0] p(c_10) = [0] Following rules are strictly oriented: foldl#(a,Nil()) = [2] > [0] = c_2() foldl#(x,Cons(S(0()),xs)) = [1] xs + [4] > [1] xs + [0] = c_3(foldl#(S(x),xs)) foldl#(S(0()),Cons(x,xs)) = [1] xs + [4] > [1] xs + [0] = c_4(foldl#(S(x),xs)) foldr#(a,Cons(x,xs)) = [2] a + [4] xs + [16] > [2] a + [4] xs + [1] = c_5(op#(x,foldr(a,xs))) foldr#(a,Nil()) = [2] a + [8] > [0] = c_6() notEmpty#(Cons(x,xs)) = [6] xs + [24] > [0] = c_7() notEmpty#(Nil()) = [12] > [0] = c_8() foldr(a,Cons(x,xs)) = [2] a + [4] xs + [17] > [2] a + [4] xs + [7] = op(x,foldr(a,xs)) foldr(a,Nil()) = [2] a + [9] > [1] a + [0] = a op(x,S(0())) = [6] > [0] = S(x) op(S(0()),y) = [1] y + [6] > [0] = S(y) Following rules are (at-least) weakly oriented: fold#(a,xs) = [5] a + [5] xs + [0] >= [2] a + [5] xs + [0] = c_1(foldl#(a,xs),foldr#(a,xs)) op#(x,S(0())) = [0] >= [0] = c_9() op#(S(0()),y) = [1] y + [0] >= [0] = c_10() Further, it can be verified that all rules not oriented are covered by the weightgap condition. * Step 4: PredecessorEstimation WORST_CASE(?,O(1)) + Considered Problem: - Strict DPs: fold#(a,xs) -> c_1(foldl#(a,xs),foldr#(a,xs)) op#(x,S(0())) -> c_9() op#(S(0()),y) -> c_10() - Weak DPs: foldl#(a,Nil()) -> c_2() foldl#(x,Cons(S(0()),xs)) -> c_3(foldl#(S(x),xs)) foldl#(S(0()),Cons(x,xs)) -> c_4(foldl#(S(x),xs)) foldr#(a,Cons(x,xs)) -> c_5(op#(x,foldr(a,xs))) foldr#(a,Nil()) -> c_6() notEmpty#(Cons(x,xs)) -> c_7() notEmpty#(Nil()) -> c_8() - Weak TRS: foldr(a,Cons(x,xs)) -> op(x,foldr(a,xs)) foldr(a,Nil()) -> a op(x,S(0())) -> S(x) op(S(0()),y) -> S(y) - Signature: {fold/2,foldl/2,foldr/2,notEmpty/1,op/2,fold#/2,foldl#/2,foldr#/2,notEmpty#/1,op#/2} / {0/0,Cons/2,False/0 ,Nil/0,S/1,True/0,c_1/2,c_2/0,c_3/1,c_4/1,c_5/1,c_6/0,c_7/0,c_8/0,c_9/0,c_10/0} - Obligation: innermost runtime complexity wrt. defined symbols {fold#,foldl#,foldr#,notEmpty#,op#} and constructors {0 ,Cons,False,Nil,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: fold#(a,xs) -> c_1(foldl#(a,xs),foldr#(a,xs)) 2: op#(x,S(0())) -> c_9() 3: op#(S(0()),y) -> c_10() 4: foldl#(a,Nil()) -> c_2() 5: foldl#(x,Cons(S(0()),xs)) -> c_3(foldl#(S(x),xs)) 6: foldl#(S(0()),Cons(x,xs)) -> c_4(foldl#(S(x),xs)) 7: foldr#(a,Cons(x,xs)) -> c_5(op#(x,foldr(a,xs))) 8: foldr#(a,Nil()) -> c_6() 9: notEmpty#(Cons(x,xs)) -> c_7() 10: notEmpty#(Nil()) -> c_8() * Step 5: RemoveWeakSuffixes WORST_CASE(?,O(1)) + Considered Problem: - Strict DPs: op#(x,S(0())) -> c_9() op#(S(0()),y) -> c_10() - Weak DPs: fold#(a,xs) -> c_1(foldl#(a,xs),foldr#(a,xs)) foldl#(a,Nil()) -> c_2() foldl#(x,Cons(S(0()),xs)) -> c_3(foldl#(S(x),xs)) foldl#(S(0()),Cons(x,xs)) -> c_4(foldl#(S(x),xs)) foldr#(a,Cons(x,xs)) -> c_5(op#(x,foldr(a,xs))) foldr#(a,Nil()) -> c_6() notEmpty#(Cons(x,xs)) -> c_7() notEmpty#(Nil()) -> c_8() - Weak TRS: foldr(a,Cons(x,xs)) -> op(x,foldr(a,xs)) foldr(a,Nil()) -> a op(x,S(0())) -> S(x) op(S(0()),y) -> S(y) - Signature: {fold/2,foldl/2,foldr/2,notEmpty/1,op/2,fold#/2,foldl#/2,foldr#/2,notEmpty#/1,op#/2} / {0/0,Cons/2,False/0 ,Nil/0,S/1,True/0,c_1/2,c_2/0,c_3/1,c_4/1,c_5/1,c_6/0,c_7/0,c_8/0,c_9/0,c_10/0} - Obligation: innermost runtime complexity wrt. defined symbols {fold#,foldl#,foldr#,notEmpty#,op#} and constructors {0 ,Cons,False,Nil,S,True} + Applied Processor: RemoveWeakSuffixes + Details: Consider the dependency graph 1:S:op#(x,S(0())) -> c_9() 2:S:op#(S(0()),y) -> c_10() 3:W:fold#(a,xs) -> c_1(foldl#(a,xs),foldr#(a,xs)) -->_2 foldr#(a,Cons(x,xs)) -> c_5(op#(x,foldr(a,xs))):7 -->_1 foldl#(S(0()),Cons(x,xs)) -> c_4(foldl#(S(x),xs)):6 -->_1 foldl#(x,Cons(S(0()),xs)) -> c_3(foldl#(S(x),xs)):5 -->_2 foldr#(a,Nil()) -> c_6():8 -->_1 foldl#(a,Nil()) -> c_2():4 4:W:foldl#(a,Nil()) -> c_2() 5:W:foldl#(x,Cons(S(0()),xs)) -> c_3(foldl#(S(x),xs)) -->_1 foldl#(S(0()),Cons(x,xs)) -> c_4(foldl#(S(x),xs)):6 -->_1 foldl#(x,Cons(S(0()),xs)) -> c_3(foldl#(S(x),xs)):5 -->_1 foldl#(a,Nil()) -> c_2():4 6:W:foldl#(S(0()),Cons(x,xs)) -> c_4(foldl#(S(x),xs)) -->_1 foldl#(S(0()),Cons(x,xs)) -> c_4(foldl#(S(x),xs)):6 -->_1 foldl#(x,Cons(S(0()),xs)) -> c_3(foldl#(S(x),xs)):5 -->_1 foldl#(a,Nil()) -> c_2():4 7:W:foldr#(a,Cons(x,xs)) -> c_5(op#(x,foldr(a,xs))) -->_1 op#(S(0()),y) -> c_10():2 -->_1 op#(x,S(0())) -> c_9():1 8:W:foldr#(a,Nil()) -> c_6() 9:W:notEmpty#(Cons(x,xs)) -> c_7() 10:W:notEmpty#(Nil()) -> c_8() The following weak DPs constitute a sub-graph of the DG that is closed under successors. The DPs are removed. 10: notEmpty#(Nil()) -> c_8() 9: notEmpty#(Cons(x,xs)) -> c_7() 8: foldr#(a,Nil()) -> c_6() 6: foldl#(S(0()),Cons(x,xs)) -> c_4(foldl#(S(x),xs)) 5: foldl#(x,Cons(S(0()),xs)) -> c_3(foldl#(S(x),xs)) 4: foldl#(a,Nil()) -> c_2() * Step 6: SimplifyRHS WORST_CASE(?,O(1)) + Considered Problem: - Strict DPs: op#(x,S(0())) -> c_9() op#(S(0()),y) -> c_10() - Weak DPs: fold#(a,xs) -> c_1(foldl#(a,xs),foldr#(a,xs)) foldr#(a,Cons(x,xs)) -> c_5(op#(x,foldr(a,xs))) - Weak TRS: foldr(a,Cons(x,xs)) -> op(x,foldr(a,xs)) foldr(a,Nil()) -> a op(x,S(0())) -> S(x) op(S(0()),y) -> S(y) - Signature: {fold/2,foldl/2,foldr/2,notEmpty/1,op/2,fold#/2,foldl#/2,foldr#/2,notEmpty#/1,op#/2} / {0/0,Cons/2,False/0 ,Nil/0,S/1,True/0,c_1/2,c_2/0,c_3/1,c_4/1,c_5/1,c_6/0,c_7/0,c_8/0,c_9/0,c_10/0} - Obligation: innermost runtime complexity wrt. defined symbols {fold#,foldl#,foldr#,notEmpty#,op#} and constructors {0 ,Cons,False,Nil,S,True} + Applied Processor: SimplifyRHS + Details: Consider the dependency graph 1:S:op#(x,S(0())) -> c_9() 2:S:op#(S(0()),y) -> c_10() 3:W:fold#(a,xs) -> c_1(foldl#(a,xs),foldr#(a,xs)) -->_2 foldr#(a,Cons(x,xs)) -> c_5(op#(x,foldr(a,xs))):7 7:W:foldr#(a,Cons(x,xs)) -> c_5(op#(x,foldr(a,xs))) -->_1 op#(S(0()),y) -> c_10():2 -->_1 op#(x,S(0())) -> c_9():1 Due to missing edges in the depndency graph, the right-hand sides of following rules could be simplified: fold#(a,xs) -> c_1(foldr#(a,xs)) * Step 7: RemoveHeads WORST_CASE(?,O(1)) + Considered Problem: - Strict DPs: op#(x,S(0())) -> c_9() op#(S(0()),y) -> c_10() - Weak DPs: fold#(a,xs) -> c_1(foldr#(a,xs)) foldr#(a,Cons(x,xs)) -> c_5(op#(x,foldr(a,xs))) - Weak TRS: foldr(a,Cons(x,xs)) -> op(x,foldr(a,xs)) foldr(a,Nil()) -> a op(x,S(0())) -> S(x) op(S(0()),y) -> S(y) - Signature: {fold/2,foldl/2,foldr/2,notEmpty/1,op/2,fold#/2,foldl#/2,foldr#/2,notEmpty#/1,op#/2} / {0/0,Cons/2,False/0 ,Nil/0,S/1,True/0,c_1/1,c_2/0,c_3/1,c_4/1,c_5/1,c_6/0,c_7/0,c_8/0,c_9/0,c_10/0} - Obligation: innermost runtime complexity wrt. defined symbols {fold#,foldl#,foldr#,notEmpty#,op#} and constructors {0 ,Cons,False,Nil,S,True} + Applied Processor: RemoveHeads + Details: Consider the dependency graph 1:S:op#(x,S(0())) -> c_9() 2:S:op#(S(0()),y) -> c_10() 3:W:fold#(a,xs) -> c_1(foldr#(a,xs)) -->_1 foldr#(a,Cons(x,xs)) -> c_5(op#(x,foldr(a,xs))):4 4:W:foldr#(a,Cons(x,xs)) -> c_5(op#(x,foldr(a,xs))) -->_1 op#(S(0()),y) -> c_10():2 -->_1 op#(x,S(0())) -> c_9():1 Following roots of the dependency graph are removed, as the considered set of starting terms is closed under reduction with respect to these rules (modulo compound contexts). [(3,fold#(a,xs) -> c_1(foldr#(a,xs)))] * Step 8: Decompose WORST_CASE(?,O(1)) + Considered Problem: - Strict DPs: op#(x,S(0())) -> c_9() op#(S(0()),y) -> c_10() - Weak DPs: foldr#(a,Cons(x,xs)) -> c_5(op#(x,foldr(a,xs))) - Weak TRS: foldr(a,Cons(x,xs)) -> op(x,foldr(a,xs)) foldr(a,Nil()) -> a op(x,S(0())) -> S(x) op(S(0()),y) -> S(y) - Signature: {fold/2,foldl/2,foldr/2,notEmpty/1,op/2,fold#/2,foldl#/2,foldr#/2,notEmpty#/1,op#/2} / {0/0,Cons/2,False/0 ,Nil/0,S/1,True/0,c_1/1,c_2/0,c_3/1,c_4/1,c_5/1,c_6/0,c_7/0,c_8/0,c_9/0,c_10/0} - Obligation: innermost runtime complexity wrt. defined symbols {fold#,foldl#,foldr#,notEmpty#,op#} and constructors {0 ,Cons,False,Nil,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: op#(x,S(0())) -> c_9() - Weak DPs: foldr#(a,Cons(x,xs)) -> c_5(op#(x,foldr(a,xs))) op#(S(0()),y) -> c_10() - Weak TRS: foldr(a,Cons(x,xs)) -> op(x,foldr(a,xs)) foldr(a,Nil()) -> a op(x,S(0())) -> S(x) op(S(0()),y) -> S(y) - Signature: {fold/2,foldl/2,foldr/2,notEmpty/1,op/2,fold#/2,foldl#/2,foldr#/2,notEmpty#/1,op#/2} / {0/0,Cons/2,False/0 ,Nil/0,S/1,True/0,c_1/1,c_2/0,c_3/1,c_4/1,c_5/1,c_6/0,c_7/0,c_8/0,c_9/0,c_10/0} - Obligation: innermost runtime complexity wrt. defined symbols {fold#,foldl#,foldr#,notEmpty#,op#} and constructors {0 ,Cons,False,Nil,S,True} Problem (S) - Strict DPs: op#(S(0()),y) -> c_10() - Weak DPs: foldr#(a,Cons(x,xs)) -> c_5(op#(x,foldr(a,xs))) op#(x,S(0())) -> c_9() - Weak TRS: foldr(a,Cons(x,xs)) -> op(x,foldr(a,xs)) foldr(a,Nil()) -> a op(x,S(0())) -> S(x) op(S(0()),y) -> S(y) - Signature: {fold/2,foldl/2,foldr/2,notEmpty/1,op/2,fold#/2,foldl#/2,foldr#/2,notEmpty#/1,op#/2} / {0/0,Cons/2,False/0 ,Nil/0,S/1,True/0,c_1/1,c_2/0,c_3/1,c_4/1,c_5/1,c_6/0,c_7/0,c_8/0,c_9/0,c_10/0} - Obligation: innermost runtime complexity wrt. defined symbols {fold#,foldl#,foldr#,notEmpty#,op#} and constructors {0 ,Cons,False,Nil,S,True} ** Step 8.a:1: RemoveWeakSuffixes WORST_CASE(?,O(1)) + Considered Problem: - Strict DPs: op#(x,S(0())) -> c_9() - Weak DPs: foldr#(a,Cons(x,xs)) -> c_5(op#(x,foldr(a,xs))) op#(S(0()),y) -> c_10() - Weak TRS: foldr(a,Cons(x,xs)) -> op(x,foldr(a,xs)) foldr(a,Nil()) -> a op(x,S(0())) -> S(x) op(S(0()),y) -> S(y) - Signature: {fold/2,foldl/2,foldr/2,notEmpty/1,op/2,fold#/2,foldl#/2,foldr#/2,notEmpty#/1,op#/2} / {0/0,Cons/2,False/0 ,Nil/0,S/1,True/0,c_1/1,c_2/0,c_3/1,c_4/1,c_5/1,c_6/0,c_7/0,c_8/0,c_9/0,c_10/0} - Obligation: innermost runtime complexity wrt. defined symbols {fold#,foldl#,foldr#,notEmpty#,op#} and constructors {0 ,Cons,False,Nil,S,True} + Applied Processor: RemoveWeakSuffixes + Details: Consider the dependency graph 1:S:op#(x,S(0())) -> c_9() 2:W:op#(S(0()),y) -> c_10() 4:W:foldr#(a,Cons(x,xs)) -> c_5(op#(x,foldr(a,xs))) -->_1 op#(x,S(0())) -> c_9():1 -->_1 op#(S(0()),y) -> c_10():2 The following weak DPs constitute a sub-graph of the DG that is closed under successors. The DPs are removed. 2: op#(S(0()),y) -> c_10() ** Step 8.a:2: Trivial WORST_CASE(?,O(1)) + Considered Problem: - Strict DPs: op#(x,S(0())) -> c_9() - Weak DPs: foldr#(a,Cons(x,xs)) -> c_5(op#(x,foldr(a,xs))) - Weak TRS: foldr(a,Cons(x,xs)) -> op(x,foldr(a,xs)) foldr(a,Nil()) -> a op(x,S(0())) -> S(x) op(S(0()),y) -> S(y) - Signature: {fold/2,foldl/2,foldr/2,notEmpty/1,op/2,fold#/2,foldl#/2,foldr#/2,notEmpty#/1,op#/2} / {0/0,Cons/2,False/0 ,Nil/0,S/1,True/0,c_1/1,c_2/0,c_3/1,c_4/1,c_5/1,c_6/0,c_7/0,c_8/0,c_9/0,c_10/0} - Obligation: innermost runtime complexity wrt. defined symbols {fold#,foldl#,foldr#,notEmpty#,op#} and constructors {0 ,Cons,False,Nil,S,True} + Applied Processor: Trivial + Details: Consider the dependency graph 1:S:op#(x,S(0())) -> c_9() 4:W:foldr#(a,Cons(x,xs)) -> c_5(op#(x,foldr(a,xs))) -->_1 op#(x,S(0())) -> c_9():1 The dependency graph contains no loops, we remove all dependency pairs. ** Step 8.a:3: EmptyProcessor WORST_CASE(?,O(1)) + Considered Problem: - Weak TRS: foldr(a,Cons(x,xs)) -> op(x,foldr(a,xs)) foldr(a,Nil()) -> a op(x,S(0())) -> S(x) op(S(0()),y) -> S(y) - Signature: {fold/2,foldl/2,foldr/2,notEmpty/1,op/2,fold#/2,foldl#/2,foldr#/2,notEmpty#/1,op#/2} / {0/0,Cons/2,False/0 ,Nil/0,S/1,True/0,c_1/1,c_2/0,c_3/1,c_4/1,c_5/1,c_6/0,c_7/0,c_8/0,c_9/0,c_10/0} - Obligation: innermost runtime complexity wrt. defined symbols {fold#,foldl#,foldr#,notEmpty#,op#} and constructors {0 ,Cons,False,Nil,S,True} + Applied Processor: EmptyProcessor + Details: The problem is already closed. The intended complexity is O(1). ** Step 8.b:1: RemoveWeakSuffixes WORST_CASE(?,O(1)) + Considered Problem: - Strict DPs: op#(S(0()),y) -> c_10() - Weak DPs: foldr#(a,Cons(x,xs)) -> c_5(op#(x,foldr(a,xs))) op#(x,S(0())) -> c_9() - Weak TRS: foldr(a,Cons(x,xs)) -> op(x,foldr(a,xs)) foldr(a,Nil()) -> a op(x,S(0())) -> S(x) op(S(0()),y) -> S(y) - Signature: {fold/2,foldl/2,foldr/2,notEmpty/1,op/2,fold#/2,foldl#/2,foldr#/2,notEmpty#/1,op#/2} / {0/0,Cons/2,False/0 ,Nil/0,S/1,True/0,c_1/1,c_2/0,c_3/1,c_4/1,c_5/1,c_6/0,c_7/0,c_8/0,c_9/0,c_10/0} - Obligation: innermost runtime complexity wrt. defined symbols {fold#,foldl#,foldr#,notEmpty#,op#} and constructors {0 ,Cons,False,Nil,S,True} + Applied Processor: RemoveWeakSuffixes + Details: Consider the dependency graph 1:S:op#(S(0()),y) -> c_10() 2:W:foldr#(a,Cons(x,xs)) -> c_5(op#(x,foldr(a,xs))) -->_1 op#(x,S(0())) -> c_9():3 -->_1 op#(S(0()),y) -> c_10():1 3:W:op#(x,S(0())) -> c_9() The following weak DPs constitute a sub-graph of the DG that is closed under successors. The DPs are removed. 3: op#(x,S(0())) -> c_9() ** Step 8.b:2: Trivial WORST_CASE(?,O(1)) + Considered Problem: - Strict DPs: op#(S(0()),y) -> c_10() - Weak DPs: foldr#(a,Cons(x,xs)) -> c_5(op#(x,foldr(a,xs))) - Weak TRS: foldr(a,Cons(x,xs)) -> op(x,foldr(a,xs)) foldr(a,Nil()) -> a op(x,S(0())) -> S(x) op(S(0()),y) -> S(y) - Signature: {fold/2,foldl/2,foldr/2,notEmpty/1,op/2,fold#/2,foldl#/2,foldr#/2,notEmpty#/1,op#/2} / {0/0,Cons/2,False/0 ,Nil/0,S/1,True/0,c_1/1,c_2/0,c_3/1,c_4/1,c_5/1,c_6/0,c_7/0,c_8/0,c_9/0,c_10/0} - Obligation: innermost runtime complexity wrt. defined symbols {fold#,foldl#,foldr#,notEmpty#,op#} and constructors {0 ,Cons,False,Nil,S,True} + Applied Processor: Trivial + Details: Consider the dependency graph 1:S:op#(S(0()),y) -> c_10() 2:W:foldr#(a,Cons(x,xs)) -> c_5(op#(x,foldr(a,xs))) -->_1 op#(S(0()),y) -> c_10():1 The dependency graph contains no loops, we remove all dependency pairs. ** Step 8.b:3: EmptyProcessor WORST_CASE(?,O(1)) + Considered Problem: - Weak TRS: foldr(a,Cons(x,xs)) -> op(x,foldr(a,xs)) foldr(a,Nil()) -> a op(x,S(0())) -> S(x) op(S(0()),y) -> S(y) - Signature: {fold/2,foldl/2,foldr/2,notEmpty/1,op/2,fold#/2,foldl#/2,foldr#/2,notEmpty#/1,op#/2} / {0/0,Cons/2,False/0 ,Nil/0,S/1,True/0,c_1/1,c_2/0,c_3/1,c_4/1,c_5/1,c_6/0,c_7/0,c_8/0,c_9/0,c_10/0} - Obligation: innermost runtime complexity wrt. defined symbols {fold#,foldl#,foldr#,notEmpty#,op#} and constructors {0 ,Cons,False,Nil,S,True} + Applied Processor: EmptyProcessor + Details: The problem is already closed. The intended complexity is O(1). WORST_CASE(?,O(n^1))