YES We show the termination of R/S, where R is tests(0) -> true tests(s(x)) -> and(test(rands(rand(0),nil)),x) test(done(y)) -> eq(f(y),g(y)) eq(x,x) -> true rands(0,y) -> done(y) rands(s(x),y) -> rands(x,::(rand(0),y)) 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 tests#(s(x)) -> test#(rands(rand(0),nil)) tests#(s(x)) -> rands#(rand(0),nil) test#(done(y)) -> eq#(f(y),g(y)) rands#(s(x),y) -> rands#(x,::(rand(0),y)) and Q consists of the rules: tests(0) -> true tests(s(x)) -> and(test(rands(rand(0),nil)),x) test(done(y)) -> eq(f(y),g(y)) eq(x,x) -> true rands(0,y) -> done(y) rands(s(x),y) -> rands(x,::(rand(0),y)) rand(x) -> x rand(x) -> rand(s(x)) The weakly monotone algebra (N^3, >_lex) with tests#_A((x1,y1,z1)) = (4, 2, 2) s_A((x1,y1,z1)) = (x1, y1 + 1, z1 + 1) test#_A((x1,y1,z1)) = (x1, y1, z1) rands_A((x1,y1,z1),(x2,y2,z2)) = (x1 + 1, y1, z1) rand_A((x1,y1,z1)) = (x1 + 1, 1, 1) 0_A = (1, 1, 1) nil_A = (1, 1, 1) rands#_A((x1,y1,z1),(x2,y2,z2)) = (x1, y1 + 2, z1 + 2) done_A((x1,y1,z1)) = (1, 2, 2) eq#_A((x1,y1,z1),(x2,y2,z2)) = (0, 0, 0) f_A((x1,y1,z1)) = (1, 1, 1) g_A((x1,y1,z1)) = (1, 1, 1) ::_A((x1,y1,z1),(x2,y2,z2)) = (x2 + 1, y2 + 1, z2 + 1) tests_A((x1,y1,z1)) = (x1 + 1, 1, 0) true_A = (0, 3, 3) and_A((x1,y1,z1),(x2,y2,z2)) = (0, 0, 1) test_A((x1,y1,z1)) = (2, 1, 1) eq_A((x1,y1,z1),(x2,y2,z2)) = (1, 2, 2) strictly orients the following dependency pairs: tests#(s(x)) -> test#(rands(rand(0),nil)) tests#(s(x)) -> rands#(rand(0),nil) test#(done(y)) -> eq#(f(y),g(y)) rands#(s(x),y) -> rands#(x,::(rand(0),y)) We remove them from the set of dependency pairs. No dependency pair remains.