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:

  lexicographic path order with precedence:
  
    precedence:
    
      d > g > h > active > mark# > active# > mark > c
    
    argument filter:
  
      pi(active#) = [1]
      pi(g) = [1]
      pi(mark#) = [1]
      pi(h) = [1]
      pi(d) = []
      pi(c) = []
      pi(mark) = [1]
      pi(active) = 1

The next rules are strictly ordered:

  p1, p2, p3, p4
  r1, r2, r3, r4, r5, r6, r7, r8, r10

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: 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:

  lexicographic path order with precedence:
  
    precedence:
    
      h# > active > mark
    
    argument filter:
  
      pi(h#) = 1
      pi(mark) = [1]
      pi(active) = [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:

  lexicographic path order with precedence:
  
    precedence:
    
      g# > active > mark
    
    argument filter:
  
      pi(g#) = 1
      pi(mark) = [1]
      pi(active) = [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.