WORST_CASE(?,O(n^2)) * Step 1: NaturalMI WORST_CASE(?,O(n^2)) + Considered Problem: - Strict TRS: domatch(patcs,Cons(x,xs),n) -> domatch[Ite](prefix(patcs,Cons(x,xs)),patcs,Cons(x,xs),n) domatch(Cons(x,xs),Nil(),n) -> Nil() domatch(Nil(),Nil(),n) -> Cons(n,Nil()) eqNatList(Cons(x,xs),Cons(y,ys)) -> eqNatList[Ite](!EQ(x,y),y,ys,x,xs) eqNatList(Cons(x,xs),Nil()) -> False() eqNatList(Nil(),Cons(y,ys)) -> False() eqNatList(Nil(),Nil()) -> True() notEmpty(Cons(x,xs)) -> True() notEmpty(Nil()) -> False() prefix(Cons(x,xs),Nil()) -> False() prefix(Cons(x',xs'),Cons(x,xs)) -> and(!EQ(x',x),prefix(xs',xs)) prefix(Nil(),cs) -> True() strmatch(patstr,str) -> domatch(patstr,str,Nil()) - Weak TRS: !EQ(0(),0()) -> True() !EQ(0(),S(y)) -> False() !EQ(S(x),0()) -> False() !EQ(S(x),S(y)) -> !EQ(x,y) and(False(),False()) -> False() and(False(),True()) -> False() and(True(),False()) -> False() and(True(),True()) -> True() domatch[Ite](False(),patcs,Cons(x,xs),n) -> domatch(patcs,xs,Cons(n,Cons(Nil(),Nil()))) domatch[Ite](True(),patcs,Cons(x,xs),n) -> Cons(n,domatch(patcs,xs,Cons(n,Cons(Nil(),Nil())))) eqNatList[Ite](False(),y,ys,x,xs) -> False() eqNatList[Ite](True(),y,ys,x,xs) -> eqNatList(xs,ys) - Signature: {!EQ/2,and/2,domatch/3,domatch[Ite]/4,eqNatList/2,eqNatList[Ite]/5,notEmpty/1,prefix/2,strmatch/2} / {0/0 ,Cons/2,False/0,Nil/0,S/1,True/0} - Obligation: innermost runtime complexity wrt. defined symbols {!EQ,and,domatch,domatch[Ite],eqNatList,eqNatList[Ite] ,notEmpty,prefix,strmatch} and constructors {0,Cons,False,Nil,S,True} + Applied Processor: NaturalMI {miDimension = 2, miDegree = 2, 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) = {2}, uargs(and) = {1,2}, uargs(domatch[Ite]) = {1}, uargs(eqNatList[Ite]) = {1} Following symbols are considered usable: {!EQ,and,domatch,domatch[Ite],eqNatList,eqNatList[Ite],notEmpty,prefix,strmatch} TcT has computed the following interpretation: p(!EQ) = [0] [3] p(0) = [0] [0] p(Cons) = [1 1] x2 + [0] [0 1] [4] p(False) = [0] [2] p(Nil) = [0] [2] p(S) = [1 0] x1 + [2] [0 1] [0] p(True) = [0] [0] p(and) = [4 0] x1 + [1 0] x2 + [2] [4 1] [0 1] [5] p(domatch) = [6 3] x2 + [0] [0 3] [0] p(domatch[Ite]) = [2 0] x1 + [6 0] x3 + [0] [0 0] [0 3] [0] p(eqNatList) = [2 0] x1 + [0 1] x2 + [3] [2 0] [0 3] [1] p(eqNatList[Ite]) = [1 0] x1 + [0 1] x3 + [2 0] x5 + [5] [0 0] [0 3] [2 2] [7] p(notEmpty) = [1 2] x1 + [4] [0 1] [4] p(prefix) = [0 1] x2 + [1] [0 2] [5] p(strmatch) = [0 1] x1 + [6 3] x2 + [3] [1 0] [0 3] [0] Following rules are strictly oriented: domatch(patcs,Cons(x,xs),n) = [6 9] xs + [12] [0 3] [12] > [6 8] xs + [10] [0 3] [12] = domatch[Ite](prefix(patcs,Cons(x,xs)),patcs,Cons(x,xs),n) domatch(Cons(x,xs),Nil(),n) = [6] [6] > [0] [2] = Nil() domatch(Nil(),Nil(),n) = [6] [6] > [2] [6] = Cons(n,Nil()) eqNatList(Cons(x,xs),Cons(y,ys)) = [2 2] xs + [0 1] ys + [7] [2 2] [0 3] [13] > [2 0] xs + [0 1] ys + [5] [2 2] [0 3] [7] = eqNatList[Ite](!EQ(x,y),y,ys,x,xs) eqNatList(Cons(x,xs),Nil()) = [2 2] xs + [5] [2 2] [7] > [0] [2] = False() eqNatList(Nil(),Cons(y,ys)) = [0 1] ys + [7] [0 3] [13] > [0] [2] = False() eqNatList(Nil(),Nil()) = [5] [7] > [0] [0] = True() notEmpty(Cons(x,xs)) = [1 3] xs + [12] [0 1] [8] > [0] [0] = True() notEmpty(Nil()) = [8] [6] > [0] [2] = False() prefix(Cons(x,xs),Nil()) = [3] [9] > [0] [2] = False() prefix(Cons(x',xs'),Cons(x,xs)) = [0 1] xs + [5] [0 2] [13] > [0 1] xs + [3] [0 2] [13] = and(!EQ(x',x),prefix(xs',xs)) prefix(Nil(),cs) = [0 1] cs + [1] [0 2] [5] > [0] [0] = True() strmatch(patstr,str) = [0 1] patstr + [6 3] str + [3] [1 0] [0 3] [0] > [6 3] str + [0] [0 3] [0] = domatch(patstr,str,Nil()) Following rules are (at-least) weakly oriented: !EQ(0(),0()) = [0] [3] >= [0] [0] = True() !EQ(0(),S(y)) = [0] [3] >= [0] [2] = False() !EQ(S(x),0()) = [0] [3] >= [0] [2] = False() !EQ(S(x),S(y)) = [0] [3] >= [0] [3] = !EQ(x,y) and(False(),False()) = [2] [9] >= [0] [2] = False() and(False(),True()) = [2] [7] >= [0] [2] = False() and(True(),False()) = [2] [7] >= [0] [2] = False() and(True(),True()) = [2] [5] >= [0] [0] = True() domatch[Ite](False(),patcs,Cons(x,xs),n) = [6 6] xs + [0] [0 3] [12] >= [6 3] xs + [0] [0 3] [0] = domatch(patcs,xs,Cons(n,Cons(Nil(),Nil()))) domatch[Ite](True(),patcs,Cons(x,xs),n) = [6 6] xs + [0] [0 3] [12] >= [6 6] xs + [0] [0 3] [4] = Cons(n,domatch(patcs,xs,Cons(n,Cons(Nil(),Nil())))) eqNatList[Ite](False(),y,ys,x,xs) = [2 0] xs + [0 1] ys + [5] [2 2] [0 3] [7] >= [0] [2] = False() eqNatList[Ite](True(),y,ys,x,xs) = [2 0] xs + [0 1] ys + [5] [2 2] [0 3] [7] >= [2 0] xs + [0 1] ys + [3] [2 0] [0 3] [1] = eqNatList(xs,ys) WORST_CASE(?,O(n^2))