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. max/plus interpretations on natural numbers: a#_A(x1,x2) = max{x1 - 1, x2 + 5} f_A = 13 a_A(x1,x2) = x1 + 6 g_A = 0 2. max/plus interpretations on natural numbers: a#_A(x1,x2) = 0 f_A = 0 a_A(x1,x2) = 0 g_A = 0 The next rules are strictly ordered: p2 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#(g(),a(f(),a(g(),x))) -> a#(f(),a(f(),a(g(),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: {p3} {p1} -- 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. max/plus interpretations on natural numbers: a#_A(x1,x2) = max{x1 - 15, x2 + 1} g_A = 17 a_A(x1,x2) = max{0, x1 - 11, x2 - 4} f_A = 0 2. max/plus interpretations on natural numbers: a#_A(x1,x2) = 0 g_A = 0 a_A(x1,x2) = 0 f_A = 0 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#(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. max/plus interpretations on natural numbers: a#_A(x1,x2) = max{x1 - 15, x2 + 1} f_A = 17 a_A(x1,x2) = max{0, x1 - 11, x2 - 4} g_A = 0 2. max/plus interpretations on natural numbers: a#_A(x1,x2) = 0 f_A = 0 a_A(x1,x2) = 0 g_A = 0 The next rules are strictly ordered: p1 We remove them from the problem. Then no dependency pair remains.