{"id":853,"date":"2017-01-01T13:53:15","date_gmt":"2017-01-01T13:53:15","guid":{"rendered":"http:\/\/wobable.com\/?p=853"},"modified":"2017-01-01T14:02:42","modified_gmt":"2017-01-01T14:02:42","slug":"how-many-palindromic-postcodes-are-there","status":"publish","type":"post","link":"https:\/\/wobable.com\/?p=853","title":{"rendered":"How many palindromic postcodes are there?"},"content":{"rendered":"<p>The map goddess @AngharadStone posed an interesting poser on Twitter last night.<\/p>\n<blockquote class=\"twitter-tweet\" data-lang=\"en\">\n<p dir=\"ltr\" lang=\"en\"><a href=\"https:\/\/twitter.com\/AngharadStone\">@AngharadStone<\/a> Good question. Do you mean the full postcode or just the first part? B, BB, DD, E, G, LL, M, N, NN, S, SS, W.<\/p>\n<p>\u2014 BX Postcode Area (@BXpostcodearea) <a href=\"https:\/\/twitter.com\/BXpostcodearea\/status\/815313550474412032\">December 31, 2016<\/a><\/p><\/blockquote>\n<p><script async src=\"\/\/platform.twitter.com\/widgets.js\" charset=\"utf-8\"><\/script><\/p>\n<p>It seemed like an interesting problem, so I thought I&#8217;d give it a go.<br \/>\nThe full definition is a fully palindromic postcode (across the space) that is also currently in use and valid.<\/p>\n<p>My first thought was to start with a full list of postcodes from Doogal, and then prune them down &#8211; but my computer and excel wasn&#8217;t quite up to dealing with that many records.<\/p>\n<p>Instead I wondered if I could build up to see how many possible palindromic postcodes there might be, and then see how many of them are valid.<\/p>\n<p>I found a list of postcode districts on the Doogal downloads page. This is the outbound (<span style=\"text-decoration: underline;\">GU1<\/span> 1ED) and the first part of the inbound postcode (GU1 <span style=\"text-decoration: underline;\">1<\/span>ED). It struck me that there are only a very few districts which could even support a palindromic postcode:<\/p>\n<ul>\n<li>If the district is 5 digits long, the outbound and inbound digit have to be the same: GU1 1UG?<\/li>\n<li>If the district is 6 digits long, the first digit of the outbound, and the inbound digit have to be the same (GU10 1UG?). Also if the district is six digits long, then the space has to be ignored in the palindromicness (but that is fairly normal in well known palindromes like Madam I&#8217;m Adam).<\/li>\n<\/ul>\n<p>These two criteria then allowed me to make a full list of all the possible (but not valid) postcodes.<\/p>\n<p>There were 682 &#8220;five digit sector&#8221; possible postcodes, and a further 578 &#8220;six digit sector&#8221; possible postcodes. I can then construct what those postcodes would look like.<\/p>\n<p>I then discovered that Doogal also has a page that can tell you how many postcodes are valid: <a href=\"https:\/\/www.doogal.co.uk\/MultiplePostcodes.php\">https:\/\/www.doogal.co.uk\/MultiplePostcodes.php<\/a><\/p>\n<p>WOOHOO!<\/p>\n<p>I can exclusively reveal there are (drum roll please)&#8230; 165 six digit valid palindromic postcodes and 167 seven digit valid palindromic postcodes &#8211; a total of 332 palindromic postcodes.<\/p>\n<p>You can see the full list in this google document:<\/p>\n<p><a href=\"https:\/\/docs.google.com\/spreadsheets\/d\/1qfI1QJIcPj2EeIBaLqnXTPqXgxCMVz8kK6MgWbKSShM\/edit?usp=sharing\">https:\/\/docs.google.com\/spreadsheets\/d\/1qfI1QJIcPj2EeIBaLqnXTPqXgxCMVz8kK6MgWbKSShM\/edit?usp=sharing<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>The map goddess @AngharadStone posed an interesting poser on Twitter last night. @AngharadStone Good question. Do you mean the full postcode or just the first part? B, BB, DD, E, G, LL, M, N, NN, S, SS, W. \u2014 BX Postcode Area (@BXpostcodearea) December 31, 2016 It seemed like an interesting problem, so I thought &hellip;<\/p>\n<p class=\"read-more\"> <a class=\"\" href=\"https:\/\/wobable.com\/?p=853\"> <span class=\"screen-reader-text\">How many palindromic postcodes are there?<\/span> Read More &raquo;<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"inline_featured_image":false,"site-sidebar-layout":"default","site-content-layout":"default","ast-global-header-display":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_hide_featured_image":false,"_jetpack_featured_image_duplicate_dismissed":0,"_jetpack_feature_clip_id":0,"_jetpack_memberships_contains_paid_content":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},"jetpack_post_was_ever_published":false},"categories":[1],"tags":[],"class_list":["post-853","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"jetpack_publicize_connections":[],"jetpack_shortlink":"https:\/\/wp.me\/p2c0fT-dL","jetpack_sharing_enabled":true,"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/wobable.com\/index.php?rest_route=\/wp\/v2\/posts\/853","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wobable.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/wobable.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/wobable.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/wobable.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=853"}],"version-history":[{"count":4,"href":"https:\/\/wobable.com\/index.php?rest_route=\/wp\/v2\/posts\/853\/revisions"}],"predecessor-version":[{"id":857,"href":"https:\/\/wobable.com\/index.php?rest_route=\/wp\/v2\/posts\/853\/revisions\/857"}],"wp:attachment":[{"href":"https:\/\/wobable.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=853"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/wobable.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=853"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/wobable.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=853"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}