* Step 1: Sum WORST_CASE(Omega(n^1),?)
+ Considered Problem:
- Strict TRS:
append(cons(x,xs),ys()) -> cons(x,append(xs,ys()))
append(nil(),ys()) -> ys()
filterhigh(n,cons(x,xs)) -> if2(ge(x,n),n,x,xs)
filterhigh(n,nil()) -> nil()
filterlow(n,cons(x,xs)) -> if1(ge(n,x),n,x,xs)
filterlow(n,nil()) -> nil()
ge(x,0()) -> true()
ge(0(),s(x)) -> false()
ge(s(x),s(y)) -> ge(x,y)
get(n,cons(x,nil())) -> x
get(n,nil()) -> 0()
get(0(),cons(x,cons(y,xs))) -> x
get(s(n),cons(x,cons(y,xs))) -> get(n,cons(y,xs))
half(0()) -> 0()
half(s(0())) -> 0()
half(s(s(x))) -> s(half(x))
if1(false(),n,x,xs) -> cons(x,filterlow(n,xs))
if1(true(),n,x,xs) -> filterlow(n,xs)
if2(false(),n,x,xs) -> cons(x,filterhigh(n,xs))
if2(true(),n,x,xs) -> filterhigh(n,xs)
length(cons(x,xs)) -> s(length(xs))
length(nil()) -> 0()
qs(n,cons(x,xs)) -> append(qs(half(n),filterlow(get(n,cons(x,xs)),cons(x,xs)))
,cons(get(n,cons(x,xs)),qs(half(n),filterhigh(get(n,cons(x,xs)),cons(x,xs)))))
qs(n,nil()) -> nil()
qsort(xs) -> qs(half(length(xs)),xs)
- Signature:
{append/2,filterhigh/2,filterlow/2,ge/2,get/2,half/1,if1/4,if2/4,length/1,qs/2,qsort/1} / {0/0,cons/2
,false/0,nil/0,s/1,true/0,ys/0}
- Obligation:
innermost runtime complexity wrt. defined symbols {append,filterhigh,filterlow,ge,get,half,if1,if2,length,qs
,qsort} and constructors {0,cons,false,nil,s,true,ys}
+ Applied Processor:
Sum {left = someStrategy, right = someStrategy}
+ Details:
()
* Step 2: DecreasingLoops WORST_CASE(Omega(n^1),?)
+ Considered Problem:
- Strict TRS:
append(cons(x,xs),ys()) -> cons(x,append(xs,ys()))
append(nil(),ys()) -> ys()
filterhigh(n,cons(x,xs)) -> if2(ge(x,n),n,x,xs)
filterhigh(n,nil()) -> nil()
filterlow(n,cons(x,xs)) -> if1(ge(n,x),n,x,xs)
filterlow(n,nil()) -> nil()
ge(x,0()) -> true()
ge(0(),s(x)) -> false()
ge(s(x),s(y)) -> ge(x,y)
get(n,cons(x,nil())) -> x
get(n,nil()) -> 0()
get(0(),cons(x,cons(y,xs))) -> x
get(s(n),cons(x,cons(y,xs))) -> get(n,cons(y,xs))
half(0()) -> 0()
half(s(0())) -> 0()
half(s(s(x))) -> s(half(x))
if1(false(),n,x,xs) -> cons(x,filterlow(n,xs))
if1(true(),n,x,xs) -> filterlow(n,xs)
if2(false(),n,x,xs) -> cons(x,filterhigh(n,xs))
if2(true(),n,x,xs) -> filterhigh(n,xs)
length(cons(x,xs)) -> s(length(xs))
length(nil()) -> 0()
qs(n,cons(x,xs)) -> append(qs(half(n),filterlow(get(n,cons(x,xs)),cons(x,xs)))
,cons(get(n,cons(x,xs)),qs(half(n),filterhigh(get(n,cons(x,xs)),cons(x,xs)))))
qs(n,nil()) -> nil()
qsort(xs) -> qs(half(length(xs)),xs)
- Signature:
{append/2,filterhigh/2,filterlow/2,ge/2,get/2,half/1,if1/4,if2/4,length/1,qs/2,qsort/1} / {0/0,cons/2
,false/0,nil/0,s/1,true/0,ys/0}
- Obligation:
innermost runtime complexity wrt. defined symbols {append,filterhigh,filterlow,ge,get,half,if1,if2,length,qs
,qsort} and constructors {0,cons,false,nil,s,true,ys}
+ Applied Processor:
DecreasingLoops {bound = AnyLoop, narrow = 10}
+ Details:
The system has following decreasing Loops:
append(y,ys()){y -> cons(x,y)} =
append(cons(x,y),ys()) ->^+ cons(x,append(y,ys()))
= C[append(y,ys()) = append(y,ys()){}]
WORST_CASE(Omega(n^1),?)