WORST_CASE(?,O(n^2)) * Step 1: NaturalPI WORST_CASE(?,O(n^2)) + Considered Problem: - Strict TRS: revapp(Cons(x,xs),rest) -> revapp(xs,Cons(x,rest)) revapp(Nil(),rest) -> rest select(Cons(x,xs)) -> selects(x,Nil(),xs) select(Nil()) -> Nil() selects(x,revprefix,Nil()) -> Cons(Cons(x,revapp(revprefix,Nil())),Nil()) selects(x',revprefix,Cons(x,xs)) -> Cons(Cons(x',revapp(revprefix,Cons(x,xs))) ,selects(x,Cons(x',revprefix),xs)) - Signature: {revapp/2,select/1,selects/3} / {Cons/2,Nil/0} - Obligation: innermost runtime complexity wrt. defined symbols {revapp,select,selects} and constructors {Cons,Nil} + Applied Processor: NaturalPI {shape = Mixed 2, restrict = NoRestrict, uargs = UArgs, urules = URules, selector = Nothing} + Details: We apply a polynomial interpretation of kind constructor-based(mixed(2)): The following argument positions are considered usable: uargs(Cons) = {1,2} Following symbols are considered usable: {revapp,select,selects} TcT has computed the following interpretation: p(Cons) = 1 + x1 + x2 p(Nil) = 1 p(revapp) = 5*x1 + 4*x2 p(select) = 2 + 6*x1^2 p(selects) = 4 + 6*x1 + 6*x1*x3 + x1^2 + 5*x2*x3 + 2*x3 + 6*x3^2 Following rules are strictly oriented: revapp(Cons(x,xs),rest) = 5 + 4*rest + 5*x + 5*xs > 4 + 4*rest + 4*x + 5*xs = revapp(xs,Cons(x,rest)) revapp(Nil(),rest) = 5 + 4*rest > rest = rest select(Cons(x,xs)) = 8 + 12*x + 12*x*xs + 6*x^2 + 12*xs + 6*xs^2 > 4 + 6*x + 6*x*xs + x^2 + 7*xs + 6*xs^2 = selects(x,Nil(),xs) select(Nil()) = 8 > 1 = Nil() selects(x,revprefix,Nil()) = 12 + 5*revprefix + 12*x + x^2 > 7 + 5*revprefix + x = Cons(Cons(x,revapp(revprefix,Nil())),Nil()) selects(x',revprefix,Cons(x,xs)) = 12 + 5*revprefix + 5*revprefix*x + 5*revprefix*xs + 14*x + 6*x*x' + 12*x*xs + 6*x^2 + 12*x' + 6*x'*xs + x'^2 + 14*xs + 6*xs^2 > 10 + 5*revprefix + 5*revprefix*xs + 10*x + 6*x*xs + x^2 + x' + 5*x'*xs + 11*xs + 6*xs^2 = Cons(Cons(x',revapp(revprefix,Cons(x,xs))),selects(x,Cons(x',revprefix),xs)) Following rules are (at-least) weakly oriented: WORST_CASE(?,O(n^2))