Input TRS: 1: lt(0,s(X)) -> true 2: lt(s(X),0) -> false 3: lt(s(X),s(Y)) -> lt(X,Y) 4: append(nil,Y) -> Y 5: append(add(N,X),Y) -> add(N,append(X,Y)) 6: split(N,nil) -> pair(nil,nil) 7: split(N,add(M,Y)) -> f_1(split(N,Y),N,M,Y) 8: f_1(pair(X,Z),N,M,Y) -> f_2(lt(N,M),N,M,Y,X,Z) 9: f_2(true,N,M,Y,X,Z) -> pair(X,add(M,Z)) 10: f_2(false,N,M,Y,X,Z) -> pair(add(M,X),Z) 11: qsort(nil) -> nil 12: qsort(add(N,X)) -> f_3(split(N,X),N,X) 13: f_3(pair(Y,Z),N,X) -> append(qsort(Y),add(X,qsort(Z))) Dependency Pairs: #1: #lt(s(X),s(Y)) -> #lt(X,Y) #2: #append(add(N,X),Y) -> #append(X,Y) #3: #split(N,add(M,Y)) -> #f_1(split(N,Y),N,M,Y) #4: #split(N,add(M,Y)) -> #split(N,Y) #5: #f_1(pair(X,Z),N,M,Y) -> #f_2(lt(N,M),N,M,Y,X,Z) #6: #f_1(pair(X,Z),N,M,Y) -> #lt(N,M) #7: #qsort(add(N,X)) -> #f_3(split(N,X),N,X) #8: #qsort(add(N,X)) -> #split(N,X) #9: #f_3(pair(Y,Z),N,X) -> #append(qsort(Y),add(X,qsort(Z))) #10: #f_3(pair(Y,Z),N,X) -> #qsort(Y) #11: #f_3(pair(Y,Z),N,X) -> #qsort(Z) Number of SCCs: 4 SCC { #1 } QKBOPS(sum)... removes: #1 I(s) = 1 + x1 \pi(s) = [1] I(#lt) = x1 + x2 \pi(#lt) = [] PREC: #lt > s USABLE RULES: { } Number of SCCs: 3 SCC { #2 } QKBOPS(sum)... removes: #2 I(#append) = x1 + x2 \pi(#append) = [2] I(add) = x1 + x2 \pi(add) = [2] PREC: #append > add USABLE RULES: { } Number of SCCs: 2 SCC { #4 } QKBOPS(sum)... removes: #4 I(#split) = 1 + x2 \pi(#split) = [] I(add) = 1 + x2 \pi(add) = [] PREC: #split = add USABLE RULES: { } Number of SCCs: 1 SCC { #7 #10 #11 } QKBOPS(sum)... removes: #7 #10 #11 I(false) = 7 I(#qsort) = x1 \pi(#qsort) = [] I(0) = 8 I(true) = 9 I(s) = x1 \pi(s) = 1 I(f_1) = 4 + x1 + x3 \pi(f_1) = [] I(nil) = 2 I(f_2) = 5 + x3 + x5 + x6 \pi(f_2) = [] I(pair) = 1 + x1 + x2 \pi(pair) = [] I(#f_3) = x1 \pi(#f_3) = 1 I(lt) = x2 \pi(lt) = 2 I(add) = 4 + x1 + x2 \pi(add) = [1] I(split) = 4 + x2 \pi(split) = [] PREC: #qsort = add = split > false = 0 > f_1 = f_2 > nil = pair > true USABLE RULES: { 10..6 } Number of SCCs: 0