WORST_CASE(?,O(n^1)) * Step 1: NaturalMI 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: NaturalMI {miDimension = 1, miDegree = 1, miKind = Algebraic, uargs = UArgs, urules = URules, selector = Nothing} + Details: We apply a matrix interpretation of kind constructor based matrix interpretation: 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) = [6] p(Cons) = [1] x1 + [1] x2 + [4] p(False) = [3] p(Nil) = [2] p(S) = [1] x1 + [2] p(True) = [0] p(fold) = [8] x1 + [8] x2 + [15] p(foldl) = [2] x1 + [2] x2 + [0] p(foldr) = [2] x1 + [6] x2 + [4] p(notEmpty) = [5] p(op) = [1] x1 + [1] x2 + [0] Following rules are strictly oriented: fold(a,xs) = [8] a + [8] xs + [15] > [4] a + [8] xs + [14] = Cons(foldl(a,xs),Cons(foldr(a,xs),Nil())) foldl(a,Nil()) = [2] a + [4] > [1] a + [0] = a foldl(x,Cons(S(0()),xs)) = [2] x + [2] xs + [24] > [2] x + [2] xs + [4] = foldl(S(x),xs) foldl(S(0()),Cons(x,xs)) = [2] x + [2] xs + [24] > [2] x + [2] xs + [4] = foldl(S(x),xs) foldr(a,Cons(x,xs)) = [2] a + [6] x + [6] xs + [28] > [2] a + [1] x + [6] xs + [4] = op(x,foldr(a,xs)) foldr(a,Nil()) = [2] a + [16] > [1] a + [0] = a notEmpty(Cons(x,xs)) = [5] > [0] = True() notEmpty(Nil()) = [5] > [3] = False() op(x,S(0())) = [1] x + [8] > [1] x + [2] = S(x) op(S(0()),y) = [1] y + [8] > [1] y + [2] = S(y) Following rules are (at-least) weakly oriented: WORST_CASE(?,O(n^1))