For two different USA states the four possibilities happen considering their frontiers:
- They don't share any frontier (e.g. Alaska and Utah or Florida and California)
- They share a straight frontier (Montana and South Dakota)
- They share a fractal frontier and a straight frontier (Texas and Oklahoma)
- They share a fractal frontier (Tennesse and North Carolina)
The same occurs for African countries:

- They don't share any frontier (e.g. Madagascar and Egypt)
- They share a straight frontier (Western Sahara and Morocco)
- They share a fractal frontier and a straight frontier (Egypt and Lybia)
- They share a fractal frontier (Ethiopia and Sudan)
Swap as many US states and African countries such that the number of neighbors don't change and the type of frontier also does not change! Once a state or a country has been swapped, it can not be swapped again.
As a trivial start, Alaska can be swapped with Madagascar as they don't share any frontier with any other state or country.
Then, Florida has two neighbors, Alabama and Georgia and Florida shares only fractal frontiers with both of them. The same occurs for Tunisia which has two neighbors, Algeria and Lybia and Tunisia shares only fractal frontiers with both of them. As a result, Florida and Tunisia could be swapped.
You can not swap Washington with Morocco even if they have the same number of neighbors (Idaho and Oregon for Washington) and (Western Sahara and Algeria for Morocco) because Washington shares fractal frontiers with Oregon and fractal and straight frontiers with Idaho while Morocco shares straight frontiers with Western Sahara!
How many pair State(USA)-Country(Africa) can be swapped at most?
Please consider the following two lists for this puzzle:
- Alabama
- Alaska
- Arizona
- Arkansas
- California
- Colorado
- Connecticut
- Delaware
- Florida
- Georgia
- Hawaii
- Idaho
- Illinois
- Indiana
- Iowa
- Kansas
- Kentucky
- Louisiana
- Maine
- Maryland
- Massachusetts
- Michigan
- Minnesota
- Mississippi
- Missouri
- Montana
- Nebraska
- Nevada
- New Hampshire
- New Jersey
- New Mexico
- New York
- North Carolina
- North Dakota
- Ohio
- Oklahoma
- Oregon
- Pennsylvania
- Rhode Island
- South Carolina
- South Dakota
- Tennessee
- Texas
- Utah
- Vermont
- Virginia
- Washington
- West Virginia
- Wisconsin
- Wyoming
And:
- Algeria
- Angola
- Benin
- Botswana
- Burkina Faso
- Burundi
- Cabo Verde (Cape Verde)
- Cameroon
- Central African Republic
- Chad
- Comoros
- Republic of the Congo
- Democratic Republic of the Congo
- Côte d'Ivoire (Ivory Coast)
- Djibouti
- Egypt
- Equatorial Guinea
- Eritrea
- Eswatini (formerly Swaziland)
- Ethiopia
- Gabon
- The Gambia
- Ghana
- Guinea
- Guinea-Bissau
- Kenya
- Lesotho
- Liberia
- Libya
- Madagascar
- Malawi
- Mali
- Mauritania
- Mauritius
- Morocco
- Mozambique
- Namibia
- Niger
- Nigeria
- Rwanda
- São Tomé and Príncipe
- Senegal
- Seychelles
- Sierra Leone
- Somalia
- South Africa
- South Sudan
- Sudan
- Tanzania
- Togo
- Tunisia
- Uganda
- Zambia
- Zimbabwe
