YES We show the termination of the TRS R: a(f(),a(g(),a(f(),x))) -> a(f(),a(g(),a(g(),a(f(),x)))) a(g(),a(f(),a(g(),x))) -> a(g(),a(f(),a(f(),a(g(),x)))) -- SCC decomposition. Consider the dependency pair problem (P, R), where P consists of p1: a#(f(),a(g(),a(f(),x))) -> a#(f(),a(g(),a(g(),a(f(),x)))) p2: a#(f(),a(g(),a(f(),x))) -> a#(g(),a(g(),a(f(),x))) p3: a#(g(),a(f(),a(g(),x))) -> a#(g(),a(f(),a(f(),a(g(),x)))) p4: a#(g(),a(f(),a(g(),x))) -> a#(f(),a(f(),a(g(),x))) and R consists of: r1: a(f(),a(g(),a(f(),x))) -> a(f(),a(g(),a(g(),a(f(),x)))) r2: a(g(),a(f(),a(g(),x))) -> a(g(),a(f(),a(f(),a(g(),x)))) The estimated dependency graph contains the following SCCs: {p1, p2, p3, p4} -- Reduction pair. Consider the dependency pair problem (P, R), where P consists of p1: a#(f(),a(g(),a(f(),x))) -> a#(f(),a(g(),a(g(),a(f(),x)))) p2: a#(f(),a(g(),a(f(),x))) -> a#(g(),a(g(),a(f(),x))) p3: a#(g(),a(f(),a(g(),x))) -> a#(f(),a(f(),a(g(),x))) p4: a#(g(),a(f(),a(g(),x))) -> a#(g(),a(f(),a(f(),a(g(),x)))) and R consists of: r1: a(f(),a(g(),a(f(),x))) -> a(f(),a(g(),a(g(),a(f(),x)))) r2: a(g(),a(f(),a(g(),x))) -> a(g(),a(f(),a(f(),a(g(),x)))) The set of usable rules consists of r1, r2 Take the reduction pair: lexicographic combination of reduction pairs: 1. weighted path order base order: max/plus interpretations on natural numbers: a#_A(x1,x2) = max{14, x1 + 13, x2 + 3} f_A = 9 a_A(x1,x2) = max{18, x1 + 1} g_A = 9 precedence: a# = a > f = g partial status: pi(a#) = [1, 2] pi(f) = [] pi(a) = [1] pi(g) = [] 2. weighted path order base order: max/plus interpretations on natural numbers: a#_A(x1,x2) = max{22, x1 + 9, x2 - 13} f_A = 0 a_A(x1,x2) = max{34, x1 + 23} g_A = 23 precedence: a# = a = g > f partial status: pi(a#) = [] pi(f) = [] pi(a) = [] pi(g) = [] The next rules are strictly ordered: p3 We remove them from the problem. -- SCC decomposition. Consider the dependency pair problem (P, R), where P consists of p1: a#(f(),a(g(),a(f(),x))) -> a#(f(),a(g(),a(g(),a(f(),x)))) p2: a#(f(),a(g(),a(f(),x))) -> a#(g(),a(g(),a(f(),x))) p3: a#(g(),a(f(),a(g(),x))) -> a#(g(),a(f(),a(f(),a(g(),x)))) and R consists of: r1: a(f(),a(g(),a(f(),x))) -> a(f(),a(g(),a(g(),a(f(),x)))) r2: a(g(),a(f(),a(g(),x))) -> a(g(),a(f(),a(f(),a(g(),x)))) The estimated dependency graph contains the following SCCs: {p1} {p3} -- Reduction pair. Consider the dependency pair problem (P, R), where P consists of p1: a#(f(),a(g(),a(f(),x))) -> a#(f(),a(g(),a(g(),a(f(),x)))) and R consists of: r1: a(f(),a(g(),a(f(),x))) -> a(f(),a(g(),a(g(),a(f(),x)))) r2: a(g(),a(f(),a(g(),x))) -> a(g(),a(f(),a(f(),a(g(),x)))) The set of usable rules consists of r1, r2 Take the reduction pair: lexicographic combination of reduction pairs: 1. weighted path order base order: max/plus interpretations on natural numbers: a#_A(x1,x2) = max{31, x1 + 15, x2} f_A = 11 a_A(x1,x2) = max{x1 + 24, x2 - 4} g_A = 1 precedence: f = a = g > a# partial status: pi(a#) = [1, 2] pi(f) = [] pi(a) = [] pi(g) = [] 2. weighted path order base order: max/plus interpretations on natural numbers: a#_A(x1,x2) = max{15, x1 - 54} f_A = 70 a_A(x1,x2) = 18 g_A = 50 precedence: a# = f = a = g partial status: pi(a#) = [] pi(f) = [] pi(a) = [] pi(g) = [] The next rules are strictly ordered: p1 We remove them from the problem. Then no dependency pair remains. -- Reduction pair. Consider the dependency pair problem (P, R), where P consists of p1: a#(g(),a(f(),a(g(),x))) -> a#(g(),a(f(),a(f(),a(g(),x)))) and R consists of: r1: a(f(),a(g(),a(f(),x))) -> a(f(),a(g(),a(g(),a(f(),x)))) r2: a(g(),a(f(),a(g(),x))) -> a(g(),a(f(),a(f(),a(g(),x)))) The set of usable rules consists of r1, r2 Take the reduction pair: lexicographic combination of reduction pairs: 1. weighted path order base order: max/plus interpretations on natural numbers: a#_A(x1,x2) = max{28, x1 + 9, x2 + 19} g_A = 31 a_A(x1,x2) = max{0, x1 - 7, x2 - 3} f_A = 20 precedence: a# = g = f > a partial status: pi(a#) = [2] pi(g) = [] pi(a) = [] pi(f) = [] 2. weighted path order base order: max/plus interpretations on natural numbers: a#_A(x1,x2) = max{48, x2 + 15} g_A = 58 a_A(x1,x2) = 45 f_A = 59 precedence: a# = g = a = f partial status: pi(a#) = [2] pi(g) = [] pi(a) = [] pi(f) = [] The next rules are strictly ordered: p1 We remove them from the problem. Then no dependency pair remains.