WORST_CASE(?,O(n^2)) * Step 1: NaturalPI WORST_CASE(?,O(n^2)) + Considered Problem: - Strict TRS: loop(Cons(x,xs),Nil(),pp,ss) -> False() loop(Cons(x',xs'),Cons(x,xs),pp,ss) -> loop[Ite](!EQ(x',x),Cons(x',xs'),Cons(x,xs),pp,ss) loop(Nil(),s,pp,ss) -> True() match1(p,s) -> loop(p,s,p,s) - Weak TRS: !EQ(0(),0()) -> True() !EQ(0(),S(y)) -> False() !EQ(S(x),0()) -> False() !EQ(S(x),S(y)) -> !EQ(x,y) loop[Ite](False(),p,s,pp,Cons(x,xs)) -> loop(pp,xs,pp,xs) loop[Ite](True(),Cons(x',xs'),Cons(x,xs),pp,ss) -> loop(xs',xs,pp,ss) - Signature: {!EQ/2,loop/4,loop[Ite]/5,match1/2} / {0/0,Cons/2,False/0,Nil/0,S/1,True/0} - Obligation: innermost runtime complexity wrt. defined symbols {!EQ,loop,loop[Ite],match1} and constructors {0,Cons,False ,Nil,S,True} + Applied Processor: NaturalPI {shape = Quadratic, restrict = NoRestrict, uargs = UArgs, urules = URules, selector = Nothing} + Details: We apply a polynomial interpretation of kind constructor-based(quadratic): The following argument positions are considered usable: uargs(loop[Ite]) = {1} Following symbols are considered usable: {!EQ,loop,loop[Ite],match1} TcT has computed the following interpretation: p(!EQ) = 0 p(0) = 0 p(Cons) = 2 + x2 p(False) = 0 p(Nil) = 0 p(S) = 1 + x1 p(True) = 0 p(loop) = 1 + 5*x2 + 2*x3 + x3^2 + 2*x4^2 p(loop[Ite]) = 4*x1 + 5*x3 + 2*x4 + x4^2 + 2*x5^2 p(match1) = 4 + 5*x1 + 6*x1^2 + 5*x2 + 4*x2^2 Following rules are strictly oriented: loop(Cons(x,xs),Nil(),pp,ss) = 1 + 2*pp + pp^2 + 2*ss^2 > 0 = False() loop(Cons(x',xs'),Cons(x,xs),pp,ss) = 11 + 2*pp + pp^2 + 2*ss^2 + 5*xs > 10 + 2*pp + pp^2 + 2*ss^2 + 5*xs = loop[Ite](!EQ(x',x),Cons(x',xs'),Cons(x,xs),pp,ss) loop(Nil(),s,pp,ss) = 1 + 2*pp + pp^2 + 5*s + 2*ss^2 > 0 = True() match1(p,s) = 4 + 5*p + 6*p^2 + 5*s + 4*s^2 > 1 + 2*p + p^2 + 5*s + 2*s^2 = loop(p,s,p,s) Following rules are (at-least) weakly oriented: !EQ(0(),0()) = 0 >= 0 = True() !EQ(0(),S(y)) = 0 >= 0 = False() !EQ(S(x),0()) = 0 >= 0 = False() !EQ(S(x),S(y)) = 0 >= 0 = !EQ(x,y) loop[Ite](False(),p,s,pp,Cons(x,xs)) = 8 + 2*pp + pp^2 + 5*s + 8*xs + 2*xs^2 >= 1 + 2*pp + pp^2 + 5*xs + 2*xs^2 = loop(pp,xs,pp,xs) loop[Ite](True(),Cons(x',xs'),Cons(x,xs),pp,ss) = 10 + 2*pp + pp^2 + 2*ss^2 + 5*xs >= 1 + 2*pp + pp^2 + 2*ss^2 + 5*xs = loop(xs',xs,pp,ss) WORST_CASE(?,O(n^2))