YES We show the termination of the TRS R: active(f(f(a()))) -> mark(f(g(f(a())))) mark(f(X)) -> active(f(mark(X))) mark(a()) -> active(a()) mark(g(X)) -> active(g(X)) f(mark(X)) -> f(X) f(active(X)) -> f(X) g(mark(X)) -> g(X) g(active(X)) -> g(X) -- SCC decomposition. Consider the dependency pair problem (P, R), where P consists of p1: active#(f(f(a()))) -> mark#(f(g(f(a())))) p2: active#(f(f(a()))) -> f#(g(f(a()))) p3: active#(f(f(a()))) -> g#(f(a())) p4: mark#(f(X)) -> active#(f(mark(X))) p5: mark#(f(X)) -> f#(mark(X)) p6: mark#(f(X)) -> mark#(X) p7: mark#(a()) -> active#(a()) p8: mark#(g(X)) -> active#(g(X)) p9: f#(mark(X)) -> f#(X) p10: f#(active(X)) -> f#(X) p11: g#(mark(X)) -> g#(X) p12: g#(active(X)) -> g#(X) and R consists of: r1: active(f(f(a()))) -> mark(f(g(f(a())))) r2: mark(f(X)) -> active(f(mark(X))) r3: mark(a()) -> active(a()) r4: mark(g(X)) -> active(g(X)) r5: f(mark(X)) -> f(X) r6: f(active(X)) -> f(X) r7: g(mark(X)) -> g(X) r8: g(active(X)) -> g(X) The estimated dependency graph contains the following SCCs: {p1, p4, p6, p8} {p9, p10} {p11, p12} -- Reduction pair. Consider the dependency pair problem (P, R), where P consists of p1: active#(f(f(a()))) -> mark#(f(g(f(a())))) p2: mark#(f(X)) -> mark#(X) p3: mark#(g(X)) -> active#(g(X)) p4: mark#(f(X)) -> active#(f(mark(X))) and R consists of: r1: active(f(f(a()))) -> mark(f(g(f(a())))) r2: mark(f(X)) -> active(f(mark(X))) r3: mark(a()) -> active(a()) r4: mark(g(X)) -> active(g(X)) r5: f(mark(X)) -> f(X) r6: f(active(X)) -> f(X) r7: g(mark(X)) -> g(X) r8: g(active(X)) -> g(X) The set of usable rules consists of r1, r2, r3, r4, r5, r6, r7, r8 Take the reduction pair: lexicographic combination of reduction pairs: 1. weighted path order base order: max/plus interpretations on natural numbers: active#_A(x1) = max{8, x1} f_A(x1) = max{6, x1} a_A = 10 mark#_A(x1) = max{9, x1 + 4} g_A(x1) = 0 mark_A(x1) = max{8, x1} active_A(x1) = max{6, x1} precedence: mark > active > f = a > mark# > active# > g partial status: pi(active#) = [1] pi(f) = [1] pi(a) = [] pi(mark#) = [1] pi(g) = [] pi(mark) = [1] pi(active) = [1] 2. weighted path order base order: max/plus interpretations on natural numbers: active#_A(x1) = max{13, x1 + 12} f_A(x1) = max{7, x1 + 4} a_A = 19 mark#_A(x1) = x1 + 12 g_A(x1) = 2 mark_A(x1) = max{0, x1 - 29} active_A(x1) = max{8, x1 - 28} precedence: a = mark# > active# = f = g = mark = active partial status: pi(active#) = [1] pi(f) = [1] pi(a) = [] pi(mark#) = [] pi(g) = [] pi(mark) = [] pi(active) = [] The next rules are strictly ordered: p1, p2, p3, p4 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: f#(mark(X)) -> f#(X) p2: f#(active(X)) -> f#(X) and R consists of: r1: active(f(f(a()))) -> mark(f(g(f(a())))) r2: mark(f(X)) -> active(f(mark(X))) r3: mark(a()) -> active(a()) r4: mark(g(X)) -> active(g(X)) r5: f(mark(X)) -> f(X) r6: f(active(X)) -> f(X) r7: g(mark(X)) -> g(X) r8: g(active(X)) -> g(X) The set of usable rules consists of (no rules) Take the monotone reduction pair: lexicographic combination of reduction pairs: 1. weighted path order base order: max/plus interpretations on natural numbers: f#_A(x1) = x1 + 2 mark_A(x1) = x1 active_A(x1) = x1 + 2 precedence: mark > active > f# partial status: pi(f#) = [1] pi(mark) = [1] pi(active) = [1] 2. weighted path order base order: max/plus interpretations on natural numbers: f#_A(x1) = x1 + 1 mark_A(x1) = x1 active_A(x1) = x1 precedence: f# = mark = active partial status: pi(f#) = [1] pi(mark) = [1] pi(active) = [1] The next rules are strictly ordered: p1, p2 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: g#(mark(X)) -> g#(X) p2: g#(active(X)) -> g#(X) and R consists of: r1: active(f(f(a()))) -> mark(f(g(f(a())))) r2: mark(f(X)) -> active(f(mark(X))) r3: mark(a()) -> active(a()) r4: mark(g(X)) -> active(g(X)) r5: f(mark(X)) -> f(X) r6: f(active(X)) -> f(X) r7: g(mark(X)) -> g(X) r8: g(active(X)) -> g(X) The set of usable rules consists of (no rules) Take the monotone reduction pair: lexicographic combination of reduction pairs: 1. weighted path order base order: max/plus interpretations on natural numbers: g#_A(x1) = x1 + 2 mark_A(x1) = x1 active_A(x1) = x1 + 2 precedence: mark > active > g# partial status: pi(g#) = [1] pi(mark) = [1] pi(active) = [1] 2. weighted path order base order: max/plus interpretations on natural numbers: g#_A(x1) = x1 + 1 mark_A(x1) = x1 active_A(x1) = x1 precedence: g# = mark = active partial status: pi(g#) = [1] pi(mark) = [1] pi(active) = [1] The next rules are strictly ordered: p1, p2 We remove them from the problem. Then no dependency pair remains.