YES We show the termination of the TRS R: le(|0|(),Y) -> true() le(s(X),|0|()) -> false() le(s(X),s(Y)) -> le(X,Y) app(nil(),Y) -> Y app(cons(N,L),Y) -> cons(N,app(L,Y)) low(N,nil()) -> nil() low(N,cons(M,L)) -> iflow(le(M,N),N,cons(M,L)) iflow(true(),N,cons(M,L)) -> cons(M,low(N,L)) iflow(false(),N,cons(M,L)) -> low(N,L) high(N,nil()) -> nil() high(N,cons(M,L)) -> ifhigh(le(M,N),N,cons(M,L)) ifhigh(true(),N,cons(M,L)) -> high(N,L) ifhigh(false(),N,cons(M,L)) -> cons(M,high(N,L)) quicksort(nil()) -> nil() quicksort(cons(N,L)) -> app(quicksort(low(N,L)),cons(N,quicksort(high(N,L)))) -- SCC decomposition. Consider the dependency pair problem (P, R), where P consists of p1: le#(s(X),s(Y)) -> le#(X,Y) p2: app#(cons(N,L),Y) -> app#(L,Y) p3: low#(N,cons(M,L)) -> iflow#(le(M,N),N,cons(M,L)) p4: low#(N,cons(M,L)) -> le#(M,N) p5: iflow#(true(),N,cons(M,L)) -> low#(N,L) p6: iflow#(false(),N,cons(M,L)) -> low#(N,L) p7: high#(N,cons(M,L)) -> ifhigh#(le(M,N),N,cons(M,L)) p8: high#(N,cons(M,L)) -> le#(M,N) p9: ifhigh#(true(),N,cons(M,L)) -> high#(N,L) p10: ifhigh#(false(),N,cons(M,L)) -> high#(N,L) p11: quicksort#(cons(N,L)) -> app#(quicksort(low(N,L)),cons(N,quicksort(high(N,L)))) p12: quicksort#(cons(N,L)) -> quicksort#(low(N,L)) p13: quicksort#(cons(N,L)) -> low#(N,L) p14: quicksort#(cons(N,L)) -> quicksort#(high(N,L)) p15: quicksort#(cons(N,L)) -> high#(N,L) and R consists of: r1: le(|0|(),Y) -> true() r2: le(s(X),|0|()) -> false() r3: le(s(X),s(Y)) -> le(X,Y) r4: app(nil(),Y) -> Y r5: app(cons(N,L),Y) -> cons(N,app(L,Y)) r6: low(N,nil()) -> nil() r7: low(N,cons(M,L)) -> iflow(le(M,N),N,cons(M,L)) r8: iflow(true(),N,cons(M,L)) -> cons(M,low(N,L)) r9: iflow(false(),N,cons(M,L)) -> low(N,L) r10: high(N,nil()) -> nil() r11: high(N,cons(M,L)) -> ifhigh(le(M,N),N,cons(M,L)) r12: ifhigh(true(),N,cons(M,L)) -> high(N,L) r13: ifhigh(false(),N,cons(M,L)) -> cons(M,high(N,L)) r14: quicksort(nil()) -> nil() r15: quicksort(cons(N,L)) -> app(quicksort(low(N,L)),cons(N,quicksort(high(N,L)))) The estimated dependency graph contains the following SCCs: {p12, p14} {p7, p9, p10} {p3, p5, p6} {p1} {p2} -- Reduction pair. Consider the dependency pair problem (P, R), where P consists of p1: quicksort#(cons(N,L)) -> quicksort#(high(N,L)) p2: quicksort#(cons(N,L)) -> quicksort#(low(N,L)) and R consists of: r1: le(|0|(),Y) -> true() r2: le(s(X),|0|()) -> false() r3: le(s(X),s(Y)) -> le(X,Y) r4: app(nil(),Y) -> Y r5: app(cons(N,L),Y) -> cons(N,app(L,Y)) r6: low(N,nil()) -> nil() r7: low(N,cons(M,L)) -> iflow(le(M,N),N,cons(M,L)) r8: iflow(true(),N,cons(M,L)) -> cons(M,low(N,L)) r9: iflow(false(),N,cons(M,L)) -> low(N,L) r10: high(N,nil()) -> nil() r11: high(N,cons(M,L)) -> ifhigh(le(M,N),N,cons(M,L)) r12: ifhigh(true(),N,cons(M,L)) -> high(N,L) r13: ifhigh(false(),N,cons(M,L)) -> cons(M,high(N,L)) r14: quicksort(nil()) -> nil() r15: quicksort(cons(N,L)) -> app(quicksort(low(N,L)),cons(N,quicksort(high(N,L)))) The set of usable rules consists of r1, r2, r3, r6, r7, r8, r9, r10, r11, r12, r13 Take the reduction pair: weighted path order base order: max/plus interpretations on natural numbers: quicksort#_A(x1) = max{11, x1 + 4} cons_A(x1,x2) = max{x1 + 14, x2 + 10} high_A(x1,x2) = x2 + 6 low_A(x1,x2) = max{9, x2 + 2} le_A(x1,x2) = x1 + 36 |0|_A = 27 true_A = 40 s_A(x1) = max{28, x1} false_A = 28 iflow_A(x1,x2,x3) = max{x1 - 20, x3 + 2} ifhigh_A(x1,x2,x3) = max{x1 - 16, x3 + 6} nil_A = 2 precedence: cons = high = low = le = |0| = true = s = false = iflow = ifhigh = nil > quicksort# partial status: pi(quicksort#) = [1] pi(cons) = [1] pi(high) = [2] pi(low) = [2] pi(le) = [] pi(|0|) = [] pi(true) = [] pi(s) = [1] pi(false) = [] pi(iflow) = [3] pi(ifhigh) = [3] pi(nil) = [] The next rules are strictly ordered: p1 We remove them from the problem. -- SCC decomposition. Consider the dependency pair problem (P, R), where P consists of p1: quicksort#(cons(N,L)) -> quicksort#(low(N,L)) and R consists of: r1: le(|0|(),Y) -> true() r2: le(s(X),|0|()) -> false() r3: le(s(X),s(Y)) -> le(X,Y) r4: app(nil(),Y) -> Y r5: app(cons(N,L),Y) -> cons(N,app(L,Y)) r6: low(N,nil()) -> nil() r7: low(N,cons(M,L)) -> iflow(le(M,N),N,cons(M,L)) r8: iflow(true(),N,cons(M,L)) -> cons(M,low(N,L)) r9: iflow(false(),N,cons(M,L)) -> low(N,L) r10: high(N,nil()) -> nil() r11: high(N,cons(M,L)) -> ifhigh(le(M,N),N,cons(M,L)) r12: ifhigh(true(),N,cons(M,L)) -> high(N,L) r13: ifhigh(false(),N,cons(M,L)) -> cons(M,high(N,L)) r14: quicksort(nil()) -> nil() r15: quicksort(cons(N,L)) -> app(quicksort(low(N,L)),cons(N,quicksort(high(N,L)))) The estimated dependency graph contains the following SCCs: {p1} -- Reduction pair. Consider the dependency pair problem (P, R), where P consists of p1: quicksort#(cons(N,L)) -> quicksort#(low(N,L)) and R consists of: r1: le(|0|(),Y) -> true() r2: le(s(X),|0|()) -> false() r3: le(s(X),s(Y)) -> le(X,Y) r4: app(nil(),Y) -> Y r5: app(cons(N,L),Y) -> cons(N,app(L,Y)) r6: low(N,nil()) -> nil() r7: low(N,cons(M,L)) -> iflow(le(M,N),N,cons(M,L)) r8: iflow(true(),N,cons(M,L)) -> cons(M,low(N,L)) r9: iflow(false(),N,cons(M,L)) -> low(N,L) r10: high(N,nil()) -> nil() r11: high(N,cons(M,L)) -> ifhigh(le(M,N),N,cons(M,L)) r12: ifhigh(true(),N,cons(M,L)) -> high(N,L) r13: ifhigh(false(),N,cons(M,L)) -> cons(M,high(N,L)) r14: quicksort(nil()) -> nil() r15: quicksort(cons(N,L)) -> app(quicksort(low(N,L)),cons(N,quicksort(high(N,L)))) The set of usable rules consists of r1, r2, r3, r6, r7, r8, r9 Take the reduction pair: weighted path order base order: max/plus interpretations on natural numbers: quicksort#_A(x1) = max{10, x1 + 6} cons_A(x1,x2) = x2 + 10 low_A(x1,x2) = x2 + 2 le_A(x1,x2) = max{x1 + 14, x2 + 23} |0|_A = 23 true_A = 22 s_A(x1) = max{2, x1} false_A = 1 iflow_A(x1,x2,x3) = x3 + 2 nil_A = 8 precedence: cons = low = le = |0| = true = iflow = nil > quicksort# > s = false partial status: pi(quicksort#) = [1] pi(cons) = [] pi(low) = [] pi(le) = [] pi(|0|) = [] pi(true) = [] pi(s) = [] pi(false) = [] pi(iflow) = [] pi(nil) = [] The next rules are strictly ordered: p1 We remove them from the problem. Then no dependency pair remains. -- Reduction pair. Consider the dependency pair problem (P, R), where P consists of p1: ifhigh#(false(),N,cons(M,L)) -> high#(N,L) p2: high#(N,cons(M,L)) -> ifhigh#(le(M,N),N,cons(M,L)) p3: ifhigh#(true(),N,cons(M,L)) -> high#(N,L) and R consists of: r1: le(|0|(),Y) -> true() r2: le(s(X),|0|()) -> false() r3: le(s(X),s(Y)) -> le(X,Y) r4: app(nil(),Y) -> Y r5: app(cons(N,L),Y) -> cons(N,app(L,Y)) r6: low(N,nil()) -> nil() r7: low(N,cons(M,L)) -> iflow(le(M,N),N,cons(M,L)) r8: iflow(true(),N,cons(M,L)) -> cons(M,low(N,L)) r9: iflow(false(),N,cons(M,L)) -> low(N,L) r10: high(N,nil()) -> nil() r11: high(N,cons(M,L)) -> ifhigh(le(M,N),N,cons(M,L)) r12: ifhigh(true(),N,cons(M,L)) -> high(N,L) r13: ifhigh(false(),N,cons(M,L)) -> cons(M,high(N,L)) r14: quicksort(nil()) -> nil() r15: quicksort(cons(N,L)) -> app(quicksort(low(N,L)),cons(N,quicksort(high(N,L)))) The set of usable rules consists of r1, r2, r3 Take the reduction pair: weighted path order base order: max/plus interpretations on natural numbers: ifhigh#_A(x1,x2,x3) = max{x2 + 2, x3} false_A = 1 cons_A(x1,x2) = max{x1 + 2, x2 + 2} high#_A(x1,x2) = max{x1 + 2, x2} le_A(x1,x2) = 2 true_A = 1 |0|_A = 0 s_A(x1) = max{6, x1 + 2} precedence: ifhigh# = false = cons = high# = le = true = |0| = s partial status: pi(ifhigh#) = [3] pi(false) = [] pi(cons) = [] pi(high#) = [2] pi(le) = [] pi(true) = [] pi(|0|) = [] pi(s) = [1] The next rules are strictly ordered: p1 We remove them from the problem. -- SCC decomposition. Consider the dependency pair problem (P, R), where P consists of p1: high#(N,cons(M,L)) -> ifhigh#(le(M,N),N,cons(M,L)) p2: ifhigh#(true(),N,cons(M,L)) -> high#(N,L) and R consists of: r1: le(|0|(),Y) -> true() r2: le(s(X),|0|()) -> false() r3: le(s(X),s(Y)) -> le(X,Y) r4: app(nil(),Y) -> Y r5: app(cons(N,L),Y) -> cons(N,app(L,Y)) r6: low(N,nil()) -> nil() r7: low(N,cons(M,L)) -> iflow(le(M,N),N,cons(M,L)) r8: iflow(true(),N,cons(M,L)) -> cons(M,low(N,L)) r9: iflow(false(),N,cons(M,L)) -> low(N,L) r10: high(N,nil()) -> nil() r11: high(N,cons(M,L)) -> ifhigh(le(M,N),N,cons(M,L)) r12: ifhigh(true(),N,cons(M,L)) -> high(N,L) r13: ifhigh(false(),N,cons(M,L)) -> cons(M,high(N,L)) r14: quicksort(nil()) -> nil() r15: quicksort(cons(N,L)) -> app(quicksort(low(N,L)),cons(N,quicksort(high(N,L)))) The estimated dependency graph contains the following SCCs: {p1, p2} -- Reduction pair. Consider the dependency pair problem (P, R), where P consists of p1: high#(N,cons(M,L)) -> ifhigh#(le(M,N),N,cons(M,L)) p2: ifhigh#(true(),N,cons(M,L)) -> high#(N,L) and R consists of: r1: le(|0|(),Y) -> true() r2: le(s(X),|0|()) -> false() r3: le(s(X),s(Y)) -> le(X,Y) r4: app(nil(),Y) -> Y r5: app(cons(N,L),Y) -> cons(N,app(L,Y)) r6: low(N,nil()) -> nil() r7: low(N,cons(M,L)) -> iflow(le(M,N),N,cons(M,L)) r8: iflow(true(),N,cons(M,L)) -> cons(M,low(N,L)) r9: iflow(false(),N,cons(M,L)) -> low(N,L) r10: high(N,nil()) -> nil() r11: high(N,cons(M,L)) -> ifhigh(le(M,N),N,cons(M,L)) r12: ifhigh(true(),N,cons(M,L)) -> high(N,L) r13: ifhigh(false(),N,cons(M,L)) -> cons(M,high(N,L)) r14: quicksort(nil()) -> nil() r15: quicksort(cons(N,L)) -> app(quicksort(low(N,L)),cons(N,quicksort(high(N,L)))) The set of usable rules consists of r1, r2, r3 Take the reduction pair: weighted path order base order: max/plus interpretations on natural numbers: high#_A(x1,x2) = max{x1 + 9, x2 + 5} cons_A(x1,x2) = max{10, x1 + 1, x2 + 4} ifhigh#_A(x1,x2,x3) = max{x1 + 1, x2 + 9, x3 + 1} le_A(x1,x2) = 4 true_A = 3 |0|_A = 0 s_A(x1) = max{8, x1 + 2} false_A = 1 precedence: high# = cons = ifhigh# = le = true = |0| = s = false partial status: pi(high#) = [2] pi(cons) = [2] pi(ifhigh#) = [3] pi(le) = [] pi(true) = [] pi(|0|) = [] pi(s) = [1] pi(false) = [] The next rules are strictly ordered: p2 We remove them from the problem. -- SCC decomposition. Consider the dependency pair problem (P, R), where P consists of p1: high#(N,cons(M,L)) -> ifhigh#(le(M,N),N,cons(M,L)) and R consists of: r1: le(|0|(),Y) -> true() r2: le(s(X),|0|()) -> false() r3: le(s(X),s(Y)) -> le(X,Y) r4: app(nil(),Y) -> Y r5: app(cons(N,L),Y) -> cons(N,app(L,Y)) r6: low(N,nil()) -> nil() r7: low(N,cons(M,L)) -> iflow(le(M,N),N,cons(M,L)) r8: iflow(true(),N,cons(M,L)) -> cons(M,low(N,L)) r9: iflow(false(),N,cons(M,L)) -> low(N,L) r10: high(N,nil()) -> nil() r11: high(N,cons(M,L)) -> ifhigh(le(M,N),N,cons(M,L)) r12: ifhigh(true(),N,cons(M,L)) -> high(N,L) r13: ifhigh(false(),N,cons(M,L)) -> cons(M,high(N,L)) r14: quicksort(nil()) -> nil() r15: quicksort(cons(N,L)) -> app(quicksort(low(N,L)),cons(N,quicksort(high(N,L)))) The estimated dependency graph contains the following SCCs: (no SCCs) -- Reduction pair. Consider the dependency pair problem (P, R), where P consists of p1: iflow#(false(),N,cons(M,L)) -> low#(N,L) p2: low#(N,cons(M,L)) -> iflow#(le(M,N),N,cons(M,L)) p3: iflow#(true(),N,cons(M,L)) -> low#(N,L) and R consists of: r1: le(|0|(),Y) -> true() r2: le(s(X),|0|()) -> false() r3: le(s(X),s(Y)) -> le(X,Y) r4: app(nil(),Y) -> Y r5: app(cons(N,L),Y) -> cons(N,app(L,Y)) r6: low(N,nil()) -> nil() r7: low(N,cons(M,L)) -> iflow(le(M,N),N,cons(M,L)) r8: iflow(true(),N,cons(M,L)) -> cons(M,low(N,L)) r9: iflow(false(),N,cons(M,L)) -> low(N,L) r10: high(N,nil()) -> nil() r11: high(N,cons(M,L)) -> ifhigh(le(M,N),N,cons(M,L)) r12: ifhigh(true(),N,cons(M,L)) -> high(N,L) r13: ifhigh(false(),N,cons(M,L)) -> cons(M,high(N,L)) r14: quicksort(nil()) -> nil() r15: quicksort(cons(N,L)) -> app(quicksort(low(N,L)),cons(N,quicksort(high(N,L)))) The set of usable rules consists of r1, r2, r3 Take the reduction pair: weighted path order base order: max/plus interpretations on natural numbers: iflow#_A(x1,x2,x3) = max{x2 + 2, x3} false_A = 1 cons_A(x1,x2) = max{x1 + 2, x2 + 2} low#_A(x1,x2) = max{x1 + 2, x2} le_A(x1,x2) = 2 true_A = 1 |0|_A = 0 s_A(x1) = max{6, x1 + 2} precedence: iflow# = false = cons = low# = le = true = |0| = s partial status: pi(iflow#) = [3] pi(false) = [] pi(cons) = [] pi(low#) = [2] pi(le) = [] pi(true) = [] pi(|0|) = [] pi(s) = [1] The next rules are strictly ordered: p1 We remove them from the problem. -- SCC decomposition. Consider the dependency pair problem (P, R), where P consists of p1: low#(N,cons(M,L)) -> iflow#(le(M,N),N,cons(M,L)) p2: iflow#(true(),N,cons(M,L)) -> low#(N,L) and R consists of: r1: le(|0|(),Y) -> true() r2: le(s(X),|0|()) -> false() r3: le(s(X),s(Y)) -> le(X,Y) r4: app(nil(),Y) -> Y r5: app(cons(N,L),Y) -> cons(N,app(L,Y)) r6: low(N,nil()) -> nil() r7: low(N,cons(M,L)) -> iflow(le(M,N),N,cons(M,L)) r8: iflow(true(),N,cons(M,L)) -> cons(M,low(N,L)) r9: iflow(false(),N,cons(M,L)) -> low(N,L) r10: high(N,nil()) -> nil() r11: high(N,cons(M,L)) -> ifhigh(le(M,N),N,cons(M,L)) r12: ifhigh(true(),N,cons(M,L)) -> high(N,L) r13: ifhigh(false(),N,cons(M,L)) -> cons(M,high(N,L)) r14: quicksort(nil()) -> nil() r15: quicksort(cons(N,L)) -> app(quicksort(low(N,L)),cons(N,quicksort(high(N,L)))) The estimated dependency graph contains the following SCCs: {p1, p2} -- Reduction pair. Consider the dependency pair problem (P, R), where P consists of p1: low#(N,cons(M,L)) -> iflow#(le(M,N),N,cons(M,L)) p2: iflow#(true(),N,cons(M,L)) -> low#(N,L) and R consists of: r1: le(|0|(),Y) -> true() r2: le(s(X),|0|()) -> false() r3: le(s(X),s(Y)) -> le(X,Y) r4: app(nil(),Y) -> Y r5: app(cons(N,L),Y) -> cons(N,app(L,Y)) r6: low(N,nil()) -> nil() r7: low(N,cons(M,L)) -> iflow(le(M,N),N,cons(M,L)) r8: iflow(true(),N,cons(M,L)) -> cons(M,low(N,L)) r9: iflow(false(),N,cons(M,L)) -> low(N,L) r10: high(N,nil()) -> nil() r11: high(N,cons(M,L)) -> ifhigh(le(M,N),N,cons(M,L)) r12: ifhigh(true(),N,cons(M,L)) -> high(N,L) r13: ifhigh(false(),N,cons(M,L)) -> cons(M,high(N,L)) r14: quicksort(nil()) -> nil() r15: quicksort(cons(N,L)) -> app(quicksort(low(N,L)),cons(N,quicksort(high(N,L)))) The set of usable rules consists of r1, r2, r3 Take the reduction pair: weighted path order base order: max/plus interpretations on natural numbers: low#_A(x1,x2) = max{x1 + 9, x2 + 5} cons_A(x1,x2) = max{10, x1 + 1, x2 + 4} iflow#_A(x1,x2,x3) = max{x1 + 1, x2 + 9, x3 + 1} le_A(x1,x2) = 4 true_A = 3 |0|_A = 0 s_A(x1) = max{8, x1 + 2} false_A = 1 precedence: low# = cons = iflow# = le = true = |0| = s = false partial status: pi(low#) = [2] pi(cons) = [2] pi(iflow#) = [3] pi(le) = [] pi(true) = [] pi(|0|) = [] pi(s) = [1] pi(false) = [] The next rules are strictly ordered: p2 We remove them from the problem. -- SCC decomposition. Consider the dependency pair problem (P, R), where P consists of p1: low#(N,cons(M,L)) -> iflow#(le(M,N),N,cons(M,L)) and R consists of: r1: le(|0|(),Y) -> true() r2: le(s(X),|0|()) -> false() r3: le(s(X),s(Y)) -> le(X,Y) r4: app(nil(),Y) -> Y r5: app(cons(N,L),Y) -> cons(N,app(L,Y)) r6: low(N,nil()) -> nil() r7: low(N,cons(M,L)) -> iflow(le(M,N),N,cons(M,L)) r8: iflow(true(),N,cons(M,L)) -> cons(M,low(N,L)) r9: iflow(false(),N,cons(M,L)) -> low(N,L) r10: high(N,nil()) -> nil() r11: high(N,cons(M,L)) -> ifhigh(le(M,N),N,cons(M,L)) r12: ifhigh(true(),N,cons(M,L)) -> high(N,L) r13: ifhigh(false(),N,cons(M,L)) -> cons(M,high(N,L)) r14: quicksort(nil()) -> nil() r15: quicksort(cons(N,L)) -> app(quicksort(low(N,L)),cons(N,quicksort(high(N,L)))) The estimated dependency graph contains the following SCCs: (no SCCs) -- Reduction pair. Consider the dependency pair problem (P, R), where P consists of p1: le#(s(X),s(Y)) -> le#(X,Y) and R consists of: r1: le(|0|(),Y) -> true() r2: le(s(X),|0|()) -> false() r3: le(s(X),s(Y)) -> le(X,Y) r4: app(nil(),Y) -> Y r5: app(cons(N,L),Y) -> cons(N,app(L,Y)) r6: low(N,nil()) -> nil() r7: low(N,cons(M,L)) -> iflow(le(M,N),N,cons(M,L)) r8: iflow(true(),N,cons(M,L)) -> cons(M,low(N,L)) r9: iflow(false(),N,cons(M,L)) -> low(N,L) r10: high(N,nil()) -> nil() r11: high(N,cons(M,L)) -> ifhigh(le(M,N),N,cons(M,L)) r12: ifhigh(true(),N,cons(M,L)) -> high(N,L) r13: ifhigh(false(),N,cons(M,L)) -> cons(M,high(N,L)) r14: quicksort(nil()) -> nil() r15: quicksort(cons(N,L)) -> app(quicksort(low(N,L)),cons(N,quicksort(high(N,L)))) The set of usable rules consists of (no rules) Take the reduction pair: weighted path order base order: max/plus interpretations on natural numbers: le#_A(x1,x2) = max{0, x1 - 2, x2 - 2} s_A(x1) = max{3, x1 + 1} precedence: le# = s partial status: pi(le#) = [] pi(s) = [] The next rules are strictly ordered: p1 We remove them from the problem. Then no dependency pair remains. -- Reduction pair. Consider the dependency pair problem (P, R), where P consists of p1: app#(cons(N,L),Y) -> app#(L,Y) and R consists of: r1: le(|0|(),Y) -> true() r2: le(s(X),|0|()) -> false() r3: le(s(X),s(Y)) -> le(X,Y) r4: app(nil(),Y) -> Y r5: app(cons(N,L),Y) -> cons(N,app(L,Y)) r6: low(N,nil()) -> nil() r7: low(N,cons(M,L)) -> iflow(le(M,N),N,cons(M,L)) r8: iflow(true(),N,cons(M,L)) -> cons(M,low(N,L)) r9: iflow(false(),N,cons(M,L)) -> low(N,L) r10: high(N,nil()) -> nil() r11: high(N,cons(M,L)) -> ifhigh(le(M,N),N,cons(M,L)) r12: ifhigh(true(),N,cons(M,L)) -> high(N,L) r13: ifhigh(false(),N,cons(M,L)) -> cons(M,high(N,L)) r14: quicksort(nil()) -> nil() r15: quicksort(cons(N,L)) -> app(quicksort(low(N,L)),cons(N,quicksort(high(N,L)))) The set of usable rules consists of (no rules) Take the reduction pair: weighted path order base order: max/plus interpretations on natural numbers: app#_A(x1,x2) = max{0, x1 - 2} cons_A(x1,x2) = max{x1 + 3, x2 + 1} precedence: app# = cons partial status: pi(app#) = [] pi(cons) = [2] The next rules are strictly ordered: p1 We remove them from the problem. Then no dependency pair remains.