YES We show the termination of the TRS R: active(f(a(),X,X)) -> mark(f(X,b(),b())) active(b()) -> mark(a()) mark(f(X1,X2,X3)) -> active(f(X1,mark(X2),X3)) mark(a()) -> active(a()) mark(b()) -> active(b()) f(mark(X1),X2,X3) -> f(X1,X2,X3) f(X1,mark(X2),X3) -> f(X1,X2,X3) f(X1,X2,mark(X3)) -> f(X1,X2,X3) f(active(X1),X2,X3) -> f(X1,X2,X3) f(X1,active(X2),X3) -> f(X1,X2,X3) f(X1,X2,active(X3)) -> f(X1,X2,X3) -- SCC decomposition. Consider the dependency pair problem (P, R), where P consists of p1: active#(f(a(),X,X)) -> mark#(f(X,b(),b())) p2: active#(f(a(),X,X)) -> f#(X,b(),b()) p3: active#(b()) -> mark#(a()) p4: mark#(f(X1,X2,X3)) -> active#(f(X1,mark(X2),X3)) p5: mark#(f(X1,X2,X3)) -> f#(X1,mark(X2),X3) p6: mark#(f(X1,X2,X3)) -> mark#(X2) p7: mark#(a()) -> active#(a()) p8: mark#(b()) -> active#(b()) p9: f#(mark(X1),X2,X3) -> f#(X1,X2,X3) p10: f#(X1,mark(X2),X3) -> f#(X1,X2,X3) p11: f#(X1,X2,mark(X3)) -> f#(X1,X2,X3) p12: f#(active(X1),X2,X3) -> f#(X1,X2,X3) p13: f#(X1,active(X2),X3) -> f#(X1,X2,X3) p14: f#(X1,X2,active(X3)) -> f#(X1,X2,X3) and R consists of: r1: active(f(a(),X,X)) -> mark(f(X,b(),b())) r2: active(b()) -> mark(a()) r3: mark(f(X1,X2,X3)) -> active(f(X1,mark(X2),X3)) r4: mark(a()) -> active(a()) r5: mark(b()) -> active(b()) r6: f(mark(X1),X2,X3) -> f(X1,X2,X3) r7: f(X1,mark(X2),X3) -> f(X1,X2,X3) r8: f(X1,X2,mark(X3)) -> f(X1,X2,X3) r9: f(active(X1),X2,X3) -> f(X1,X2,X3) r10: f(X1,active(X2),X3) -> f(X1,X2,X3) r11: f(X1,X2,active(X3)) -> f(X1,X2,X3) The estimated dependency graph contains the following SCCs: {p1, p4, p6} {p9, p10, p11, p12, p13, p14} -- Reduction pair. Consider the dependency pair problem (P, R), where P consists of p1: active#(f(a(),X,X)) -> mark#(f(X,b(),b())) p2: mark#(f(X1,X2,X3)) -> mark#(X2) p3: mark#(f(X1,X2,X3)) -> active#(f(X1,mark(X2),X3)) and R consists of: r1: active(f(a(),X,X)) -> mark(f(X,b(),b())) r2: active(b()) -> mark(a()) r3: mark(f(X1,X2,X3)) -> active(f(X1,mark(X2),X3)) r4: mark(a()) -> active(a()) r5: mark(b()) -> active(b()) r6: f(mark(X1),X2,X3) -> f(X1,X2,X3) r7: f(X1,mark(X2),X3) -> f(X1,X2,X3) r8: f(X1,X2,mark(X3)) -> f(X1,X2,X3) r9: f(active(X1),X2,X3) -> f(X1,X2,X3) r10: f(X1,active(X2),X3) -> f(X1,X2,X3) r11: f(X1,X2,active(X3)) -> f(X1,X2,X3) The set of usable rules consists of r1, r2, r3, r4, r5, r6, r7, r8, r9, r10, r11 Take the reduction pair: lexicographic combination of reduction pairs: 1. max/plus interpretations on natural numbers: active#_A(x1) = max{0, x1 - 5} f_A(x1,x2,x3) = max{x1 + 4, x2, x3 + 7} a_A = 13 mark#_A(x1) = max{11, x1 - 3} b_A = 7 mark_A(x1) = max{14, x1 + 1} active_A(x1) = max{14, x1} 2. max/plus interpretations on natural numbers: active#_A(x1) = 0 f_A(x1,x2,x3) = 0 a_A = 2 mark#_A(x1) = 1 b_A = 1 mark_A(x1) = 0 active_A(x1) = 0 The next rules are strictly ordered: p1, p3 We remove them from the problem. -- SCC decomposition. Consider the dependency pair problem (P, R), where P consists of p1: mark#(f(X1,X2,X3)) -> mark#(X2) and R consists of: r1: active(f(a(),X,X)) -> mark(f(X,b(),b())) r2: active(b()) -> mark(a()) r3: mark(f(X1,X2,X3)) -> active(f(X1,mark(X2),X3)) r4: mark(a()) -> active(a()) r5: mark(b()) -> active(b()) r6: f(mark(X1),X2,X3) -> f(X1,X2,X3) r7: f(X1,mark(X2),X3) -> f(X1,X2,X3) r8: f(X1,X2,mark(X3)) -> f(X1,X2,X3) r9: f(active(X1),X2,X3) -> f(X1,X2,X3) r10: f(X1,active(X2),X3) -> f(X1,X2,X3) r11: f(X1,X2,active(X3)) -> f(X1,X2,X3) The estimated dependency graph contains the following SCCs: {p1} -- Reduction pair. Consider the dependency pair problem (P, R), where P consists of p1: mark#(f(X1,X2,X3)) -> mark#(X2) and R consists of: r1: active(f(a(),X,X)) -> mark(f(X,b(),b())) r2: active(b()) -> mark(a()) r3: mark(f(X1,X2,X3)) -> active(f(X1,mark(X2),X3)) r4: mark(a()) -> active(a()) r5: mark(b()) -> active(b()) r6: f(mark(X1),X2,X3) -> f(X1,X2,X3) r7: f(X1,mark(X2),X3) -> f(X1,X2,X3) r8: f(X1,X2,mark(X3)) -> f(X1,X2,X3) r9: f(active(X1),X2,X3) -> f(X1,X2,X3) r10: f(X1,active(X2),X3) -> f(X1,X2,X3) r11: f(X1,X2,active(X3)) -> f(X1,X2,X3) The set of usable rules consists of (no rules) Take the reduction pair: lexicographic combination of reduction pairs: 1. max/plus interpretations on natural numbers: mark#_A(x1) = max{1, x1} f_A(x1,x2,x3) = max{x1 + 1, x2 + 2, x3 + 1} 2. max/plus interpretations on natural numbers: mark#_A(x1) = 0 f_A(x1,x2,x3) = 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: f#(mark(X1),X2,X3) -> f#(X1,X2,X3) p2: f#(X1,X2,active(X3)) -> f#(X1,X2,X3) p3: f#(X1,active(X2),X3) -> f#(X1,X2,X3) p4: f#(active(X1),X2,X3) -> f#(X1,X2,X3) p5: f#(X1,X2,mark(X3)) -> f#(X1,X2,X3) p6: f#(X1,mark(X2),X3) -> f#(X1,X2,X3) and R consists of: r1: active(f(a(),X,X)) -> mark(f(X,b(),b())) r2: active(b()) -> mark(a()) r3: mark(f(X1,X2,X3)) -> active(f(X1,mark(X2),X3)) r4: mark(a()) -> active(a()) r5: mark(b()) -> active(b()) r6: f(mark(X1),X2,X3) -> f(X1,X2,X3) r7: f(X1,mark(X2),X3) -> f(X1,X2,X3) r8: f(X1,X2,mark(X3)) -> f(X1,X2,X3) r9: f(active(X1),X2,X3) -> f(X1,X2,X3) r10: f(X1,active(X2),X3) -> f(X1,X2,X3) r11: f(X1,X2,active(X3)) -> f(X1,X2,X3) The set of usable rules consists of (no rules) Take the reduction pair: lexicographic combination of reduction pairs: 1. max/plus interpretations on natural numbers: f#_A(x1,x2,x3) = max{0, x2 - 1} mark_A(x1) = max{3, x1 + 2} active_A(x1) = max{1, x1} 2. max/plus interpretations on natural numbers: f#_A(x1,x2,x3) = 0 mark_A(x1) = 0 active_A(x1) = 0 The next rules are strictly ordered: p6 We remove them from the problem. -- SCC decomposition. Consider the dependency pair problem (P, R), where P consists of p1: f#(mark(X1),X2,X3) -> f#(X1,X2,X3) p2: f#(X1,X2,active(X3)) -> f#(X1,X2,X3) p3: f#(X1,active(X2),X3) -> f#(X1,X2,X3) p4: f#(active(X1),X2,X3) -> f#(X1,X2,X3) p5: f#(X1,X2,mark(X3)) -> f#(X1,X2,X3) and R consists of: r1: active(f(a(),X,X)) -> mark(f(X,b(),b())) r2: active(b()) -> mark(a()) r3: mark(f(X1,X2,X3)) -> active(f(X1,mark(X2),X3)) r4: mark(a()) -> active(a()) r5: mark(b()) -> active(b()) r6: f(mark(X1),X2,X3) -> f(X1,X2,X3) r7: f(X1,mark(X2),X3) -> f(X1,X2,X3) r8: f(X1,X2,mark(X3)) -> f(X1,X2,X3) r9: f(active(X1),X2,X3) -> f(X1,X2,X3) r10: f(X1,active(X2),X3) -> f(X1,X2,X3) r11: f(X1,X2,active(X3)) -> f(X1,X2,X3) The estimated dependency graph contains the following SCCs: {p1, p2, p3, p4, p5} -- Reduction pair. Consider the dependency pair problem (P, R), where P consists of p1: f#(mark(X1),X2,X3) -> f#(X1,X2,X3) p2: f#(X1,X2,mark(X3)) -> f#(X1,X2,X3) p3: f#(active(X1),X2,X3) -> f#(X1,X2,X3) p4: f#(X1,active(X2),X3) -> f#(X1,X2,X3) p5: f#(X1,X2,active(X3)) -> f#(X1,X2,X3) and R consists of: r1: active(f(a(),X,X)) -> mark(f(X,b(),b())) r2: active(b()) -> mark(a()) r3: mark(f(X1,X2,X3)) -> active(f(X1,mark(X2),X3)) r4: mark(a()) -> active(a()) r5: mark(b()) -> active(b()) r6: f(mark(X1),X2,X3) -> f(X1,X2,X3) r7: f(X1,mark(X2),X3) -> f(X1,X2,X3) r8: f(X1,X2,mark(X3)) -> f(X1,X2,X3) r9: f(active(X1),X2,X3) -> f(X1,X2,X3) r10: f(X1,active(X2),X3) -> f(X1,X2,X3) r11: f(X1,X2,active(X3)) -> f(X1,X2,X3) The set of usable rules consists of (no rules) Take the reduction pair: lexicographic combination of reduction pairs: 1. max/plus interpretations on natural numbers: f#_A(x1,x2,x3) = x1 + 2 mark_A(x1) = max{2, x1 + 1} active_A(x1) = max{2, x1 + 1} 2. max/plus interpretations on natural numbers: f#_A(x1,x2,x3) = 0 mark_A(x1) = 0 active_A(x1) = 0 The next rules are strictly ordered: p1, p3 We remove them from the problem. -- SCC decomposition. Consider the dependency pair problem (P, R), where P consists of p1: f#(X1,X2,mark(X3)) -> f#(X1,X2,X3) p2: f#(X1,active(X2),X3) -> f#(X1,X2,X3) p3: f#(X1,X2,active(X3)) -> f#(X1,X2,X3) and R consists of: r1: active(f(a(),X,X)) -> mark(f(X,b(),b())) r2: active(b()) -> mark(a()) r3: mark(f(X1,X2,X3)) -> active(f(X1,mark(X2),X3)) r4: mark(a()) -> active(a()) r5: mark(b()) -> active(b()) r6: f(mark(X1),X2,X3) -> f(X1,X2,X3) r7: f(X1,mark(X2),X3) -> f(X1,X2,X3) r8: f(X1,X2,mark(X3)) -> f(X1,X2,X3) r9: f(active(X1),X2,X3) -> f(X1,X2,X3) r10: f(X1,active(X2),X3) -> f(X1,X2,X3) r11: f(X1,X2,active(X3)) -> f(X1,X2,X3) 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: f#(X1,X2,mark(X3)) -> f#(X1,X2,X3) p2: f#(X1,X2,active(X3)) -> f#(X1,X2,X3) p3: f#(X1,active(X2),X3) -> f#(X1,X2,X3) and R consists of: r1: active(f(a(),X,X)) -> mark(f(X,b(),b())) r2: active(b()) -> mark(a()) r3: mark(f(X1,X2,X3)) -> active(f(X1,mark(X2),X3)) r4: mark(a()) -> active(a()) r5: mark(b()) -> active(b()) r6: f(mark(X1),X2,X3) -> f(X1,X2,X3) r7: f(X1,mark(X2),X3) -> f(X1,X2,X3) r8: f(X1,X2,mark(X3)) -> f(X1,X2,X3) r9: f(active(X1),X2,X3) -> f(X1,X2,X3) r10: f(X1,active(X2),X3) -> f(X1,X2,X3) r11: f(X1,X2,active(X3)) -> f(X1,X2,X3) The set of usable rules consists of (no rules) Take the reduction pair: lexicographic combination of reduction pairs: 1. max/plus interpretations on natural numbers: f#_A(x1,x2,x3) = x2 + 2 mark_A(x1) = max{2, x1 + 1} active_A(x1) = max{2, x1 + 1} 2. max/plus interpretations on natural numbers: f#_A(x1,x2,x3) = 0 mark_A(x1) = 0 active_A(x1) = 0 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: f#(X1,X2,mark(X3)) -> f#(X1,X2,X3) p2: f#(X1,X2,active(X3)) -> f#(X1,X2,X3) and R consists of: r1: active(f(a(),X,X)) -> mark(f(X,b(),b())) r2: active(b()) -> mark(a()) r3: mark(f(X1,X2,X3)) -> active(f(X1,mark(X2),X3)) r4: mark(a()) -> active(a()) r5: mark(b()) -> active(b()) r6: f(mark(X1),X2,X3) -> f(X1,X2,X3) r7: f(X1,mark(X2),X3) -> f(X1,X2,X3) r8: f(X1,X2,mark(X3)) -> f(X1,X2,X3) r9: f(active(X1),X2,X3) -> f(X1,X2,X3) r10: f(X1,active(X2),X3) -> f(X1,X2,X3) r11: f(X1,X2,active(X3)) -> f(X1,X2,X3) The estimated dependency graph contains the following SCCs: {p1, p2} -- Reduction pair. Consider the dependency pair problem (P, R), where P consists of p1: f#(X1,X2,mark(X3)) -> f#(X1,X2,X3) p2: f#(X1,X2,active(X3)) -> f#(X1,X2,X3) and R consists of: r1: active(f(a(),X,X)) -> mark(f(X,b(),b())) r2: active(b()) -> mark(a()) r3: mark(f(X1,X2,X3)) -> active(f(X1,mark(X2),X3)) r4: mark(a()) -> active(a()) r5: mark(b()) -> active(b()) r6: f(mark(X1),X2,X3) -> f(X1,X2,X3) r7: f(X1,mark(X2),X3) -> f(X1,X2,X3) r8: f(X1,X2,mark(X3)) -> f(X1,X2,X3) r9: f(active(X1),X2,X3) -> f(X1,X2,X3) r10: f(X1,active(X2),X3) -> f(X1,X2,X3) r11: f(X1,X2,active(X3)) -> f(X1,X2,X3) The set of usable rules consists of (no rules) Take the reduction pair: lexicographic combination of reduction pairs: 1. max/plus interpretations on natural numbers: f#_A(x1,x2,x3) = x3 + 1 mark_A(x1) = max{1, x1} active_A(x1) = max{2, x1 + 1} 2. max/plus interpretations on natural numbers: f#_A(x1,x2,x3) = 0 mark_A(x1) = 0 active_A(x1) = 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: f#(X1,X2,mark(X3)) -> f#(X1,X2,X3) and R consists of: r1: active(f(a(),X,X)) -> mark(f(X,b(),b())) r2: active(b()) -> mark(a()) r3: mark(f(X1,X2,X3)) -> active(f(X1,mark(X2),X3)) r4: mark(a()) -> active(a()) r5: mark(b()) -> active(b()) r6: f(mark(X1),X2,X3) -> f(X1,X2,X3) r7: f(X1,mark(X2),X3) -> f(X1,X2,X3) r8: f(X1,X2,mark(X3)) -> f(X1,X2,X3) r9: f(active(X1),X2,X3) -> f(X1,X2,X3) r10: f(X1,active(X2),X3) -> f(X1,X2,X3) r11: f(X1,X2,active(X3)) -> f(X1,X2,X3) The estimated dependency graph contains the following SCCs: {p1} -- Reduction pair. Consider the dependency pair problem (P, R), where P consists of p1: f#(X1,X2,mark(X3)) -> f#(X1,X2,X3) and R consists of: r1: active(f(a(),X,X)) -> mark(f(X,b(),b())) r2: active(b()) -> mark(a()) r3: mark(f(X1,X2,X3)) -> active(f(X1,mark(X2),X3)) r4: mark(a()) -> active(a()) r5: mark(b()) -> active(b()) r6: f(mark(X1),X2,X3) -> f(X1,X2,X3) r7: f(X1,mark(X2),X3) -> f(X1,X2,X3) r8: f(X1,X2,mark(X3)) -> f(X1,X2,X3) r9: f(active(X1),X2,X3) -> f(X1,X2,X3) r10: f(X1,active(X2),X3) -> f(X1,X2,X3) r11: f(X1,X2,active(X3)) -> f(X1,X2,X3) The set of usable rules consists of (no rules) Take the reduction pair: lexicographic combination of reduction pairs: 1. max/plus interpretations on natural numbers: f#_A(x1,x2,x3) = x3 mark_A(x1) = max{2, x1 + 1} 2. max/plus interpretations on natural numbers: f#_A(x1,x2,x3) = 0 mark_A(x1) = 0 The next rules are strictly ordered: p1 We remove them from the problem. Then no dependency pair remains.