WORST_CASE(?,O(n^1)) * Step 1: NaturalPI 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: NaturalPI {shape = Linear, restrict = NoRestrict, uargs = UArgs, urules = URules, selector = Nothing} + Details: We apply a polynomial interpretation of kind constructor-based(linear): The following argument positions are considered usable: uargs(Cons) = {1,2}, uargs(op) = {2} Following symbols are considered usable: {fold,foldl,foldr,notEmpty,op} TcT has computed the following interpretation: p(0) = 5 p(Cons) = 1 + x1 + x2 p(False) = 9 p(Nil) = 4 p(S) = x1 p(True) = 3 p(fold) = 15 + 8*x1 + 8*x2 p(foldl) = 3 + x1 + 2*x2 p(foldr) = 2 + x1 + 6*x2 p(notEmpty) = 8 + x1 p(op) = 4*x1 + x2 Following rules are strictly oriented: fold(a,xs) = 15 + 8*a + 8*xs > 11 + 2*a + 8*xs = Cons(foldl(a,xs),Cons(foldr(a,xs),Nil())) foldl(a,Nil()) = 11 + a > a = a foldl(x,Cons(S(0()),xs)) = 15 + x + 2*xs > 3 + x + 2*xs = foldl(S(x),xs) foldl(S(0()),Cons(x,xs)) = 10 + 2*x + 2*xs > 3 + x + 2*xs = foldl(S(x),xs) foldr(a,Cons(x,xs)) = 8 + a + 6*x + 6*xs > 2 + a + 4*x + 6*xs = op(x,foldr(a,xs)) foldr(a,Nil()) = 26 + a > a = a notEmpty(Cons(x,xs)) = 9 + x + xs > 3 = True() notEmpty(Nil()) = 12 > 9 = False() op(x,S(0())) = 5 + 4*x > x = S(x) op(S(0()),y) = 20 + y > y = S(y) Following rules are (at-least) weakly oriented: WORST_CASE(?,O(n^1))