algorithms – Formula to find the number of colors to be colored on a map so that two adjacent counties do not have the same color

Ironically, yes. Just use n colors. But I guess you mean the minimum number of colors. In this case, the problem is NP-complete. By the way, we know that:
$ text {Let G text {be} X_G text {correspond to the number of colors of G and} D_G text {to the maximum number of adjacent cells in G,} $we have that $ X_G the D_G + 1 $