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