Determine all pairs $(p, q)$, $p, q \in \mathbb {N}$, such that

$(p + 1)^{p - 1} + (p - 1)^{p + 1} = q^q$.
To determine all pairs \((p, q)\) where \(p, q \in \mathbb{N}\) such that \((p + 1)^{p - 1} + (p - 1)^{p + 1} = q^q\), we will analyze different cases based on the relationship between \(p\) and \(q\).

1. **Case 1: \(q \leq p - 1\)**

   \[
   (p + 1)^{p - 1} + (p - 1)^{p + 1} = q^q \leq (p - 1)^{p - 1}
   \]

   Clearly, there is no solution in this case because \((p + 1)^{p - 1} > (p - 1)^{p - 1}\).

2. **Case 2: \(q \geq p + 2\)**

   \[
   (p + 1)^{p - 1} + (p - 1)^{p + 1} = q^q \geq (p + 2)^{p + 2}
   \]

   We know that:

   \[
   (p + 2)^{p + 2} > 2(p + 2)^{p + 1}
   \]

   Since \((p + 2)^{p + 1} > (p + 1)^{p - 1}\) and \((p + 2)^{p + 1} > (p - 1)^{p + 1}\), it follows that:

   \[
   2(p + 2)^{p + 1} > (p + 1)^{p - 1} + (p - 1)^{p + 1}
   \]

   This leads to a contradiction, so there is no solution in this case either.

3. **Case 3: \(q = p + 1\)**

   \[
   (p + 1)^{p - 1} + (p - 1)^{p + 1} = (p + 1)^{p + 1}
   \]

   Simplifying, we get:

   \[
   (p - 1)^{p + 1} = (p + 1)^{p - 1} \cdot (p^2 + 2p)
   \]

   We know that \((p + 1)^{p - 1} > (p - 1)^{p - 1}\) and \(p^2 + 2p > (p - 1)^2\). Multiplying these inequalities, we get:

   \[
   (p + 1)^{p - 1} \cdot (p^2 + 2p) > (p - 1)^{p + 1}
   \]

   Hence, there is no solution in this case either.

4. **Case 4: \(q = p\)**

   \[
   (p + 1)^{p - 1} + (p - 1)^{p + 1} = p^p
   \]

   We can show by induction that \((p - 1)^{p + 1} > p^p\) for all \(p \geq 6\).

   **Base Case:**
   For \(p = 6\):

   \[
   (6 - 1)^{6 + 1} = 5^7 = 78125 \quad \text{and} \quad 6^6 = 46656
   \]

   Clearly, \(5^7 > 6^6\).

   **Inductive Step:**
   Assume \((p - 1)^{p + 1} > p^p\) for some \(p \geq 6\). We need to show that \((p + 1)^{p + 2} > (p + 2)^{p + 1}\).

   It suffices to show that:

   \[
   p^{p + 2} \cdot p^p > (p + 1)^{p + 1} \cdot (p - 1)^{p + 1}
   \]

   Simplifying, we get:

   \[
   p^2 > (p - 1)(p + 1)
   \]

   This is clearly true. Therefore, by induction, \((p - 1)^{p + 1} > p^p\) for all \(p \geq 6\).

   By checking the values \(p \leq 5\), we conclude that \(p = 1\) and \(p = 2\) are the only solutions.

The final answer is \( \boxed{ (p, q) = (1, 1); (2, 2) } \)