{"id":5132,"date":"2013-09-18T16:02:43","date_gmt":"2013-09-18T15:02:43","guid":{"rendered":"http:\/\/www.walkingrandomly.com\/?p=5132"},"modified":"2013-09-19T09:25:03","modified_gmt":"2013-09-19T08:25:03","slug":"programming-challenge-which-words-have-the-most-anagrams","status":"publish","type":"post","link":"https:\/\/walkingrandomly.com\/?p=5132","title":{"rendered":"Programming challenge: Which words have the most anagrams?"},"content":{"rendered":"<p>While on the train to work this morning, I wondered which English words have the most anagrams that are also valid English words. So, I knocked up few lines of <a href=\"http:\/\/www.wolfram.com\/mathematica\/\">Mathematica<\/a> code and came up with 4 sets of 7:<\/p>\n<pre>{{\"ates\", \"east\", \"eats\", \"etas\", \"sate\", \"seat\", \"teas\"},\r\n{\"pares\", \"parse\", \"pears\", \"rapes\", \"reaps\", \"spare\", \"spear\"}, \r\n{\"capers\", \"crapes\", \"pacers\", \"parsec\", \"recaps\", \"scrape\", \"spacer\"},\r\n{\"carets\", \"caster\", \"caters\", \"crates\", \"reacts\", \"recast\", \"traces\"}}<\/pre>\n<p>So, according to my program (and Mathematica&#8217;s dictionary), the best you can do is 7.\u00a0 I&#8217;m not going to post the code until later because I don&#8217;t want to influence the challenge which is <em><strong>&#8216;Write a program in your language of choice that queries a dictionary to find which English words have the most anagrams that are also valid English words.&#8217;<\/strong> <\/em><\/p>\n","protected":false},"excerpt":{"rendered":"<p>While on the train to work this morning, I wondered which English words have the most anagrams that are also valid English words. So, I knocked up few lines of Mathematica code and came up with 4 sets of 7: {{&#8220;ates&#8221;, &#8220;east&#8221;, &#8220;eats&#8221;, &#8220;etas&#8221;, &#8220;sate&#8221;, &#8220;seat&#8221;, &#8220;teas&#8221;}, {&#8220;pares&#8221;, &#8220;parse&#8221;, &#8220;pears&#8221;, &#8220;rapes&#8221;, &#8220;reaps&#8221;, &#8220;spare&#8221;, &#8220;spear&#8221;}, {&#8220;capers&#8221;, [&hellip;]<\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[21,7],"tags":[],"class_list":["post-5132","post","type-post","status-publish","format-standard","hentry","category-problem-of-the-week","category-programming"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/p3swhs-1kM","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/walkingrandomly.com\/index.php?rest_route=\/wp\/v2\/posts\/5132","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/walkingrandomly.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/walkingrandomly.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/walkingrandomly.com\/index.php?rest_route=\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/walkingrandomly.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=5132"}],"version-history":[{"count":4,"href":"https:\/\/walkingrandomly.com\/index.php?rest_route=\/wp\/v2\/posts\/5132\/revisions"}],"predecessor-version":[{"id":5137,"href":"https:\/\/walkingrandomly.com\/index.php?rest_route=\/wp\/v2\/posts\/5132\/revisions\/5137"}],"wp:attachment":[{"href":"https:\/\/walkingrandomly.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=5132"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/walkingrandomly.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=5132"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/walkingrandomly.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=5132"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}