YES We show the termination of R/S, where R is minus(x,0) -> x minus(s(x),s(y)) -> minus(x,y) f(0) -> s(0) f(s(x)) -> minus(s(x),g(f(x))) g(0) -> 0 g(s(x)) -> minus(s(x),f(g(x))) and S is: rand(x) -> x rand(x) -> rand(s(x)) Since R almost dominates S and S is non-duplicating, it is enough to show finiteness of (P, Q). Here P consists of the dependency pairs minus#(s(x),s(y)) -> minus#(x,y) f#(s(x)) -> minus#(s(x),g(f(x))) f#(s(x)) -> g#(f(x)) f#(s(x)) -> f#(x) g#(s(x)) -> minus#(s(x),f(g(x))) g#(s(x)) -> f#(g(x)) g#(s(x)) -> g#(x) and Q consists of the rules: minus(x,0) -> x minus(s(x),s(y)) -> minus(x,y) f(0) -> s(0) f(s(x)) -> minus(s(x),g(f(x))) g(0) -> 0 g(s(x)) -> minus(s(x),f(g(x))) rand(x) -> x rand(x) -> rand(s(x)) The weakly monotone algebra (N^3, >_lex) with minus#_A((x1,y1,z1),(x2,y2,z2)) = (0, 0, 0) s_A((x1,y1,z1)) = (x1, y1 + 1, 1) f#_A((x1,y1,z1)) = (x1 + 1, 1, 1) g_A((x1,y1,z1)) = (x1, y1 + 2, 1) f_A((x1,y1,z1)) = (x1, y1 + 2, z1 + 1) g#_A((x1,y1,z1)) = (x1 + 1, 1, 1) minus_A((x1,y1,z1),(x2,y2,z2)) = (x1, y1 + 1, 2) 0_A = (1, 1, 0) rand_A((x1,y1,z1)) = (x1 + 1, 1, 0) strictly orients the following dependency pairs: f#(s(x)) -> minus#(s(x),g(f(x))) g#(s(x)) -> minus#(s(x),f(g(x))) We remove them from the set of dependency pairs. The weakly monotone algebra (N^3, >_lex) with minus#_A((x1,y1,z1),(x2,y2,z2)) = (x2, y2, 0) s_A((x1,y1,z1)) = (x1, y1 + 1, 2) f#_A((x1,y1,z1)) = (0, 0, 0) g#_A((x1,y1,z1)) = (0, 0, 0) f_A((x1,y1,z1)) = (x1 + 2, 4, 1) g_A((x1,y1,z1)) = (x1 + 2, y1 + 1, z1 + 1) minus_A((x1,y1,z1),(x2,y2,z2)) = (x1 + 1, y1 + 2, 4) 0_A = (1, 4, 0) rand_A((x1,y1,z1)) = (x1 + 1, 1, 0) strictly orients the following dependency pairs: minus#(s(x),s(y)) -> minus#(x,y) We remove them from the set of dependency pairs. The weakly monotone algebra (N^3, >_lex) with f#_A((x1,y1,z1)) = (x1, y1 + 2, 2) s_A((x1,y1,z1)) = (x1, y1 + 5, z1 + 3) g#_A((x1,y1,z1)) = (x1, y1, z1) f_A((x1,y1,z1)) = (x1, y1 + 6, 1) g_A((x1,y1,z1)) = (x1, y1 + 2, 1) minus_A((x1,y1,z1),(x2,y2,z2)) = (x1, y1 + 1, 2) 0_A = (1, 0, 0) rand_A((x1,y1,z1)) = (x1 + 1, 1, 0) strictly orients the following dependency pairs: f#(s(x)) -> g#(f(x)) f#(s(x)) -> f#(x) g#(s(x)) -> f#(g(x)) g#(s(x)) -> g#(x) We remove them from the set of dependency pairs. No dependency pair remains.