WORST_CASE(Omega(n^1),O(n^2)) * Step 1: Sum WORST_CASE(Omega(n^1),O(n^2)) + Considered Problem: - Strict TRS: app(Cons(x,xs),ys) -> Cons(x,app(xs,ys)) app(Nil(),ys) -> ys notEmpty(Cons(x,xs)) -> True() notEmpty(Nil()) -> False() part(x,Nil(),xs1,xs2) -> app(xs1,xs2) part(x',Cons(x,xs),xs1,xs2) -> part[Ite](>(x',x),x',Cons(x,xs),xs1,xs2) qs(x',Cons(x,xs)) -> app(Cons(x,Nil()),Cons(x',quicksort(xs))) quicksort(Cons(x,Cons(x',xs))) -> qs(x,part(x,Cons(x',xs),Nil(),Nil())) quicksort(Cons(x,Nil())) -> Cons(x,Nil()) quicksort(Nil()) -> Nil() - Weak TRS: <(x,0()) -> False() <(0(),S(y)) -> True() <(S(x),S(y)) -> <(x,y) >(0(),y) -> False() >(S(x),0()) -> True() >(S(x),S(y)) -> >(x,y) part[False][Ite](False(),x',Cons(x,xs),xs1,xs2) -> part(x',xs,xs1,xs2) part[False][Ite](True(),x',Cons(x,xs),xs1,xs2) -> part(x',xs,xs1,Cons(x,xs2)) part[Ite](False(),x',Cons(x,xs),xs1,xs2) -> part[False][Ite](<(x',x),x',Cons(x,xs),xs1,xs2) part[Ite](True(),x',Cons(x,xs),xs1,xs2) -> part(x',xs,Cons(x,xs1),xs2) - Signature: {/2,app/2,notEmpty/1,part/4,part[False][Ite]/5,part[Ite]/5,qs/2,quicksort/1} / {0/0,Cons/2,False/0 ,Nil/0,S/1,True/0} - Obligation: innermost runtime complexity wrt. defined symbols {<,>,app,notEmpty,part,part[False][Ite],part[Ite],qs ,quicksort} and constructors {0,Cons,False,Nil,S,True} + Applied Processor: Sum {left = someStrategy, right = someStrategy} + Details: () ** Step 1.a:1: DecreasingLoops WORST_CASE(Omega(n^1),?) + Considered Problem: - Strict TRS: app(Cons(x,xs),ys) -> Cons(x,app(xs,ys)) app(Nil(),ys) -> ys notEmpty(Cons(x,xs)) -> True() notEmpty(Nil()) -> False() part(x,Nil(),xs1,xs2) -> app(xs1,xs2) part(x',Cons(x,xs),xs1,xs2) -> part[Ite](>(x',x),x',Cons(x,xs),xs1,xs2) qs(x',Cons(x,xs)) -> app(Cons(x,Nil()),Cons(x',quicksort(xs))) quicksort(Cons(x,Cons(x',xs))) -> qs(x,part(x,Cons(x',xs),Nil(),Nil())) quicksort(Cons(x,Nil())) -> Cons(x,Nil()) quicksort(Nil()) -> Nil() - Weak TRS: <(x,0()) -> False() <(0(),S(y)) -> True() <(S(x),S(y)) -> <(x,y) >(0(),y) -> False() >(S(x),0()) -> True() >(S(x),S(y)) -> >(x,y) part[False][Ite](False(),x',Cons(x,xs),xs1,xs2) -> part(x',xs,xs1,xs2) part[False][Ite](True(),x',Cons(x,xs),xs1,xs2) -> part(x',xs,xs1,Cons(x,xs2)) part[Ite](False(),x',Cons(x,xs),xs1,xs2) -> part[False][Ite](<(x',x),x',Cons(x,xs),xs1,xs2) part[Ite](True(),x',Cons(x,xs),xs1,xs2) -> part(x',xs,Cons(x,xs1),xs2) - Signature: {/2,app/2,notEmpty/1,part/4,part[False][Ite]/5,part[Ite]/5,qs/2,quicksort/1} / {0/0,Cons/2,False/0 ,Nil/0,S/1,True/0} - Obligation: innermost runtime complexity wrt. defined symbols {<,>,app,notEmpty,part,part[False][Ite],part[Ite],qs ,quicksort} and constructors {0,Cons,False,Nil,S,True} + Applied Processor: DecreasingLoops {bound = AnyLoop, narrow = 10} + Details: The system has following decreasing Loops: app(y,z){y -> Cons(x,y)} = app(Cons(x,y),z) ->^+ Cons(x,app(y,z)) = C[app(y,z) = app(y,z){}] ** Step 1.b:1: DependencyPairs WORST_CASE(?,O(n^2)) + Considered Problem: - Strict TRS: app(Cons(x,xs),ys) -> Cons(x,app(xs,ys)) app(Nil(),ys) -> ys notEmpty(Cons(x,xs)) -> True() notEmpty(Nil()) -> False() part(x,Nil(),xs1,xs2) -> app(xs1,xs2) part(x',Cons(x,xs),xs1,xs2) -> part[Ite](>(x',x),x',Cons(x,xs),xs1,xs2) qs(x',Cons(x,xs)) -> app(Cons(x,Nil()),Cons(x',quicksort(xs))) quicksort(Cons(x,Cons(x',xs))) -> qs(x,part(x,Cons(x',xs),Nil(),Nil())) quicksort(Cons(x,Nil())) -> Cons(x,Nil()) quicksort(Nil()) -> Nil() - Weak TRS: <(x,0()) -> False() <(0(),S(y)) -> True() <(S(x),S(y)) -> <(x,y) >(0(),y) -> False() >(S(x),0()) -> True() >(S(x),S(y)) -> >(x,y) part[False][Ite](False(),x',Cons(x,xs),xs1,xs2) -> part(x',xs,xs1,xs2) part[False][Ite](True(),x',Cons(x,xs),xs1,xs2) -> part(x',xs,xs1,Cons(x,xs2)) part[Ite](False(),x',Cons(x,xs),xs1,xs2) -> part[False][Ite](<(x',x),x',Cons(x,xs),xs1,xs2) part[Ite](True(),x',Cons(x,xs),xs1,xs2) -> part(x',xs,Cons(x,xs1),xs2) - Signature: {/2,app/2,notEmpty/1,part/4,part[False][Ite]/5,part[Ite]/5,qs/2,quicksort/1} / {0/0,Cons/2,False/0 ,Nil/0,S/1,True/0} - Obligation: innermost runtime complexity wrt. defined symbols {<,>,app,notEmpty,part,part[False][Ite],part[Ite],qs ,quicksort} and constructors {0,Cons,False,Nil,S,True} + Applied Processor: DependencyPairs {dpKind_ = DT} + Details: We add the following dependency tuples: Strict DPs app#(Cons(x,xs),ys) -> c_1(app#(xs,ys)) app#(Nil(),ys) -> c_2() notEmpty#(Cons(x,xs)) -> c_3() notEmpty#(Nil()) -> c_4() part#(x,Nil(),xs1,xs2) -> c_5(app#(xs1,xs2)) part#(x',Cons(x,xs),xs1,xs2) -> c_6(part[Ite]#(>(x',x),x',Cons(x,xs),xs1,xs2),>#(x',x)) qs#(x',Cons(x,xs)) -> c_7(app#(Cons(x,Nil()),Cons(x',quicksort(xs))),quicksort#(xs)) quicksort#(Cons(x,Cons(x',xs))) -> c_8(qs#(x,part(x,Cons(x',xs),Nil(),Nil())) ,part#(x,Cons(x',xs),Nil(),Nil())) quicksort#(Cons(x,Nil())) -> c_9() quicksort#(Nil()) -> c_10() Weak DPs <#(x,0()) -> c_11() <#(0(),S(y)) -> c_12() <#(S(x),S(y)) -> c_13(<#(x,y)) >#(0(),y) -> c_14() >#(S(x),0()) -> c_15() >#(S(x),S(y)) -> c_16(>#(x,y)) part[False][Ite]#(False(),x',Cons(x,xs),xs1,xs2) -> c_17(part#(x',xs,xs1,xs2)) part[False][Ite]#(True(),x',Cons(x,xs),xs1,xs2) -> c_18(part#(x',xs,xs1,Cons(x,xs2))) part[Ite]#(False(),x',Cons(x,xs),xs1,xs2) -> c_19(part[False][Ite]#(<(x',x),x',Cons(x,xs),xs1,xs2),<#(x',x)) part[Ite]#(True(),x',Cons(x,xs),xs1,xs2) -> c_20(part#(x',xs,Cons(x,xs1),xs2)) and mark the set of starting terms. ** Step 1.b:2: PredecessorEstimation WORST_CASE(?,O(n^2)) + Considered Problem: - Strict DPs: app#(Cons(x,xs),ys) -> c_1(app#(xs,ys)) app#(Nil(),ys) -> c_2() notEmpty#(Cons(x,xs)) -> c_3() notEmpty#(Nil()) -> c_4() part#(x,Nil(),xs1,xs2) -> c_5(app#(xs1,xs2)) part#(x',Cons(x,xs),xs1,xs2) -> c_6(part[Ite]#(>(x',x),x',Cons(x,xs),xs1,xs2),>#(x',x)) qs#(x',Cons(x,xs)) -> c_7(app#(Cons(x,Nil()),Cons(x',quicksort(xs))),quicksort#(xs)) quicksort#(Cons(x,Cons(x',xs))) -> c_8(qs#(x,part(x,Cons(x',xs),Nil(),Nil())) ,part#(x,Cons(x',xs),Nil(),Nil())) quicksort#(Cons(x,Nil())) -> c_9() quicksort#(Nil()) -> c_10() - Weak DPs: <#(x,0()) -> c_11() <#(0(),S(y)) -> c_12() <#(S(x),S(y)) -> c_13(<#(x,y)) >#(0(),y) -> c_14() >#(S(x),0()) -> c_15() >#(S(x),S(y)) -> c_16(>#(x,y)) part[False][Ite]#(False(),x',Cons(x,xs),xs1,xs2) -> c_17(part#(x',xs,xs1,xs2)) part[False][Ite]#(True(),x',Cons(x,xs),xs1,xs2) -> c_18(part#(x',xs,xs1,Cons(x,xs2))) part[Ite]#(False(),x',Cons(x,xs),xs1,xs2) -> c_19(part[False][Ite]#(<(x',x),x',Cons(x,xs),xs1,xs2),<#(x',x)) part[Ite]#(True(),x',Cons(x,xs),xs1,xs2) -> c_20(part#(x',xs,Cons(x,xs1),xs2)) - Weak TRS: <(x,0()) -> False() <(0(),S(y)) -> True() <(S(x),S(y)) -> <(x,y) >(0(),y) -> False() >(S(x),0()) -> True() >(S(x),S(y)) -> >(x,y) app(Cons(x,xs),ys) -> Cons(x,app(xs,ys)) app(Nil(),ys) -> ys notEmpty(Cons(x,xs)) -> True() notEmpty(Nil()) -> False() part(x,Nil(),xs1,xs2) -> app(xs1,xs2) part(x',Cons(x,xs),xs1,xs2) -> part[Ite](>(x',x),x',Cons(x,xs),xs1,xs2) part[False][Ite](False(),x',Cons(x,xs),xs1,xs2) -> part(x',xs,xs1,xs2) part[False][Ite](True(),x',Cons(x,xs),xs1,xs2) -> part(x',xs,xs1,Cons(x,xs2)) part[Ite](False(),x',Cons(x,xs),xs1,xs2) -> part[False][Ite](<(x',x),x',Cons(x,xs),xs1,xs2) part[Ite](True(),x',Cons(x,xs),xs1,xs2) -> part(x',xs,Cons(x,xs1),xs2) qs(x',Cons(x,xs)) -> app(Cons(x,Nil()),Cons(x',quicksort(xs))) quicksort(Cons(x,Cons(x',xs))) -> qs(x,part(x,Cons(x',xs),Nil(),Nil())) quicksort(Cons(x,Nil())) -> Cons(x,Nil()) quicksort(Nil()) -> Nil() - Signature: {/2,app/2,notEmpty/1,part/4,part[False][Ite]/5,part[Ite]/5,qs/2,quicksort/1,<#/2,>#/2,app#/2 ,notEmpty#/1,part#/4,part[False][Ite]#/5,part[Ite]#/5,qs#/2,quicksort#/1} / {0/0,Cons/2,False/0,Nil/0,S/1 ,True/0,c_1/1,c_2/0,c_3/0,c_4/0,c_5/1,c_6/2,c_7/2,c_8/2,c_9/0,c_10/0,c_11/0,c_12/0,c_13/1,c_14/0,c_15/0 ,c_16/1,c_17/1,c_18/1,c_19/2,c_20/1} - Obligation: innermost runtime complexity wrt. defined symbols {<#,>#,app#,notEmpty#,part#,part[False][Ite]#,part[Ite]# ,qs#,quicksort#} and constructors {0,Cons,False,Nil,S,True} + Applied Processor: PredecessorEstimation {onSelection = all simple predecessor estimation selector} + Details: We estimate the number of application of {2,3,4,9,10} by application of Pre({2,3,4,9,10}) = {1,5,7}. Here rules are labelled as follows: 1: app#(Cons(x,xs),ys) -> c_1(app#(xs,ys)) 2: app#(Nil(),ys) -> c_2() 3: notEmpty#(Cons(x,xs)) -> c_3() 4: notEmpty#(Nil()) -> c_4() 5: part#(x,Nil(),xs1,xs2) -> c_5(app#(xs1,xs2)) 6: part#(x',Cons(x,xs),xs1,xs2) -> c_6(part[Ite]#(>(x',x),x',Cons(x,xs),xs1,xs2),>#(x',x)) 7: qs#(x',Cons(x,xs)) -> c_7(app#(Cons(x,Nil()),Cons(x',quicksort(xs))),quicksort#(xs)) 8: quicksort#(Cons(x,Cons(x',xs))) -> c_8(qs#(x,part(x,Cons(x',xs),Nil(),Nil())) ,part#(x,Cons(x',xs),Nil(),Nil())) 9: quicksort#(Cons(x,Nil())) -> c_9() 10: quicksort#(Nil()) -> c_10() 11: <#(x,0()) -> c_11() 12: <#(0(),S(y)) -> c_12() 13: <#(S(x),S(y)) -> c_13(<#(x,y)) 14: >#(0(),y) -> c_14() 15: >#(S(x),0()) -> c_15() 16: >#(S(x),S(y)) -> c_16(>#(x,y)) 17: part[False][Ite]#(False(),x',Cons(x,xs),xs1,xs2) -> c_17(part#(x',xs,xs1,xs2)) 18: part[False][Ite]#(True(),x',Cons(x,xs),xs1,xs2) -> c_18(part#(x',xs,xs1,Cons(x,xs2))) 19: part[Ite]#(False(),x',Cons(x,xs),xs1,xs2) -> c_19(part[False][Ite]#(<(x',x),x',Cons(x,xs),xs1,xs2) ,<#(x',x)) 20: part[Ite]#(True(),x',Cons(x,xs),xs1,xs2) -> c_20(part#(x',xs,Cons(x,xs1),xs2)) ** Step 1.b:3: RemoveWeakSuffixes WORST_CASE(?,O(n^2)) + Considered Problem: - Strict DPs: app#(Cons(x,xs),ys) -> c_1(app#(xs,ys)) part#(x,Nil(),xs1,xs2) -> c_5(app#(xs1,xs2)) part#(x',Cons(x,xs),xs1,xs2) -> c_6(part[Ite]#(>(x',x),x',Cons(x,xs),xs1,xs2),>#(x',x)) qs#(x',Cons(x,xs)) -> c_7(app#(Cons(x,Nil()),Cons(x',quicksort(xs))),quicksort#(xs)) quicksort#(Cons(x,Cons(x',xs))) -> c_8(qs#(x,part(x,Cons(x',xs),Nil(),Nil())) ,part#(x,Cons(x',xs),Nil(),Nil())) - Weak DPs: <#(x,0()) -> c_11() <#(0(),S(y)) -> c_12() <#(S(x),S(y)) -> c_13(<#(x,y)) >#(0(),y) -> c_14() >#(S(x),0()) -> c_15() >#(S(x),S(y)) -> c_16(>#(x,y)) app#(Nil(),ys) -> c_2() notEmpty#(Cons(x,xs)) -> c_3() notEmpty#(Nil()) -> c_4() part[False][Ite]#(False(),x',Cons(x,xs),xs1,xs2) -> c_17(part#(x',xs,xs1,xs2)) part[False][Ite]#(True(),x',Cons(x,xs),xs1,xs2) -> c_18(part#(x',xs,xs1,Cons(x,xs2))) part[Ite]#(False(),x',Cons(x,xs),xs1,xs2) -> c_19(part[False][Ite]#(<(x',x),x',Cons(x,xs),xs1,xs2),<#(x',x)) part[Ite]#(True(),x',Cons(x,xs),xs1,xs2) -> c_20(part#(x',xs,Cons(x,xs1),xs2)) quicksort#(Cons(x,Nil())) -> c_9() quicksort#(Nil()) -> c_10() - Weak TRS: <(x,0()) -> False() <(0(),S(y)) -> True() <(S(x),S(y)) -> <(x,y) >(0(),y) -> False() >(S(x),0()) -> True() >(S(x),S(y)) -> >(x,y) app(Cons(x,xs),ys) -> Cons(x,app(xs,ys)) app(Nil(),ys) -> ys notEmpty(Cons(x,xs)) -> True() notEmpty(Nil()) -> False() part(x,Nil(),xs1,xs2) -> app(xs1,xs2) part(x',Cons(x,xs),xs1,xs2) -> part[Ite](>(x',x),x',Cons(x,xs),xs1,xs2) part[False][Ite](False(),x',Cons(x,xs),xs1,xs2) -> part(x',xs,xs1,xs2) part[False][Ite](True(),x',Cons(x,xs),xs1,xs2) -> part(x',xs,xs1,Cons(x,xs2)) part[Ite](False(),x',Cons(x,xs),xs1,xs2) -> part[False][Ite](<(x',x),x',Cons(x,xs),xs1,xs2) part[Ite](True(),x',Cons(x,xs),xs1,xs2) -> part(x',xs,Cons(x,xs1),xs2) qs(x',Cons(x,xs)) -> app(Cons(x,Nil()),Cons(x',quicksort(xs))) quicksort(Cons(x,Cons(x',xs))) -> qs(x,part(x,Cons(x',xs),Nil(),Nil())) quicksort(Cons(x,Nil())) -> Cons(x,Nil()) quicksort(Nil()) -> Nil() - Signature: {/2,app/2,notEmpty/1,part/4,part[False][Ite]/5,part[Ite]/5,qs/2,quicksort/1,<#/2,>#/2,app#/2 ,notEmpty#/1,part#/4,part[False][Ite]#/5,part[Ite]#/5,qs#/2,quicksort#/1} / {0/0,Cons/2,False/0,Nil/0,S/1 ,True/0,c_1/1,c_2/0,c_3/0,c_4/0,c_5/1,c_6/2,c_7/2,c_8/2,c_9/0,c_10/0,c_11/0,c_12/0,c_13/1,c_14/0,c_15/0 ,c_16/1,c_17/1,c_18/1,c_19/2,c_20/1} - Obligation: innermost runtime complexity wrt. defined symbols {<#,>#,app#,notEmpty#,part#,part[False][Ite]#,part[Ite]# ,qs#,quicksort#} and constructors {0,Cons,False,Nil,S,True} + Applied Processor: RemoveWeakSuffixes + Details: Consider the dependency graph 1:S:app#(Cons(x,xs),ys) -> c_1(app#(xs,ys)) -->_1 app#(Nil(),ys) -> c_2():12 -->_1 app#(Cons(x,xs),ys) -> c_1(app#(xs,ys)):1 2:S:part#(x,Nil(),xs1,xs2) -> c_5(app#(xs1,xs2)) -->_1 app#(Nil(),ys) -> c_2():12 -->_1 app#(Cons(x,xs),ys) -> c_1(app#(xs,ys)):1 3:S:part#(x',Cons(x,xs),xs1,xs2) -> c_6(part[Ite]#(>(x',x),x',Cons(x,xs),xs1,xs2),>#(x',x)) -->_1 part[Ite]#(True(),x',Cons(x,xs),xs1,xs2) -> c_20(part#(x',xs,Cons(x,xs1),xs2)):18 -->_1 part[Ite]#(False(),x',Cons(x,xs),xs1,xs2) -> c_19(part[False][Ite]#(<(x',x),x',Cons(x,xs),xs1,xs2) ,<#(x',x)):17 -->_2 >#(S(x),S(y)) -> c_16(>#(x,y)):11 -->_2 >#(S(x),0()) -> c_15():10 -->_2 >#(0(),y) -> c_14():9 4:S:qs#(x',Cons(x,xs)) -> c_7(app#(Cons(x,Nil()),Cons(x',quicksort(xs))),quicksort#(xs)) -->_2 quicksort#(Cons(x,Cons(x',xs))) -> c_8(qs#(x,part(x,Cons(x',xs),Nil(),Nil())) ,part#(x,Cons(x',xs),Nil(),Nil())):5 -->_2 quicksort#(Nil()) -> c_10():20 -->_2 quicksort#(Cons(x,Nil())) -> c_9():19 -->_1 app#(Cons(x,xs),ys) -> c_1(app#(xs,ys)):1 5:S:quicksort#(Cons(x,Cons(x',xs))) -> c_8(qs#(x,part(x,Cons(x',xs),Nil(),Nil())) ,part#(x,Cons(x',xs),Nil(),Nil())) -->_1 qs#(x',Cons(x,xs)) -> c_7(app#(Cons(x,Nil()),Cons(x',quicksort(xs))),quicksort#(xs)):4 -->_2 part#(x',Cons(x,xs),xs1,xs2) -> c_6(part[Ite]#(>(x',x),x',Cons(x,xs),xs1,xs2),>#(x',x)):3 6:W:<#(x,0()) -> c_11() 7:W:<#(0(),S(y)) -> c_12() 8:W:<#(S(x),S(y)) -> c_13(<#(x,y)) -->_1 <#(S(x),S(y)) -> c_13(<#(x,y)):8 -->_1 <#(0(),S(y)) -> c_12():7 -->_1 <#(x,0()) -> c_11():6 9:W:>#(0(),y) -> c_14() 10:W:>#(S(x),0()) -> c_15() 11:W:>#(S(x),S(y)) -> c_16(>#(x,y)) -->_1 >#(S(x),S(y)) -> c_16(>#(x,y)):11 -->_1 >#(S(x),0()) -> c_15():10 -->_1 >#(0(),y) -> c_14():9 12:W:app#(Nil(),ys) -> c_2() 13:W:notEmpty#(Cons(x,xs)) -> c_3() 14:W:notEmpty#(Nil()) -> c_4() 15:W:part[False][Ite]#(False(),x',Cons(x,xs),xs1,xs2) -> c_17(part#(x',xs,xs1,xs2)) -->_1 part#(x',Cons(x,xs),xs1,xs2) -> c_6(part[Ite]#(>(x',x),x',Cons(x,xs),xs1,xs2),>#(x',x)):3 -->_1 part#(x,Nil(),xs1,xs2) -> c_5(app#(xs1,xs2)):2 16:W:part[False][Ite]#(True(),x',Cons(x,xs),xs1,xs2) -> c_18(part#(x',xs,xs1,Cons(x,xs2))) -->_1 part#(x',Cons(x,xs),xs1,xs2) -> c_6(part[Ite]#(>(x',x),x',Cons(x,xs),xs1,xs2),>#(x',x)):3 -->_1 part#(x,Nil(),xs1,xs2) -> c_5(app#(xs1,xs2)):2 17:W:part[Ite]#(False(),x',Cons(x,xs),xs1,xs2) -> c_19(part[False][Ite]#(<(x',x),x',Cons(x,xs),xs1,xs2) ,<#(x',x)) -->_1 part[False][Ite]#(True(),x',Cons(x,xs),xs1,xs2) -> c_18(part#(x',xs,xs1,Cons(x,xs2))):16 -->_1 part[False][Ite]#(False(),x',Cons(x,xs),xs1,xs2) -> c_17(part#(x',xs,xs1,xs2)):15 -->_2 <#(S(x),S(y)) -> c_13(<#(x,y)):8 -->_2 <#(0(),S(y)) -> c_12():7 -->_2 <#(x,0()) -> c_11():6 18:W:part[Ite]#(True(),x',Cons(x,xs),xs1,xs2) -> c_20(part#(x',xs,Cons(x,xs1),xs2)) -->_1 part#(x',Cons(x,xs),xs1,xs2) -> c_6(part[Ite]#(>(x',x),x',Cons(x,xs),xs1,xs2),>#(x',x)):3 -->_1 part#(x,Nil(),xs1,xs2) -> c_5(app#(xs1,xs2)):2 19:W:quicksort#(Cons(x,Nil())) -> c_9() 20:W:quicksort#(Nil()) -> c_10() The following weak DPs constitute a sub-graph of the DG that is closed under successors. The DPs are removed. 14: notEmpty#(Nil()) -> c_4() 13: notEmpty#(Cons(x,xs)) -> c_3() 19: quicksort#(Cons(x,Nil())) -> c_9() 20: quicksort#(Nil()) -> c_10() 11: >#(S(x),S(y)) -> c_16(>#(x,y)) 9: >#(0(),y) -> c_14() 10: >#(S(x),0()) -> c_15() 8: <#(S(x),S(y)) -> c_13(<#(x,y)) 6: <#(x,0()) -> c_11() 7: <#(0(),S(y)) -> c_12() 12: app#(Nil(),ys) -> c_2() ** Step 1.b:4: SimplifyRHS WORST_CASE(?,O(n^2)) + Considered Problem: - Strict DPs: app#(Cons(x,xs),ys) -> c_1(app#(xs,ys)) part#(x,Nil(),xs1,xs2) -> c_5(app#(xs1,xs2)) part#(x',Cons(x,xs),xs1,xs2) -> c_6(part[Ite]#(>(x',x),x',Cons(x,xs),xs1,xs2),>#(x',x)) qs#(x',Cons(x,xs)) -> c_7(app#(Cons(x,Nil()),Cons(x',quicksort(xs))),quicksort#(xs)) quicksort#(Cons(x,Cons(x',xs))) -> c_8(qs#(x,part(x,Cons(x',xs),Nil(),Nil())) ,part#(x,Cons(x',xs),Nil(),Nil())) - Weak DPs: part[False][Ite]#(False(),x',Cons(x,xs),xs1,xs2) -> c_17(part#(x',xs,xs1,xs2)) part[False][Ite]#(True(),x',Cons(x,xs),xs1,xs2) -> c_18(part#(x',xs,xs1,Cons(x,xs2))) part[Ite]#(False(),x',Cons(x,xs),xs1,xs2) -> c_19(part[False][Ite]#(<(x',x),x',Cons(x,xs),xs1,xs2),<#(x',x)) part[Ite]#(True(),x',Cons(x,xs),xs1,xs2) -> c_20(part#(x',xs,Cons(x,xs1),xs2)) - Weak TRS: <(x,0()) -> False() <(0(),S(y)) -> True() <(S(x),S(y)) -> <(x,y) >(0(),y) -> False() >(S(x),0()) -> True() >(S(x),S(y)) -> >(x,y) app(Cons(x,xs),ys) -> Cons(x,app(xs,ys)) app(Nil(),ys) -> ys notEmpty(Cons(x,xs)) -> True() notEmpty(Nil()) -> False() part(x,Nil(),xs1,xs2) -> app(xs1,xs2) part(x',Cons(x,xs),xs1,xs2) -> part[Ite](>(x',x),x',Cons(x,xs),xs1,xs2) part[False][Ite](False(),x',Cons(x,xs),xs1,xs2) -> part(x',xs,xs1,xs2) part[False][Ite](True(),x',Cons(x,xs),xs1,xs2) -> part(x',xs,xs1,Cons(x,xs2)) part[Ite](False(),x',Cons(x,xs),xs1,xs2) -> part[False][Ite](<(x',x),x',Cons(x,xs),xs1,xs2) part[Ite](True(),x',Cons(x,xs),xs1,xs2) -> part(x',xs,Cons(x,xs1),xs2) qs(x',Cons(x,xs)) -> app(Cons(x,Nil()),Cons(x',quicksort(xs))) quicksort(Cons(x,Cons(x',xs))) -> qs(x,part(x,Cons(x',xs),Nil(),Nil())) quicksort(Cons(x,Nil())) -> Cons(x,Nil()) quicksort(Nil()) -> Nil() - Signature: {/2,app/2,notEmpty/1,part/4,part[False][Ite]/5,part[Ite]/5,qs/2,quicksort/1,<#/2,>#/2,app#/2 ,notEmpty#/1,part#/4,part[False][Ite]#/5,part[Ite]#/5,qs#/2,quicksort#/1} / {0/0,Cons/2,False/0,Nil/0,S/1 ,True/0,c_1/1,c_2/0,c_3/0,c_4/0,c_5/1,c_6/2,c_7/2,c_8/2,c_9/0,c_10/0,c_11/0,c_12/0,c_13/1,c_14/0,c_15/0 ,c_16/1,c_17/1,c_18/1,c_19/2,c_20/1} - Obligation: innermost runtime complexity wrt. defined symbols {<#,>#,app#,notEmpty#,part#,part[False][Ite]#,part[Ite]# ,qs#,quicksort#} and constructors {0,Cons,False,Nil,S,True} + Applied Processor: SimplifyRHS + Details: Consider the dependency graph 1:S:app#(Cons(x,xs),ys) -> c_1(app#(xs,ys)) -->_1 app#(Cons(x,xs),ys) -> c_1(app#(xs,ys)):1 2:S:part#(x,Nil(),xs1,xs2) -> c_5(app#(xs1,xs2)) -->_1 app#(Cons(x,xs),ys) -> c_1(app#(xs,ys)):1 3:S:part#(x',Cons(x,xs),xs1,xs2) -> c_6(part[Ite]#(>(x',x),x',Cons(x,xs),xs1,xs2),>#(x',x)) -->_1 part[Ite]#(True(),x',Cons(x,xs),xs1,xs2) -> c_20(part#(x',xs,Cons(x,xs1),xs2)):18 -->_1 part[Ite]#(False(),x',Cons(x,xs),xs1,xs2) -> c_19(part[False][Ite]#(<(x',x),x',Cons(x,xs),xs1,xs2) ,<#(x',x)):17 4:S:qs#(x',Cons(x,xs)) -> c_7(app#(Cons(x,Nil()),Cons(x',quicksort(xs))),quicksort#(xs)) -->_2 quicksort#(Cons(x,Cons(x',xs))) -> c_8(qs#(x,part(x,Cons(x',xs),Nil(),Nil())) ,part#(x,Cons(x',xs),Nil(),Nil())):5 -->_1 app#(Cons(x,xs),ys) -> c_1(app#(xs,ys)):1 5:S:quicksort#(Cons(x,Cons(x',xs))) -> c_8(qs#(x,part(x,Cons(x',xs),Nil(),Nil())) ,part#(x,Cons(x',xs),Nil(),Nil())) -->_1 qs#(x',Cons(x,xs)) -> c_7(app#(Cons(x,Nil()),Cons(x',quicksort(xs))),quicksort#(xs)):4 -->_2 part#(x',Cons(x,xs),xs1,xs2) -> c_6(part[Ite]#(>(x',x),x',Cons(x,xs),xs1,xs2),>#(x',x)):3 15:W:part[False][Ite]#(False(),x',Cons(x,xs),xs1,xs2) -> c_17(part#(x',xs,xs1,xs2)) -->_1 part#(x',Cons(x,xs),xs1,xs2) -> c_6(part[Ite]#(>(x',x),x',Cons(x,xs),xs1,xs2),>#(x',x)):3 -->_1 part#(x,Nil(),xs1,xs2) -> c_5(app#(xs1,xs2)):2 16:W:part[False][Ite]#(True(),x',Cons(x,xs),xs1,xs2) -> c_18(part#(x',xs,xs1,Cons(x,xs2))) -->_1 part#(x',Cons(x,xs),xs1,xs2) -> c_6(part[Ite]#(>(x',x),x',Cons(x,xs),xs1,xs2),>#(x',x)):3 -->_1 part#(x,Nil(),xs1,xs2) -> c_5(app#(xs1,xs2)):2 17:W:part[Ite]#(False(),x',Cons(x,xs),xs1,xs2) -> c_19(part[False][Ite]#(<(x',x),x',Cons(x,xs),xs1,xs2) ,<#(x',x)) -->_1 part[False][Ite]#(True(),x',Cons(x,xs),xs1,xs2) -> c_18(part#(x',xs,xs1,Cons(x,xs2))):16 -->_1 part[False][Ite]#(False(),x',Cons(x,xs),xs1,xs2) -> c_17(part#(x',xs,xs1,xs2)):15 18:W:part[Ite]#(True(),x',Cons(x,xs),xs1,xs2) -> c_20(part#(x',xs,Cons(x,xs1),xs2)) -->_1 part#(x',Cons(x,xs),xs1,xs2) -> c_6(part[Ite]#(>(x',x),x',Cons(x,xs),xs1,xs2),>#(x',x)):3 -->_1 part#(x,Nil(),xs1,xs2) -> c_5(app#(xs1,xs2)):2 Due to missing edges in the depndency graph, the right-hand sides of following rules could be simplified: part#(x',Cons(x,xs),xs1,xs2) -> c_6(part[Ite]#(>(x',x),x',Cons(x,xs),xs1,xs2)) part[Ite]#(False(),x',Cons(x,xs),xs1,xs2) -> c_19(part[False][Ite]#(<(x',x),x',Cons(x,xs),xs1,xs2)) ** Step 1.b:5: UsableRules WORST_CASE(?,O(n^2)) + Considered Problem: - Strict DPs: app#(Cons(x,xs),ys) -> c_1(app#(xs,ys)) part#(x,Nil(),xs1,xs2) -> c_5(app#(xs1,xs2)) part#(x',Cons(x,xs),xs1,xs2) -> c_6(part[Ite]#(>(x',x),x',Cons(x,xs),xs1,xs2)) qs#(x',Cons(x,xs)) -> c_7(app#(Cons(x,Nil()),Cons(x',quicksort(xs))),quicksort#(xs)) quicksort#(Cons(x,Cons(x',xs))) -> c_8(qs#(x,part(x,Cons(x',xs),Nil(),Nil())) ,part#(x,Cons(x',xs),Nil(),Nil())) - Weak DPs: part[False][Ite]#(False(),x',Cons(x,xs),xs1,xs2) -> c_17(part#(x',xs,xs1,xs2)) part[False][Ite]#(True(),x',Cons(x,xs),xs1,xs2) -> c_18(part#(x',xs,xs1,Cons(x,xs2))) part[Ite]#(False(),x',Cons(x,xs),xs1,xs2) -> c_19(part[False][Ite]#(<(x',x),x',Cons(x,xs),xs1,xs2)) part[Ite]#(True(),x',Cons(x,xs),xs1,xs2) -> c_20(part#(x',xs,Cons(x,xs1),xs2)) - Weak TRS: <(x,0()) -> False() <(0(),S(y)) -> True() <(S(x),S(y)) -> <(x,y) >(0(),y) -> False() >(S(x),0()) -> True() >(S(x),S(y)) -> >(x,y) app(Cons(x,xs),ys) -> Cons(x,app(xs,ys)) app(Nil(),ys) -> ys notEmpty(Cons(x,xs)) -> True() notEmpty(Nil()) -> False() part(x,Nil(),xs1,xs2) -> app(xs1,xs2) part(x',Cons(x,xs),xs1,xs2) -> part[Ite](>(x',x),x',Cons(x,xs),xs1,xs2) part[False][Ite](False(),x',Cons(x,xs),xs1,xs2) -> part(x',xs,xs1,xs2) part[False][Ite](True(),x',Cons(x,xs),xs1,xs2) -> part(x',xs,xs1,Cons(x,xs2)) part[Ite](False(),x',Cons(x,xs),xs1,xs2) -> part[False][Ite](<(x',x),x',Cons(x,xs),xs1,xs2) part[Ite](True(),x',Cons(x,xs),xs1,xs2) -> part(x',xs,Cons(x,xs1),xs2) qs(x',Cons(x,xs)) -> app(Cons(x,Nil()),Cons(x',quicksort(xs))) quicksort(Cons(x,Cons(x',xs))) -> qs(x,part(x,Cons(x',xs),Nil(),Nil())) quicksort(Cons(x,Nil())) -> Cons(x,Nil()) quicksort(Nil()) -> Nil() - Signature: {/2,app/2,notEmpty/1,part/4,part[False][Ite]/5,part[Ite]/5,qs/2,quicksort/1,<#/2,>#/2,app#/2 ,notEmpty#/1,part#/4,part[False][Ite]#/5,part[Ite]#/5,qs#/2,quicksort#/1} / {0/0,Cons/2,False/0,Nil/0,S/1 ,True/0,c_1/1,c_2/0,c_3/0,c_4/0,c_5/1,c_6/1,c_7/2,c_8/2,c_9/0,c_10/0,c_11/0,c_12/0,c_13/1,c_14/0,c_15/0 ,c_16/1,c_17/1,c_18/1,c_19/1,c_20/1} - Obligation: innermost runtime complexity wrt. defined symbols {<#,>#,app#,notEmpty#,part#,part[False][Ite]#,part[Ite]# ,qs#,quicksort#} and constructors {0,Cons,False,Nil,S,True} + Applied Processor: UsableRules + Details: We replace rewrite rules by usable rules: <(x,0()) -> False() <(0(),S(y)) -> True() <(S(x),S(y)) -> <(x,y) >(0(),y) -> False() >(S(x),0()) -> True() >(S(x),S(y)) -> >(x,y) app(Cons(x,xs),ys) -> Cons(x,app(xs,ys)) app(Nil(),ys) -> ys part(x,Nil(),xs1,xs2) -> app(xs1,xs2) part(x',Cons(x,xs),xs1,xs2) -> part[Ite](>(x',x),x',Cons(x,xs),xs1,xs2) part[False][Ite](False(),x',Cons(x,xs),xs1,xs2) -> part(x',xs,xs1,xs2) part[False][Ite](True(),x',Cons(x,xs),xs1,xs2) -> part(x',xs,xs1,Cons(x,xs2)) part[Ite](False(),x',Cons(x,xs),xs1,xs2) -> part[False][Ite](<(x',x),x',Cons(x,xs),xs1,xs2) part[Ite](True(),x',Cons(x,xs),xs1,xs2) -> part(x',xs,Cons(x,xs1),xs2) qs(x',Cons(x,xs)) -> app(Cons(x,Nil()),Cons(x',quicksort(xs))) quicksort(Cons(x,Cons(x',xs))) -> qs(x,part(x,Cons(x',xs),Nil(),Nil())) quicksort(Cons(x,Nil())) -> Cons(x,Nil()) quicksort(Nil()) -> Nil() app#(Cons(x,xs),ys) -> c_1(app#(xs,ys)) part#(x,Nil(),xs1,xs2) -> c_5(app#(xs1,xs2)) part#(x',Cons(x,xs),xs1,xs2) -> c_6(part[Ite]#(>(x',x),x',Cons(x,xs),xs1,xs2)) part[False][Ite]#(False(),x',Cons(x,xs),xs1,xs2) -> c_17(part#(x',xs,xs1,xs2)) part[False][Ite]#(True(),x',Cons(x,xs),xs1,xs2) -> c_18(part#(x',xs,xs1,Cons(x,xs2))) part[Ite]#(False(),x',Cons(x,xs),xs1,xs2) -> c_19(part[False][Ite]#(<(x',x),x',Cons(x,xs),xs1,xs2)) part[Ite]#(True(),x',Cons(x,xs),xs1,xs2) -> c_20(part#(x',xs,Cons(x,xs1),xs2)) qs#(x',Cons(x,xs)) -> c_7(app#(Cons(x,Nil()),Cons(x',quicksort(xs))),quicksort#(xs)) quicksort#(Cons(x,Cons(x',xs))) -> c_8(qs#(x,part(x,Cons(x',xs),Nil(),Nil())) ,part#(x,Cons(x',xs),Nil(),Nil())) ** Step 1.b:6: DecomposeDG WORST_CASE(?,O(n^2)) + Considered Problem: - Strict DPs: app#(Cons(x,xs),ys) -> c_1(app#(xs,ys)) part#(x,Nil(),xs1,xs2) -> c_5(app#(xs1,xs2)) part#(x',Cons(x,xs),xs1,xs2) -> c_6(part[Ite]#(>(x',x),x',Cons(x,xs),xs1,xs2)) qs#(x',Cons(x,xs)) -> c_7(app#(Cons(x,Nil()),Cons(x',quicksort(xs))),quicksort#(xs)) quicksort#(Cons(x,Cons(x',xs))) -> c_8(qs#(x,part(x,Cons(x',xs),Nil(),Nil())) ,part#(x,Cons(x',xs),Nil(),Nil())) - Weak DPs: part[False][Ite]#(False(),x',Cons(x,xs),xs1,xs2) -> c_17(part#(x',xs,xs1,xs2)) part[False][Ite]#(True(),x',Cons(x,xs),xs1,xs2) -> c_18(part#(x',xs,xs1,Cons(x,xs2))) part[Ite]#(False(),x',Cons(x,xs),xs1,xs2) -> c_19(part[False][Ite]#(<(x',x),x',Cons(x,xs),xs1,xs2)) part[Ite]#(True(),x',Cons(x,xs),xs1,xs2) -> c_20(part#(x',xs,Cons(x,xs1),xs2)) - Weak TRS: <(x,0()) -> False() <(0(),S(y)) -> True() <(S(x),S(y)) -> <(x,y) >(0(),y) -> False() >(S(x),0()) -> True() >(S(x),S(y)) -> >(x,y) app(Cons(x,xs),ys) -> Cons(x,app(xs,ys)) app(Nil(),ys) -> ys part(x,Nil(),xs1,xs2) -> app(xs1,xs2) part(x',Cons(x,xs),xs1,xs2) -> part[Ite](>(x',x),x',Cons(x,xs),xs1,xs2) part[False][Ite](False(),x',Cons(x,xs),xs1,xs2) -> part(x',xs,xs1,xs2) part[False][Ite](True(),x',Cons(x,xs),xs1,xs2) -> part(x',xs,xs1,Cons(x,xs2)) part[Ite](False(),x',Cons(x,xs),xs1,xs2) -> part[False][Ite](<(x',x),x',Cons(x,xs),xs1,xs2) part[Ite](True(),x',Cons(x,xs),xs1,xs2) -> part(x',xs,Cons(x,xs1),xs2) qs(x',Cons(x,xs)) -> app(Cons(x,Nil()),Cons(x',quicksort(xs))) quicksort(Cons(x,Cons(x',xs))) -> qs(x,part(x,Cons(x',xs),Nil(),Nil())) quicksort(Cons(x,Nil())) -> Cons(x,Nil()) quicksort(Nil()) -> Nil() - Signature: {/2,app/2,notEmpty/1,part/4,part[False][Ite]/5,part[Ite]/5,qs/2,quicksort/1,<#/2,>#/2,app#/2 ,notEmpty#/1,part#/4,part[False][Ite]#/5,part[Ite]#/5,qs#/2,quicksort#/1} / {0/0,Cons/2,False/0,Nil/0,S/1 ,True/0,c_1/1,c_2/0,c_3/0,c_4/0,c_5/1,c_6/1,c_7/2,c_8/2,c_9/0,c_10/0,c_11/0,c_12/0,c_13/1,c_14/0,c_15/0 ,c_16/1,c_17/1,c_18/1,c_19/1,c_20/1} - Obligation: innermost runtime complexity wrt. defined symbols {<#,>#,app#,notEmpty#,part#,part[False][Ite]#,part[Ite]# ,qs#,quicksort#} and constructors {0,Cons,False,Nil,S,True} + Applied Processor: DecomposeDG {onSelection = all below first cut in WDG, onUpper = Nothing, onLower = Nothing} + Details: We decompose the input problem according to the dependency graph into the upper component qs#(x',Cons(x,xs)) -> c_7(app#(Cons(x,Nil()),Cons(x',quicksort(xs))),quicksort#(xs)) quicksort#(Cons(x,Cons(x',xs))) -> c_8(qs#(x,part(x,Cons(x',xs),Nil(),Nil())) ,part#(x,Cons(x',xs),Nil(),Nil())) and a lower component app#(Cons(x,xs),ys) -> c_1(app#(xs,ys)) part#(x,Nil(),xs1,xs2) -> c_5(app#(xs1,xs2)) part#(x',Cons(x,xs),xs1,xs2) -> c_6(part[Ite]#(>(x',x),x',Cons(x,xs),xs1,xs2)) part[False][Ite]#(False(),x',Cons(x,xs),xs1,xs2) -> c_17(part#(x',xs,xs1,xs2)) part[False][Ite]#(True(),x',Cons(x,xs),xs1,xs2) -> c_18(part#(x',xs,xs1,Cons(x,xs2))) part[Ite]#(False(),x',Cons(x,xs),xs1,xs2) -> c_19(part[False][Ite]#(<(x',x),x',Cons(x,xs),xs1,xs2)) part[Ite]#(True(),x',Cons(x,xs),xs1,xs2) -> c_20(part#(x',xs,Cons(x,xs1),xs2)) Further, following extension rules are added to the lower component. qs#(x',Cons(x,xs)) -> app#(Cons(x,Nil()),Cons(x',quicksort(xs))) qs#(x',Cons(x,xs)) -> quicksort#(xs) quicksort#(Cons(x,Cons(x',xs))) -> part#(x,Cons(x',xs),Nil(),Nil()) quicksort#(Cons(x,Cons(x',xs))) -> qs#(x,part(x,Cons(x',xs),Nil(),Nil())) *** Step 1.b:6.a:1: SimplifyRHS WORST_CASE(?,O(n^1)) + Considered Problem: - Strict DPs: qs#(x',Cons(x,xs)) -> c_7(app#(Cons(x,Nil()),Cons(x',quicksort(xs))),quicksort#(xs)) quicksort#(Cons(x,Cons(x',xs))) -> c_8(qs#(x,part(x,Cons(x',xs),Nil(),Nil())) ,part#(x,Cons(x',xs),Nil(),Nil())) - Weak TRS: <(x,0()) -> False() <(0(),S(y)) -> True() <(S(x),S(y)) -> <(x,y) >(0(),y) -> False() >(S(x),0()) -> True() >(S(x),S(y)) -> >(x,y) app(Cons(x,xs),ys) -> Cons(x,app(xs,ys)) app(Nil(),ys) -> ys part(x,Nil(),xs1,xs2) -> app(xs1,xs2) part(x',Cons(x,xs),xs1,xs2) -> part[Ite](>(x',x),x',Cons(x,xs),xs1,xs2) part[False][Ite](False(),x',Cons(x,xs),xs1,xs2) -> part(x',xs,xs1,xs2) part[False][Ite](True(),x',Cons(x,xs),xs1,xs2) -> part(x',xs,xs1,Cons(x,xs2)) part[Ite](False(),x',Cons(x,xs),xs1,xs2) -> part[False][Ite](<(x',x),x',Cons(x,xs),xs1,xs2) part[Ite](True(),x',Cons(x,xs),xs1,xs2) -> part(x',xs,Cons(x,xs1),xs2) qs(x',Cons(x,xs)) -> app(Cons(x,Nil()),Cons(x',quicksort(xs))) quicksort(Cons(x,Cons(x',xs))) -> qs(x,part(x,Cons(x',xs),Nil(),Nil())) quicksort(Cons(x,Nil())) -> Cons(x,Nil()) quicksort(Nil()) -> Nil() - Signature: {/2,app/2,notEmpty/1,part/4,part[False][Ite]/5,part[Ite]/5,qs/2,quicksort/1,<#/2,>#/2,app#/2 ,notEmpty#/1,part#/4,part[False][Ite]#/5,part[Ite]#/5,qs#/2,quicksort#/1} / {0/0,Cons/2,False/0,Nil/0,S/1 ,True/0,c_1/1,c_2/0,c_3/0,c_4/0,c_5/1,c_6/1,c_7/2,c_8/2,c_9/0,c_10/0,c_11/0,c_12/0,c_13/1,c_14/0,c_15/0 ,c_16/1,c_17/1,c_18/1,c_19/1,c_20/1} - Obligation: innermost runtime complexity wrt. defined symbols {<#,>#,app#,notEmpty#,part#,part[False][Ite]#,part[Ite]# ,qs#,quicksort#} and constructors {0,Cons,False,Nil,S,True} + Applied Processor: SimplifyRHS + Details: Consider the dependency graph 1:S:qs#(x',Cons(x,xs)) -> c_7(app#(Cons(x,Nil()),Cons(x',quicksort(xs))),quicksort#(xs)) -->_2 quicksort#(Cons(x,Cons(x',xs))) -> c_8(qs#(x,part(x,Cons(x',xs),Nil(),Nil())) ,part#(x,Cons(x',xs),Nil(),Nil())):2 2:S:quicksort#(Cons(x,Cons(x',xs))) -> c_8(qs#(x,part(x,Cons(x',xs),Nil(),Nil())) ,part#(x,Cons(x',xs),Nil(),Nil())) -->_1 qs#(x',Cons(x,xs)) -> c_7(app#(Cons(x,Nil()),Cons(x',quicksort(xs))),quicksort#(xs)):1 Due to missing edges in the depndency graph, the right-hand sides of following rules could be simplified: qs#(x',Cons(x,xs)) -> c_7(quicksort#(xs)) quicksort#(Cons(x,Cons(x',xs))) -> c_8(qs#(x,part(x,Cons(x',xs),Nil(),Nil()))) *** Step 1.b:6.a:2: UsableRules WORST_CASE(?,O(n^1)) + Considered Problem: - Strict DPs: qs#(x',Cons(x,xs)) -> c_7(quicksort#(xs)) quicksort#(Cons(x,Cons(x',xs))) -> c_8(qs#(x,part(x,Cons(x',xs),Nil(),Nil()))) - Weak TRS: <(x,0()) -> False() <(0(),S(y)) -> True() <(S(x),S(y)) -> <(x,y) >(0(),y) -> False() >(S(x),0()) -> True() >(S(x),S(y)) -> >(x,y) app(Cons(x,xs),ys) -> Cons(x,app(xs,ys)) app(Nil(),ys) -> ys part(x,Nil(),xs1,xs2) -> app(xs1,xs2) part(x',Cons(x,xs),xs1,xs2) -> part[Ite](>(x',x),x',Cons(x,xs),xs1,xs2) part[False][Ite](False(),x',Cons(x,xs),xs1,xs2) -> part(x',xs,xs1,xs2) part[False][Ite](True(),x',Cons(x,xs),xs1,xs2) -> part(x',xs,xs1,Cons(x,xs2)) part[Ite](False(),x',Cons(x,xs),xs1,xs2) -> part[False][Ite](<(x',x),x',Cons(x,xs),xs1,xs2) part[Ite](True(),x',Cons(x,xs),xs1,xs2) -> part(x',xs,Cons(x,xs1),xs2) qs(x',Cons(x,xs)) -> app(Cons(x,Nil()),Cons(x',quicksort(xs))) quicksort(Cons(x,Cons(x',xs))) -> qs(x,part(x,Cons(x',xs),Nil(),Nil())) quicksort(Cons(x,Nil())) -> Cons(x,Nil()) quicksort(Nil()) -> Nil() - Signature: {/2,app/2,notEmpty/1,part/4,part[False][Ite]/5,part[Ite]/5,qs/2,quicksort/1,<#/2,>#/2,app#/2 ,notEmpty#/1,part#/4,part[False][Ite]#/5,part[Ite]#/5,qs#/2,quicksort#/1} / {0/0,Cons/2,False/0,Nil/0,S/1 ,True/0,c_1/1,c_2/0,c_3/0,c_4/0,c_5/1,c_6/1,c_7/1,c_8/1,c_9/0,c_10/0,c_11/0,c_12/0,c_13/1,c_14/0,c_15/0 ,c_16/1,c_17/1,c_18/1,c_19/1,c_20/1} - Obligation: innermost runtime complexity wrt. defined symbols {<#,>#,app#,notEmpty#,part#,part[False][Ite]#,part[Ite]# ,qs#,quicksort#} and constructors {0,Cons,False,Nil,S,True} + Applied Processor: UsableRules + Details: We replace rewrite rules by usable rules: <(x,0()) -> False() <(0(),S(y)) -> True() <(S(x),S(y)) -> <(x,y) >(0(),y) -> False() >(S(x),0()) -> True() >(S(x),S(y)) -> >(x,y) app(Cons(x,xs),ys) -> Cons(x,app(xs,ys)) app(Nil(),ys) -> ys part(x,Nil(),xs1,xs2) -> app(xs1,xs2) part(x',Cons(x,xs),xs1,xs2) -> part[Ite](>(x',x),x',Cons(x,xs),xs1,xs2) part[False][Ite](False(),x',Cons(x,xs),xs1,xs2) -> part(x',xs,xs1,xs2) part[False][Ite](True(),x',Cons(x,xs),xs1,xs2) -> part(x',xs,xs1,Cons(x,xs2)) part[Ite](False(),x',Cons(x,xs),xs1,xs2) -> part[False][Ite](<(x',x),x',Cons(x,xs),xs1,xs2) part[Ite](True(),x',Cons(x,xs),xs1,xs2) -> part(x',xs,Cons(x,xs1),xs2) qs#(x',Cons(x,xs)) -> c_7(quicksort#(xs)) quicksort#(Cons(x,Cons(x',xs))) -> c_8(qs#(x,part(x,Cons(x',xs),Nil(),Nil()))) *** Step 1.b:6.a:3: WeightGap WORST_CASE(?,O(n^1)) + Considered Problem: - Strict DPs: qs#(x',Cons(x,xs)) -> c_7(quicksort#(xs)) quicksort#(Cons(x,Cons(x',xs))) -> c_8(qs#(x,part(x,Cons(x',xs),Nil(),Nil()))) - Weak TRS: <(x,0()) -> False() <(0(),S(y)) -> True() <(S(x),S(y)) -> <(x,y) >(0(),y) -> False() >(S(x),0()) -> True() >(S(x),S(y)) -> >(x,y) app(Cons(x,xs),ys) -> Cons(x,app(xs,ys)) app(Nil(),ys) -> ys part(x,Nil(),xs1,xs2) -> app(xs1,xs2) part(x',Cons(x,xs),xs1,xs2) -> part[Ite](>(x',x),x',Cons(x,xs),xs1,xs2) part[False][Ite](False(),x',Cons(x,xs),xs1,xs2) -> part(x',xs,xs1,xs2) part[False][Ite](True(),x',Cons(x,xs),xs1,xs2) -> part(x',xs,xs1,Cons(x,xs2)) part[Ite](False(),x',Cons(x,xs),xs1,xs2) -> part[False][Ite](<(x',x),x',Cons(x,xs),xs1,xs2) part[Ite](True(),x',Cons(x,xs),xs1,xs2) -> part(x',xs,Cons(x,xs1),xs2) - Signature: {/2,app/2,notEmpty/1,part/4,part[False][Ite]/5,part[Ite]/5,qs/2,quicksort/1,<#/2,>#/2,app#/2 ,notEmpty#/1,part#/4,part[False][Ite]#/5,part[Ite]#/5,qs#/2,quicksort#/1} / {0/0,Cons/2,False/0,Nil/0,S/1 ,True/0,c_1/1,c_2/0,c_3/0,c_4/0,c_5/1,c_6/1,c_7/1,c_8/1,c_9/0,c_10/0,c_11/0,c_12/0,c_13/1,c_14/0,c_15/0 ,c_16/1,c_17/1,c_18/1,c_19/1,c_20/1} - Obligation: innermost runtime complexity wrt. defined symbols {<#,>#,app#,notEmpty#,part#,part[False][Ite]#,part[Ite]# ,qs#,quicksort#} and constructors {0,Cons,False,Nil,S,True} + Applied Processor: WeightGap {wgDimension = 1, wgDegree = 1, wgKind = Algebraic, wgUArgs = UArgs, wgOn = WgOnAny} + Details: The weightgap principle applies using the following constant growth matrix-interpretation: We apply a matrix interpretation of kind constructor based matrix interpretation: The following argument positions are considered usable: uargs(Cons) = {2}, uargs(part[False][Ite]) = {1}, uargs(part[Ite]) = {1}, uargs(qs#) = {2}, uargs(c_7) = {1}, uargs(c_8) = {1} Following symbols are considered usable: all TcT has computed the following interpretation: p(0) = [0] p(<) = [1] p(>) = [1] p(Cons) = [1] x2 + [0] p(False) = [1] p(Nil) = [2] p(S) = [0] p(True) = [1] p(app) = [1] x2 + [1] p(notEmpty) = [0] p(part) = [2] x4 + [3] p(part[False][Ite]) = [1] x1 + [2] x5 + [2] p(part[Ite]) = [1] x1 + [2] x5 + [2] p(qs) = [0] p(quicksort) = [2] x1 + [2] p(<#) = [2] x1 + [1] x2 + [1] p(>#) = [1] x1 + [2] p(app#) = [1] x1 + [4] x2 + [0] p(notEmpty#) = [2] p(part#) = [2] x1 + [1] x4 + [2] p(part[False][Ite]#) = [2] x3 + [2] x5 + [0] p(part[Ite]#) = [4] x2 + [1] x5 + [0] p(qs#) = [1] x2 + [3] p(quicksort#) = [1] x1 + [0] p(c_1) = [1] x1 + [0] p(c_2) = [4] p(c_3) = [0] p(c_4) = [0] p(c_5) = [2] p(c_6) = [1] x1 + [2] p(c_7) = [1] x1 + [2] p(c_8) = [1] x1 + [0] p(c_9) = [2] p(c_10) = [0] p(c_11) = [1] p(c_12) = [0] p(c_13) = [1] x1 + [0] p(c_14) = [1] p(c_15) = [0] p(c_16) = [1] p(c_17) = [1] p(c_18) = [4] p(c_19) = [1] x1 + [4] p(c_20) = [1] x1 + [2] Following rules are strictly oriented: qs#(x',Cons(x,xs)) = [1] xs + [3] > [1] xs + [2] = c_7(quicksort#(xs)) Following rules are (at-least) weakly oriented: quicksort#(Cons(x,Cons(x',xs))) = [1] xs + [0] >= [10] = c_8(qs#(x,part(x,Cons(x',xs),Nil(),Nil()))) <(x,0()) = [1] >= [1] = False() <(0(),S(y)) = [1] >= [1] = True() <(S(x),S(y)) = [1] >= [1] = <(x,y) >(0(),y) = [1] >= [1] = False() >(S(x),0()) = [1] >= [1] = True() >(S(x),S(y)) = [1] >= [1] = >(x,y) app(Cons(x,xs),ys) = [1] ys + [1] >= [1] ys + [1] = Cons(x,app(xs,ys)) app(Nil(),ys) = [1] ys + [1] >= [1] ys + [0] = ys part(x,Nil(),xs1,xs2) = [2] xs2 + [3] >= [1] xs2 + [1] = app(xs1,xs2) part(x',Cons(x,xs),xs1,xs2) = [2] xs2 + [3] >= [2] xs2 + [3] = part[Ite](>(x',x),x',Cons(x,xs),xs1,xs2) part[False][Ite](False(),x',Cons(x,xs),xs1,xs2) = [2] xs2 + [3] >= [2] xs2 + [3] = part(x',xs,xs1,xs2) part[False][Ite](True(),x',Cons(x,xs),xs1,xs2) = [2] xs2 + [3] >= [2] xs2 + [3] = part(x',xs,xs1,Cons(x,xs2)) part[Ite](False(),x',Cons(x,xs),xs1,xs2) = [2] xs2 + [3] >= [2] xs2 + [3] = part[False][Ite](<(x',x),x',Cons(x,xs),xs1,xs2) part[Ite](True(),x',Cons(x,xs),xs1,xs2) = [2] xs2 + [3] >= [2] xs2 + [3] = part(x',xs,Cons(x,xs1),xs2) Further, it can be verified that all rules not oriented are covered by the weightgap condition. *** Step 1.b:6.a:4: NaturalMI WORST_CASE(?,O(n^1)) + Considered Problem: - Strict DPs: quicksort#(Cons(x,Cons(x',xs))) -> c_8(qs#(x,part(x,Cons(x',xs),Nil(),Nil()))) - Weak DPs: qs#(x',Cons(x,xs)) -> c_7(quicksort#(xs)) - Weak TRS: <(x,0()) -> False() <(0(),S(y)) -> True() <(S(x),S(y)) -> <(x,y) >(0(),y) -> False() >(S(x),0()) -> True() >(S(x),S(y)) -> >(x,y) app(Cons(x,xs),ys) -> Cons(x,app(xs,ys)) app(Nil(),ys) -> ys part(x,Nil(),xs1,xs2) -> app(xs1,xs2) part(x',Cons(x,xs),xs1,xs2) -> part[Ite](>(x',x),x',Cons(x,xs),xs1,xs2) part[False][Ite](False(),x',Cons(x,xs),xs1,xs2) -> part(x',xs,xs1,xs2) part[False][Ite](True(),x',Cons(x,xs),xs1,xs2) -> part(x',xs,xs1,Cons(x,xs2)) part[Ite](False(),x',Cons(x,xs),xs1,xs2) -> part[False][Ite](<(x',x),x',Cons(x,xs),xs1,xs2) part[Ite](True(),x',Cons(x,xs),xs1,xs2) -> part(x',xs,Cons(x,xs1),xs2) - Signature: {/2,app/2,notEmpty/1,part/4,part[False][Ite]/5,part[Ite]/5,qs/2,quicksort/1,<#/2,>#/2,app#/2 ,notEmpty#/1,part#/4,part[False][Ite]#/5,part[Ite]#/5,qs#/2,quicksort#/1} / {0/0,Cons/2,False/0,Nil/0,S/1 ,True/0,c_1/1,c_2/0,c_3/0,c_4/0,c_5/1,c_6/1,c_7/1,c_8/1,c_9/0,c_10/0,c_11/0,c_12/0,c_13/1,c_14/0,c_15/0 ,c_16/1,c_17/1,c_18/1,c_19/1,c_20/1} - Obligation: innermost runtime complexity wrt. defined symbols {<#,>#,app#,notEmpty#,part#,part[False][Ite]#,part[Ite]# ,qs#,quicksort#} and constructors {0,Cons,False,Nil,S,True} + Applied Processor: NaturalMI {miDimension = 1, miDegree = 1, miKind = Algebraic, uargs = UArgs, urules = URules, selector = Just any strict-rules} + Details: We apply a matrix interpretation of kind constructor based matrix interpretation: The following argument positions are considered usable: uargs(c_7) = {1}, uargs(c_8) = {1} Following symbols are considered usable: {app,part,part[False][Ite],part[Ite],<#,>#,app#,notEmpty#,part#,part[False][Ite]#,part[Ite]#,qs# ,quicksort#} TcT has computed the following interpretation: p(0) = [0] p(<) = [4] x1 + [0] p(>) = [0] p(Cons) = [1] x2 + [2] p(False) = [1] p(Nil) = [0] p(S) = [1] x1 + [0] p(True) = [0] p(app) = [1] x1 + [1] x2 + [0] p(notEmpty) = [2] x1 + [0] p(part) = [1] x2 + [1] x3 + [1] x4 + [0] p(part[False][Ite]) = [1] x3 + [1] x4 + [1] x5 + [0] p(part[Ite]) = [1] x3 + [1] x4 + [1] x5 + [0] p(qs) = [1] p(quicksort) = [1] x1 + [4] p(<#) = [1] p(>#) = [0] p(app#) = [1] p(notEmpty#) = [1] x1 + [0] p(part#) = [4] x1 + [1] x2 + [1] p(part[False][Ite]#) = [2] x1 + [0] p(part[Ite]#) = [1] x1 + [1] x2 + [4] x3 + [2] x5 + [1] p(qs#) = [2] x2 + [0] p(quicksort#) = [2] x1 + [4] p(c_1) = [1] p(c_2) = [2] p(c_3) = [1] p(c_4) = [1] p(c_5) = [0] p(c_6) = [2] x1 + [0] p(c_7) = [1] x1 + [0] p(c_8) = [1] x1 + [7] p(c_9) = [1] p(c_10) = [1] p(c_11) = [1] p(c_12) = [0] p(c_13) = [1] x1 + [0] p(c_14) = [4] p(c_15) = [0] p(c_16) = [2] x1 + [0] p(c_17) = [1] p(c_18) = [1] x1 + [1] p(c_19) = [2] x1 + [1] p(c_20) = [1] x1 + [4] Following rules are strictly oriented: quicksort#(Cons(x,Cons(x',xs))) = [2] xs + [12] > [2] xs + [11] = c_8(qs#(x,part(x,Cons(x',xs),Nil(),Nil()))) Following rules are (at-least) weakly oriented: qs#(x',Cons(x,xs)) = [2] xs + [4] >= [2] xs + [4] = c_7(quicksort#(xs)) app(Cons(x,xs),ys) = [1] xs + [1] ys + [2] >= [1] xs + [1] ys + [2] = Cons(x,app(xs,ys)) app(Nil(),ys) = [1] ys + [0] >= [1] ys + [0] = ys part(x,Nil(),xs1,xs2) = [1] xs1 + [1] xs2 + [0] >= [1] xs1 + [1] xs2 + [0] = app(xs1,xs2) part(x',Cons(x,xs),xs1,xs2) = [1] xs + [1] xs1 + [1] xs2 + [2] >= [1] xs + [1] xs1 + [1] xs2 + [2] = part[Ite](>(x',x),x',Cons(x,xs),xs1,xs2) part[False][Ite](False(),x',Cons(x,xs),xs1,xs2) = [1] xs + [1] xs1 + [1] xs2 + [2] >= [1] xs + [1] xs1 + [1] xs2 + [0] = part(x',xs,xs1,xs2) part[False][Ite](True(),x',Cons(x,xs),xs1,xs2) = [1] xs + [1] xs1 + [1] xs2 + [2] >= [1] xs + [1] xs1 + [1] xs2 + [2] = part(x',xs,xs1,Cons(x,xs2)) part[Ite](False(),x',Cons(x,xs),xs1,xs2) = [1] xs + [1] xs1 + [1] xs2 + [2] >= [1] xs + [1] xs1 + [1] xs2 + [2] = part[False][Ite](<(x',x),x',Cons(x,xs),xs1,xs2) part[Ite](True(),x',Cons(x,xs),xs1,xs2) = [1] xs + [1] xs1 + [1] xs2 + [2] >= [1] xs + [1] xs1 + [1] xs2 + [2] = part(x',xs,Cons(x,xs1),xs2) *** Step 1.b:6.a:5: EmptyProcessor WORST_CASE(?,O(1)) + Considered Problem: - Weak DPs: qs#(x',Cons(x,xs)) -> c_7(quicksort#(xs)) quicksort#(Cons(x,Cons(x',xs))) -> c_8(qs#(x,part(x,Cons(x',xs),Nil(),Nil()))) - Weak TRS: <(x,0()) -> False() <(0(),S(y)) -> True() <(S(x),S(y)) -> <(x,y) >(0(),y) -> False() >(S(x),0()) -> True() >(S(x),S(y)) -> >(x,y) app(Cons(x,xs),ys) -> Cons(x,app(xs,ys)) app(Nil(),ys) -> ys part(x,Nil(),xs1,xs2) -> app(xs1,xs2) part(x',Cons(x,xs),xs1,xs2) -> part[Ite](>(x',x),x',Cons(x,xs),xs1,xs2) part[False][Ite](False(),x',Cons(x,xs),xs1,xs2) -> part(x',xs,xs1,xs2) part[False][Ite](True(),x',Cons(x,xs),xs1,xs2) -> part(x',xs,xs1,Cons(x,xs2)) part[Ite](False(),x',Cons(x,xs),xs1,xs2) -> part[False][Ite](<(x',x),x',Cons(x,xs),xs1,xs2) part[Ite](True(),x',Cons(x,xs),xs1,xs2) -> part(x',xs,Cons(x,xs1),xs2) - Signature: {/2,app/2,notEmpty/1,part/4,part[False][Ite]/5,part[Ite]/5,qs/2,quicksort/1,<#/2,>#/2,app#/2 ,notEmpty#/1,part#/4,part[False][Ite]#/5,part[Ite]#/5,qs#/2,quicksort#/1} / {0/0,Cons/2,False/0,Nil/0,S/1 ,True/0,c_1/1,c_2/0,c_3/0,c_4/0,c_5/1,c_6/1,c_7/1,c_8/1,c_9/0,c_10/0,c_11/0,c_12/0,c_13/1,c_14/0,c_15/0 ,c_16/1,c_17/1,c_18/1,c_19/1,c_20/1} - Obligation: innermost runtime complexity wrt. defined symbols {<#,>#,app#,notEmpty#,part#,part[False][Ite]#,part[Ite]# ,qs#,quicksort#} and constructors {0,Cons,False,Nil,S,True} + Applied Processor: EmptyProcessor + Details: The problem is already closed. The intended complexity is O(1). *** Step 1.b:6.b:1: WeightGap WORST_CASE(?,O(n^1)) + Considered Problem: - Strict DPs: app#(Cons(x,xs),ys) -> c_1(app#(xs,ys)) part#(x,Nil(),xs1,xs2) -> c_5(app#(xs1,xs2)) part#(x',Cons(x,xs),xs1,xs2) -> c_6(part[Ite]#(>(x',x),x',Cons(x,xs),xs1,xs2)) - Weak DPs: part[False][Ite]#(False(),x',Cons(x,xs),xs1,xs2) -> c_17(part#(x',xs,xs1,xs2)) part[False][Ite]#(True(),x',Cons(x,xs),xs1,xs2) -> c_18(part#(x',xs,xs1,Cons(x,xs2))) part[Ite]#(False(),x',Cons(x,xs),xs1,xs2) -> c_19(part[False][Ite]#(<(x',x),x',Cons(x,xs),xs1,xs2)) part[Ite]#(True(),x',Cons(x,xs),xs1,xs2) -> c_20(part#(x',xs,Cons(x,xs1),xs2)) qs#(x',Cons(x,xs)) -> app#(Cons(x,Nil()),Cons(x',quicksort(xs))) qs#(x',Cons(x,xs)) -> quicksort#(xs) quicksort#(Cons(x,Cons(x',xs))) -> part#(x,Cons(x',xs),Nil(),Nil()) quicksort#(Cons(x,Cons(x',xs))) -> qs#(x,part(x,Cons(x',xs),Nil(),Nil())) - Weak TRS: <(x,0()) -> False() <(0(),S(y)) -> True() <(S(x),S(y)) -> <(x,y) >(0(),y) -> False() >(S(x),0()) -> True() >(S(x),S(y)) -> >(x,y) app(Cons(x,xs),ys) -> Cons(x,app(xs,ys)) app(Nil(),ys) -> ys part(x,Nil(),xs1,xs2) -> app(xs1,xs2) part(x',Cons(x,xs),xs1,xs2) -> part[Ite](>(x',x),x',Cons(x,xs),xs1,xs2) part[False][Ite](False(),x',Cons(x,xs),xs1,xs2) -> part(x',xs,xs1,xs2) part[False][Ite](True(),x',Cons(x,xs),xs1,xs2) -> part(x',xs,xs1,Cons(x,xs2)) part[Ite](False(),x',Cons(x,xs),xs1,xs2) -> part[False][Ite](<(x',x),x',Cons(x,xs),xs1,xs2) part[Ite](True(),x',Cons(x,xs),xs1,xs2) -> part(x',xs,Cons(x,xs1),xs2) qs(x',Cons(x,xs)) -> app(Cons(x,Nil()),Cons(x',quicksort(xs))) quicksort(Cons(x,Cons(x',xs))) -> qs(x,part(x,Cons(x',xs),Nil(),Nil())) quicksort(Cons(x,Nil())) -> Cons(x,Nil()) quicksort(Nil()) -> Nil() - Signature: {/2,app/2,notEmpty/1,part/4,part[False][Ite]/5,part[Ite]/5,qs/2,quicksort/1,<#/2,>#/2,app#/2 ,notEmpty#/1,part#/4,part[False][Ite]#/5,part[Ite]#/5,qs#/2,quicksort#/1} / {0/0,Cons/2,False/0,Nil/0,S/1 ,True/0,c_1/1,c_2/0,c_3/0,c_4/0,c_5/1,c_6/1,c_7/2,c_8/2,c_9/0,c_10/0,c_11/0,c_12/0,c_13/1,c_14/0,c_15/0 ,c_16/1,c_17/1,c_18/1,c_19/1,c_20/1} - Obligation: innermost runtime complexity wrt. defined symbols {<#,>#,app#,notEmpty#,part#,part[False][Ite]#,part[Ite]# ,qs#,quicksort#} and constructors {0,Cons,False,Nil,S,True} + Applied Processor: WeightGap {wgDimension = 1, wgDegree = 1, wgKind = Algebraic, wgUArgs = UArgs, wgOn = WgOnAny} + Details: The weightgap principle applies using the following constant growth matrix-interpretation: We apply a matrix interpretation of kind constructor based matrix interpretation: The following argument positions are considered usable: uargs(Cons) = {2}, uargs(app) = {2}, uargs(part[False][Ite]) = {1}, uargs(part[Ite]) = {1}, uargs(qs) = {2}, uargs(app#) = {2}, uargs(part[False][Ite]#) = {1}, uargs(part[Ite]#) = {1}, uargs(qs#) = {2}, uargs(c_1) = {1}, uargs(c_5) = {1}, uargs(c_6) = {1}, uargs(c_17) = {1}, uargs(c_18) = {1}, uargs(c_19) = {1}, uargs(c_20) = {1} Following symbols are considered usable: all TcT has computed the following interpretation: p(0) = [0] p(<) = [0] p(>) = [0] p(Cons) = [1] x2 + [0] p(False) = [0] p(Nil) = [0] p(S) = [1] x1 + [0] p(True) = [0] p(app) = [1] x2 + [0] p(notEmpty) = [1] x1 + [4] p(part) = [1] x4 + [0] p(part[False][Ite]) = [1] x1 + [1] x5 + [0] p(part[Ite]) = [1] x1 + [1] x5 + [0] p(qs) = [1] x2 + [0] p(quicksort) = [1] x1 + [0] p(<#) = [4] x1 + [2] p(>#) = [1] x1 + [1] p(app#) = [1] x2 + [0] p(notEmpty#) = [1] x1 + [2] p(part#) = [1] x4 + [2] p(part[False][Ite]#) = [1] x1 + [1] x5 + [2] p(part[Ite]#) = [1] x1 + [1] x5 + [3] p(qs#) = [1] x2 + [4] p(quicksort#) = [4] p(c_1) = [1] x1 + [4] p(c_2) = [2] p(c_3) = [0] p(c_4) = [0] p(c_5) = [1] x1 + [0] p(c_6) = [1] x1 + [4] p(c_7) = [0] p(c_8) = [1] x1 + [1] p(c_9) = [0] p(c_10) = [1] p(c_11) = [1] p(c_12) = [1] p(c_13) = [2] x1 + [0] p(c_14) = [1] p(c_15) = [1] p(c_16) = [4] x1 + [2] p(c_17) = [1] x1 + [0] p(c_18) = [1] x1 + [0] p(c_19) = [1] x1 + [1] p(c_20) = [1] x1 + [1] Following rules are strictly oriented: part#(x,Nil(),xs1,xs2) = [1] xs2 + [2] > [1] xs2 + [0] = c_5(app#(xs1,xs2)) Following rules are (at-least) weakly oriented: app#(Cons(x,xs),ys) = [1] ys + [0] >= [1] ys + [4] = c_1(app#(xs,ys)) part#(x',Cons(x,xs),xs1,xs2) = [1] xs2 + [2] >= [1] xs2 + [7] = c_6(part[Ite]#(>(x',x),x',Cons(x,xs),xs1,xs2)) part[False][Ite]#(False(),x',Cons(x,xs),xs1,xs2) = [1] xs2 + [2] >= [1] xs2 + [2] = c_17(part#(x',xs,xs1,xs2)) part[False][Ite]#(True(),x',Cons(x,xs),xs1,xs2) = [1] xs2 + [2] >= [1] xs2 + [2] = c_18(part#(x',xs,xs1,Cons(x,xs2))) part[Ite]#(False(),x',Cons(x,xs),xs1,xs2) = [1] xs2 + [3] >= [1] xs2 + [3] = c_19(part[False][Ite]#(<(x',x),x',Cons(x,xs),xs1,xs2)) part[Ite]#(True(),x',Cons(x,xs),xs1,xs2) = [1] xs2 + [3] >= [1] xs2 + [3] = c_20(part#(x',xs,Cons(x,xs1),xs2)) qs#(x',Cons(x,xs)) = [1] xs + [4] >= [1] xs + [0] = app#(Cons(x,Nil()),Cons(x',quicksort(xs))) qs#(x',Cons(x,xs)) = [1] xs + [4] >= [4] = quicksort#(xs) quicksort#(Cons(x,Cons(x',xs))) = [4] >= [2] = part#(x,Cons(x',xs),Nil(),Nil()) quicksort#(Cons(x,Cons(x',xs))) = [4] >= [4] = qs#(x,part(x,Cons(x',xs),Nil(),Nil())) <(x,0()) = [0] >= [0] = False() <(0(),S(y)) = [0] >= [0] = True() <(S(x),S(y)) = [0] >= [0] = <(x,y) >(0(),y) = [0] >= [0] = False() >(S(x),0()) = [0] >= [0] = True() >(S(x),S(y)) = [0] >= [0] = >(x,y) app(Cons(x,xs),ys) = [1] ys + [0] >= [1] ys + [0] = Cons(x,app(xs,ys)) app(Nil(),ys) = [1] ys + [0] >= [1] ys + [0] = ys part(x,Nil(),xs1,xs2) = [1] xs2 + [0] >= [1] xs2 + [0] = app(xs1,xs2) part(x',Cons(x,xs),xs1,xs2) = [1] xs2 + [0] >= [1] xs2 + [0] = part[Ite](>(x',x),x',Cons(x,xs),xs1,xs2) part[False][Ite](False(),x',Cons(x,xs),xs1,xs2) = [1] xs2 + [0] >= [1] xs2 + [0] = part(x',xs,xs1,xs2) part[False][Ite](True(),x',Cons(x,xs),xs1,xs2) = [1] xs2 + [0] >= [1] xs2 + [0] = part(x',xs,xs1,Cons(x,xs2)) part[Ite](False(),x',Cons(x,xs),xs1,xs2) = [1] xs2 + [0] >= [1] xs2 + [0] = part[False][Ite](<(x',x),x',Cons(x,xs),xs1,xs2) part[Ite](True(),x',Cons(x,xs),xs1,xs2) = [1] xs2 + [0] >= [1] xs2 + [0] = part(x',xs,Cons(x,xs1),xs2) qs(x',Cons(x,xs)) = [1] xs + [0] >= [1] xs + [0] = app(Cons(x,Nil()),Cons(x',quicksort(xs))) quicksort(Cons(x,Cons(x',xs))) = [1] xs + [0] >= [0] = qs(x,part(x,Cons(x',xs),Nil(),Nil())) quicksort(Cons(x,Nil())) = [0] >= [0] = Cons(x,Nil()) quicksort(Nil()) = [0] >= [0] = Nil() Further, it can be verified that all rules not oriented are covered by the weightgap condition. *** Step 1.b:6.b:2: WeightGap WORST_CASE(?,O(n^1)) + Considered Problem: - Strict DPs: app#(Cons(x,xs),ys) -> c_1(app#(xs,ys)) part#(x',Cons(x,xs),xs1,xs2) -> c_6(part[Ite]#(>(x',x),x',Cons(x,xs),xs1,xs2)) - Weak DPs: part#(x,Nil(),xs1,xs2) -> c_5(app#(xs1,xs2)) part[False][Ite]#(False(),x',Cons(x,xs),xs1,xs2) -> c_17(part#(x',xs,xs1,xs2)) part[False][Ite]#(True(),x',Cons(x,xs),xs1,xs2) -> c_18(part#(x',xs,xs1,Cons(x,xs2))) part[Ite]#(False(),x',Cons(x,xs),xs1,xs2) -> c_19(part[False][Ite]#(<(x',x),x',Cons(x,xs),xs1,xs2)) part[Ite]#(True(),x',Cons(x,xs),xs1,xs2) -> c_20(part#(x',xs,Cons(x,xs1),xs2)) qs#(x',Cons(x,xs)) -> app#(Cons(x,Nil()),Cons(x',quicksort(xs))) qs#(x',Cons(x,xs)) -> quicksort#(xs) quicksort#(Cons(x,Cons(x',xs))) -> part#(x,Cons(x',xs),Nil(),Nil()) quicksort#(Cons(x,Cons(x',xs))) -> qs#(x,part(x,Cons(x',xs),Nil(),Nil())) - Weak TRS: <(x,0()) -> False() <(0(),S(y)) -> True() <(S(x),S(y)) -> <(x,y) >(0(),y) -> False() >(S(x),0()) -> True() >(S(x),S(y)) -> >(x,y) app(Cons(x,xs),ys) -> Cons(x,app(xs,ys)) app(Nil(),ys) -> ys part(x,Nil(),xs1,xs2) -> app(xs1,xs2) part(x',Cons(x,xs),xs1,xs2) -> part[Ite](>(x',x),x',Cons(x,xs),xs1,xs2) part[False][Ite](False(),x',Cons(x,xs),xs1,xs2) -> part(x',xs,xs1,xs2) part[False][Ite](True(),x',Cons(x,xs),xs1,xs2) -> part(x',xs,xs1,Cons(x,xs2)) part[Ite](False(),x',Cons(x,xs),xs1,xs2) -> part[False][Ite](<(x',x),x',Cons(x,xs),xs1,xs2) part[Ite](True(),x',Cons(x,xs),xs1,xs2) -> part(x',xs,Cons(x,xs1),xs2) qs(x',Cons(x,xs)) -> app(Cons(x,Nil()),Cons(x',quicksort(xs))) quicksort(Cons(x,Cons(x',xs))) -> qs(x,part(x,Cons(x',xs),Nil(),Nil())) quicksort(Cons(x,Nil())) -> Cons(x,Nil()) quicksort(Nil()) -> Nil() - Signature: {/2,app/2,notEmpty/1,part/4,part[False][Ite]/5,part[Ite]/5,qs/2,quicksort/1,<#/2,>#/2,app#/2 ,notEmpty#/1,part#/4,part[False][Ite]#/5,part[Ite]#/5,qs#/2,quicksort#/1} / {0/0,Cons/2,False/0,Nil/0,S/1 ,True/0,c_1/1,c_2/0,c_3/0,c_4/0,c_5/1,c_6/1,c_7/2,c_8/2,c_9/0,c_10/0,c_11/0,c_12/0,c_13/1,c_14/0,c_15/0 ,c_16/1,c_17/1,c_18/1,c_19/1,c_20/1} - Obligation: innermost runtime complexity wrt. defined symbols {<#,>#,app#,notEmpty#,part#,part[False][Ite]#,part[Ite]# ,qs#,quicksort#} and constructors {0,Cons,False,Nil,S,True} + Applied Processor: WeightGap {wgDimension = 1, wgDegree = 1, wgKind = Algebraic, wgUArgs = UArgs, wgOn = WgOnAny} + Details: The weightgap principle applies using the following constant growth matrix-interpretation: We apply a matrix interpretation of kind constructor based matrix interpretation: The following argument positions are considered usable: uargs(Cons) = {2}, uargs(app) = {2}, uargs(part[False][Ite]) = {1}, uargs(part[Ite]) = {1}, uargs(qs) = {2}, uargs(app#) = {2}, uargs(part[False][Ite]#) = {1}, uargs(part[Ite]#) = {1}, uargs(qs#) = {2}, uargs(c_1) = {1}, uargs(c_5) = {1}, uargs(c_6) = {1}, uargs(c_17) = {1}, uargs(c_18) = {1}, uargs(c_19) = {1}, uargs(c_20) = {1} Following symbols are considered usable: all TcT has computed the following interpretation: p(0) = [2] p(<) = [0] p(>) = [0] p(Cons) = [1] x2 + [1] p(False) = [0] p(Nil) = [0] p(S) = [1] p(True) = [0] p(app) = [1] x1 + [1] x2 + [0] p(notEmpty) = [1] x1 + [2] p(part) = [1] x2 + [1] x3 + [1] x4 + [0] p(part[False][Ite]) = [1] x1 + [1] x3 + [1] x4 + [1] x5 + [0] p(part[Ite]) = [1] x1 + [1] x3 + [1] x4 + [1] x5 + [0] p(qs) = [1] x2 + [5] p(quicksort) = [1] x1 + [4] p(<#) = [2] p(>#) = [1] x1 + [1] x2 + [1] p(app#) = [1] x1 + [1] x2 + [0] p(notEmpty#) = [4] x1 + [0] p(part#) = [1] x3 + [1] x4 + [0] p(part[False][Ite]#) = [1] x1 + [1] x4 + [1] x5 + [2] p(part[Ite]#) = [1] x1 + [1] x4 + [1] x5 + [2] p(qs#) = [1] x2 + [7] p(quicksort#) = [1] x1 + [6] p(c_1) = [1] x1 + [0] p(c_2) = [1] p(c_3) = [2] p(c_4) = [0] p(c_5) = [1] x1 + [0] p(c_6) = [1] x1 + [3] p(c_7) = [4] x1 + [2] p(c_8) = [1] p(c_9) = [0] p(c_10) = [1] p(c_11) = [4] p(c_12) = [2] p(c_13) = [4] x1 + [0] p(c_14) = [0] p(c_15) = [2] p(c_16) = [1] x1 + [0] p(c_17) = [1] x1 + [1] p(c_18) = [1] x1 + [0] p(c_19) = [1] x1 + [0] p(c_20) = [1] x1 + [1] Following rules are strictly oriented: app#(Cons(x,xs),ys) = [1] xs + [1] ys + [1] > [1] xs + [1] ys + [0] = c_1(app#(xs,ys)) Following rules are (at-least) weakly oriented: part#(x,Nil(),xs1,xs2) = [1] xs1 + [1] xs2 + [0] >= [1] xs1 + [1] xs2 + [0] = c_5(app#(xs1,xs2)) part#(x',Cons(x,xs),xs1,xs2) = [1] xs1 + [1] xs2 + [0] >= [1] xs1 + [1] xs2 + [5] = c_6(part[Ite]#(>(x',x),x',Cons(x,xs),xs1,xs2)) part[False][Ite]#(False(),x',Cons(x,xs),xs1,xs2) = [1] xs1 + [1] xs2 + [2] >= [1] xs1 + [1] xs2 + [1] = c_17(part#(x',xs,xs1,xs2)) part[False][Ite]#(True(),x',Cons(x,xs),xs1,xs2) = [1] xs1 + [1] xs2 + [2] >= [1] xs1 + [1] xs2 + [1] = c_18(part#(x',xs,xs1,Cons(x,xs2))) part[Ite]#(False(),x',Cons(x,xs),xs1,xs2) = [1] xs1 + [1] xs2 + [2] >= [1] xs1 + [1] xs2 + [2] = c_19(part[False][Ite]#(<(x',x),x',Cons(x,xs),xs1,xs2)) part[Ite]#(True(),x',Cons(x,xs),xs1,xs2) = [1] xs1 + [1] xs2 + [2] >= [1] xs1 + [1] xs2 + [2] = c_20(part#(x',xs,Cons(x,xs1),xs2)) qs#(x',Cons(x,xs)) = [1] xs + [8] >= [1] xs + [6] = app#(Cons(x,Nil()),Cons(x',quicksort(xs))) qs#(x',Cons(x,xs)) = [1] xs + [8] >= [1] xs + [6] = quicksort#(xs) quicksort#(Cons(x,Cons(x',xs))) = [1] xs + [8] >= [0] = part#(x,Cons(x',xs),Nil(),Nil()) quicksort#(Cons(x,Cons(x',xs))) = [1] xs + [8] >= [1] xs + [8] = qs#(x,part(x,Cons(x',xs),Nil(),Nil())) <(x,0()) = [0] >= [0] = False() <(0(),S(y)) = [0] >= [0] = True() <(S(x),S(y)) = [0] >= [0] = <(x,y) >(0(),y) = [0] >= [0] = False() >(S(x),0()) = [0] >= [0] = True() >(S(x),S(y)) = [0] >= [0] = >(x,y) app(Cons(x,xs),ys) = [1] xs + [1] ys + [1] >= [1] xs + [1] ys + [1] = Cons(x,app(xs,ys)) app(Nil(),ys) = [1] ys + [0] >= [1] ys + [0] = ys part(x,Nil(),xs1,xs2) = [1] xs1 + [1] xs2 + [0] >= [1] xs1 + [1] xs2 + [0] = app(xs1,xs2) part(x',Cons(x,xs),xs1,xs2) = [1] xs + [1] xs1 + [1] xs2 + [1] >= [1] xs + [1] xs1 + [1] xs2 + [1] = part[Ite](>(x',x),x',Cons(x,xs),xs1,xs2) part[False][Ite](False(),x',Cons(x,xs),xs1,xs2) = [1] xs + [1] xs1 + [1] xs2 + [1] >= [1] xs + [1] xs1 + [1] xs2 + [0] = part(x',xs,xs1,xs2) part[False][Ite](True(),x',Cons(x,xs),xs1,xs2) = [1] xs + [1] xs1 + [1] xs2 + [1] >= [1] xs + [1] xs1 + [1] xs2 + [1] = part(x',xs,xs1,Cons(x,xs2)) part[Ite](False(),x',Cons(x,xs),xs1,xs2) = [1] xs + [1] xs1 + [1] xs2 + [1] >= [1] xs + [1] xs1 + [1] xs2 + [1] = part[False][Ite](<(x',x),x',Cons(x,xs),xs1,xs2) part[Ite](True(),x',Cons(x,xs),xs1,xs2) = [1] xs + [1] xs1 + [1] xs2 + [1] >= [1] xs + [1] xs1 + [1] xs2 + [1] = part(x',xs,Cons(x,xs1),xs2) qs(x',Cons(x,xs)) = [1] xs + [6] >= [1] xs + [6] = app(Cons(x,Nil()),Cons(x',quicksort(xs))) quicksort(Cons(x,Cons(x',xs))) = [1] xs + [6] >= [1] xs + [6] = qs(x,part(x,Cons(x',xs),Nil(),Nil())) quicksort(Cons(x,Nil())) = [5] >= [1] = Cons(x,Nil()) quicksort(Nil()) = [4] >= [0] = Nil() Further, it can be verified that all rules not oriented are covered by the weightgap condition. *** Step 1.b:6.b:3: NaturalMI WORST_CASE(?,O(n^1)) + Considered Problem: - Strict DPs: part#(x',Cons(x,xs),xs1,xs2) -> c_6(part[Ite]#(>(x',x),x',Cons(x,xs),xs1,xs2)) - Weak DPs: app#(Cons(x,xs),ys) -> c_1(app#(xs,ys)) part#(x,Nil(),xs1,xs2) -> c_5(app#(xs1,xs2)) part[False][Ite]#(False(),x',Cons(x,xs),xs1,xs2) -> c_17(part#(x',xs,xs1,xs2)) part[False][Ite]#(True(),x',Cons(x,xs),xs1,xs2) -> c_18(part#(x',xs,xs1,Cons(x,xs2))) part[Ite]#(False(),x',Cons(x,xs),xs1,xs2) -> c_19(part[False][Ite]#(<(x',x),x',Cons(x,xs),xs1,xs2)) part[Ite]#(True(),x',Cons(x,xs),xs1,xs2) -> c_20(part#(x',xs,Cons(x,xs1),xs2)) qs#(x',Cons(x,xs)) -> app#(Cons(x,Nil()),Cons(x',quicksort(xs))) qs#(x',Cons(x,xs)) -> quicksort#(xs) quicksort#(Cons(x,Cons(x',xs))) -> part#(x,Cons(x',xs),Nil(),Nil()) quicksort#(Cons(x,Cons(x',xs))) -> qs#(x,part(x,Cons(x',xs),Nil(),Nil())) - Weak TRS: <(x,0()) -> False() <(0(),S(y)) -> True() <(S(x),S(y)) -> <(x,y) >(0(),y) -> False() >(S(x),0()) -> True() >(S(x),S(y)) -> >(x,y) app(Cons(x,xs),ys) -> Cons(x,app(xs,ys)) app(Nil(),ys) -> ys part(x,Nil(),xs1,xs2) -> app(xs1,xs2) part(x',Cons(x,xs),xs1,xs2) -> part[Ite](>(x',x),x',Cons(x,xs),xs1,xs2) part[False][Ite](False(),x',Cons(x,xs),xs1,xs2) -> part(x',xs,xs1,xs2) part[False][Ite](True(),x',Cons(x,xs),xs1,xs2) -> part(x',xs,xs1,Cons(x,xs2)) part[Ite](False(),x',Cons(x,xs),xs1,xs2) -> part[False][Ite](<(x',x),x',Cons(x,xs),xs1,xs2) part[Ite](True(),x',Cons(x,xs),xs1,xs2) -> part(x',xs,Cons(x,xs1),xs2) qs(x',Cons(x,xs)) -> app(Cons(x,Nil()),Cons(x',quicksort(xs))) quicksort(Cons(x,Cons(x',xs))) -> qs(x,part(x,Cons(x',xs),Nil(),Nil())) quicksort(Cons(x,Nil())) -> Cons(x,Nil()) quicksort(Nil()) -> Nil() - Signature: {/2,app/2,notEmpty/1,part/4,part[False][Ite]/5,part[Ite]/5,qs/2,quicksort/1,<#/2,>#/2,app#/2 ,notEmpty#/1,part#/4,part[False][Ite]#/5,part[Ite]#/5,qs#/2,quicksort#/1} / {0/0,Cons/2,False/0,Nil/0,S/1 ,True/0,c_1/1,c_2/0,c_3/0,c_4/0,c_5/1,c_6/1,c_7/2,c_8/2,c_9/0,c_10/0,c_11/0,c_12/0,c_13/1,c_14/0,c_15/0 ,c_16/1,c_17/1,c_18/1,c_19/1,c_20/1} - Obligation: innermost runtime complexity wrt. defined symbols {<#,>#,app#,notEmpty#,part#,part[False][Ite]#,part[Ite]# ,qs#,quicksort#} and constructors {0,Cons,False,Nil,S,True} + Applied Processor: NaturalMI {miDimension = 1, miDegree = 1, miKind = Algebraic, uargs = UArgs, urules = URules, selector = Just any strict-rules} + Details: We apply a matrix interpretation of kind constructor based matrix interpretation: The following argument positions are considered usable: uargs(c_1) = {1}, uargs(c_5) = {1}, uargs(c_6) = {1}, uargs(c_17) = {1}, uargs(c_18) = {1}, uargs(c_19) = {1}, uargs(c_20) = {1} Following symbols are considered usable: {app,part,part[False][Ite],part[Ite],<#,>#,app#,notEmpty#,part#,part[False][Ite]#,part[Ite]#,qs# ,quicksort#} TcT has computed the following interpretation: p(0) = [2] p(<) = [2] x1 + [4] x2 + [0] p(>) = [0] p(Cons) = [1] x2 + [2] p(False) = [0] p(Nil) = [0] p(S) = [2] p(True) = [0] p(app) = [1] x1 + [1] x2 + [1] p(notEmpty) = [4] x1 + [2] p(part) = [1] x2 + [1] x3 + [1] x4 + [1] p(part[False][Ite]) = [1] x3 + [1] x4 + [1] x5 + [1] p(part[Ite]) = [1] x3 + [1] x4 + [1] x5 + [1] p(qs) = [2] x1 + [1] x2 + [4] p(quicksort) = [1] p(<#) = [0] p(>#) = [2] x2 + [1] p(app#) = [0] p(notEmpty#) = [0] p(part#) = [1] x2 + [1] p(part[False][Ite]#) = [1] x3 + [0] p(part[Ite]#) = [1] x3 + [0] p(qs#) = [2] x2 + [2] p(quicksort#) = [2] x1 + [1] p(c_1) = [1] x1 + [0] p(c_2) = [1] p(c_3) = [1] p(c_4) = [1] p(c_5) = [2] x1 + [1] p(c_6) = [1] x1 + [0] p(c_7) = [0] p(c_8) = [2] x2 + [0] p(c_9) = [0] p(c_10) = [4] p(c_11) = [2] p(c_12) = [0] p(c_13) = [0] p(c_14) = [0] p(c_15) = [0] p(c_16) = [1] x1 + [0] p(c_17) = [1] x1 + [1] p(c_18) = [1] x1 + [1] p(c_19) = [1] x1 + [0] p(c_20) = [1] x1 + [0] Following rules are strictly oriented: part#(x',Cons(x,xs),xs1,xs2) = [1] xs + [3] > [1] xs + [2] = c_6(part[Ite]#(>(x',x),x',Cons(x,xs),xs1,xs2)) Following rules are (at-least) weakly oriented: app#(Cons(x,xs),ys) = [0] >= [0] = c_1(app#(xs,ys)) part#(x,Nil(),xs1,xs2) = [1] >= [1] = c_5(app#(xs1,xs2)) part[False][Ite]#(False(),x',Cons(x,xs),xs1,xs2) = [1] xs + [2] >= [1] xs + [2] = c_17(part#(x',xs,xs1,xs2)) part[False][Ite]#(True(),x',Cons(x,xs),xs1,xs2) = [1] xs + [2] >= [1] xs + [2] = c_18(part#(x',xs,xs1,Cons(x,xs2))) part[Ite]#(False(),x',Cons(x,xs),xs1,xs2) = [1] xs + [2] >= [1] xs + [2] = c_19(part[False][Ite]#(<(x',x),x',Cons(x,xs),xs1,xs2)) part[Ite]#(True(),x',Cons(x,xs),xs1,xs2) = [1] xs + [2] >= [1] xs + [1] = c_20(part#(x',xs,Cons(x,xs1),xs2)) qs#(x',Cons(x,xs)) = [2] xs + [6] >= [0] = app#(Cons(x,Nil()),Cons(x',quicksort(xs))) qs#(x',Cons(x,xs)) = [2] xs + [6] >= [2] xs + [1] = quicksort#(xs) quicksort#(Cons(x,Cons(x',xs))) = [2] xs + [9] >= [1] xs + [3] = part#(x,Cons(x',xs),Nil(),Nil()) quicksort#(Cons(x,Cons(x',xs))) = [2] xs + [9] >= [2] xs + [8] = qs#(x,part(x,Cons(x',xs),Nil(),Nil())) app(Cons(x,xs),ys) = [1] xs + [1] ys + [3] >= [1] xs + [1] ys + [3] = Cons(x,app(xs,ys)) app(Nil(),ys) = [1] ys + [1] >= [1] ys + [0] = ys part(x,Nil(),xs1,xs2) = [1] xs1 + [1] xs2 + [1] >= [1] xs1 + [1] xs2 + [1] = app(xs1,xs2) part(x',Cons(x,xs),xs1,xs2) = [1] xs + [1] xs1 + [1] xs2 + [3] >= [1] xs + [1] xs1 + [1] xs2 + [3] = part[Ite](>(x',x),x',Cons(x,xs),xs1,xs2) part[False][Ite](False(),x',Cons(x,xs),xs1,xs2) = [1] xs + [1] xs1 + [1] xs2 + [3] >= [1] xs + [1] xs1 + [1] xs2 + [1] = part(x',xs,xs1,xs2) part[False][Ite](True(),x',Cons(x,xs),xs1,xs2) = [1] xs + [1] xs1 + [1] xs2 + [3] >= [1] xs + [1] xs1 + [1] xs2 + [3] = part(x',xs,xs1,Cons(x,xs2)) part[Ite](False(),x',Cons(x,xs),xs1,xs2) = [1] xs + [1] xs1 + [1] xs2 + [3] >= [1] xs + [1] xs1 + [1] xs2 + [3] = part[False][Ite](<(x',x),x',Cons(x,xs),xs1,xs2) part[Ite](True(),x',Cons(x,xs),xs1,xs2) = [1] xs + [1] xs1 + [1] xs2 + [3] >= [1] xs + [1] xs1 + [1] xs2 + [3] = part(x',xs,Cons(x,xs1),xs2) *** Step 1.b:6.b:4: EmptyProcessor WORST_CASE(?,O(1)) + Considered Problem: - Weak DPs: app#(Cons(x,xs),ys) -> c_1(app#(xs,ys)) part#(x,Nil(),xs1,xs2) -> c_5(app#(xs1,xs2)) part#(x',Cons(x,xs),xs1,xs2) -> c_6(part[Ite]#(>(x',x),x',Cons(x,xs),xs1,xs2)) part[False][Ite]#(False(),x',Cons(x,xs),xs1,xs2) -> c_17(part#(x',xs,xs1,xs2)) part[False][Ite]#(True(),x',Cons(x,xs),xs1,xs2) -> c_18(part#(x',xs,xs1,Cons(x,xs2))) part[Ite]#(False(),x',Cons(x,xs),xs1,xs2) -> c_19(part[False][Ite]#(<(x',x),x',Cons(x,xs),xs1,xs2)) part[Ite]#(True(),x',Cons(x,xs),xs1,xs2) -> c_20(part#(x',xs,Cons(x,xs1),xs2)) qs#(x',Cons(x,xs)) -> app#(Cons(x,Nil()),Cons(x',quicksort(xs))) qs#(x',Cons(x,xs)) -> quicksort#(xs) quicksort#(Cons(x,Cons(x',xs))) -> part#(x,Cons(x',xs),Nil(),Nil()) quicksort#(Cons(x,Cons(x',xs))) -> qs#(x,part(x,Cons(x',xs),Nil(),Nil())) - Weak TRS: <(x,0()) -> False() <(0(),S(y)) -> True() <(S(x),S(y)) -> <(x,y) >(0(),y) -> False() >(S(x),0()) -> True() >(S(x),S(y)) -> >(x,y) app(Cons(x,xs),ys) -> Cons(x,app(xs,ys)) app(Nil(),ys) -> ys part(x,Nil(),xs1,xs2) -> app(xs1,xs2) part(x',Cons(x,xs),xs1,xs2) -> part[Ite](>(x',x),x',Cons(x,xs),xs1,xs2) part[False][Ite](False(),x',Cons(x,xs),xs1,xs2) -> part(x',xs,xs1,xs2) part[False][Ite](True(),x',Cons(x,xs),xs1,xs2) -> part(x',xs,xs1,Cons(x,xs2)) part[Ite](False(),x',Cons(x,xs),xs1,xs2) -> part[False][Ite](<(x',x),x',Cons(x,xs),xs1,xs2) part[Ite](True(),x',Cons(x,xs),xs1,xs2) -> part(x',xs,Cons(x,xs1),xs2) qs(x',Cons(x,xs)) -> app(Cons(x,Nil()),Cons(x',quicksort(xs))) quicksort(Cons(x,Cons(x',xs))) -> qs(x,part(x,Cons(x',xs),Nil(),Nil())) quicksort(Cons(x,Nil())) -> Cons(x,Nil()) quicksort(Nil()) -> Nil() - Signature: {/2,app/2,notEmpty/1,part/4,part[False][Ite]/5,part[Ite]/5,qs/2,quicksort/1,<#/2,>#/2,app#/2 ,notEmpty#/1,part#/4,part[False][Ite]#/5,part[Ite]#/5,qs#/2,quicksort#/1} / {0/0,Cons/2,False/0,Nil/0,S/1 ,True/0,c_1/1,c_2/0,c_3/0,c_4/0,c_5/1,c_6/1,c_7/2,c_8/2,c_9/0,c_10/0,c_11/0,c_12/0,c_13/1,c_14/0,c_15/0 ,c_16/1,c_17/1,c_18/1,c_19/1,c_20/1} - Obligation: innermost runtime complexity wrt. defined symbols {<#,>#,app#,notEmpty#,part#,part[False][Ite]#,part[Ite]# ,qs#,quicksort#} and constructors {0,Cons,False,Nil,S,True} + Applied Processor: EmptyProcessor + Details: The problem is already closed. The intended complexity is O(1). WORST_CASE(Omega(n^1),O(n^2))