{"id":404,"date":"2011-08-21T10:33:03","date_gmt":"2011-08-21T02:33:03","guid":{"rendered":"http:\/\/www.dr-mikes-math-games-for-kids.com\/blog\/?p=404"},"modified":"2024-02-16T21:13:34","modified_gmt":"2024-02-16T13:13:34","slug":"dice-and-polynomials-part-1","status":"publish","type":"post","link":"https:\/\/www.dr-mikes-math-games-for-kids.com\/blog\/2011\/08\/dice-and-polynomials-part-1\/","title":{"rendered":"Dice and Polynomials &#8211; Part 1"},"content":{"rendered":"<figure id=\"attachment_408\" aria-describedby=\"caption-attachment-408\" style=\"width: 270px\" class=\"wp-caption alignleft\"><a href=\"http:\/\/www.dr-mikes-math-games-for-kids.com\/blog\/wp-content\/files\/2011\/08\/Dice1.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-408 \" title=\"Can polynomials help calculate probabilities?\" src=\"http:\/\/www.dr-mikes-math-games-for-kids.com\/blog\/wp-content\/files\/2011\/08\/Dice1.jpg\" alt=\"Can polynomials help calculate probabilities?\" width=\"270\" height=\"132\" \/><\/a><figcaption id=\"caption-attachment-408\" class=\"wp-caption-text\">Can polynomials help calculate probabilities?<\/figcaption><\/figure>\n<p>Imagine you have two coins. One side is blank, and one has a single dot. You flip the coins. How many ways can you get 0 dots? How many ways can you get 1 dot? How many ways can you get 2 dots?<\/p>\n<p>If you got answers like &#8220;1 way \/ 2 ways \/ 1 way&#8221; you got it right.<\/p>\n<p><!--more-->Now, another question. If I multiply together 1.x<sup>0<\/sup> + 1.x<sup>1<\/sup> and 1.x<sup>0<\/sup> + 1.x<sup>1<\/sup>, that is, (1+x) times (1+x), what is the coefficient of x<sup>0<\/sup> ? of x<sup>1 <\/sup>? of x<sup>2<\/sup> ? If you got answers like &#8220;1 \/ 2 \/ 1&#8221;, you got it right.<\/p>\n<p>If you ask similar questions for three coins, or (1+x)<sup>3<\/sup>, you still get the same answers : 1, 3, 3 and 1. There&#8217;s a good reason for this &#8211; the question &#8220;how many ways can you get 2 dots&#8221; is, in a way, the same question as &#8220;what is the coefficient of x<sup>2<\/sup> ?&#8221;. This has huge implications, it gives a great new way to calculate probabilities, <a title=\"Dice and Polynomials \u2013 Part 2\" href=\"http:\/\/www.dr-mikes-math-games-for-kids.com\/blog\/2011\/08\/dice-and-polynomials-part-2\/\">and more<\/a>.<\/p>\n<p>Imagine I have a coin. Or a die. Whatever. Some of the faces have dots. I&#8217;ll represent each dot by &#8216;x&#8217;. The dots showing up on one side will be all multiplied together, so a face with three dots would be x<sup>3<\/sup>. A face with one dot would be x<sup>3<\/sup>, or x, and one with no dots would be x<sup>0<\/sup>, or 1. So the two sides of my coin are 1 and x, and the 6 sides of a normal die are x,\u00a0x<sup>2<\/sup>, x<sup>3<\/sup>, x<sup>4<\/sup>, x<sup>5<\/sup> and x<sup>6<\/sup>.<\/p>\n<p>Now, what about the whole coin or die? To represent the whole die, I&#8217;ll add up all its faces. The coins at the start are each 1+x, and a normal die is x + x<sup>2<\/sup> + x<sup>3<\/sup> + x<sup>4<\/sup> + x<sup>5<\/sup> + x<sup>6<\/sup>. Or, if I had a strange die whose faces were 1, 2, 2, 2, 3 and 3, it would be represented by the polynomial x + x<sup>2<\/sup> + x<sup>2<\/sup> + x<sup>2<\/sup> + x<sup>3<\/sup> + x<sup>3<\/sup>, that is, x + 3x<sup>2<\/sup> + 2x<sup>3<\/sup>.<\/p>\n<p>In these polynomials, the coefficient of each power of x represents the number of ways to get that number of dots. So, for my strange die, the coefficient of x<sup>2<\/sup> is 3 because there are three ways to get a 2.<\/p>\n<p>Now, why are we going to all the trouble to write down polynomials representing these dice? The comes when you want to toss two or more of these dice, and count how many ways there are to get certain numbers. If I<\/p>\n<ul>\n<li>take two dice<\/li>\n<li>work out their polynomials<\/li>\n<li>multiply the polynomials together to get a new polynomial<\/li>\n<\/ul>\n<p>then the new polynomial tells me the number of ways to get each number of dots when I toss the pair of dice, just like each individual polynomial does for its individual die.<\/p>\n<ul>\n<li>If I take two normal dice,<\/li>\n<li>Their polynomials are x + x<sup>2<\/sup> + x<sup>3<\/sup> + x<sup>4<\/sup> + x<sup>5<\/sup> + x<sup>6<\/sup> and x + x<sup>2<\/sup> + x<sup>3<\/sup> + x<sup>4<\/sup> + x<sup>5<\/sup> + x<sup>6<\/sup>,<\/li>\n<li>which multiply to give\u00a0 x<sup>2<\/sup> + 2x<sup>3<\/sup> + 3x<sup>4<\/sup> + 4x<sup>5<\/sup> + 5x<sup>6<\/sup> + 6x<sup>7<\/sup> + 5x<sup>8<\/sup> + 4x<sup>9<\/sup> + 3x<sup>10<\/sup> + 2x<sup>11<\/sup> + x<sup>12<\/sup> ,<\/li>\n<\/ul>\n<p>and this tells me that there are 2 ways to get a 3, 3 ways to get a 4, 6 ways to get a 7, and only 1 way to get a 12. That&#8217;s why, when you&#8217;re playing monopoly, you get 6&#8217;s, 7&#8217;s and 8&#8217;s almost half the time. Let&#8217;s see another example.<\/p>\n<ul>\n<li>If I take two funny dice, whose faces are 1, 2, 2, 2, 3 and 3,<\/li>\n<li>their polynomials are x + 3x<sup>2<\/sup> + 2x<sup>3<\/sup> and x + 3x<sup>2<\/sup> + 2x<sup>3<\/sup> ,<\/li>\n<li>which multiply together to give x<sup>2<\/sup> + 6x<sup>3<\/sup> + 13x<sup>4<\/sup> + 12x<sup>5<\/sup> + 4x<sup>6<\/sup>,<\/li>\n<\/ul>\n<p>so there is 1 way to get a 2, six ways to get a 3, thirteen ways to get a 4, and so on.<\/p>\n<p>This trick works with three dice, four, or any number of dice. For example,<\/p>\n<ul>\n<li>If I take three normal dice,<\/li>\n<li>Their polynomials are x + x<sup>2<\/sup> + x<sup>3<\/sup> + x<sup>4<\/sup> + x<sup>5<\/sup> + x<sup>6<\/sup>, x + x<sup>2<\/sup> + x<sup>3<\/sup> + x<sup>4<\/sup> + x<sup>5<\/sup> + x<sup>6<\/sup>, and x + x<sup>2<\/sup> + x<sup>3<\/sup> + x<sup>4<\/sup> + x<sup>5<\/sup> + x<sup>6<\/sup>,<\/li>\n<li>which multiply together to give x<sup>3<\/sup> + 3x<sup>4<\/sup> + 6x<sup>5<\/sup> + 10x<sup>6<\/sup> + 15x<sup>7<\/sup> + 21x<sup>8<\/sup> + 25x<sup>9<\/sup> + 27x<sup>10<\/sup> + 27x<sup>11<\/sup> + 25x<sup>12<\/sup> + 21x<sup>13<\/sup> + 15x<sup>14<\/sup> + 10x<sup>15<\/sup> + 6x<sup>16<\/sup> + 3x<sup>17<\/sup> + x<sup>18<\/sup> ,<\/li>\n<\/ul>\n<p>So, while there&#8217;s only 10 ways to get 16, 17 or 18, there are 100 ways to get an 8, 9, 10 or 11, which explains why we always had to cheat to create Dungeons and Dragons characters that could actually survive a typical adventure.<\/p>\n<p>So, by representing dice as polynomials, some fiendishly difficult probability questions suddenly become easy-peasy. You now know how to work out, for example, the chance of getting a 10 on three four-sided dice &#8211; just multiply together a few polynomials, instead of doing the contortedly complicated combination-counting you thought you needed before.<\/p>\n<p>If you want to learn more about this technique, the words to google are &#8220;probability generating functions&#8221;, or move on to <a title=\"Dice and Polynomials \u2013 Part 2\" href=\"http:\/\/www.dr-mikes-math-games-for-kids.com\/blog\/2011\/08\/dice-and-polynomials-part-2\/\">Dice and Polynomials &#8211; Part 2<\/a>.<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Imagine you have two coins. One side is blank, and one has a single dot. You flip the coins. How many ways can you get 0 dots? How many ways can you get 1 dot? How many ways can you get 2 dots? If you got answers like &#8220;1 way \/ 2 ways \/ 1 &hellip; <a href=\"https:\/\/www.dr-mikes-math-games-for-kids.com\/blog\/2011\/08\/dice-and-polynomials-part-1\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Dice and Polynomials &#8211; Part 1<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[81,1],"tags":[291,227,290,292,108],"_links":{"self":[{"href":"https:\/\/www.dr-mikes-math-games-for-kids.com\/blog\/wp-json\/wp\/v2\/posts\/404"}],"collection":[{"href":"https:\/\/www.dr-mikes-math-games-for-kids.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.dr-mikes-math-games-for-kids.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.dr-mikes-math-games-for-kids.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.dr-mikes-math-games-for-kids.com\/blog\/wp-json\/wp\/v2\/comments?post=404"}],"version-history":[{"count":2,"href":"https:\/\/www.dr-mikes-math-games-for-kids.com\/blog\/wp-json\/wp\/v2\/posts\/404\/revisions"}],"predecessor-version":[{"id":1371,"href":"https:\/\/www.dr-mikes-math-games-for-kids.com\/blog\/wp-json\/wp\/v2\/posts\/404\/revisions\/1371"}],"wp:attachment":[{"href":"https:\/\/www.dr-mikes-math-games-for-kids.com\/blog\/wp-json\/wp\/v2\/media?parent=404"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.dr-mikes-math-games-for-kids.com\/blog\/wp-json\/wp\/v2\/categories?post=404"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.dr-mikes-math-games-for-kids.com\/blog\/wp-json\/wp\/v2\/tags?post=404"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}