Find a Four-Coloring of a Map of Europe
Find the neighbors of each European country.
In[1]:= | ![]() X |
These are the neighbors of Austria.
In[2]:= | ![]() X |
Out[2]= | ![]() |
Encode the four possible colors as two Booleans per country.
In[3]:= | ![]() X |
In[4]:= | ![]() X |
Express the condition that all pairs of bordering countries have different colors as a logical expression.
In[5]:= | ![]() X |
Compute a solution to the four-color problem.
In[6]:= | ![]() X |
Form the coloring.
In[7]:= | ![]() X |
Out[7]= | ![]() |
Color each country according to the coloring found.
In[8]:= | ![]() X |
Out[8]= | ![]() |