If Rick is mad at Sue and Philip, Sue is mad at Terry, and Terry is mad at Rick, it might be hard to keep track of this information.
A model of the situation might look like this:
In this model, each circle represents a person and lines connect the people who might not want to sit at the same table.
These types of math models are called graphs. On graphs, circles are called vertexes and lines that connect vertexes are called edges.
It may be easier to color the map of South America as cheaply as possible if we first make a graph of the problem.
On your graph: