Input TRS: 1: average(x,y) -> if(ge(x,y),x,y) 2: if(true,x,y) -> averIter(y,x,y) 3: if(false,x,y) -> averIter(x,y,x) 4: averIter(x,y,z) -> ifIter(ge(x,y),x,y,z) 5: ifIter(true,x,y,z) -> z 6: ifIter(false,x,y,z) -> averIter(plus(x,s(s(s(0)))),plus(y,s(0)),plus(z,s(0))) 7: append(nil,y) -> y 8: append(cons(n,x),y) -> cons(n,app(x,y)) 9: low(n,nil) -> nil 10: low(n,cons(m,x)) -> if_low(ge(m,n),n,cons(m,x)) 11: if_low(false,n,cons(m,x)) -> cons(m,low(n,x)) 12: if_low(true,n,cons(m,x)) -> low(n,x) 13: high(n,nil) -> nil 14: high(n,cons(m,x)) -> if_high(ge(m,n),n,cons(m,x)) 15: if_high(false,n,cons(m,x)) -> high(n,x) 16: if_high(true,n,cons(m,x)) -> cons(average(m,m),high(n,x)) 17: quicksort(x) -> ifquick(isempty(x),x) 18: ifquick(true,x) -> nil 19: ifquick(false,x) -> append(quicksort(low(head(x),tail(x))),cons(tail(x),quicksort(high(head(x),tail(x))))) 20: plus(0,y) -> y 21: plus(s(x),y) -> s(plus(x,y)) 22: isempty(nil) -> true 23: isempty(cons(n,x)) -> false 24: head(nil) -> error 25: head(cons(n,x)) -> n 26: tail(nil) -> nil 27: tail(cons(n,x)) -> x 28: ge(x,0) -> true 29: ge(0,s(y)) -> false 30: ge(s(x),s(y)) -> ge(x,y) 31: a -> b 32: a -> c Dependency Pairs: #1: #average(x,y) -> #if(ge(x,y),x,y) #2: #average(x,y) -> #ge(x,y) #3: #if(true,x,y) -> #averIter(y,x,y) #4: #if(false,x,y) -> #averIter(x,y,x) #5: #averIter(x,y,z) -> #ifIter(ge(x,y),x,y,z) #6: #averIter(x,y,z) -> #ge(x,y) #7: #ifIter(false,x,y,z) -> #averIter(plus(x,s(s(s(0)))),plus(y,s(0)),plus(z,s(0))) #8: #ifIter(false,x,y,z) -> #plus(x,s(s(s(0)))) #9: #ifIter(false,x,y,z) -> #plus(y,s(0)) #10: #ifIter(false,x,y,z) -> #plus(z,s(0)) #11: #low(n,cons(m,x)) -> #if_low(ge(m,n),n,cons(m,x)) #12: #low(n,cons(m,x)) -> #ge(m,n) #13: #if_low(false,n,cons(m,x)) -> #low(n,x) #14: #if_low(true,n,cons(m,x)) -> #low(n,x) #15: #high(n,cons(m,x)) -> #if_high(ge(m,n),n,cons(m,x)) #16: #high(n,cons(m,x)) -> #ge(m,n) #17: #if_high(false,n,cons(m,x)) -> #high(n,x) #18: #if_high(true,n,cons(m,x)) -> #average(m,m) #19: #if_high(true,n,cons(m,x)) -> #high(n,x) #20: #quicksort(x) -> #ifquick(isempty(x),x) #21: #quicksort(x) -> #isempty(x) #22: #ifquick(false,x) -> #append(quicksort(low(head(x),tail(x))),cons(tail(x),quicksort(high(head(x),tail(x))))) #23: #ifquick(false,x) -> #quicksort(low(head(x),tail(x))) #24: #ifquick(false,x) -> #low(head(x),tail(x)) #25: #ifquick(false,x) -> #head(x) #26: #ifquick(false,x) -> #tail(x) #27: #ifquick(false,x) -> #tail(x) #28: #ifquick(false,x) -> #quicksort(high(head(x),tail(x))) #29: #ifquick(false,x) -> #high(head(x),tail(x)) #30: #ifquick(false,x) -> #head(x) #31: #ifquick(false,x) -> #tail(x) #32: #plus(s(x),y) -> #plus(x,y) #33: #ge(s(x),s(y)) -> #ge(x,y) Number of SCCs: 6 SCC { #33 } QKBOPS(sum)... removes: #33 I(#ge) = 1 + x1 + x2 \pi(#ge) = [] I(s) = 2 + x1 \pi(s) = [] PREC: #ge > s USABLE RULES: { } Number of SCCs: 5 SCC { #32 } QKBOPS(sum)... removes: #32 I(#plus) = x1 \pi(#plus) = [] I(s) = 1 + x1 \pi(s) = [1] PREC: #plus = s USABLE RULES: { } Number of SCCs: 4 SCC { #5 #7 } QKBOPS(sum)... failed.