We consider the following Problem:

  Strict Trs:
    {  f(f(x, y, z), u, f(x, y, v)) -> f(x, y, f(z, u, v))
     , f(x, y, y) -> y
     , f(x, y, g(y)) -> x
     , f(x, x, y) -> x
     , f(g(x), x, y) -> y}
  StartTerms: basic terms
  Strategy: innermost

Certificate: YES(?,O(n^1))

Proof:
  We consider the following Problem:
  
    Strict Trs:
      {  f(f(x, y, z), u, f(x, y, v)) -> f(x, y, f(z, u, v))
       , f(x, y, y) -> y
       , f(x, y, g(y)) -> x
       , f(x, x, y) -> x
       , f(g(x), x, y) -> y}
    StartTerms: basic terms
    Strategy: innermost
  
  Certificate: YES(?,O(n^1))
  
  Proof:
    The weightgap principle applies, where following rules are oriented strictly:
    
    TRS Component: {f(x, y, g(y)) -> x}
    
    Interpretation of nonconstant growth:
    -------------------------------------
      The following argument positions are usable:
        Uargs(f) = {3}, Uargs(g) = {}
      We have the following EDA-non-satisfying and IDA(1)-non-satisfying matrix interpretation:
      Interpretation Functions:
       f(x1, x2, x3) = [1 0] x1 + [0 0] x2 + [1 0] x3 + [0]
                       [0 1]      [0 0]      [1 0]      [0]
       g(x1) = [1 0] x1 + [2]
               [0 0]      [0]
    
    The strictly oriented rules are moved into the weak component.
    
    We consider the following Problem:
    
      Strict Trs:
        {  f(f(x, y, z), u, f(x, y, v)) -> f(x, y, f(z, u, v))
         , f(x, y, y) -> y
         , f(x, x, y) -> x
         , f(g(x), x, y) -> y}
      Weak Trs: {f(x, y, g(y)) -> x}
      StartTerms: basic terms
      Strategy: innermost
    
    Certificate: YES(?,O(n^1))
    
    Proof:
      The weightgap principle applies, where following rules are oriented strictly:
      
      TRS Component:
        {  f(f(x, y, z), u, f(x, y, v)) -> f(x, y, f(z, u, v))
         , f(x, x, y) -> x}
      
      Interpretation of nonconstant growth:
      -------------------------------------
        The following argument positions are usable:
          Uargs(f) = {3}, Uargs(g) = {}
        We have the following EDA-non-satisfying and IDA(1)-non-satisfying matrix interpretation:
        Interpretation Functions:
         f(x1, x2, x3) = [1 0] x1 + [0 0] x2 + [1 0] x3 + [2]
                         [0 1]      [0 0]      [1 0]      [0]
         g(x1) = [1 0] x1 + [0]
                 [0 0]      [0]
      
      The strictly oriented rules are moved into the weak component.
      
      We consider the following Problem:
      
        Strict Trs:
          {  f(x, y, y) -> y
           , f(g(x), x, y) -> y}
        Weak Trs:
          {  f(f(x, y, z), u, f(x, y, v)) -> f(x, y, f(z, u, v))
           , f(x, x, y) -> x
           , f(x, y, g(y)) -> x}
        StartTerms: basic terms
        Strategy: innermost
      
      Certificate: YES(?,O(n^1))
      
      Proof:
        The weightgap principle applies, where following rules are oriented strictly:
        
        TRS Component:
          {  f(x, y, y) -> y
           , f(g(x), x, y) -> y}
        
        Interpretation of nonconstant growth:
        -------------------------------------
          The following argument positions are usable:
            Uargs(f) = {3}, Uargs(g) = {}
          We have the following EDA-non-satisfying and IDA(1)-non-satisfying matrix interpretation:
          Interpretation Functions:
           f(x1, x2, x3) = [1 0] x1 + [1 1] x2 + [1 0] x3 + [1]
                           [0 1]      [0 0]      [0 1]      [1]
           g(x1) = [0 0] x1 + [0]
                   [0 0]      [0]
        
        The strictly oriented rules are moved into the weak component.
        
        We consider the following Problem:
        
          Weak Trs:
            {  f(x, y, y) -> y
             , f(g(x), x, y) -> y
             , f(f(x, y, z), u, f(x, y, v)) -> f(x, y, f(z, u, v))
             , f(x, x, y) -> x
             , f(x, y, g(y)) -> x}
          StartTerms: basic terms
          Strategy: innermost
        
        Certificate: YES(O(1),O(1))
        
        Proof:
          We consider the following Problem:
          
            Weak Trs:
              {  f(x, y, y) -> y
               , f(g(x), x, y) -> y
               , f(f(x, y, z), u, f(x, y, v)) -> f(x, y, f(z, u, v))
               , f(x, x, y) -> x
               , f(x, y, g(y)) -> x}
            StartTerms: basic terms
            Strategy: innermost
          
          Certificate: YES(O(1),O(1))
          
          Proof:
            Empty rules are trivially bounded

Hurray, we answered YES(?,O(n^1))