{"id":1516,"date":"2016-11-14T00:35:18","date_gmt":"2016-11-14T06:35:18","guid":{"rendered":"http:\/\/www.laurentlessard.com\/bookproofs\/?p=1516"},"modified":"2016-11-14T01:35:16","modified_gmt":"2016-11-14T07:35:16","slug":"adversarial-map-coloring","status":"publish","type":"post","link":"https:\/\/laurentlessard.com\/bookproofs\/adversarial-map-coloring\/","title":{"rendered":"Adversarial map coloring"},"content":{"rendered":"<p>This <a href=\"http:\/\/fivethirtyeight.com\/features\/allison-bob-and-the-technicolor-dream-map\/\">Riddler<\/a> problem considers the classical map-coloring problem with an adversarial twist! One player draws countries and the other player colors them.<\/p>\n<blockquote><p>\nAllison and Bob decide to play a map-coloring game. Each turn, Allison draws a simple closed curve on a piece of paper, and Bob must then color the interior of the &#8220;country&#8221; that curve creates with one of his many crayons. If the new country borders any pre-existing countries, Bob must color the new country with a color that is different from the ones he used for the bordering ones.<\/p>\n<p>Allison wins the game when she forces Bob to use a sixth color. If they both play optimally, how many countries will Allison have to draw to win?\n<\/p><\/blockquote>\n<p>Here is my solution:<br \/>\n<a href=\"javascript:Solution('soln_map_coloring','toggle_map_coloring')\" id=\"toggle_map_coloring\">[Show Solution]<\/a><\/p>\n<div id=\"soln_map_coloring\" style=\"display: none\">\n<h3>Graph colorings<\/h3>\n<p>There is a well-known result called the <a href=\"https:\/\/en.wikipedia.org\/wiki\/Four_color_theorem\">four color theorem<\/a> that states that at most four colors are required to color a map such that countries sharing a border are always different colors. So why would six colors ever be required? While it&#8217;s true that it only takes four colors to color a given map, you need to see the whole map in order to know which colors to use where. In this problem, Allison can (and must) change the way she draws the countries based on how Bob chooses to color them.<\/p>\n<p>Maps can get messy pretty quickly, but it turns out we can work with graphs instead. Each country is represented by a vertex, and we draw an edge between two vertices whenever those countries share a border. Every map can be represented by a <a href=\"https:\/\/en.wikipedia.org\/wiki\/Planar_graph\">planar graph<\/a>, i.e. a graph that can be drawn such that none of its edges intersect. Likewise, every planar graph corresponds to a map. Here is an example illustrating the transformation.<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/laurentlessard.com\/bookproofs\/wp-content\/uploads\/2016\/11\/graph_coloring_equivalence.png\" alt=\"graph_coloring_equivalence\" width=\"500\" class=\"aligncenter size-full wp-image-1533\" \/><\/p>\n<p>Every map coloring therefore corresponds to a coloring of the graph vertices such that whenever vertices share an edge, they cannot share the same color. This is known as a <a href=\"https:\/\/en.wikipedia.org\/wiki\/Graph_coloring\">graph coloring<\/a>.<\/p>\n<h3>Sequential country addition<\/h3>\n<p>The game involves drawing new countries sequentially and then coloring them. From the graph point of view, this amounts to Allison drawing a new vertex along with some number of edges such that the new graph is still planar, and then Bob picking a color for that vertex. The planar graph divides the plane into regions separated by the existing edges: several inner regions and one outer region.<\/p>\n<h3>Solution<\/h3>\n<p>The smallest map I came up with has eight countries (in the worst case). In the figure below, I show which countries Allison should add at each stage (gray nodes) and what Bob&#8217;s color options are. In a couple cases, I pruned the graph to remove interior vertices just to simplify the picture, and I ignored equivalent positions resulting from permuting colors since the color itself doesn&#8217;t matter, only whether colors are the same or different. Allison starts by drawing three touching countries.<\/p>\n<p><a href=\"https:\/\/laurentlessard.com\/bookproofs\/wp-content\/uploads\/2016\/11\/graphcoloring.png\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/laurentlessard.com\/bookproofs\/wp-content\/uploads\/2016\/11\/graphcoloring.png\" alt=\"graphcoloring\" width=\"1094\" height=\"1225\" class=\"aligncenter size-full wp-image-1541\" srcset=\"https:\/\/laurentlessard.com\/bookproofs\/wp-content\/uploads\/2016\/11\/graphcoloring.png 1094w, https:\/\/laurentlessard.com\/bookproofs\/wp-content\/uploads\/2016\/11\/graphcoloring-268x300.png 268w, https:\/\/laurentlessard.com\/bookproofs\/wp-content\/uploads\/2016\/11\/graphcoloring-768x860.png 768w, https:\/\/laurentlessard.com\/bookproofs\/wp-content\/uploads\/2016\/11\/graphcoloring-914x1024.png 914w\" sizes=\"auto, (max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 1362px) 62vw, 840px\" \/><\/a><\/p>\n<p>If Bob does his best to delay the inevitable (he follows the longest path on the diagram above), then there will be a total of 8 countries on the map when Bob is forced to use a sixth color. Here is what one of the final largest maps looks like with all the countries drawn in when both players are playing optimally. I numbered the regions in the order in which Allison draws them, and colored them as Bob would color them.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/laurentlessard.com\/bookproofs\/wp-content\/uploads\/2016\/11\/graphcoloring_map-300x172.png\" alt=\"graphcoloring_map\" width=\"300\" height=\"172\" class=\"aligncenter size-medium wp-image-1551\" srcset=\"https:\/\/laurentlessard.com\/bookproofs\/wp-content\/uploads\/2016\/11\/graphcoloring_map-300x172.png 300w, https:\/\/laurentlessard.com\/bookproofs\/wp-content\/uploads\/2016\/11\/graphcoloring_map.png 527w\" sizes=\"auto, (max-width: 300px) 85vw, 300px\" \/><\/p>\n<p>The eigth country forces Bob to choose the sixth color. As mentioned above, every map can be colored using only four colors, so in hindsight, Bob could have recolored this same map using only four colors. Here is one possible way to do that:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/laurentlessard.com\/bookproofs\/wp-content\/uploads\/2016\/11\/graphcoloring_map_four-300x172.png\" alt=\"graphcoloring_map_four\" width=\"300\" height=\"172\" class=\"aligncenter size-medium wp-image-1547\" srcset=\"https:\/\/laurentlessard.com\/bookproofs\/wp-content\/uploads\/2016\/11\/graphcoloring_map_four-300x172.png 300w, https:\/\/laurentlessard.com\/bookproofs\/wp-content\/uploads\/2016\/11\/graphcoloring_map_four.png 527w\" sizes=\"auto, (max-width: 300px) 85vw, 300px\" \/><\/p>\n<p>Of course, there is no hindsight in this game. No matter how Bob colors the map, Allison will simply adjust how she draws subsequent countries in such a way to force a sixth color to appear.<\/p>\n<h3>Open problem and conjecture<\/h3>\n<p>The natural question to ask is whether Allison can ever force Bob to use 7 colors, or 8 colors, or arbitrarily many colors. I suspect the answer is yes, because if we repeatedly add nodes with only two neighbors, we can make the graph&#8217;s boundary as large as we like. We can also ensure all four colors are used as often as we like by occasionally grouping triples (e.g. group 1,2,3 to force a 4). We can also group 1,2,3,4 to force a 5 and by adding enough nodes, we can include as many 5&#8217;s as we like in the boundary as well. This process continues and ultimately we can force the appearance of a 6, then arbitrarily many 6&#8217;s, then a 7, then arbitrarily many 7&#8217;s, and so on. The question of finding the minimum number of countries required to force a given number of colors seems difficult, but I suspect it grows exponentially.<\/p>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>This Riddler problem considers the classical map-coloring problem with an adversarial twist! One player draws countries and the other player colors them. Allison and Bob decide to play a map-coloring game. Each turn, Allison draws a simple closed curve on a piece of paper, and Bob must then color the interior of the &#8220;country&#8221; that &hellip; <a href=\"https:\/\/laurentlessard.com\/bookproofs\/adversarial-map-coloring\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Adversarial map coloring&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":1551,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"om_disable_all_campaigns":false,"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"_uf_show_specific_survey":0,"_uf_disable_surveys":false,"footnotes":""},"categories":[7],"tags":[25,23,2],"class_list":["post-1516","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-riddler","tag-graph-theory","tag-logic","tag-riddler"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/laurentlessard.com\/bookproofs\/wp-json\/wp\/v2\/posts\/1516","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/laurentlessard.com\/bookproofs\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/laurentlessard.com\/bookproofs\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/laurentlessard.com\/bookproofs\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/laurentlessard.com\/bookproofs\/wp-json\/wp\/v2\/comments?post=1516"}],"version-history":[{"count":23,"href":"https:\/\/laurentlessard.com\/bookproofs\/wp-json\/wp\/v2\/posts\/1516\/revisions"}],"predecessor-version":[{"id":1552,"href":"https:\/\/laurentlessard.com\/bookproofs\/wp-json\/wp\/v2\/posts\/1516\/revisions\/1552"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/laurentlessard.com\/bookproofs\/wp-json\/wp\/v2\/media\/1551"}],"wp:attachment":[{"href":"https:\/\/laurentlessard.com\/bookproofs\/wp-json\/wp\/v2\/media?parent=1516"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/laurentlessard.com\/bookproofs\/wp-json\/wp\/v2\/categories?post=1516"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/laurentlessard.com\/bookproofs\/wp-json\/wp\/v2\/tags?post=1516"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}