WORST_CASE(?,O(n^3)) * Step 1: DependencyPairs WORST_CASE(?,O(n^3)) + Considered Problem: - Strict TRS: append(add(N,X),Y) -> add(N,append(X,Y)) append(nil(),Y) -> Y f_1(pair(X,Z),N,M,Y) -> f_2(lt(N,M),N,M,Y,X,Z) f_2(false(),N,M,Y,X,Z) -> pair(add(M,X),Z) f_2(true(),N,M,Y,X,Z) -> pair(X,add(M,Z)) f_3(pair(Y,Z),N,X) -> append(qsort(Y),add(X,qsort(Z))) lt(0(),s(X)) -> true() lt(s(X),0()) -> false() lt(s(X),s(Y)) -> lt(X,Y) qsort(add(N,X)) -> f_3(split(N,X),N,X) qsort(nil()) -> nil() split(N,add(M,Y)) -> f_1(split(N,Y),N,M,Y) split(N,nil()) -> pair(nil(),nil()) - Signature: {append/2,f_1/4,f_2/6,f_3/3,lt/2,qsort/1,split/2} / {0/0,add/2,false/0,nil/0,pair/2,s/1,true/0} - Obligation: innermost runtime complexity wrt. defined symbols {append,f_1,f_2,f_3,lt,qsort,split} and constructors {0 ,add,false,nil,pair,s,true} + Applied Processor: DependencyPairs {dpKind_ = DT} + Details: We add the following dependency tuples: Strict DPs append#(add(N,X),Y) -> c_1(append#(X,Y)) append#(nil(),Y) -> c_2() f_1#(pair(X,Z),N,M,Y) -> c_3(f_2#(lt(N,M),N,M,Y,X,Z),lt#(N,M)) f_2#(false(),N,M,Y,X,Z) -> c_4() f_2#(true(),N,M,Y,X,Z) -> c_5() f_3#(pair(Y,Z),N,X) -> c_6(append#(qsort(Y),add(X,qsort(Z))),qsort#(Y),qsort#(Z)) lt#(0(),s(X)) -> c_7() lt#(s(X),0()) -> c_8() lt#(s(X),s(Y)) -> c_9(lt#(X,Y)) qsort#(add(N,X)) -> c_10(f_3#(split(N,X),N,X),split#(N,X)) qsort#(nil()) -> c_11() split#(N,add(M,Y)) -> c_12(f_1#(split(N,Y),N,M,Y),split#(N,Y)) split#(N,nil()) -> c_13() Weak DPs and mark the set of starting terms. * Step 2: PredecessorEstimation WORST_CASE(?,O(n^3)) + Considered Problem: - Strict DPs: append#(add(N,X),Y) -> c_1(append#(X,Y)) append#(nil(),Y) -> c_2() f_1#(pair(X,Z),N,M,Y) -> c_3(f_2#(lt(N,M),N,M,Y,X,Z),lt#(N,M)) f_2#(false(),N,M,Y,X,Z) -> c_4() f_2#(true(),N,M,Y,X,Z) -> c_5() f_3#(pair(Y,Z),N,X) -> c_6(append#(qsort(Y),add(X,qsort(Z))),qsort#(Y),qsort#(Z)) lt#(0(),s(X)) -> c_7() lt#(s(X),0()) -> c_8() lt#(s(X),s(Y)) -> c_9(lt#(X,Y)) qsort#(add(N,X)) -> c_10(f_3#(split(N,X),N,X),split#(N,X)) qsort#(nil()) -> c_11() split#(N,add(M,Y)) -> c_12(f_1#(split(N,Y),N,M,Y),split#(N,Y)) split#(N,nil()) -> c_13() - Weak TRS: append(add(N,X),Y) -> add(N,append(X,Y)) append(nil(),Y) -> Y f_1(pair(X,Z),N,M,Y) -> f_2(lt(N,M),N,M,Y,X,Z) f_2(false(),N,M,Y,X,Z) -> pair(add(M,X),Z) f_2(true(),N,M,Y,X,Z) -> pair(X,add(M,Z)) f_3(pair(Y,Z),N,X) -> append(qsort(Y),add(X,qsort(Z))) lt(0(),s(X)) -> true() lt(s(X),0()) -> false() lt(s(X),s(Y)) -> lt(X,Y) qsort(add(N,X)) -> f_3(split(N,X),N,X) qsort(nil()) -> nil() split(N,add(M,Y)) -> f_1(split(N,Y),N,M,Y) split(N,nil()) -> pair(nil(),nil()) - Signature: {append/2,f_1/4,f_2/6,f_3/3,lt/2,qsort/1,split/2,append#/2,f_1#/4,f_2#/6,f_3#/3,lt#/2,qsort#/1 ,split#/2} / {0/0,add/2,false/0,nil/0,pair/2,s/1,true/0,c_1/1,c_2/0,c_3/2,c_4/0,c_5/0,c_6/3,c_7/0,c_8/0 ,c_9/1,c_10/2,c_11/0,c_12/2,c_13/0} - Obligation: innermost runtime complexity wrt. defined symbols {append#,f_1#,f_2#,f_3#,lt#,qsort# ,split#} and constructors {0,add,false,nil,pair,s,true} + Applied Processor: PredecessorEstimation {onSelection = all simple predecessor estimation selector} + Details: We estimate the number of application of {2,4,5,7,8,11,13} by application of Pre({2,4,5,7,8,11,13}) = {1,3,6,9,10,12}. Here rules are labelled as follows: 1: append#(add(N,X),Y) -> c_1(append#(X,Y)) 2: append#(nil(),Y) -> c_2() 3: f_1#(pair(X,Z),N,M,Y) -> c_3(f_2#(lt(N,M),N,M,Y,X,Z),lt#(N,M)) 4: f_2#(false(),N,M,Y,X,Z) -> c_4() 5: f_2#(true(),N,M,Y,X,Z) -> c_5() 6: f_3#(pair(Y,Z),N,X) -> c_6(append#(qsort(Y),add(X,qsort(Z))),qsort#(Y),qsort#(Z)) 7: lt#(0(),s(X)) -> c_7() 8: lt#(s(X),0()) -> c_8() 9: lt#(s(X),s(Y)) -> c_9(lt#(X,Y)) 10: qsort#(add(N,X)) -> c_10(f_3#(split(N,X),N,X),split#(N,X)) 11: qsort#(nil()) -> c_11() 12: split#(N,add(M,Y)) -> c_12(f_1#(split(N,Y),N,M,Y),split#(N,Y)) 13: split#(N,nil()) -> c_13() * Step 3: RemoveWeakSuffixes WORST_CASE(?,O(n^3)) + Considered Problem: - Strict DPs: append#(add(N,X),Y) -> c_1(append#(X,Y)) f_1#(pair(X,Z),N,M,Y) -> c_3(f_2#(lt(N,M),N,M,Y,X,Z),lt#(N,M)) f_3#(pair(Y,Z),N,X) -> c_6(append#(qsort(Y),add(X,qsort(Z))),qsort#(Y),qsort#(Z)) lt#(s(X),s(Y)) -> c_9(lt#(X,Y)) qsort#(add(N,X)) -> c_10(f_3#(split(N,X),N,X),split#(N,X)) split#(N,add(M,Y)) -> c_12(f_1#(split(N,Y),N,M,Y),split#(N,Y)) - Weak DPs: append#(nil(),Y) -> c_2() f_2#(false(),N,M,Y,X,Z) -> c_4() f_2#(true(),N,M,Y,X,Z) -> c_5() lt#(0(),s(X)) -> c_7() lt#(s(X),0()) -> c_8() qsort#(nil()) -> c_11() split#(N,nil()) -> c_13() - Weak TRS: append(add(N,X),Y) -> add(N,append(X,Y)) append(nil(),Y) -> Y f_1(pair(X,Z),N,M,Y) -> f_2(lt(N,M),N,M,Y,X,Z) f_2(false(),N,M,Y,X,Z) -> pair(add(M,X),Z) f_2(true(),N,M,Y,X,Z) -> pair(X,add(M,Z)) f_3(pair(Y,Z),N,X) -> append(qsort(Y),add(X,qsort(Z))) lt(0(),s(X)) -> true() lt(s(X),0()) -> false() lt(s(X),s(Y)) -> lt(X,Y) qsort(add(N,X)) -> f_3(split(N,X),N,X) qsort(nil()) -> nil() split(N,add(M,Y)) -> f_1(split(N,Y),N,M,Y) split(N,nil()) -> pair(nil(),nil()) - Signature: {append/2,f_1/4,f_2/6,f_3/3,lt/2,qsort/1,split/2,append#/2,f_1#/4,f_2#/6,f_3#/3,lt#/2,qsort#/1 ,split#/2} / {0/0,add/2,false/0,nil/0,pair/2,s/1,true/0,c_1/1,c_2/0,c_3/2,c_4/0,c_5/0,c_6/3,c_7/0,c_8/0 ,c_9/1,c_10/2,c_11/0,c_12/2,c_13/0} - Obligation: innermost runtime complexity wrt. defined symbols {append#,f_1#,f_2#,f_3#,lt#,qsort# ,split#} and constructors {0,add,false,nil,pair,s,true} + Applied Processor: RemoveWeakSuffixes + Details: Consider the dependency graph 1:S:append#(add(N,X),Y) -> c_1(append#(X,Y)) -->_1 append#(nil(),Y) -> c_2():7 -->_1 append#(add(N,X),Y) -> c_1(append#(X,Y)):1 2:S:f_1#(pair(X,Z),N,M,Y) -> c_3(f_2#(lt(N,M),N,M,Y,X,Z),lt#(N,M)) -->_2 lt#(s(X),s(Y)) -> c_9(lt#(X,Y)):4 -->_2 lt#(s(X),0()) -> c_8():11 -->_2 lt#(0(),s(X)) -> c_7():10 -->_1 f_2#(true(),N,M,Y,X,Z) -> c_5():9 -->_1 f_2#(false(),N,M,Y,X,Z) -> c_4():8 3:S:f_3#(pair(Y,Z),N,X) -> c_6(append#(qsort(Y),add(X,qsort(Z))),qsort#(Y),qsort#(Z)) -->_3 qsort#(add(N,X)) -> c_10(f_3#(split(N,X),N,X),split#(N,X)):5 -->_2 qsort#(add(N,X)) -> c_10(f_3#(split(N,X),N,X),split#(N,X)):5 -->_3 qsort#(nil()) -> c_11():12 -->_2 qsort#(nil()) -> c_11():12 -->_1 append#(nil(),Y) -> c_2():7 -->_1 append#(add(N,X),Y) -> c_1(append#(X,Y)):1 4:S:lt#(s(X),s(Y)) -> c_9(lt#(X,Y)) -->_1 lt#(s(X),0()) -> c_8():11 -->_1 lt#(0(),s(X)) -> c_7():10 -->_1 lt#(s(X),s(Y)) -> c_9(lt#(X,Y)):4 5:S:qsort#(add(N,X)) -> c_10(f_3#(split(N,X),N,X),split#(N,X)) -->_2 split#(N,add(M,Y)) -> c_12(f_1#(split(N,Y),N,M,Y),split#(N,Y)):6 -->_2 split#(N,nil()) -> c_13():13 -->_1 f_3#(pair(Y,Z),N,X) -> c_6(append#(qsort(Y),add(X,qsort(Z))),qsort#(Y),qsort#(Z)):3 6:S:split#(N,add(M,Y)) -> c_12(f_1#(split(N,Y),N,M,Y),split#(N,Y)) -->_2 split#(N,nil()) -> c_13():13 -->_2 split#(N,add(M,Y)) -> c_12(f_1#(split(N,Y),N,M,Y),split#(N,Y)):6 -->_1 f_1#(pair(X,Z),N,M,Y) -> c_3(f_2#(lt(N,M),N,M,Y,X,Z),lt#(N,M)):2 7:W:append#(nil(),Y) -> c_2() 8:W:f_2#(false(),N,M,Y,X,Z) -> c_4() 9:W:f_2#(true(),N,M,Y,X,Z) -> c_5() 10:W:lt#(0(),s(X)) -> c_7() 11:W:lt#(s(X),0()) -> c_8() 12:W:qsort#(nil()) -> c_11() 13:W:split#(N,nil()) -> c_13() The following weak DPs constitute a sub-graph of the DG that is closed under successors. The DPs are removed. 12: qsort#(nil()) -> c_11() 13: split#(N,nil()) -> c_13() 8: f_2#(false(),N,M,Y,X,Z) -> c_4() 9: f_2#(true(),N,M,Y,X,Z) -> c_5() 10: lt#(0(),s(X)) -> c_7() 11: lt#(s(X),0()) -> c_8() 7: append#(nil(),Y) -> c_2() * Step 4: SimplifyRHS WORST_CASE(?,O(n^3)) + Considered Problem: - Strict DPs: append#(add(N,X),Y) -> c_1(append#(X,Y)) f_1#(pair(X,Z),N,M,Y) -> c_3(f_2#(lt(N,M),N,M,Y,X,Z),lt#(N,M)) f_3#(pair(Y,Z),N,X) -> c_6(append#(qsort(Y),add(X,qsort(Z))),qsort#(Y),qsort#(Z)) lt#(s(X),s(Y)) -> c_9(lt#(X,Y)) qsort#(add(N,X)) -> c_10(f_3#(split(N,X),N,X),split#(N,X)) split#(N,add(M,Y)) -> c_12(f_1#(split(N,Y),N,M,Y),split#(N,Y)) - Weak TRS: append(add(N,X),Y) -> add(N,append(X,Y)) append(nil(),Y) -> Y f_1(pair(X,Z),N,M,Y) -> f_2(lt(N,M),N,M,Y,X,Z) f_2(false(),N,M,Y,X,Z) -> pair(add(M,X),Z) f_2(true(),N,M,Y,X,Z) -> pair(X,add(M,Z)) f_3(pair(Y,Z),N,X) -> append(qsort(Y),add(X,qsort(Z))) lt(0(),s(X)) -> true() lt(s(X),0()) -> false() lt(s(X),s(Y)) -> lt(X,Y) qsort(add(N,X)) -> f_3(split(N,X),N,X) qsort(nil()) -> nil() split(N,add(M,Y)) -> f_1(split(N,Y),N,M,Y) split(N,nil()) -> pair(nil(),nil()) - Signature: {append/2,f_1/4,f_2/6,f_3/3,lt/2,qsort/1,split/2,append#/2,f_1#/4,f_2#/6,f_3#/3,lt#/2,qsort#/1 ,split#/2} / {0/0,add/2,false/0,nil/0,pair/2,s/1,true/0,c_1/1,c_2/0,c_3/2,c_4/0,c_5/0,c_6/3,c_7/0,c_8/0 ,c_9/1,c_10/2,c_11/0,c_12/2,c_13/0} - Obligation: innermost runtime complexity wrt. defined symbols {append#,f_1#,f_2#,f_3#,lt#,qsort# ,split#} and constructors {0,add,false,nil,pair,s,true} + Applied Processor: SimplifyRHS + Details: Consider the dependency graph 1:S:append#(add(N,X),Y) -> c_1(append#(X,Y)) -->_1 append#(add(N,X),Y) -> c_1(append#(X,Y)):1 2:S:f_1#(pair(X,Z),N,M,Y) -> c_3(f_2#(lt(N,M),N,M,Y,X,Z),lt#(N,M)) -->_2 lt#(s(X),s(Y)) -> c_9(lt#(X,Y)):4 3:S:f_3#(pair(Y,Z),N,X) -> c_6(append#(qsort(Y),add(X,qsort(Z))),qsort#(Y),qsort#(Z)) -->_3 qsort#(add(N,X)) -> c_10(f_3#(split(N,X),N,X),split#(N,X)):5 -->_2 qsort#(add(N,X)) -> c_10(f_3#(split(N,X),N,X),split#(N,X)):5 -->_1 append#(add(N,X),Y) -> c_1(append#(X,Y)):1 4:S:lt#(s(X),s(Y)) -> c_9(lt#(X,Y)) -->_1 lt#(s(X),s(Y)) -> c_9(lt#(X,Y)):4 5:S:qsort#(add(N,X)) -> c_10(f_3#(split(N,X),N,X),split#(N,X)) -->_2 split#(N,add(M,Y)) -> c_12(f_1#(split(N,Y),N,M,Y),split#(N,Y)):6 -->_1 f_3#(pair(Y,Z),N,X) -> c_6(append#(qsort(Y),add(X,qsort(Z))),qsort#(Y),qsort#(Z)):3 6:S:split#(N,add(M,Y)) -> c_12(f_1#(split(N,Y),N,M,Y),split#(N,Y)) -->_2 split#(N,add(M,Y)) -> c_12(f_1#(split(N,Y),N,M,Y),split#(N,Y)):6 -->_1 f_1#(pair(X,Z),N,M,Y) -> c_3(f_2#(lt(N,M),N,M,Y,X,Z),lt#(N,M)):2 Due to missing edges in the depndency graph, the right-hand sides of following rules could be simplified: f_1#(pair(X,Z),N,M,Y) -> c_3(lt#(N,M)) * Step 5: DecomposeDG WORST_CASE(?,O(n^3)) + Considered Problem: - Strict DPs: append#(add(N,X),Y) -> c_1(append#(X,Y)) f_1#(pair(X,Z),N,M,Y) -> c_3(lt#(N,M)) f_3#(pair(Y,Z),N,X) -> c_6(append#(qsort(Y),add(X,qsort(Z))),qsort#(Y),qsort#(Z)) lt#(s(X),s(Y)) -> c_9(lt#(X,Y)) qsort#(add(N,X)) -> c_10(f_3#(split(N,X),N,X),split#(N,X)) split#(N,add(M,Y)) -> c_12(f_1#(split(N,Y),N,M,Y),split#(N,Y)) - Weak TRS: append(add(N,X),Y) -> add(N,append(X,Y)) append(nil(),Y) -> Y f_1(pair(X,Z),N,M,Y) -> f_2(lt(N,M),N,M,Y,X,Z) f_2(false(),N,M,Y,X,Z) -> pair(add(M,X),Z) f_2(true(),N,M,Y,X,Z) -> pair(X,add(M,Z)) f_3(pair(Y,Z),N,X) -> append(qsort(Y),add(X,qsort(Z))) lt(0(),s(X)) -> true() lt(s(X),0()) -> false() lt(s(X),s(Y)) -> lt(X,Y) qsort(add(N,X)) -> f_3(split(N,X),N,X) qsort(nil()) -> nil() split(N,add(M,Y)) -> f_1(split(N,Y),N,M,Y) split(N,nil()) -> pair(nil(),nil()) - Signature: {append/2,f_1/4,f_2/6,f_3/3,lt/2,qsort/1,split/2,append#/2,f_1#/4,f_2#/6,f_3#/3,lt#/2,qsort#/1 ,split#/2} / {0/0,add/2,false/0,nil/0,pair/2,s/1,true/0,c_1/1,c_2/0,c_3/1,c_4/0,c_5/0,c_6/3,c_7/0,c_8/0 ,c_9/1,c_10/2,c_11/0,c_12/2,c_13/0} - Obligation: innermost runtime complexity wrt. defined symbols {append#,f_1#,f_2#,f_3#,lt#,qsort# ,split#} and constructors {0,add,false,nil,pair,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 f_3#(pair(Y,Z),N,X) -> c_6(append#(qsort(Y),add(X,qsort(Z))),qsort#(Y),qsort#(Z)) qsort#(add(N,X)) -> c_10(f_3#(split(N,X),N,X),split#(N,X)) and a lower component append#(add(N,X),Y) -> c_1(append#(X,Y)) f_1#(pair(X,Z),N,M,Y) -> c_3(lt#(N,M)) lt#(s(X),s(Y)) -> c_9(lt#(X,Y)) split#(N,add(M,Y)) -> c_12(f_1#(split(N,Y),N,M,Y),split#(N,Y)) Further, following extension rules are added to the lower component. f_3#(pair(Y,Z),N,X) -> append#(qsort(Y),add(X,qsort(Z))) f_3#(pair(Y,Z),N,X) -> qsort#(Y) f_3#(pair(Y,Z),N,X) -> qsort#(Z) qsort#(add(N,X)) -> f_3#(split(N,X),N,X) qsort#(add(N,X)) -> split#(N,X) ** Step 5.a:1: SimplifyRHS WORST_CASE(?,O(n^1)) + Considered Problem: - Strict DPs: f_3#(pair(Y,Z),N,X) -> c_6(append#(qsort(Y),add(X,qsort(Z))),qsort#(Y),qsort#(Z)) qsort#(add(N,X)) -> c_10(f_3#(split(N,X),N,X),split#(N,X)) - Weak TRS: append(add(N,X),Y) -> add(N,append(X,Y)) append(nil(),Y) -> Y f_1(pair(X,Z),N,M,Y) -> f_2(lt(N,M),N,M,Y,X,Z) f_2(false(),N,M,Y,X,Z) -> pair(add(M,X),Z) f_2(true(),N,M,Y,X,Z) -> pair(X,add(M,Z)) f_3(pair(Y,Z),N,X) -> append(qsort(Y),add(X,qsort(Z))) lt(0(),s(X)) -> true() lt(s(X),0()) -> false() lt(s(X),s(Y)) -> lt(X,Y) qsort(add(N,X)) -> f_3(split(N,X),N,X) qsort(nil()) -> nil() split(N,add(M,Y)) -> f_1(split(N,Y),N,M,Y) split(N,nil()) -> pair(nil(),nil()) - Signature: {append/2,f_1/4,f_2/6,f_3/3,lt/2,qsort/1,split/2,append#/2,f_1#/4,f_2#/6,f_3#/3,lt#/2,qsort#/1 ,split#/2} / {0/0,add/2,false/0,nil/0,pair/2,s/1,true/0,c_1/1,c_2/0,c_3/1,c_4/0,c_5/0,c_6/3,c_7/0,c_8/0 ,c_9/1,c_10/2,c_11/0,c_12/2,c_13/0} - Obligation: innermost runtime complexity wrt. defined symbols {append#,f_1#,f_2#,f_3#,lt#,qsort# ,split#} and constructors {0,add,false,nil,pair,s,true} + Applied Processor: SimplifyRHS + Details: Consider the dependency graph 1:S:f_3#(pair(Y,Z),N,X) -> c_6(append#(qsort(Y),add(X,qsort(Z))),qsort#(Y),qsort#(Z)) -->_3 qsort#(add(N,X)) -> c_10(f_3#(split(N,X),N,X),split#(N,X)):2 -->_2 qsort#(add(N,X)) -> c_10(f_3#(split(N,X),N,X),split#(N,X)):2 2:S:qsort#(add(N,X)) -> c_10(f_3#(split(N,X),N,X),split#(N,X)) -->_1 f_3#(pair(Y,Z),N,X) -> c_6(append#(qsort(Y),add(X,qsort(Z))),qsort#(Y),qsort#(Z)):1 Due to missing edges in the depndency graph, the right-hand sides of following rules could be simplified: f_3#(pair(Y,Z),N,X) -> c_6(qsort#(Y),qsort#(Z)) qsort#(add(N,X)) -> c_10(f_3#(split(N,X),N,X)) ** Step 5.a:2: UsableRules WORST_CASE(?,O(n^1)) + Considered Problem: - Strict DPs: f_3#(pair(Y,Z),N,X) -> c_6(qsort#(Y),qsort#(Z)) qsort#(add(N,X)) -> c_10(f_3#(split(N,X),N,X)) - Weak TRS: append(add(N,X),Y) -> add(N,append(X,Y)) append(nil(),Y) -> Y f_1(pair(X,Z),N,M,Y) -> f_2(lt(N,M),N,M,Y,X,Z) f_2(false(),N,M,Y,X,Z) -> pair(add(M,X),Z) f_2(true(),N,M,Y,X,Z) -> pair(X,add(M,Z)) f_3(pair(Y,Z),N,X) -> append(qsort(Y),add(X,qsort(Z))) lt(0(),s(X)) -> true() lt(s(X),0()) -> false() lt(s(X),s(Y)) -> lt(X,Y) qsort(add(N,X)) -> f_3(split(N,X),N,X) qsort(nil()) -> nil() split(N,add(M,Y)) -> f_1(split(N,Y),N,M,Y) split(N,nil()) -> pair(nil(),nil()) - Signature: {append/2,f_1/4,f_2/6,f_3/3,lt/2,qsort/1,split/2,append#/2,f_1#/4,f_2#/6,f_3#/3,lt#/2,qsort#/1 ,split#/2} / {0/0,add/2,false/0,nil/0,pair/2,s/1,true/0,c_1/1,c_2/0,c_3/1,c_4/0,c_5/0,c_6/2,c_7/0,c_8/0 ,c_9/1,c_10/1,c_11/0,c_12/2,c_13/0} - Obligation: innermost runtime complexity wrt. defined symbols {append#,f_1#,f_2#,f_3#,lt#,qsort# ,split#} and constructors {0,add,false,nil,pair,s,true} + Applied Processor: UsableRules + Details: We replace rewrite rules by usable rules: f_1(pair(X,Z),N,M,Y) -> f_2(lt(N,M),N,M,Y,X,Z) f_2(false(),N,M,Y,X,Z) -> pair(add(M,X),Z) f_2(true(),N,M,Y,X,Z) -> pair(X,add(M,Z)) lt(0(),s(X)) -> true() lt(s(X),0()) -> false() lt(s(X),s(Y)) -> lt(X,Y) split(N,add(M,Y)) -> f_1(split(N,Y),N,M,Y) split(N,nil()) -> pair(nil(),nil()) f_3#(pair(Y,Z),N,X) -> c_6(qsort#(Y),qsort#(Z)) qsort#(add(N,X)) -> c_10(f_3#(split(N,X),N,X)) ** Step 5.a:3: WeightGap WORST_CASE(?,O(n^1)) + Considered Problem: - Strict DPs: f_3#(pair(Y,Z),N,X) -> c_6(qsort#(Y),qsort#(Z)) qsort#(add(N,X)) -> c_10(f_3#(split(N,X),N,X)) - Weak TRS: f_1(pair(X,Z),N,M,Y) -> f_2(lt(N,M),N,M,Y,X,Z) f_2(false(),N,M,Y,X,Z) -> pair(add(M,X),Z) f_2(true(),N,M,Y,X,Z) -> pair(X,add(M,Z)) lt(0(),s(X)) -> true() lt(s(X),0()) -> false() lt(s(X),s(Y)) -> lt(X,Y) split(N,add(M,Y)) -> f_1(split(N,Y),N,M,Y) split(N,nil()) -> pair(nil(),nil()) - Signature: {append/2,f_1/4,f_2/6,f_3/3,lt/2,qsort/1,split/2,append#/2,f_1#/4,f_2#/6,f_3#/3,lt#/2,qsort#/1 ,split#/2} / {0/0,add/2,false/0,nil/0,pair/2,s/1,true/0,c_1/1,c_2/0,c_3/1,c_4/0,c_5/0,c_6/2,c_7/0,c_8/0 ,c_9/1,c_10/1,c_11/0,c_12/2,c_13/0} - Obligation: innermost runtime complexity wrt. defined symbols {append#,f_1#,f_2#,f_3#,lt#,qsort# ,split#} and constructors {0,add,false,nil,pair,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(f_1) = {1}, uargs(f_2) = {1}, uargs(f_3#) = {1}, uargs(c_6) = {1,2}, uargs(c_10) = {1} Following symbols are considered usable: all TcT has computed the following interpretation: p(0) = [1] p(add) = [1] x1 + [1] x2 + [0] p(append) = [0] p(f_1) = [1] x1 + [0] p(f_2) = [1] x1 + [1] p(f_3) = [0] p(false) = [1] p(lt) = [1] p(nil) = [0] p(pair) = [2] p(qsort) = [0] p(s) = [0] p(split) = [2] p(true) = [1] p(append#) = [1] x1 + [2] p(f_1#) = [1] x2 + [1] p(f_2#) = [1] x6 + [4] p(f_3#) = [1] x1 + [0] p(lt#) = [0] p(qsort#) = [7] p(split#) = [0] p(c_1) = [0] p(c_2) = [0] p(c_3) = [0] p(c_4) = [0] p(c_5) = [0] p(c_6) = [1] x1 + [1] x2 + [0] p(c_7) = [0] p(c_8) = [0] p(c_9) = [0] p(c_10) = [1] x1 + [0] p(c_11) = [0] p(c_12) = [0] p(c_13) = [0] Following rules are strictly oriented: qsort#(add(N,X)) = [7] > [2] = c_10(f_3#(split(N,X),N,X)) Following rules are (at-least) weakly oriented: f_3#(pair(Y,Z),N,X) = [2] >= [14] = c_6(qsort#(Y),qsort#(Z)) f_1(pair(X,Z),N,M,Y) = [2] >= [2] = f_2(lt(N,M),N,M,Y,X,Z) f_2(false(),N,M,Y,X,Z) = [2] >= [2] = pair(add(M,X),Z) f_2(true(),N,M,Y,X,Z) = [2] >= [2] = pair(X,add(M,Z)) lt(0(),s(X)) = [1] >= [1] = true() lt(s(X),0()) = [1] >= [1] = false() lt(s(X),s(Y)) = [1] >= [1] = lt(X,Y) split(N,add(M,Y)) = [2] >= [2] = f_1(split(N,Y),N,M,Y) split(N,nil()) = [2] >= [2] = pair(nil(),nil()) Further, it can be verified that all rules not oriented are covered by the weightgap condition. ** Step 5.a:4: WeightGap WORST_CASE(?,O(n^1)) + Considered Problem: - Strict DPs: f_3#(pair(Y,Z),N,X) -> c_6(qsort#(Y),qsort#(Z)) - Weak DPs: qsort#(add(N,X)) -> c_10(f_3#(split(N,X),N,X)) - Weak TRS: f_1(pair(X,Z),N,M,Y) -> f_2(lt(N,M),N,M,Y,X,Z) f_2(false(),N,M,Y,X,Z) -> pair(add(M,X),Z) f_2(true(),N,M,Y,X,Z) -> pair(X,add(M,Z)) lt(0(),s(X)) -> true() lt(s(X),0()) -> false() lt(s(X),s(Y)) -> lt(X,Y) split(N,add(M,Y)) -> f_1(split(N,Y),N,M,Y) split(N,nil()) -> pair(nil(),nil()) - Signature: {append/2,f_1/4,f_2/6,f_3/3,lt/2,qsort/1,split/2,append#/2,f_1#/4,f_2#/6,f_3#/3,lt#/2,qsort#/1 ,split#/2} / {0/0,add/2,false/0,nil/0,pair/2,s/1,true/0,c_1/1,c_2/0,c_3/1,c_4/0,c_5/0,c_6/2,c_7/0,c_8/0 ,c_9/1,c_10/1,c_11/0,c_12/2,c_13/0} - Obligation: innermost runtime complexity wrt. defined symbols {append#,f_1#,f_2#,f_3#,lt#,qsort# ,split#} and constructors {0,add,false,nil,pair,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(f_1) = {1}, uargs(f_2) = {1}, uargs(f_3#) = {1}, uargs(c_6) = {1,2}, uargs(c_10) = {1} Following symbols are considered usable: all TcT has computed the following interpretation: p(0) = [0] p(add) = [1] x2 + [1] p(append) = [1] x2 + [4] p(f_1) = [1] x1 + [1] p(f_2) = [1] x1 + [1] x5 + [1] x6 + [0] p(f_3) = [1] x1 + [1] x2 + [2] x3 + [2] p(false) = [1] p(lt) = [1] p(nil) = [0] p(pair) = [1] x1 + [1] x2 + [0] p(qsort) = [1] x1 + [4] p(s) = [1] x1 + [4] p(split) = [1] x2 + [0] p(true) = [1] p(append#) = [2] x1 + [0] p(f_1#) = [0] p(f_2#) = [2] x4 + [1] x5 + [0] p(f_3#) = [1] x1 + [1] p(lt#) = [4] x1 + [2] p(qsort#) = [1] x1 + [0] p(split#) = [2] x1 + [1] x2 + [0] p(c_1) = [1] x1 + [0] p(c_2) = [2] p(c_3) = [2] p(c_4) = [0] p(c_5) = [0] p(c_6) = [1] x1 + [1] x2 + [0] p(c_7) = [0] p(c_8) = [2] p(c_9) = [0] p(c_10) = [1] x1 + [0] p(c_11) = [2] p(c_12) = [1] x1 + [4] x2 + [1] p(c_13) = [0] Following rules are strictly oriented: f_3#(pair(Y,Z),N,X) = [1] Y + [1] Z + [1] > [1] Y + [1] Z + [0] = c_6(qsort#(Y),qsort#(Z)) Following rules are (at-least) weakly oriented: qsort#(add(N,X)) = [1] X + [1] >= [1] X + [1] = c_10(f_3#(split(N,X),N,X)) f_1(pair(X,Z),N,M,Y) = [1] X + [1] Z + [1] >= [1] X + [1] Z + [1] = f_2(lt(N,M),N,M,Y,X,Z) f_2(false(),N,M,Y,X,Z) = [1] X + [1] Z + [1] >= [1] X + [1] Z + [1] = pair(add(M,X),Z) f_2(true(),N,M,Y,X,Z) = [1] X + [1] Z + [1] >= [1] X + [1] Z + [1] = pair(X,add(M,Z)) lt(0(),s(X)) = [1] >= [1] = true() lt(s(X),0()) = [1] >= [1] = false() lt(s(X),s(Y)) = [1] >= [1] = lt(X,Y) split(N,add(M,Y)) = [1] Y + [1] >= [1] Y + [1] = f_1(split(N,Y),N,M,Y) split(N,nil()) = [0] >= [0] = pair(nil(),nil()) Further, it can be verified that all rules not oriented are covered by the weightgap condition. ** Step 5.a:5: EmptyProcessor WORST_CASE(?,O(1)) + Considered Problem: - Weak DPs: f_3#(pair(Y,Z),N,X) -> c_6(qsort#(Y),qsort#(Z)) qsort#(add(N,X)) -> c_10(f_3#(split(N,X),N,X)) - Weak TRS: f_1(pair(X,Z),N,M,Y) -> f_2(lt(N,M),N,M,Y,X,Z) f_2(false(),N,M,Y,X,Z) -> pair(add(M,X),Z) f_2(true(),N,M,Y,X,Z) -> pair(X,add(M,Z)) lt(0(),s(X)) -> true() lt(s(X),0()) -> false() lt(s(X),s(Y)) -> lt(X,Y) split(N,add(M,Y)) -> f_1(split(N,Y),N,M,Y) split(N,nil()) -> pair(nil(),nil()) - Signature: {append/2,f_1/4,f_2/6,f_3/3,lt/2,qsort/1,split/2,append#/2,f_1#/4,f_2#/6,f_3#/3,lt#/2,qsort#/1 ,split#/2} / {0/0,add/2,false/0,nil/0,pair/2,s/1,true/0,c_1/1,c_2/0,c_3/1,c_4/0,c_5/0,c_6/2,c_7/0,c_8/0 ,c_9/1,c_10/1,c_11/0,c_12/2,c_13/0} - Obligation: innermost runtime complexity wrt. defined symbols {append#,f_1#,f_2#,f_3#,lt#,qsort# ,split#} and constructors {0,add,false,nil,pair,s,true} + Applied Processor: EmptyProcessor + Details: The problem is already closed. The intended complexity is O(1). ** Step 5.b:1: DecomposeDG WORST_CASE(?,O(n^2)) + Considered Problem: - Strict DPs: append#(add(N,X),Y) -> c_1(append#(X,Y)) f_1#(pair(X,Z),N,M,Y) -> c_3(lt#(N,M)) lt#(s(X),s(Y)) -> c_9(lt#(X,Y)) split#(N,add(M,Y)) -> c_12(f_1#(split(N,Y),N,M,Y),split#(N,Y)) - Weak DPs: f_3#(pair(Y,Z),N,X) -> append#(qsort(Y),add(X,qsort(Z))) f_3#(pair(Y,Z),N,X) -> qsort#(Y) f_3#(pair(Y,Z),N,X) -> qsort#(Z) qsort#(add(N,X)) -> f_3#(split(N,X),N,X) qsort#(add(N,X)) -> split#(N,X) - Weak TRS: append(add(N,X),Y) -> add(N,append(X,Y)) append(nil(),Y) -> Y f_1(pair(X,Z),N,M,Y) -> f_2(lt(N,M),N,M,Y,X,Z) f_2(false(),N,M,Y,X,Z) -> pair(add(M,X),Z) f_2(true(),N,M,Y,X,Z) -> pair(X,add(M,Z)) f_3(pair(Y,Z),N,X) -> append(qsort(Y),add(X,qsort(Z))) lt(0(),s(X)) -> true() lt(s(X),0()) -> false() lt(s(X),s(Y)) -> lt(X,Y) qsort(add(N,X)) -> f_3(split(N,X),N,X) qsort(nil()) -> nil() split(N,add(M,Y)) -> f_1(split(N,Y),N,M,Y) split(N,nil()) -> pair(nil(),nil()) - Signature: {append/2,f_1/4,f_2/6,f_3/3,lt/2,qsort/1,split/2,append#/2,f_1#/4,f_2#/6,f_3#/3,lt#/2,qsort#/1 ,split#/2} / {0/0,add/2,false/0,nil/0,pair/2,s/1,true/0,c_1/1,c_2/0,c_3/1,c_4/0,c_5/0,c_6/3,c_7/0,c_8/0 ,c_9/1,c_10/2,c_11/0,c_12/2,c_13/0} - Obligation: innermost runtime complexity wrt. defined symbols {append#,f_1#,f_2#,f_3#,lt#,qsort# ,split#} and constructors {0,add,false,nil,pair,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 append#(add(N,X),Y) -> c_1(append#(X,Y)) f_3#(pair(Y,Z),N,X) -> append#(qsort(Y),add(X,qsort(Z))) f_3#(pair(Y,Z),N,X) -> qsort#(Y) f_3#(pair(Y,Z),N,X) -> qsort#(Z) qsort#(add(N,X)) -> f_3#(split(N,X),N,X) qsort#(add(N,X)) -> split#(N,X) split#(N,add(M,Y)) -> c_12(f_1#(split(N,Y),N,M,Y),split#(N,Y)) and a lower component f_1#(pair(X,Z),N,M,Y) -> c_3(lt#(N,M)) lt#(s(X),s(Y)) -> c_9(lt#(X,Y)) Further, following extension rules are added to the lower component. append#(add(N,X),Y) -> append#(X,Y) f_3#(pair(Y,Z),N,X) -> append#(qsort(Y),add(X,qsort(Z))) f_3#(pair(Y,Z),N,X) -> qsort#(Y) f_3#(pair(Y,Z),N,X) -> qsort#(Z) qsort#(add(N,X)) -> f_3#(split(N,X),N,X) qsort#(add(N,X)) -> split#(N,X) split#(N,add(M,Y)) -> f_1#(split(N,Y),N,M,Y) split#(N,add(M,Y)) -> split#(N,Y) *** Step 5.b:1.a:1: SimplifyRHS WORST_CASE(?,O(n^1)) + Considered Problem: - Strict DPs: append#(add(N,X),Y) -> c_1(append#(X,Y)) split#(N,add(M,Y)) -> c_12(f_1#(split(N,Y),N,M,Y),split#(N,Y)) - Weak DPs: f_3#(pair(Y,Z),N,X) -> append#(qsort(Y),add(X,qsort(Z))) f_3#(pair(Y,Z),N,X) -> qsort#(Y) f_3#(pair(Y,Z),N,X) -> qsort#(Z) qsort#(add(N,X)) -> f_3#(split(N,X),N,X) qsort#(add(N,X)) -> split#(N,X) - Weak TRS: append(add(N,X),Y) -> add(N,append(X,Y)) append(nil(),Y) -> Y f_1(pair(X,Z),N,M,Y) -> f_2(lt(N,M),N,M,Y,X,Z) f_2(false(),N,M,Y,X,Z) -> pair(add(M,X),Z) f_2(true(),N,M,Y,X,Z) -> pair(X,add(M,Z)) f_3(pair(Y,Z),N,X) -> append(qsort(Y),add(X,qsort(Z))) lt(0(),s(X)) -> true() lt(s(X),0()) -> false() lt(s(X),s(Y)) -> lt(X,Y) qsort(add(N,X)) -> f_3(split(N,X),N,X) qsort(nil()) -> nil() split(N,add(M,Y)) -> f_1(split(N,Y),N,M,Y) split(N,nil()) -> pair(nil(),nil()) - Signature: {append/2,f_1/4,f_2/6,f_3/3,lt/2,qsort/1,split/2,append#/2,f_1#/4,f_2#/6,f_3#/3,lt#/2,qsort#/1 ,split#/2} / {0/0,add/2,false/0,nil/0,pair/2,s/1,true/0,c_1/1,c_2/0,c_3/1,c_4/0,c_5/0,c_6/3,c_7/0,c_8/0 ,c_9/1,c_10/2,c_11/0,c_12/2,c_13/0} - Obligation: innermost runtime complexity wrt. defined symbols {append#,f_1#,f_2#,f_3#,lt#,qsort# ,split#} and constructors {0,add,false,nil,pair,s,true} + Applied Processor: SimplifyRHS + Details: Consider the dependency graph 1:S:append#(add(N,X),Y) -> c_1(append#(X,Y)) -->_1 append#(add(N,X),Y) -> c_1(append#(X,Y)):1 2:S:split#(N,add(M,Y)) -> c_12(f_1#(split(N,Y),N,M,Y),split#(N,Y)) -->_2 split#(N,add(M,Y)) -> c_12(f_1#(split(N,Y),N,M,Y),split#(N,Y)):2 3:W:f_3#(pair(Y,Z),N,X) -> append#(qsort(Y),add(X,qsort(Z))) -->_1 append#(add(N,X),Y) -> c_1(append#(X,Y)):1 4:W:f_3#(pair(Y,Z),N,X) -> qsort#(Y) -->_1 qsort#(add(N,X)) -> split#(N,X):7 -->_1 qsort#(add(N,X)) -> f_3#(split(N,X),N,X):6 5:W:f_3#(pair(Y,Z),N,X) -> qsort#(Z) -->_1 qsort#(add(N,X)) -> split#(N,X):7 -->_1 qsort#(add(N,X)) -> f_3#(split(N,X),N,X):6 6:W:qsort#(add(N,X)) -> f_3#(split(N,X),N,X) -->_1 f_3#(pair(Y,Z),N,X) -> qsort#(Z):5 -->_1 f_3#(pair(Y,Z),N,X) -> qsort#(Y):4 -->_1 f_3#(pair(Y,Z),N,X) -> append#(qsort(Y),add(X,qsort(Z))):3 7:W:qsort#(add(N,X)) -> split#(N,X) -->_1 split#(N,add(M,Y)) -> c_12(f_1#(split(N,Y),N,M,Y),split#(N,Y)):2 Due to missing edges in the depndency graph, the right-hand sides of following rules could be simplified: split#(N,add(M,Y)) -> c_12(split#(N,Y)) *** Step 5.b:1.a:2: WeightGap WORST_CASE(?,O(n^1)) + Considered Problem: - Strict DPs: append#(add(N,X),Y) -> c_1(append#(X,Y)) split#(N,add(M,Y)) -> c_12(split#(N,Y)) - Weak DPs: f_3#(pair(Y,Z),N,X) -> append#(qsort(Y),add(X,qsort(Z))) f_3#(pair(Y,Z),N,X) -> qsort#(Y) f_3#(pair(Y,Z),N,X) -> qsort#(Z) qsort#(add(N,X)) -> f_3#(split(N,X),N,X) qsort#(add(N,X)) -> split#(N,X) - Weak TRS: append(add(N,X),Y) -> add(N,append(X,Y)) append(nil(),Y) -> Y f_1(pair(X,Z),N,M,Y) -> f_2(lt(N,M),N,M,Y,X,Z) f_2(false(),N,M,Y,X,Z) -> pair(add(M,X),Z) f_2(true(),N,M,Y,X,Z) -> pair(X,add(M,Z)) f_3(pair(Y,Z),N,X) -> append(qsort(Y),add(X,qsort(Z))) lt(0(),s(X)) -> true() lt(s(X),0()) -> false() lt(s(X),s(Y)) -> lt(X,Y) qsort(add(N,X)) -> f_3(split(N,X),N,X) qsort(nil()) -> nil() split(N,add(M,Y)) -> f_1(split(N,Y),N,M,Y) split(N,nil()) -> pair(nil(),nil()) - Signature: {append/2,f_1/4,f_2/6,f_3/3,lt/2,qsort/1,split/2,append#/2,f_1#/4,f_2#/6,f_3#/3,lt#/2,qsort#/1 ,split#/2} / {0/0,add/2,false/0,nil/0,pair/2,s/1,true/0,c_1/1,c_2/0,c_3/1,c_4/0,c_5/0,c_6/3,c_7/0,c_8/0 ,c_9/1,c_10/2,c_11/0,c_12/1,c_13/0} - Obligation: innermost runtime complexity wrt. defined symbols {append#,f_1#,f_2#,f_3#,lt#,qsort# ,split#} and constructors {0,add,false,nil,pair,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(add) = {2}, uargs(append) = {1,2}, uargs(f_1) = {1}, uargs(f_2) = {1}, uargs(f_3) = {1}, uargs(append#) = {1,2}, uargs(f_3#) = {1}, uargs(c_1) = {1}, uargs(c_12) = {1} Following symbols are considered usable: all TcT has computed the following interpretation: p(0) = [0] p(add) = [1] x2 + [2] p(append) = [1] x1 + [1] x2 + [0] p(f_1) = [1] x1 + [2] p(f_2) = [1] x1 + [1] x5 + [1] x6 + [0] p(f_3) = [1] x1 + [2] p(false) = [2] p(lt) = [2] p(nil) = [0] p(pair) = [1] x1 + [1] x2 + [0] p(qsort) = [1] x1 + [0] p(s) = [1] p(split) = [1] x2 + [0] p(true) = [2] p(append#) = [1] x1 + [1] x2 + [0] p(f_1#) = [1] x1 + [1] x4 + [1] p(f_2#) = [1] x1 + [2] x4 + [1] x5 + [2] x6 + [0] p(f_3#) = [1] x1 + [3] p(lt#) = [1] x2 + [1] p(qsort#) = [1] x1 + [1] p(split#) = [0] p(c_1) = [1] x1 + [0] p(c_2) = [0] p(c_3) = [1] p(c_4) = [1] p(c_5) = [2] p(c_6) = [1] x1 + [1] x3 + [0] p(c_7) = [0] p(c_8) = [0] p(c_9) = [1] x1 + [4] p(c_10) = [2] x1 + [1] x2 + [0] p(c_11) = [2] p(c_12) = [1] x1 + [0] p(c_13) = [1] Following rules are strictly oriented: append#(add(N,X),Y) = [1] X + [1] Y + [2] > [1] X + [1] Y + [0] = c_1(append#(X,Y)) Following rules are (at-least) weakly oriented: f_3#(pair(Y,Z),N,X) = [1] Y + [1] Z + [3] >= [1] Y + [1] Z + [2] = append#(qsort(Y),add(X,qsort(Z))) f_3#(pair(Y,Z),N,X) = [1] Y + [1] Z + [3] >= [1] Y + [1] = qsort#(Y) f_3#(pair(Y,Z),N,X) = [1] Y + [1] Z + [3] >= [1] Z + [1] = qsort#(Z) qsort#(add(N,X)) = [1] X + [3] >= [1] X + [3] = f_3#(split(N,X),N,X) qsort#(add(N,X)) = [1] X + [3] >= [0] = split#(N,X) split#(N,add(M,Y)) = [0] >= [0] = c_12(split#(N,Y)) append(add(N,X),Y) = [1] X + [1] Y + [2] >= [1] X + [1] Y + [2] = add(N,append(X,Y)) append(nil(),Y) = [1] Y + [0] >= [1] Y + [0] = Y f_1(pair(X,Z),N,M,Y) = [1] X + [1] Z + [2] >= [1] X + [1] Z + [2] = f_2(lt(N,M),N,M,Y,X,Z) f_2(false(),N,M,Y,X,Z) = [1] X + [1] Z + [2] >= [1] X + [1] Z + [2] = pair(add(M,X),Z) f_2(true(),N,M,Y,X,Z) = [1] X + [1] Z + [2] >= [1] X + [1] Z + [2] = pair(X,add(M,Z)) f_3(pair(Y,Z),N,X) = [1] Y + [1] Z + [2] >= [1] Y + [1] Z + [2] = append(qsort(Y),add(X,qsort(Z))) lt(0(),s(X)) = [2] >= [2] = true() lt(s(X),0()) = [2] >= [2] = false() lt(s(X),s(Y)) = [2] >= [2] = lt(X,Y) qsort(add(N,X)) = [1] X + [2] >= [1] X + [2] = f_3(split(N,X),N,X) qsort(nil()) = [0] >= [0] = nil() split(N,add(M,Y)) = [1] Y + [2] >= [1] Y + [2] = f_1(split(N,Y),N,M,Y) split(N,nil()) = [0] >= [0] = pair(nil(),nil()) Further, it can be verified that all rules not oriented are covered by the weightgap condition. *** Step 5.b:1.a:3: WeightGap WORST_CASE(?,O(n^1)) + Considered Problem: - Strict DPs: split#(N,add(M,Y)) -> c_12(split#(N,Y)) - Weak DPs: append#(add(N,X),Y) -> c_1(append#(X,Y)) f_3#(pair(Y,Z),N,X) -> append#(qsort(Y),add(X,qsort(Z))) f_3#(pair(Y,Z),N,X) -> qsort#(Y) f_3#(pair(Y,Z),N,X) -> qsort#(Z) qsort#(add(N,X)) -> f_3#(split(N,X),N,X) qsort#(add(N,X)) -> split#(N,X) - Weak TRS: append(add(N,X),Y) -> add(N,append(X,Y)) append(nil(),Y) -> Y f_1(pair(X,Z),N,M,Y) -> f_2(lt(N,M),N,M,Y,X,Z) f_2(false(),N,M,Y,X,Z) -> pair(add(M,X),Z) f_2(true(),N,M,Y,X,Z) -> pair(X,add(M,Z)) f_3(pair(Y,Z),N,X) -> append(qsort(Y),add(X,qsort(Z))) lt(0(),s(X)) -> true() lt(s(X),0()) -> false() lt(s(X),s(Y)) -> lt(X,Y) qsort(add(N,X)) -> f_3(split(N,X),N,X) qsort(nil()) -> nil() split(N,add(M,Y)) -> f_1(split(N,Y),N,M,Y) split(N,nil()) -> pair(nil(),nil()) - Signature: {append/2,f_1/4,f_2/6,f_3/3,lt/2,qsort/1,split/2,append#/2,f_1#/4,f_2#/6,f_3#/3,lt#/2,qsort#/1 ,split#/2} / {0/0,add/2,false/0,nil/0,pair/2,s/1,true/0,c_1/1,c_2/0,c_3/1,c_4/0,c_5/0,c_6/3,c_7/0,c_8/0 ,c_9/1,c_10/2,c_11/0,c_12/1,c_13/0} - Obligation: innermost runtime complexity wrt. defined symbols {append#,f_1#,f_2#,f_3#,lt#,qsort# ,split#} and constructors {0,add,false,nil,pair,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(add) = {2}, uargs(append) = {1,2}, uargs(f_1) = {1}, uargs(f_2) = {1}, uargs(f_3) = {1}, uargs(append#) = {1,2}, uargs(f_3#) = {1}, uargs(c_1) = {1}, uargs(c_12) = {1} Following symbols are considered usable: all TcT has computed the following interpretation: p(0) = [1] p(add) = [1] x2 + [2] p(append) = [1] x1 + [1] x2 + [0] p(f_1) = [1] x1 + [2] p(f_2) = [1] x1 + [1] x5 + [1] x6 + [2] p(f_3) = [1] x1 + [2] p(false) = [0] p(lt) = [0] p(nil) = [0] p(pair) = [1] x1 + [1] x2 + [0] p(qsort) = [1] x1 + [0] p(s) = [1] x1 + [0] p(split) = [1] x2 + [0] p(true) = [0] p(append#) = [1] x1 + [1] x2 + [0] p(f_1#) = [1] x2 + [2] x3 + [2] x4 + [2] p(f_2#) = [2] x3 + [2] x4 + [1] x5 + [2] p(f_3#) = [1] x1 + [2] p(lt#) = [1] x1 + [2] x2 + [0] p(qsort#) = [1] x1 + [2] p(split#) = [1] x2 + [4] p(c_1) = [1] x1 + [2] p(c_2) = [0] p(c_3) = [0] p(c_4) = [1] p(c_5) = [0] p(c_6) = [1] x1 + [1] x3 + [1] p(c_7) = [2] p(c_8) = [4] p(c_9) = [1] x1 + [1] p(c_10) = [1] x1 + [0] p(c_11) = [0] p(c_12) = [1] x1 + [0] p(c_13) = [1] Following rules are strictly oriented: split#(N,add(M,Y)) = [1] Y + [6] > [1] Y + [4] = c_12(split#(N,Y)) Following rules are (at-least) weakly oriented: append#(add(N,X),Y) = [1] X + [1] Y + [2] >= [1] X + [1] Y + [2] = c_1(append#(X,Y)) f_3#(pair(Y,Z),N,X) = [1] Y + [1] Z + [2] >= [1] Y + [1] Z + [2] = append#(qsort(Y),add(X,qsort(Z))) f_3#(pair(Y,Z),N,X) = [1] Y + [1] Z + [2] >= [1] Y + [2] = qsort#(Y) f_3#(pair(Y,Z),N,X) = [1] Y + [1] Z + [2] >= [1] Z + [2] = qsort#(Z) qsort#(add(N,X)) = [1] X + [4] >= [1] X + [2] = f_3#(split(N,X),N,X) qsort#(add(N,X)) = [1] X + [4] >= [1] X + [4] = split#(N,X) append(add(N,X),Y) = [1] X + [1] Y + [2] >= [1] X + [1] Y + [2] = add(N,append(X,Y)) append(nil(),Y) = [1] Y + [0] >= [1] Y + [0] = Y f_1(pair(X,Z),N,M,Y) = [1] X + [1] Z + [2] >= [1] X + [1] Z + [2] = f_2(lt(N,M),N,M,Y,X,Z) f_2(false(),N,M,Y,X,Z) = [1] X + [1] Z + [2] >= [1] X + [1] Z + [2] = pair(add(M,X),Z) f_2(true(),N,M,Y,X,Z) = [1] X + [1] Z + [2] >= [1] X + [1] Z + [2] = pair(X,add(M,Z)) f_3(pair(Y,Z),N,X) = [1] Y + [1] Z + [2] >= [1] Y + [1] Z + [2] = append(qsort(Y),add(X,qsort(Z))) lt(0(),s(X)) = [0] >= [0] = true() lt(s(X),0()) = [0] >= [0] = false() lt(s(X),s(Y)) = [0] >= [0] = lt(X,Y) qsort(add(N,X)) = [1] X + [2] >= [1] X + [2] = f_3(split(N,X),N,X) qsort(nil()) = [0] >= [0] = nil() split(N,add(M,Y)) = [1] Y + [2] >= [1] Y + [2] = f_1(split(N,Y),N,M,Y) split(N,nil()) = [0] >= [0] = pair(nil(),nil()) Further, it can be verified that all rules not oriented are covered by the weightgap condition. *** Step 5.b:1.a:4: EmptyProcessor WORST_CASE(?,O(1)) + Considered Problem: - Weak DPs: append#(add(N,X),Y) -> c_1(append#(X,Y)) f_3#(pair(Y,Z),N,X) -> append#(qsort(Y),add(X,qsort(Z))) f_3#(pair(Y,Z),N,X) -> qsort#(Y) f_3#(pair(Y,Z),N,X) -> qsort#(Z) qsort#(add(N,X)) -> f_3#(split(N,X),N,X) qsort#(add(N,X)) -> split#(N,X) split#(N,add(M,Y)) -> c_12(split#(N,Y)) - Weak TRS: append(add(N,X),Y) -> add(N,append(X,Y)) append(nil(),Y) -> Y f_1(pair(X,Z),N,M,Y) -> f_2(lt(N,M),N,M,Y,X,Z) f_2(false(),N,M,Y,X,Z) -> pair(add(M,X),Z) f_2(true(),N,M,Y,X,Z) -> pair(X,add(M,Z)) f_3(pair(Y,Z),N,X) -> append(qsort(Y),add(X,qsort(Z))) lt(0(),s(X)) -> true() lt(s(X),0()) -> false() lt(s(X),s(Y)) -> lt(X,Y) qsort(add(N,X)) -> f_3(split(N,X),N,X) qsort(nil()) -> nil() split(N,add(M,Y)) -> f_1(split(N,Y),N,M,Y) split(N,nil()) -> pair(nil(),nil()) - Signature: {append/2,f_1/4,f_2/6,f_3/3,lt/2,qsort/1,split/2,append#/2,f_1#/4,f_2#/6,f_3#/3,lt#/2,qsort#/1 ,split#/2} / {0/0,add/2,false/0,nil/0,pair/2,s/1,true/0,c_1/1,c_2/0,c_3/1,c_4/0,c_5/0,c_6/3,c_7/0,c_8/0 ,c_9/1,c_10/2,c_11/0,c_12/1,c_13/0} - Obligation: innermost runtime complexity wrt. defined symbols {append#,f_1#,f_2#,f_3#,lt#,qsort# ,split#} and constructors {0,add,false,nil,pair,s,true} + Applied Processor: EmptyProcessor + Details: The problem is already closed. The intended complexity is O(1). *** Step 5.b:1.b:1: RemoveWeakSuffixes WORST_CASE(?,O(n^1)) + Considered Problem: - Strict DPs: f_1#(pair(X,Z),N,M,Y) -> c_3(lt#(N,M)) lt#(s(X),s(Y)) -> c_9(lt#(X,Y)) - Weak DPs: append#(add(N,X),Y) -> append#(X,Y) f_3#(pair(Y,Z),N,X) -> append#(qsort(Y),add(X,qsort(Z))) f_3#(pair(Y,Z),N,X) -> qsort#(Y) f_3#(pair(Y,Z),N,X) -> qsort#(Z) qsort#(add(N,X)) -> f_3#(split(N,X),N,X) qsort#(add(N,X)) -> split#(N,X) split#(N,add(M,Y)) -> f_1#(split(N,Y),N,M,Y) split#(N,add(M,Y)) -> split#(N,Y) - Weak TRS: append(add(N,X),Y) -> add(N,append(X,Y)) append(nil(),Y) -> Y f_1(pair(X,Z),N,M,Y) -> f_2(lt(N,M),N,M,Y,X,Z) f_2(false(),N,M,Y,X,Z) -> pair(add(M,X),Z) f_2(true(),N,M,Y,X,Z) -> pair(X,add(M,Z)) f_3(pair(Y,Z),N,X) -> append(qsort(Y),add(X,qsort(Z))) lt(0(),s(X)) -> true() lt(s(X),0()) -> false() lt(s(X),s(Y)) -> lt(X,Y) qsort(add(N,X)) -> f_3(split(N,X),N,X) qsort(nil()) -> nil() split(N,add(M,Y)) -> f_1(split(N,Y),N,M,Y) split(N,nil()) -> pair(nil(),nil()) - Signature: {append/2,f_1/4,f_2/6,f_3/3,lt/2,qsort/1,split/2,append#/2,f_1#/4,f_2#/6,f_3#/3,lt#/2,qsort#/1 ,split#/2} / {0/0,add/2,false/0,nil/0,pair/2,s/1,true/0,c_1/1,c_2/0,c_3/1,c_4/0,c_5/0,c_6/3,c_7/0,c_8/0 ,c_9/1,c_10/2,c_11/0,c_12/2,c_13/0} - Obligation: innermost runtime complexity wrt. defined symbols {append#,f_1#,f_2#,f_3#,lt#,qsort# ,split#} and constructors {0,add,false,nil,pair,s,true} + Applied Processor: RemoveWeakSuffixes + Details: Consider the dependency graph 1:S:f_1#(pair(X,Z),N,M,Y) -> c_3(lt#(N,M)) -->_1 lt#(s(X),s(Y)) -> c_9(lt#(X,Y)):2 2:S:lt#(s(X),s(Y)) -> c_9(lt#(X,Y)) -->_1 lt#(s(X),s(Y)) -> c_9(lt#(X,Y)):2 3:W:append#(add(N,X),Y) -> append#(X,Y) -->_1 append#(add(N,X),Y) -> append#(X,Y):3 4:W:f_3#(pair(Y,Z),N,X) -> append#(qsort(Y),add(X,qsort(Z))) -->_1 append#(add(N,X),Y) -> append#(X,Y):3 5:W:f_3#(pair(Y,Z),N,X) -> qsort#(Y) -->_1 qsort#(add(N,X)) -> split#(N,X):8 -->_1 qsort#(add(N,X)) -> f_3#(split(N,X),N,X):7 6:W:f_3#(pair(Y,Z),N,X) -> qsort#(Z) -->_1 qsort#(add(N,X)) -> split#(N,X):8 -->_1 qsort#(add(N,X)) -> f_3#(split(N,X),N,X):7 7:W:qsort#(add(N,X)) -> f_3#(split(N,X),N,X) -->_1 f_3#(pair(Y,Z),N,X) -> qsort#(Z):6 -->_1 f_3#(pair(Y,Z),N,X) -> qsort#(Y):5 -->_1 f_3#(pair(Y,Z),N,X) -> append#(qsort(Y),add(X,qsort(Z))):4 8:W:qsort#(add(N,X)) -> split#(N,X) -->_1 split#(N,add(M,Y)) -> split#(N,Y):10 -->_1 split#(N,add(M,Y)) -> f_1#(split(N,Y),N,M,Y):9 9:W:split#(N,add(M,Y)) -> f_1#(split(N,Y),N,M,Y) -->_1 f_1#(pair(X,Z),N,M,Y) -> c_3(lt#(N,M)):1 10:W:split#(N,add(M,Y)) -> split#(N,Y) -->_1 split#(N,add(M,Y)) -> split#(N,Y):10 -->_1 split#(N,add(M,Y)) -> f_1#(split(N,Y),N,M,Y):9 The following weak DPs constitute a sub-graph of the DG that is closed under successors. The DPs are removed. 4: f_3#(pair(Y,Z),N,X) -> append#(qsort(Y),add(X,qsort(Z))) 3: append#(add(N,X),Y) -> append#(X,Y) *** Step 5.b:1.b:2: UsableRules WORST_CASE(?,O(n^1)) + Considered Problem: - Strict DPs: f_1#(pair(X,Z),N,M,Y) -> c_3(lt#(N,M)) lt#(s(X),s(Y)) -> c_9(lt#(X,Y)) - Weak DPs: f_3#(pair(Y,Z),N,X) -> qsort#(Y) f_3#(pair(Y,Z),N,X) -> qsort#(Z) qsort#(add(N,X)) -> f_3#(split(N,X),N,X) qsort#(add(N,X)) -> split#(N,X) split#(N,add(M,Y)) -> f_1#(split(N,Y),N,M,Y) split#(N,add(M,Y)) -> split#(N,Y) - Weak TRS: append(add(N,X),Y) -> add(N,append(X,Y)) append(nil(),Y) -> Y f_1(pair(X,Z),N,M,Y) -> f_2(lt(N,M),N,M,Y,X,Z) f_2(false(),N,M,Y,X,Z) -> pair(add(M,X),Z) f_2(true(),N,M,Y,X,Z) -> pair(X,add(M,Z)) f_3(pair(Y,Z),N,X) -> append(qsort(Y),add(X,qsort(Z))) lt(0(),s(X)) -> true() lt(s(X),0()) -> false() lt(s(X),s(Y)) -> lt(X,Y) qsort(add(N,X)) -> f_3(split(N,X),N,X) qsort(nil()) -> nil() split(N,add(M,Y)) -> f_1(split(N,Y),N,M,Y) split(N,nil()) -> pair(nil(),nil()) - Signature: {append/2,f_1/4,f_2/6,f_3/3,lt/2,qsort/1,split/2,append#/2,f_1#/4,f_2#/6,f_3#/3,lt#/2,qsort#/1 ,split#/2} / {0/0,add/2,false/0,nil/0,pair/2,s/1,true/0,c_1/1,c_2/0,c_3/1,c_4/0,c_5/0,c_6/3,c_7/0,c_8/0 ,c_9/1,c_10/2,c_11/0,c_12/2,c_13/0} - Obligation: innermost runtime complexity wrt. defined symbols {append#,f_1#,f_2#,f_3#,lt#,qsort# ,split#} and constructors {0,add,false,nil,pair,s,true} + Applied Processor: UsableRules + Details: We replace rewrite rules by usable rules: f_1(pair(X,Z),N,M,Y) -> f_2(lt(N,M),N,M,Y,X,Z) f_2(false(),N,M,Y,X,Z) -> pair(add(M,X),Z) f_2(true(),N,M,Y,X,Z) -> pair(X,add(M,Z)) lt(0(),s(X)) -> true() lt(s(X),0()) -> false() lt(s(X),s(Y)) -> lt(X,Y) split(N,add(M,Y)) -> f_1(split(N,Y),N,M,Y) split(N,nil()) -> pair(nil(),nil()) f_1#(pair(X,Z),N,M,Y) -> c_3(lt#(N,M)) f_3#(pair(Y,Z),N,X) -> qsort#(Y) f_3#(pair(Y,Z),N,X) -> qsort#(Z) lt#(s(X),s(Y)) -> c_9(lt#(X,Y)) qsort#(add(N,X)) -> f_3#(split(N,X),N,X) qsort#(add(N,X)) -> split#(N,X) split#(N,add(M,Y)) -> f_1#(split(N,Y),N,M,Y) split#(N,add(M,Y)) -> split#(N,Y) *** Step 5.b:1.b:3: WeightGap WORST_CASE(?,O(n^1)) + Considered Problem: - Strict DPs: f_1#(pair(X,Z),N,M,Y) -> c_3(lt#(N,M)) lt#(s(X),s(Y)) -> c_9(lt#(X,Y)) - Weak DPs: f_3#(pair(Y,Z),N,X) -> qsort#(Y) f_3#(pair(Y,Z),N,X) -> qsort#(Z) qsort#(add(N,X)) -> f_3#(split(N,X),N,X) qsort#(add(N,X)) -> split#(N,X) split#(N,add(M,Y)) -> f_1#(split(N,Y),N,M,Y) split#(N,add(M,Y)) -> split#(N,Y) - Weak TRS: f_1(pair(X,Z),N,M,Y) -> f_2(lt(N,M),N,M,Y,X,Z) f_2(false(),N,M,Y,X,Z) -> pair(add(M,X),Z) f_2(true(),N,M,Y,X,Z) -> pair(X,add(M,Z)) lt(0(),s(X)) -> true() lt(s(X),0()) -> false() lt(s(X),s(Y)) -> lt(X,Y) split(N,add(M,Y)) -> f_1(split(N,Y),N,M,Y) split(N,nil()) -> pair(nil(),nil()) - Signature: {append/2,f_1/4,f_2/6,f_3/3,lt/2,qsort/1,split/2,append#/2,f_1#/4,f_2#/6,f_3#/3,lt#/2,qsort#/1 ,split#/2} / {0/0,add/2,false/0,nil/0,pair/2,s/1,true/0,c_1/1,c_2/0,c_3/1,c_4/0,c_5/0,c_6/3,c_7/0,c_8/0 ,c_9/1,c_10/2,c_11/0,c_12/2,c_13/0} - Obligation: innermost runtime complexity wrt. defined symbols {append#,f_1#,f_2#,f_3#,lt#,qsort# ,split#} and constructors {0,add,false,nil,pair,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(f_1) = {1}, uargs(f_2) = {1}, uargs(f_1#) = {1}, uargs(f_3#) = {1}, uargs(c_3) = {1}, uargs(c_9) = {1} Following symbols are considered usable: all TcT has computed the following interpretation: p(0) = [1] p(add) = [1] x1 + [1] x2 + [0] p(append) = [2] x2 + [0] p(f_1) = [1] x1 + [0] p(f_2) = [1] x1 + [0] p(f_3) = [4] x1 + [2] x2 + [2] x3 + [0] p(false) = [0] p(lt) = [0] p(nil) = [0] p(pair) = [0] p(qsort) = [1] p(s) = [1] x1 + [4] p(split) = [0] p(true) = [0] p(append#) = [4] x1 + [2] p(f_1#) = [1] x1 + [1] p(f_2#) = [2] x2 + [4] x6 + [4] p(f_3#) = [1] x1 + [1] p(lt#) = [0] p(qsort#) = [1] p(split#) = [1] p(c_1) = [1] x1 + [0] p(c_2) = [0] p(c_3) = [1] x1 + [0] p(c_4) = [2] p(c_5) = [2] p(c_6) = [1] x3 + [1] p(c_7) = [2] p(c_8) = [1] p(c_9) = [1] x1 + [0] p(c_10) = [1] x1 + [0] p(c_11) = [0] p(c_12) = [4] x2 + [0] p(c_13) = [1] Following rules are strictly oriented: f_1#(pair(X,Z),N,M,Y) = [1] > [0] = c_3(lt#(N,M)) Following rules are (at-least) weakly oriented: f_3#(pair(Y,Z),N,X) = [1] >= [1] = qsort#(Y) f_3#(pair(Y,Z),N,X) = [1] >= [1] = qsort#(Z) lt#(s(X),s(Y)) = [0] >= [0] = c_9(lt#(X,Y)) qsort#(add(N,X)) = [1] >= [1] = f_3#(split(N,X),N,X) qsort#(add(N,X)) = [1] >= [1] = split#(N,X) split#(N,add(M,Y)) = [1] >= [1] = f_1#(split(N,Y),N,M,Y) split#(N,add(M,Y)) = [1] >= [1] = split#(N,Y) f_1(pair(X,Z),N,M,Y) = [0] >= [0] = f_2(lt(N,M),N,M,Y,X,Z) f_2(false(),N,M,Y,X,Z) = [0] >= [0] = pair(add(M,X),Z) f_2(true(),N,M,Y,X,Z) = [0] >= [0] = pair(X,add(M,Z)) lt(0(),s(X)) = [0] >= [0] = true() lt(s(X),0()) = [0] >= [0] = false() lt(s(X),s(Y)) = [0] >= [0] = lt(X,Y) split(N,add(M,Y)) = [0] >= [0] = f_1(split(N,Y),N,M,Y) split(N,nil()) = [0] >= [0] = pair(nil(),nil()) Further, it can be verified that all rules not oriented are covered by the weightgap condition. *** Step 5.b:1.b:4: WeightGap WORST_CASE(?,O(n^1)) + Considered Problem: - Strict DPs: lt#(s(X),s(Y)) -> c_9(lt#(X,Y)) - Weak DPs: f_1#(pair(X,Z),N,M,Y) -> c_3(lt#(N,M)) f_3#(pair(Y,Z),N,X) -> qsort#(Y) f_3#(pair(Y,Z),N,X) -> qsort#(Z) qsort#(add(N,X)) -> f_3#(split(N,X),N,X) qsort#(add(N,X)) -> split#(N,X) split#(N,add(M,Y)) -> f_1#(split(N,Y),N,M,Y) split#(N,add(M,Y)) -> split#(N,Y) - Weak TRS: f_1(pair(X,Z),N,M,Y) -> f_2(lt(N,M),N,M,Y,X,Z) f_2(false(),N,M,Y,X,Z) -> pair(add(M,X),Z) f_2(true(),N,M,Y,X,Z) -> pair(X,add(M,Z)) lt(0(),s(X)) -> true() lt(s(X),0()) -> false() lt(s(X),s(Y)) -> lt(X,Y) split(N,add(M,Y)) -> f_1(split(N,Y),N,M,Y) split(N,nil()) -> pair(nil(),nil()) - Signature: {append/2,f_1/4,f_2/6,f_3/3,lt/2,qsort/1,split/2,append#/2,f_1#/4,f_2#/6,f_3#/3,lt#/2,qsort#/1 ,split#/2} / {0/0,add/2,false/0,nil/0,pair/2,s/1,true/0,c_1/1,c_2/0,c_3/1,c_4/0,c_5/0,c_6/3,c_7/0,c_8/0 ,c_9/1,c_10/2,c_11/0,c_12/2,c_13/0} - Obligation: innermost runtime complexity wrt. defined symbols {append#,f_1#,f_2#,f_3#,lt#,qsort# ,split#} and constructors {0,add,false,nil,pair,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(f_1) = {1}, uargs(f_2) = {1}, uargs(f_1#) = {1}, uargs(f_3#) = {1}, uargs(c_3) = {1}, uargs(c_9) = {1} Following symbols are considered usable: all TcT has computed the following interpretation: p(0) = [0] p(add) = [1] x1 + [1] x2 + [4] p(append) = [1] x1 + [1] x2 + [1] p(f_1) = [1] x1 + [1] x3 + [4] p(f_2) = [1] x1 + [1] x3 + [1] x5 + [1] x6 + [4] p(f_3) = [2] x2 + [1] p(false) = [0] p(lt) = [0] p(nil) = [0] p(pair) = [1] x1 + [1] x2 + [0] p(qsort) = [1] p(s) = [1] x1 + [6] p(split) = [1] x2 + [0] p(true) = [0] p(append#) = [4] x1 + [1] x2 + [2] p(f_1#) = [1] x1 + [1] x2 + [1] x3 + [3] p(f_2#) = [1] x1 + [1] x2 + [4] x3 + [1] x4 + [4] x5 + [1] p(f_3#) = [1] x1 + [0] p(lt#) = [1] x1 + [0] p(qsort#) = [1] x1 + [0] p(split#) = [1] x1 + [1] x2 + [1] p(c_1) = [0] p(c_2) = [0] p(c_3) = [1] x1 + [3] p(c_4) = [2] p(c_5) = [0] p(c_6) = [2] x3 + [0] p(c_7) = [1] p(c_8) = [0] p(c_9) = [1] x1 + [1] p(c_10) = [1] x1 + [2] x2 + [0] p(c_11) = [0] p(c_12) = [1] x1 + [0] p(c_13) = [0] Following rules are strictly oriented: lt#(s(X),s(Y)) = [1] X + [6] > [1] X + [1] = c_9(lt#(X,Y)) Following rules are (at-least) weakly oriented: f_1#(pair(X,Z),N,M,Y) = [1] M + [1] N + [1] X + [1] Z + [3] >= [1] N + [3] = c_3(lt#(N,M)) f_3#(pair(Y,Z),N,X) = [1] Y + [1] Z + [0] >= [1] Y + [0] = qsort#(Y) f_3#(pair(Y,Z),N,X) = [1] Y + [1] Z + [0] >= [1] Z + [0] = qsort#(Z) qsort#(add(N,X)) = [1] N + [1] X + [4] >= [1] X + [0] = f_3#(split(N,X),N,X) qsort#(add(N,X)) = [1] N + [1] X + [4] >= [1] N + [1] X + [1] = split#(N,X) split#(N,add(M,Y)) = [1] M + [1] N + [1] Y + [5] >= [1] M + [1] N + [1] Y + [3] = f_1#(split(N,Y),N,M,Y) split#(N,add(M,Y)) = [1] M + [1] N + [1] Y + [5] >= [1] N + [1] Y + [1] = split#(N,Y) f_1(pair(X,Z),N,M,Y) = [1] M + [1] X + [1] Z + [4] >= [1] M + [1] X + [1] Z + [4] = f_2(lt(N,M),N,M,Y,X,Z) f_2(false(),N,M,Y,X,Z) = [1] M + [1] X + [1] Z + [4] >= [1] M + [1] X + [1] Z + [4] = pair(add(M,X),Z) f_2(true(),N,M,Y,X,Z) = [1] M + [1] X + [1] Z + [4] >= [1] M + [1] X + [1] Z + [4] = pair(X,add(M,Z)) lt(0(),s(X)) = [0] >= [0] = true() lt(s(X),0()) = [0] >= [0] = false() lt(s(X),s(Y)) = [0] >= [0] = lt(X,Y) split(N,add(M,Y)) = [1] M + [1] Y + [4] >= [1] M + [1] Y + [4] = f_1(split(N,Y),N,M,Y) split(N,nil()) = [0] >= [0] = pair(nil(),nil()) Further, it can be verified that all rules not oriented are covered by the weightgap condition. *** Step 5.b:1.b:5: EmptyProcessor WORST_CASE(?,O(1)) + Considered Problem: - Weak DPs: f_1#(pair(X,Z),N,M,Y) -> c_3(lt#(N,M)) f_3#(pair(Y,Z),N,X) -> qsort#(Y) f_3#(pair(Y,Z),N,X) -> qsort#(Z) lt#(s(X),s(Y)) -> c_9(lt#(X,Y)) qsort#(add(N,X)) -> f_3#(split(N,X),N,X) qsort#(add(N,X)) -> split#(N,X) split#(N,add(M,Y)) -> f_1#(split(N,Y),N,M,Y) split#(N,add(M,Y)) -> split#(N,Y) - Weak TRS: f_1(pair(X,Z),N,M,Y) -> f_2(lt(N,M),N,M,Y,X,Z) f_2(false(),N,M,Y,X,Z) -> pair(add(M,X),Z) f_2(true(),N,M,Y,X,Z) -> pair(X,add(M,Z)) lt(0(),s(X)) -> true() lt(s(X),0()) -> false() lt(s(X),s(Y)) -> lt(X,Y) split(N,add(M,Y)) -> f_1(split(N,Y),N,M,Y) split(N,nil()) -> pair(nil(),nil()) - Signature: {append/2,f_1/4,f_2/6,f_3/3,lt/2,qsort/1,split/2,append#/2,f_1#/4,f_2#/6,f_3#/3,lt#/2,qsort#/1 ,split#/2} / {0/0,add/2,false/0,nil/0,pair/2,s/1,true/0,c_1/1,c_2/0,c_3/1,c_4/0,c_5/0,c_6/3,c_7/0,c_8/0 ,c_9/1,c_10/2,c_11/0,c_12/2,c_13/0} - Obligation: innermost runtime complexity wrt. defined symbols {append#,f_1#,f_2#,f_3#,lt#,qsort# ,split#} and constructors {0,add,false,nil,pair,s,true} + Applied Processor: EmptyProcessor + Details: The problem is already closed. The intended complexity is O(1). WORST_CASE(?,O(n^3))