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: weighted path order base order: max/plus interpretations on natural numbers: a#_A(x1,x2) = max{1, x1 - 23, x2 - 8} f_A = 12 a_A(x1,x2) = max{12, x1 + 8, x2 - 1} g_A = 8 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. -- SCC decomposition. Consider the dependency pair problem (P, R), where P consists of p1: a#(f(),a(g(),a(f(),x))) -> 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: {p1, p2, p3} -- Reduction pair. Consider the dependency pair problem (P, R), where P consists of p1: a#(f(),a(g(),a(f(),x))) -> a#(g(),a(g(),a(f(),x))) p2: a#(g(),a(f(),a(g(),x))) -> a#(g(),a(f(),a(f(),a(g(),x)))) p3: 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 set of usable rules consists of r1, r2 Take the reduction pair: weighted path order base order: max/plus interpretations on natural numbers: a#_A(x1,x2) = max{1, x1 - 20, x2 - 1} f_A = 0 a_A(x1,x2) = max{5, x1 - 4, x2 - 1} g_A = 13 precedence: a = g > a# = f partial status: pi(a#) = [] pi(f) = [] pi(a) = [] pi(g) = [] 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#(g(),a(g(),a(f(),x))) p2: 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} -- Reduction pair. Consider the dependency pair problem (P, R), where P consists of p1: a#(f(),a(g(),a(f(),x))) -> a#(g(),a(g(),a(f(),x))) p2: 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 set of usable rules consists of r1, r2 Take the reduction pair: weighted path order base order: max/plus interpretations on natural numbers: a#_A(x1,x2) = max{x1 + 7, x2 - 15} f_A = 12 a_A(x1,x2) = max{28, x1 + 27} g_A = 2 precedence: f > a# = 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. -- SCC decomposition. Consider the dependency pair problem (P, R), where P consists of p1: 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: (no SCCs)