{"id":6968,"date":"2020-05-05T17:51:02","date_gmt":"2020-05-05T17:51:02","guid":{"rendered":"https:\/\/www.mathsweek.ie\/2019\/?page_id=6968"},"modified":"2020-05-05T21:39:36","modified_gmt":"2020-05-05T21:39:36","slug":"towers-of-hanoi-solution","status":"publish","type":"page","link":"https:\/\/www.mathsweek.ie\/2025\/towers-of-hanoi-solution\/","title":{"rendered":"Towers of Hanoi Solution"},"content":{"rendered":"<p><div class=\"fusion-fullwidth fullwidth-box fusion-builder-row-1 nonhundred-percent-fullwidth non-hundred-percent-height-scrolling\" style=\"background-color: rgba(255,255,255,0);background-position: center center;background-repeat: no-repeat;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;margin-bottom: 0px;margin-top: 0px;border-width: 0px 0px 0px 0px;border-color:#eaeaea;border-style:solid;\" ><div class=\"fusion-builder-row fusion-row\"><div class=\"fusion-layout-column fusion_builder_column fusion-builder-column-0 fusion_builder_column_1_1 1_1 fusion-one-full fusion-column-first fusion-column-last\" style=\"margin-top:0px;margin-bottom:20px;\"><div class=\"fusion-column-wrapper fusion-flex-column-wrapper-legacy\" style=\"background-position:left top;background-repeat:no-repeat;-webkit-background-size:cover;-moz-background-size:cover;-o-background-size:cover;background-size:cover;padding: 0px 0px 0px 0px;\"><a id=\"activity21sevenmoves\"> <\/a><div class=\"fusion-sep-clear\"><\/div><div class=\"fusion-separator fusion-full-width-sep\" style=\"margin-left: auto;margin-right: auto;margin-bottom:200px;width:100%;\"><div class=\"fusion-separator-border sep-shadow\" style=\"background:radial-gradient(ellipse at 50% -50% , #eaeaea 0px, rgba(255, 255, 255, 0) 80%) repeat scroll 0 0 rgba(0, 0, 0, 0);background:-webkit-radial-gradient(ellipse at 50% -50% , #eaeaea 0px, rgba(255, 255, 255, 0) 80%) repeat scroll 0 0 rgba(0, 0, 0, 0);background:-moz-radial-gradient(ellipse at 50% -50% , #eaeaea 0px, rgba(255, 255, 255, 0) 80%) repeat scroll 0 0 rgba(0, 0, 0, 0);background:-o-radial-gradient(ellipse at 50% -50% , #eaeaea 0px, rgba(255, 255, 255, 0) 80%) repeat scroll 0 0 rgba(0, 0, 0, 0);\"><\/div><\/div><div class=\"fusion-sep-clear\"><\/div><div class=\"fusion-clearfix\"><\/div><\/div><\/div><div class=\"fusion-layout-column fusion_builder_column fusion-builder-column-1 fusion_builder_column_1_1 1_1 fusion-one-full fusion-column-first fusion-column-last\" style=\"margin-top:0px;margin-bottom:20px;\"><div class=\"fusion-column-wrapper fusion-flex-column-wrapper-legacy\" style=\"background-position:left top;background-repeat:no-repeat;-webkit-background-size:cover;-moz-background-size:cover;-o-background-size:cover;background-size:cover;padding: 0px 0px 0px 0px;\"><div class=\"fusion-text fusion-text-1\"><p>Here are the first 7 moves for the Towers of Hanoi.<\/p>\n<p>After you get the first 3 rings moved, what do you want to move next?<\/p>\n<\/div><span class=\" fusion-imageframe imageframe-none imageframe-1 hover-type-none\"><img decoding=\"async\" width=\"622\" height=\"232\" title=\"Towers of Hanoi first 7 Moves\" src=\"https:\/\/www.mathsweek.ie\/2025\/wp-content\/uploads\/2020\/05\/Towers-of-Hanoi-first-7-Moves.gif\" class=\"img-responsive wp-image-6969\"\/><\/span><div class=\"fusion-align-block\"><style type=\"text\/css\">.fusion-button.button-1 {border-radius:2px;}<\/style><a class=\"fusion-button button-flat fusion-button-default-size button-default button-1 fusion-button-default-span fusion-button-default-type\" target=\"_self\" href=\"https:\/\/www.mathsweek.ie\/2025\/maths-at-home-activities\/#activity21towersofhanoi\"><span class=\"fusion-button-text\">Back to Towers of Hanoi Activity<\/span><\/a><\/div><div class=\"fusion-clearfix\"><\/div><\/div><\/div><\/div><\/div><div class=\"fusion-fullwidth fullwidth-box fusion-builder-row-2 nonhundred-percent-fullwidth non-hundred-percent-height-scrolling\" style=\"background-color: rgba(255,255,255,0);background-position: center center;background-repeat: no-repeat;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;margin-bottom: 0px;margin-top: 0px;border-width: 0px 0px 0px 0px;border-color:#eaeaea;border-style:solid;\" ><div class=\"fusion-builder-row fusion-row\"><div class=\"fusion-layout-column fusion_builder_column fusion-builder-column-2 fusion_builder_column_1_1 1_1 fusion-one-full fusion-column-first fusion-column-last\" style=\"margin-top:0px;margin-bottom:20px;\"><div class=\"fusion-column-wrapper fusion-flex-column-wrapper-legacy\" style=\"background-position:left top;background-repeat:no-repeat;-webkit-background-size:cover;-moz-background-size:cover;-o-background-size:cover;background-size:cover;padding: 0px 0px 0px 0px;\"><a id=\"activity21method\"> <\/a><div class=\"fusion-sep-clear\"><\/div><div class=\"fusion-separator fusion-full-width-sep\" style=\"margin-left: auto;margin-right: auto;margin-bottom:200px;width:100%;\"><div class=\"fusion-separator-border sep-shadow\" style=\"background:radial-gradient(ellipse at 50% -50% , #eaeaea 0px, rgba(255, 255, 255, 0) 80%) repeat scroll 0 0 rgba(0, 0, 0, 0);background:-webkit-radial-gradient(ellipse at 50% -50% , #eaeaea 0px, rgba(255, 255, 255, 0) 80%) repeat scroll 0 0 rgba(0, 0, 0, 0);background:-moz-radial-gradient(ellipse at 50% -50% , #eaeaea 0px, rgba(255, 255, 255, 0) 80%) repeat scroll 0 0 rgba(0, 0, 0, 0);background:-o-radial-gradient(ellipse at 50% -50% , #eaeaea 0px, rgba(255, 255, 255, 0) 80%) repeat scroll 0 0 rgba(0, 0, 0, 0);\"><\/div><\/div><div class=\"fusion-sep-clear\"><\/div><div class=\"fusion-video fusion-youtube\" style=\"max-width:600px;max-height:360px;\"><div class=\"video-shortcode\"><iframe title=\"YouTube video player 1\" src=\"https:\/\/www.youtube.com\/embed\/zV2zTJv0HzQ?wmode=transparent&autoplay=0\" width=\"600\" height=\"360\" allowfullscreen allow=\"autoplay; fullscreen\"><\/iframe><\/div><\/div><div class=\"fusion-text fusion-text-2\"><p>Towers of Hanoi: minimum moves<\/p>\n<\/div><div class=\"fusion-clearfix\"><\/div><\/div><\/div><div class=\"fusion-layout-column fusion_builder_column fusion-builder-column-3 fusion_builder_column_1_1 1_1 fusion-one-full fusion-column-first fusion-column-last\" style=\"margin-top:0px;margin-bottom:20px;\"><div class=\"fusion-column-wrapper fusion-flex-column-wrapper-legacy\" style=\"background-position:left top;background-repeat:no-repeat;-webkit-background-size:cover;-moz-background-size:cover;-o-background-size:cover;background-size:cover;padding: 0px 0px 0px 0px;\"><div class=\"fusion-align-block\"><style type=\"text\/css\">.fusion-button.button-2 {border-radius:2px;}<\/style><a class=\"fusion-button button-flat fusion-button-default-size button-default button-2 fusion-button-default-span fusion-button-default-type\" target=\"_self\" href=\"https:\/\/www.mathsweek.ie\/2025\/maths-at-home-activities\/#activity21towersofhanoi\"><span class=\"fusion-button-text\">Back to Towers of Hanoi Activity<\/span><\/a><\/div><div class=\"fusion-clearfix\"><\/div><\/div><\/div><\/div><\/div><div class=\"fusion-fullwidth fullwidth-box fusion-builder-row-3 nonhundred-percent-fullwidth non-hundred-percent-height-scrolling\" style=\"background-color: rgba(255,255,255,0);background-position: center center;background-repeat: no-repeat;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;margin-bottom: 0px;margin-top: 0px;border-width: 0px 0px 0px 0px;border-color:#eaeaea;border-style:solid;\" ><div class=\"fusion-builder-row fusion-row\"><div class=\"fusion-layout-column fusion_builder_column fusion-builder-column-4 fusion_builder_column_1_1 1_1 fusion-one-full fusion-column-first fusion-column-last\" style=\"margin-top:0px;margin-bottom:20px;\"><div class=\"fusion-column-wrapper fusion-flex-column-wrapper-legacy\" style=\"background-position:left top;background-repeat:no-repeat;-webkit-background-size:cover;-moz-background-size:cover;-o-background-size:cover;background-size:cover;padding: 0px 0px 0px 0px;\"><a id=\"activity21minmoves\"> <\/a><div class=\"fusion-sep-clear\"><\/div><div class=\"fusion-separator fusion-full-width-sep\" style=\"margin-left: auto;margin-right: auto;margin-bottom:200px;width:100%;\"><div class=\"fusion-separator-border sep-shadow\" style=\"background:radial-gradient(ellipse at 50% -50% , #eaeaea 0px, rgba(255, 255, 255, 0) 80%) repeat scroll 0 0 rgba(0, 0, 0, 0);background:-webkit-radial-gradient(ellipse at 50% -50% , #eaeaea 0px, rgba(255, 255, 255, 0) 80%) repeat scroll 0 0 rgba(0, 0, 0, 0);background:-moz-radial-gradient(ellipse at 50% -50% , #eaeaea 0px, rgba(255, 255, 255, 0) 80%) repeat scroll 0 0 rgba(0, 0, 0, 0);background:-o-radial-gradient(ellipse at 50% -50% , #eaeaea 0px, rgba(255, 255, 255, 0) 80%) repeat scroll 0 0 rgba(0, 0, 0, 0);\"><\/div><\/div><div class=\"fusion-sep-clear\"><\/div><div class=\"fusion-clearfix\"><\/div><\/div><\/div><div class=\"fusion-layout-column fusion_builder_column fusion-builder-column-5 fusion_builder_column_1_1 1_1 fusion-one-full fusion-column-first fusion-column-last\" style=\"margin-top:0px;margin-bottom:20px;\"><div class=\"fusion-column-wrapper fusion-flex-column-wrapper-legacy\" style=\"background-position:left top;background-repeat:no-repeat;-webkit-background-size:cover;-moz-background-size:cover;-o-background-size:cover;background-size:cover;padding: 0px 0px 0px 0px;\"><div class=\"fusion-text fusion-text-3\"><p>If you start with 1,2, 3 rings you should start to see a pattern.<\/p>\n<p>Two rings takes 3 moves. To move three rings, you first have to move the two rings to the centre post (3 moves) and then the third ring to the far post (1 move) and then the two rings from the centre post to the far post (3 more moves).<\/p>\n<table>\n<tbody>\n<tr>\n<td width=\"123\">\n<p style=\"text-align: right;\">Number of Rings<\/p>\n<\/td>\n<td style=\"text-align: right;\" width=\"180\">\n<p style=\"text-align: center;\">Number of Moves Needed<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td width=\"123\">\n<p style=\"text-align: center;\">1<\/p>\n<\/td>\n<td width=\"180\">\n<p style=\"text-align: right;\">1<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td width=\"123\">\n<p style=\"text-align: center;\">2<\/p>\n<\/td>\n<td width=\"180\">\n<p style=\"text-align: right;\">3<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td width=\"123\">\n<p style=\"text-align: center;\">3<\/p>\n<\/td>\n<td width=\"180\">\n<p style=\"text-align: right;\">7<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td width=\"123\">\n<p style=\"text-align: center;\">4<\/p>\n<\/td>\n<td width=\"180\">\n<p style=\"text-align: right;\">15<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: right;\" width=\"123\">\n<p style=\"text-align: center;\">5<\/p>\n<\/td>\n<td width=\"180\">\n<p style=\"text-align: right;\">31<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div><div class=\"fusion-align-block\"><style type=\"text\/css\">.fusion-button.button-3 {border-radius:2px;}<\/style><a class=\"fusion-button button-flat fusion-button-default-size button-default button-3 fusion-button-default-span fusion-button-default-type\" target=\"_self\" href=\"https:\/\/www.mathsweek.ie\/2025\/maths-at-home-activities\/#activity21towersofhanoi\"><span class=\"fusion-button-text\">Back to Towers of Hanoi Activity<\/span><\/a><\/div><div class=\"fusion-clearfix\"><\/div><\/div><\/div><\/div><\/div><div class=\"fusion-fullwidth fullwidth-box fusion-builder-row-4 nonhundred-percent-fullwidth non-hundred-percent-height-scrolling\" style=\"background-color: rgba(255,255,255,0);background-position: center center;background-repeat: no-repeat;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;margin-bottom: 0px;margin-top: 0px;border-width: 0px 0px 0px 0px;border-color:#eaeaea;border-style:solid;\" ><div class=\"fusion-builder-row fusion-row\"><div class=\"fusion-layout-column fusion_builder_column fusion-builder-column-6 fusion_builder_column_1_1 1_1 fusion-one-full fusion-column-first fusion-column-last\" style=\"margin-top:0px;margin-bottom:20px;\"><div class=\"fusion-column-wrapper fusion-flex-column-wrapper-legacy\" style=\"background-position:left top;background-repeat:no-repeat;-webkit-background-size:cover;-moz-background-size:cover;-o-background-size:cover;background-size:cover;padding: 0px 0px 0px 0px;\"><a id=\"activity21formula\"> <\/a><div class=\"fusion-sep-clear\"><\/div><div class=\"fusion-separator fusion-full-width-sep\" style=\"margin-left: auto;margin-right: auto;margin-bottom:200px;width:100%;\"><div class=\"fusion-separator-border sep-shadow\" style=\"background:radial-gradient(ellipse at 50% -50% , #eaeaea 0px, rgba(255, 255, 255, 0) 80%) repeat scroll 0 0 rgba(0, 0, 0, 0);background:-webkit-radial-gradient(ellipse at 50% -50% , #eaeaea 0px, rgba(255, 255, 255, 0) 80%) repeat scroll 0 0 rgba(0, 0, 0, 0);background:-moz-radial-gradient(ellipse at 50% -50% , #eaeaea 0px, rgba(255, 255, 255, 0) 80%) repeat scroll 0 0 rgba(0, 0, 0, 0);background:-o-radial-gradient(ellipse at 50% -50% , #eaeaea 0px, rgba(255, 255, 255, 0) 80%) repeat scroll 0 0 rgba(0, 0, 0, 0);\"><\/div><\/div><div class=\"fusion-sep-clear\"><\/div><div class=\"fusion-clearfix\"><\/div><\/div><\/div><div class=\"fusion-layout-column fusion_builder_column fusion-builder-column-7 fusion_builder_column_1_1 1_1 fusion-one-full fusion-column-first fusion-column-last\" style=\"margin-top:0px;margin-bottom:20px;\"><div class=\"fusion-column-wrapper fusion-flex-column-wrapper-legacy\" style=\"background-position:left top;background-repeat:no-repeat;-webkit-background-size:cover;-moz-background-size:cover;-o-background-size:cover;background-size:cover;padding: 0px 0px 0px 0px;\"><div class=\"fusion-text fusion-text-4\"><p>From the table we can see that the number of moves for any number of rings (n)\u00a0 is the number of moves for one less ring (n-1) multiplied by 2\u00a0with 1 added.<\/p>\n<p>If we want to get a useful expression to describe the minimum number of moves, we need to get it in terms of the number of rings.<\/p>\n<table>\n<tbody>\n<tr>\n<td width=\"123\">\n<p style=\"text-align: center;\">Number of Rings (n)<\/p>\n<\/td>\n<td style=\"text-align: center;\" width=\"180\">Number of Moves Needed (m)<\/td>\n<td width=\"180\">\n<p style=\"text-align: center;\">2 to the power of n<\/p>\n<p style=\"text-align: center;\">2<sup>n<\/sup><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td width=\"123\">\n<p style=\"text-align: center;\">1<\/p>\n<\/td>\n<td style=\"text-align: center;\" width=\"180\">1<\/td>\n<td style=\"text-align: center;\" width=\"180\">1<\/td>\n<\/tr>\n<tr>\n<td width=\"123\">\n<p style=\"text-align: center;\">2<\/p>\n<\/td>\n<td style=\"text-align: center;\" width=\"180\">3<\/td>\n<td width=\"180\">\n<p style=\"text-align: center;\">4<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td width=\"123\">\n<p style=\"text-align: center;\">3<\/p>\n<\/td>\n<td style=\"text-align: center;\" width=\"180\">7<\/td>\n<td style=\"text-align: center;\" width=\"180\">8<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: center;\" width=\"123\">4<\/td>\n<td style=\"text-align: center;\" width=\"180\">15<\/td>\n<td width=\"180\">\n<p style=\"text-align: center;\">16<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: center;\" width=\"123\">5<\/td>\n<td style=\"text-align: center;\" width=\"180\">31<\/td>\n<td width=\"180\">\n<p style=\"text-align: center;\">32<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>We can see from the table above that the number of moves m is given by the formula<\/p>\n<p>m= 2<sup>n<\/sup>-1<\/p>\n<p>So 10 rings would take m= 2<sup>10<\/sup>-1 = 1024 &#8211; 1 = 1023 moves.<\/p>\n<\/div><div class=\"fusion-align-block\"><style type=\"text\/css\">.fusion-button.button-4 {border-radius:2px;}<\/style><a class=\"fusion-button button-flat fusion-button-default-size button-default button-4 fusion-button-default-span fusion-button-default-type\" target=\"_self\" href=\"https:\/\/www.mathsweek.ie\/2025\/maths-at-home-activities\/#activity21towersofhanoi\"><span class=\"fusion-button-text\">Back to Towers of Hanoi Activity<\/span><\/a><\/div><div class=\"fusion-clearfix\"><\/div><\/div><\/div><\/div><\/div><div class=\"fusion-fullwidth fullwidth-box fusion-builder-row-5 nonhundred-percent-fullwidth non-hundred-percent-height-scrolling\" style=\"background-color: rgba(255,255,255,0);background-position: center center;background-repeat: no-repeat;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;margin-bottom: 0px;margin-top: 0px;border-width: 0px 0px 0px 0px;border-color:#eaeaea;border-style:solid;\" ><div class=\"fusion-builder-row fusion-row\"><div class=\"fusion-layout-column fusion_builder_column fusion-builder-column-8 fusion_builder_column_1_1 1_1 fusion-one-full fusion-column-first fusion-column-last\" style=\"margin-top:0px;margin-bottom:20px;\"><div class=\"fusion-column-wrapper fusion-flex-column-wrapper-legacy\" style=\"background-position:left top;background-repeat:no-repeat;-webkit-background-size:cover;-moz-background-size:cover;-o-background-size:cover;background-size:cover;padding: 0px 0px 0px 0px;\"><a id=\"activity21time\"> <\/a><div class=\"fusion-sep-clear\"><\/div><div class=\"fusion-separator fusion-full-width-sep\" style=\"margin-left: auto;margin-right: auto;margin-bottom:200px;width:100%;\"><div class=\"fusion-separator-border sep-shadow\" style=\"background:radial-gradient(ellipse at 50% -50% , #eaeaea 0px, rgba(255, 255, 255, 0) 80%) repeat scroll 0 0 rgba(0, 0, 0, 0);background:-webkit-radial-gradient(ellipse at 50% -50% , #eaeaea 0px, rgba(255, 255, 255, 0) 80%) repeat scroll 0 0 rgba(0, 0, 0, 0);background:-moz-radial-gradient(ellipse at 50% -50% , #eaeaea 0px, rgba(255, 255, 255, 0) 80%) repeat scroll 0 0 rgba(0, 0, 0, 0);background:-o-radial-gradient(ellipse at 50% -50% , #eaeaea 0px, rgba(255, 255, 255, 0) 80%) repeat scroll 0 0 rgba(0, 0, 0, 0);\"><\/div><\/div><div class=\"fusion-sep-clear\"><\/div><div class=\"fusion-clearfix\"><\/div><\/div><\/div><div class=\"fusion-layout-column fusion_builder_column fusion-builder-column-9 fusion_builder_column_1_1 1_1 fusion-one-full fusion-column-first fusion-column-last\" style=\"margin-top:0px;margin-bottom:20px;\"><div class=\"fusion-column-wrapper fusion-flex-column-wrapper-legacy\" style=\"background-position:left top;background-repeat:no-repeat;-webkit-background-size:cover;-moz-background-size:cover;-o-background-size:cover;background-size:cover;padding: 0px 0px 0px 0px;\"><div class=\"fusion-text fusion-text-5\"><p>How long will it take to do 64 rings. It is good to have a guess before working this out using the formula.<\/p>\n<p>m= 2<sup>n<\/sup>-1<\/p>\n<p>So 64 rings would take m= 2<sup>64<\/sup>-1<\/p>\n<p>You need to do this on a calculator.<\/p>\n<p>2<sup>64<\/sup> is a very large number. It is so large it is given on my calculator as 1.844674407371 e19<\/p>\n<p>That is a 20 digit number. We dont have to be able to see this number in its entirety.<\/p>\n<p>The priests can do one move a second, that is 3600 moves an hour.<\/p>\n<p>So we divide this number by 3600 to get the numbers of hours it would take.<\/p>\n<p>The calculator will display this:<\/p>\n<p>5,124,095,576, 030,431<\/p>\n<p>Then divide the result by 24 to see how many days it would take.<\/p>\n<p>213,503,982,334,601.3<\/p>\n<p>Then by 365 to find out how many years it would take (we don&#8217;t need to worry about leap years here).<\/p>\n<p>584,942,417,355 years.<\/p>\n<p>Which is longer than the known age of the universe (approx 13,000,000,000)<\/p>\n<p>So we have plenty of time left.<\/p>\n<p>This is an example of exponential growth. With exponential growth numbers can get very big very fast.<\/p>\n<\/div><div class=\"fusion-align-block\"><style type=\"text\/css\">.fusion-button.button-5 {border-radius:2px;}<\/style><a class=\"fusion-button button-flat fusion-button-default-size button-default button-5 fusion-button-default-span fusion-button-default-type\" target=\"_self\" href=\"https:\/\/www.mathsweek.ie\/2025\/maths-at-home-activities\/#activity21towersofhanoi\"><span class=\"fusion-button-text\">Back to Towers of Hanoi Activity<\/span><\/a><\/div><div class=\"fusion-clearfix\"><\/div><\/div><\/div><\/div><\/div><\/p>\n","protected":false},"excerpt":{"rendered":"","protected":false},"author":3,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_acf_changed":false,"_vp_format_video_url":"","_vp_image_focal_point":[],"footnotes":""},"class_list":["post-6968","page","type-page","status-publish","hentry"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.3 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Towers of Hanoi Solution &#8211; MATHS WEEK IRELAND<\/title>\n<meta name=\"description\" content=\"Maths Week will take place from 11 - 19 Oct. 2025. We will have events and activities for all the family. Visit MathsWeek.ie for more info MATHS WEEK IRELAND\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.mathsweek.ie\/2025\/towers-of-hanoi-solution\/\" \/>\n<meta property=\"og:locale\" content=\"en_GB\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Towers of Hanoi Solution &#8211; MATHS WEEK IRELAND\" \/>\n<meta property=\"og:description\" content=\"Maths Week will take place from 11 - 19 Oct. 2025. We will have events and activities for all the family. Visit MathsWeek.ie for more info MATHS WEEK IRELAND\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.mathsweek.ie\/2025\/towers-of-hanoi-solution\/\" \/>\n<meta property=\"og:site_name\" content=\"MATHS WEEK IRELAND\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/MathsWeek\" \/>\n<meta property=\"article:modified_time\" content=\"2020-05-05T21:39:36+00:00\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:site\" content=\"@mathsweek\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"14 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.mathsweek.ie\\\/2025\\\/towers-of-hanoi-solution\\\/\",\"url\":\"https:\\\/\\\/www.mathsweek.ie\\\/2025\\\/towers-of-hanoi-solution\\\/\",\"name\":\"Towers of Hanoi Solution &#8211; MATHS WEEK IRELAND\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.mathsweek.ie\\\/2025\\\/#website\"},\"datePublished\":\"2020-05-05T17:51:02+00:00\",\"dateModified\":\"2020-05-05T21:39:36+00:00\",\"description\":\"Maths Week will take place from 11 - 19 Oct. 2025. We will have events and activities for all the family. Visit MathsWeek.ie for more info MATHS WEEK IRELAND\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.mathsweek.ie\\\/2025\\\/towers-of-hanoi-solution\\\/#breadcrumb\"},\"inLanguage\":\"en-GB\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.mathsweek.ie\\\/2025\\\/towers-of-hanoi-solution\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.mathsweek.ie\\\/2025\\\/towers-of-hanoi-solution\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.mathsweek.ie\\\/2025\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Towers of Hanoi Solution\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.mathsweek.ie\\\/2025\\\/#website\",\"url\":\"https:\\\/\\\/www.mathsweek.ie\\\/2025\\\/\",\"name\":\"MATHS WEEK IRELAND\",\"description\":\"Maths for All\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.mathsweek.ie\\\/2025\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.mathsweek.ie\\\/2025\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-GB\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.mathsweek.ie\\\/2025\\\/#organization\",\"name\":\"Maths Week Ireland\",\"url\":\"https:\\\/\\\/www.mathsweek.ie\\\/2025\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-GB\",\"@id\":\"https:\\\/\\\/www.mathsweek.ie\\\/2025\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.mathsweek.ie\\\/2025\\\/wp-content\\\/uploads\\\/2018\\\/03\\\/MW-logo-cropped-e1521418465216.png\",\"contentUrl\":\"https:\\\/\\\/www.mathsweek.ie\\\/2025\\\/wp-content\\\/uploads\\\/2018\\\/03\\\/MW-logo-cropped-e1521418465216.png\",\"width\":20,\"height\":20,\"caption\":\"Maths Week Ireland\"},\"image\":{\"@id\":\"https:\\\/\\\/www.mathsweek.ie\\\/2025\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/MathsWeek\",\"https:\\\/\\\/x.com\\\/mathsweek\",\"https:\\\/\\\/www.instagram.com\\\/mathsireland\\\/\",\"https:\\\/\\\/www.linkedin.com\\\/company\\\/maths-week-ireland\\\/\",\"https:\\\/\\\/www.youtube.com\\\/channel\\\/UCNWgrcdn2mGzKqhXJDI_-Pg?disable_polymer=true\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Towers of Hanoi Solution &#8211; MATHS WEEK IRELAND","description":"Maths Week will take place from 11 - 19 Oct. 2025. We will have events and activities for all the family. Visit MathsWeek.ie for more info MATHS WEEK IRELAND","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.mathsweek.ie\/2025\/towers-of-hanoi-solution\/","og_locale":"en_GB","og_type":"article","og_title":"Towers of Hanoi Solution &#8211; MATHS WEEK IRELAND","og_description":"Maths Week will take place from 11 - 19 Oct. 2025. We will have events and activities for all the family. Visit MathsWeek.ie for more info MATHS WEEK IRELAND","og_url":"https:\/\/www.mathsweek.ie\/2025\/towers-of-hanoi-solution\/","og_site_name":"MATHS WEEK IRELAND","article_publisher":"https:\/\/www.facebook.com\/MathsWeek","article_modified_time":"2020-05-05T21:39:36+00:00","twitter_card":"summary_large_image","twitter_site":"@mathsweek","twitter_misc":{"Est. reading time":"14 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.mathsweek.ie\/2025\/towers-of-hanoi-solution\/","url":"https:\/\/www.mathsweek.ie\/2025\/towers-of-hanoi-solution\/","name":"Towers of Hanoi Solution &#8211; MATHS WEEK IRELAND","isPartOf":{"@id":"https:\/\/www.mathsweek.ie\/2025\/#website"},"datePublished":"2020-05-05T17:51:02+00:00","dateModified":"2020-05-05T21:39:36+00:00","description":"Maths Week will take place from 11 - 19 Oct. 2025. We will have events and activities for all the family. Visit MathsWeek.ie for more info MATHS WEEK IRELAND","breadcrumb":{"@id":"https:\/\/www.mathsweek.ie\/2025\/towers-of-hanoi-solution\/#breadcrumb"},"inLanguage":"en-GB","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.mathsweek.ie\/2025\/towers-of-hanoi-solution\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.mathsweek.ie\/2025\/towers-of-hanoi-solution\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.mathsweek.ie\/2025\/"},{"@type":"ListItem","position":2,"name":"Towers of Hanoi Solution"}]},{"@type":"WebSite","@id":"https:\/\/www.mathsweek.ie\/2025\/#website","url":"https:\/\/www.mathsweek.ie\/2025\/","name":"MATHS WEEK IRELAND","description":"Maths for All","publisher":{"@id":"https:\/\/www.mathsweek.ie\/2025\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.mathsweek.ie\/2025\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-GB"},{"@type":"Organization","@id":"https:\/\/www.mathsweek.ie\/2025\/#organization","name":"Maths Week Ireland","url":"https:\/\/www.mathsweek.ie\/2025\/","logo":{"@type":"ImageObject","inLanguage":"en-GB","@id":"https:\/\/www.mathsweek.ie\/2025\/#\/schema\/logo\/image\/","url":"https:\/\/www.mathsweek.ie\/2025\/wp-content\/uploads\/2018\/03\/MW-logo-cropped-e1521418465216.png","contentUrl":"https:\/\/www.mathsweek.ie\/2025\/wp-content\/uploads\/2018\/03\/MW-logo-cropped-e1521418465216.png","width":20,"height":20,"caption":"Maths Week Ireland"},"image":{"@id":"https:\/\/www.mathsweek.ie\/2025\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/MathsWeek","https:\/\/x.com\/mathsweek","https:\/\/www.instagram.com\/mathsireland\/","https:\/\/www.linkedin.com\/company\/maths-week-ireland\/","https:\/\/www.youtube.com\/channel\/UCNWgrcdn2mGzKqhXJDI_-Pg?disable_polymer=true"]}]}},"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.mathsweek.ie\/2025\/wp-json\/wp\/v2\/pages\/6968","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.mathsweek.ie\/2025\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/www.mathsweek.ie\/2025\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/www.mathsweek.ie\/2025\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/www.mathsweek.ie\/2025\/wp-json\/wp\/v2\/comments?post=6968"}],"version-history":[{"count":5,"href":"https:\/\/www.mathsweek.ie\/2025\/wp-json\/wp\/v2\/pages\/6968\/revisions"}],"predecessor-version":[{"id":6976,"href":"https:\/\/www.mathsweek.ie\/2025\/wp-json\/wp\/v2\/pages\/6968\/revisions\/6976"}],"wp:attachment":[{"href":"https:\/\/www.mathsweek.ie\/2025\/wp-json\/wp\/v2\/media?parent=6968"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}