YES

We show the termination of the TRS R:

  active(g(X)) -> mark(h(X))
  active(c()) -> mark(d())
  active(h(d())) -> mark(g(c()))
  mark(g(X)) -> active(g(X))
  mark(h(X)) -> active(h(X))
  mark(c()) -> active(c())
  mark(d()) -> active(d())
  g(mark(X)) -> g(X)
  g(active(X)) -> g(X)
  h(mark(X)) -> h(X)
  h(active(X)) -> h(X)

-- SCC decomposition.

Consider the dependency pair problem (P, R), where P consists of

p1: active#(g(X)) -> mark#(h(X))
p2: active#(g(X)) -> h#(X)
p3: active#(c()) -> mark#(d())
p4: active#(h(d())) -> mark#(g(c()))
p5: active#(h(d())) -> g#(c())
p6: mark#(g(X)) -> active#(g(X))
p7: mark#(h(X)) -> active#(h(X))
p8: mark#(c()) -> active#(c())
p9: mark#(d()) -> active#(d())
p10: g#(mark(X)) -> g#(X)
p11: g#(active(X)) -> g#(X)
p12: h#(mark(X)) -> h#(X)
p13: h#(active(X)) -> h#(X)

and R consists of:

r1: active(g(X)) -> mark(h(X))
r2: active(c()) -> mark(d())
r3: active(h(d())) -> mark(g(c()))
r4: mark(g(X)) -> active(g(X))
r5: mark(h(X)) -> active(h(X))
r6: mark(c()) -> active(c())
r7: mark(d()) -> active(d())
r8: g(mark(X)) -> g(X)
r9: g(active(X)) -> g(X)
r10: h(mark(X)) -> h(X)
r11: h(active(X)) -> h(X)

The estimated dependency graph contains the following SCCs:

  {p1, p4, p6, p7}
  {p12, p13}
  {p10, p11}


-- Reduction pair.

Consider the dependency pair problem (P, R), where P consists of

p1: active#(g(X)) -> mark#(h(X))
p2: mark#(h(X)) -> active#(h(X))
p3: active#(h(d())) -> mark#(g(c()))
p4: mark#(g(X)) -> active#(g(X))

and R consists of:

r1: active(g(X)) -> mark(h(X))
r2: active(c()) -> mark(d())
r3: active(h(d())) -> mark(g(c()))
r4: mark(g(X)) -> active(g(X))
r5: mark(h(X)) -> active(h(X))
r6: mark(c()) -> active(c())
r7: mark(d()) -> active(d())
r8: g(mark(X)) -> g(X)
r9: g(active(X)) -> g(X)
r10: h(mark(X)) -> h(X)
r11: h(active(X)) -> h(X)

The set of usable rules consists of

  r8, r9, r10, r11

Take the monotone reduction pair:

  matrix interpretations:
  
    carrier: N^2
    order: standard order
    interpretations:
      active#_A(x1) = x1
      g_A(x1) = ((1,1),(1,0)) x1 + (2,1)
      mark#_A(x1) = x1 + (1,0)
      h_A(x1) = ((1,1),(1,1)) x1 + (1,1)
      d_A() = (3,1)
      c_A() = (1,1)
      mark_A(x1) = ((1,1),(1,1)) x1 + (1,1)
      active_A(x1) = ((1,1),(1,1)) x1 + (1,1)

The next rules are strictly ordered:

  p2, p4
  r1, r2, r3, r4, r5, r6, r7, r8, r9, r10, r11

We remove them from the problem.

-- SCC decomposition.

Consider the dependency pair problem (P, R), where P consists of

p1: active#(g(X)) -> mark#(h(X))
p2: active#(h(d())) -> mark#(g(c()))

and R consists of:

  (no rules)

The estimated dependency graph contains the following SCCs:

  (no SCCs)

-- Reduction pair.

Consider the dependency pair problem (P, R), where P consists of

p1: h#(mark(X)) -> h#(X)
p2: h#(active(X)) -> h#(X)

and R consists of:

r1: active(g(X)) -> mark(h(X))
r2: active(c()) -> mark(d())
r3: active(h(d())) -> mark(g(c()))
r4: mark(g(X)) -> active(g(X))
r5: mark(h(X)) -> active(h(X))
r6: mark(c()) -> active(c())
r7: mark(d()) -> active(d())
r8: g(mark(X)) -> g(X)
r9: g(active(X)) -> g(X)
r10: h(mark(X)) -> h(X)
r11: h(active(X)) -> h(X)

The set of usable rules consists of

  (no rules)

Take the monotone reduction pair:

  matrix interpretations:
  
    carrier: N^2
    order: standard order
    interpretations:
      h#_A(x1) = ((1,0),(1,1)) x1
      mark_A(x1) = ((1,1),(1,1)) x1 + (1,1)
      active_A(x1) = ((1,1),(1,1)) x1 + (1,1)

The next rules are strictly ordered:

  p1, p2
  r1, r2, r3, r4, r5, r6, r7, r8, r9, r10, r11

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(g(X)) -> mark(h(X))
r2: active(c()) -> mark(d())
r3: active(h(d())) -> mark(g(c()))
r4: mark(g(X)) -> active(g(X))
r5: mark(h(X)) -> active(h(X))
r6: mark(c()) -> active(c())
r7: mark(d()) -> active(d())
r8: g(mark(X)) -> g(X)
r9: g(active(X)) -> g(X)
r10: h(mark(X)) -> h(X)
r11: h(active(X)) -> h(X)

The set of usable rules consists of

  (no rules)

Take the monotone reduction pair:

  matrix interpretations:
  
    carrier: N^2
    order: standard order
    interpretations:
      g#_A(x1) = ((1,0),(1,1)) x1
      mark_A(x1) = ((1,1),(1,1)) x1 + (1,1)
      active_A(x1) = ((1,1),(1,1)) x1 + (1,1)

The next rules are strictly ordered:

  p1, p2
  r1, r2, r3, r4, r5, r6, r7, r8, r9, r10, r11

We remove them from the problem.  Then no dependency pair remains.