We consider the following Problem:

  Strict Trs:
    {  p(f(f(x))) -> q(f(g(x)))
     , p(g(g(x))) -> q(g(f(x)))
     , q(f(f(x))) -> p(f(g(x)))
     , q(g(g(x))) -> p(g(f(x)))}
  StartTerms: basic terms
  Strategy: innermost

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

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