YES We show the termination of the TRS R: f(f(x,y,z),u,f(x,y,v)) -> f(x,y,f(z,u,v)) f(x,y,y) -> y f(x,y,g(y)) -> x f(x,x,y) -> x f(g(x),x,y) -> y -- SCC decomposition. Consider the dependency pair problem (P, R), where P consists of p1: f#(f(x,y,z),u,f(x,y,v)) -> f#(x,y,f(z,u,v)) p2: f#(f(x,y,z),u,f(x,y,v)) -> f#(z,u,v) and R consists of: r1: f(f(x,y,z),u,f(x,y,v)) -> f(x,y,f(z,u,v)) r2: f(x,y,y) -> y r3: f(x,y,g(y)) -> x r4: f(x,x,y) -> x r5: f(g(x),x,y) -> y The estimated dependency graph contains the following SCCs: {p1, p2} -- Reduction pair. Consider the dependency pair problem (P, R), where P consists of p1: f#(f(x,y,z),u,f(x,y,v)) -> f#(x,y,f(z,u,v)) p2: f#(f(x,y,z),u,f(x,y,v)) -> f#(z,u,v) and R consists of: r1: f(f(x,y,z),u,f(x,y,v)) -> f(x,y,f(z,u,v)) r2: f(x,y,y) -> y r3: f(x,y,g(y)) -> x r4: f(x,x,y) -> x r5: f(g(x),x,y) -> y The set of usable rules consists of r1, r2, r3, r4, r5 Take the reduction pair: lexicographic combination of reduction pairs: 1. weighted path order base order: max/plus interpretations on natural numbers: f#_A(x1,x2,x3) = max{x1 + 2, x2 + 2, x3} f_A(x1,x2,x3) = max{x1 + 2, x2 + 2, x3} g_A(x1) = max{0, x1 - 1} precedence: f# = f = g partial status: pi(f#) = [1, 2, 3] pi(f) = [1, 2, 3] pi(g) = [] 2. weighted path order base order: max/plus interpretations on natural numbers: f#_A(x1,x2,x3) = max{x1 + 1, x2 + 3, x3 - 1} f_A(x1,x2,x3) = max{x1 + 6, x2 + 4, x3 + 4} g_A(x1) = 0 precedence: f > f# = g partial status: pi(f#) = [1] pi(f) = [] pi(g) = [] The next rules are strictly ordered: p1, p2 We remove them from the problem. Then no dependency pair remains.