How can we use graph theory to solve this basic AMC 10 Problem? The problem:

A farmer's rectangular field is partitioned into $2$ by $2$ grid of $4$ rectangular sections as shown in the figure. In each section the farmer will plant one crop: corn, wheat, soybeans, or potatoes. The farmer does not want to grow corn and wheat in any two sections that share a border, and the farmer does not want to grow soybeans and potatoes in any two sections that share a border. Given these restrictions, in how many ways can the farmer choose crops to plant in each of the four sections of the field?

(2021 AMC 10A Fall Problem #18, Correct Answer: 84). The intended solution is clearly casework, and I already know how to do it that way, so that's not what I'm looking for.
I was wondering how to solve this problem with graph theory. Considering the graph as a cycle with $4$ vertices, or $C_4$, it happens to be that the number of ways to color this graph with $4$ colors is $84$, the correct answer (I just plugged in $4$ to the chromatic polynomial which I found on Wikipedia). So my question is: Why is this true? Is it just by luck? I suppose the crops can be interpreted as different colors, but it is only given that corn can't neighbor wheat and soybeans can't neighbor potatoes (which isn't the setup for graph coloring, it's that two adjacent vertices can't be the same color).
I'm a beginner to this graph theory stuff, so it would be great if any answer given works from the ground up. Thanks
 A: There is actually a one-to-one correspondence from valid plantings to colorings of $C_4$ with $4$ colors.

For simplicity, we'll denote "corn" and "wheat" as $1$ and $-1$, and we'll denote "soybeans" and "potatoes" as $2$ and $-2$. (So, in the field, a crop $c$ cannot be adjacent to a crop $-c$ for any $c \in \{1, 2\}$.)
Let $v_1$, $v_2$, $v_3$, and $v_4$ be the plots in the field such that $v_1$ is adjacent to $v_2$, $v_2$ is adjacent to $v_3$, $v_3$ is adjacent to $v_4$, and $v_4$ is adjacent to $v_1$. Similarly, let $w_1$, $w_2$, $w_3$, and $w_4$ be the vertices of the cycle graph $C_4$ such that $w_1 w_2$, $w_2 w_3$, $w_3 w_4$, and $w_4 w_1$ are the edges in the graph.
Claim: Let $a_1, a_2, a_3, a_4 \in \{-2, -1, 1, 2\}$. Then $(v_1, v_2, v_3, v_4) = (a_1, a_2, a_3, a_4)$ is a valid planting if and only if $(w_1, w_2, w_3, w_4) = (a_1, -a_2, a_3, -a_4)$ is a valid coloring of the cycle graph $C_4$.
Rough sketch of proof: Suppose $(v_1, v_2, v_3, v_4) = (a_1, a_2, a_3, a_4)$ is a valid planting. Consider any adjacent plots $v_i$ and $v_j$. Clearly, $a_i \neq -a_j$ (otherwise, the planting would be invalid due to these two plots).
On the other hand, we know that the colors for $w_i$ and $w_j$ is either $(w_i, w_j) = (a_i, -a_j)$ or $(w_i, w_j) = (-a_i, a_j)$. In either case, because we have already concluded that $a_i \neq -a_j$, then we know there is no problem for the edge $w_i w_j$ in this coloring of $C_4$.
We can apply this for all adjacent vertices ($v_i$, $v_j$) to conclude that the coloring $(w_1, w_2, w_3, w_4) = (a_1, -a_2, a_3, -a_4)$ is a valid coloring of $C_4$. This only proves one direction of the claim, but we can similarly argue for the other direction.

Note that this can also be generalised: if the field forms a cycle of $2n$ plots and wants to be filled with $2n$ kinds of crops $\pm 1, \pm 2, \dots, \pm n$ such that crop $c$ and crop $-c$ cannot be adjacent for any $c \in \{1, \dots, n\}$, then the answer is exactly the number of colorings of $C_{2n}$ with $2n$ colors. As mentioned in the question post, the Wikipedia page for chromatic polynomial tells us that the number of colorings is $(2n - 1)^{2n} + (2n - 1)$.
A: Given two graphs $G = (V, E)$, $G' = (V', E')$, a graph homomorphism $f : G \to G'$ is a map $f_V : V \to V'$, together with a map $f_E : E \to E'$, such that if $e \in E$ goes from node $a \in V$ to node $b \in V$, the $f_E(e)$ goes from $f_V(a)$ to $f_V(b)$.
Each 4-colouring of a graph $G$ corresponds to a graph homomorphism $G \to K_4$. The number of 4-colourings is thus the number of graph homomorphisms $G \to K_4$.
Let $G = C_4$ be the graph representing the field.
In this problem, each planting corresponds to a graph homomorphism from $G$ to the graph $P$, where the nodes are $V = \{corn, wheat, soybeans, potatoes\}$, and the edges are $E = V^2 \setminus \{(corn, wheat), (wheat, corn), (soybeans, potatoes), (potatoes, soybeans)\}$.
So both cases, we wish to count the number of graph homomorphisms from the graph $G$ to some other graph with 4 vertices. But there's no prima facie reason why the two results should be the same that I can think of.
