{"id":29,"date":"2009-05-19T15:41:03","date_gmt":"2009-05-19T19:41:03","guid":{"rendered":"http:\/\/blogs.williams.edu\/Morgan\/?p=29"},"modified":"2014-02-18T10:42:56","modified_gmt":"2014-02-18T15:42:56","slug":"making-change-for-america","status":"publish","type":"post","link":"https:\/\/sites.williams.edu\/Morgan\/2009\/05\/19\/making-change-for-america\/","title":{"rendered":"Making Change for America"},"content":{"rendered":"<p>Guest post by\u00a0<a href=\"mailto:lee.newberg@wadsworth.org\">Lee Newberg<\/a> [but see Comment below]<\/p>\n<div>\n<p>I stumbled across an old <a href=\"http:\/\/www.maa.org\/features\/mathchat\/mathchat_4_19_01.html\">Math Chat column<\/a> of yours, which mentioned that the number of ways to make change for a dollar is the coefficient of <img src='https:\/\/s0.wp.com\/latex.php?latex=x%5E%7B100%7D&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='x^{100}' title='x^{100}' class='latex' \/> in the Taylor expansion of<\/p>\n<p><img src='https:\/\/s0.wp.com\/latex.php?latex=%5Cfrac%7B1%7D%7B%281-x%29%281-x%5E5%29%281-x%5E%7B10%7D%29%281-x%5E%7B25%7D%29%281-x%5E%7B50%7D%29%281-x%5E%7B100%7D%29%7D&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='\\frac{1}{(1-x)(1-x^5)(1-x^{10})(1-x^{25})(1-x^{50})(1-x^{100})}' title='\\frac{1}{(1-x)(1-x^5)(1-x^{10})(1-x^{25})(1-x^{50})(1-x^{100})}' class='latex' \/>.<\/p>\n<p>But I don&#8217;t see there, or anywhere on the web, the general formula for the number of ways c(n) to make change for n dollars. \u00a0In case you are interested, below I derive it to be:<\/p>\n<p><img src='https:\/\/s0.wp.com\/latex.php?latex=c%28n%29+%3D+%286+%2B+127n+%2B+483n%5E2+%2B+672n%5E3+%2B+390n%5E4+%2B+80n%5E5%29%2F6&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='c(n) = (6 + 127n + 483n^2 + 672n^3 + 390n^4 + 80n^5)\/6' title='c(n) = (6 + 127n + 483n^2 + 672n^3 + 390n^4 + 80n^5)\/6' class='latex' \/>.<\/p>\n<p>Spending 1 trillion dollars with the federal stimulus means that Obama has<\/p>\n<p><img src='https:\/\/s0.wp.com\/latex.php?latex=c%2810%5E%7B12%7D%29&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='c(10^{12})' title='c(10^{12})' class='latex' \/>= \u00a013 333333 333398 333333 333445 333333 333413 833333 333354 500000 000001<\/p>\n<p>ways to make Change for America.<!--more--><\/p>\n<p><strong>Derivation:<\/strong> For any one instance of making change, the value contributed in pennies will be some non-negative integer number of dollars plus some fractional amount in [$0.00, $0.99], and likewise for the other coins. \u00a0The generating function for making an integer number of dollars using less than $1.00 value from each coin is a polynomial:<\/p>\n<p>(1-x^100)^6 \/ ((1-x)(1-x^5)(1-x^10)(1-x^25)(1-x^50)(1-x^100))<\/p>\n<p>where each factor of the numerator truncates the series for each contributing coin. \u00a0This polynomial shows 1 way to make $0, 287 ways to make $1, 985 ways to make $2, 325 ways to make $3, 2 ways to make $4, and 0 ways to make $5 or more using less than $1.00 value of each coin. \u00a0The way to make $n using a non-negative integer number of dollars of each coin has the generating function 1\/(1-x)^6. \u00a0Thus the generating function for the solution c(n) is:<\/p>\n<p>(1+ 287*x + 985*x^2 + 325*x^3 + 2*x^4) \/ (1-x)^6.<\/p>\n<p>and this gives the c(n) formula above.<\/p>\n<p><strong>Making Change for a Small Purse\u00a0<\/strong>(added 18 February 2014)<\/p>\n<p>Suppose you have a small purse or are otherwise motivated to carry your money using the largest denominations possible. For example, to carry an amount of $123.45, you&#8217;d first use the largest-denomination bill that does not exceed that amount, which is $100; then the largest-denomination bill that does not exceed the remaining amount ($23.45), which is $20; then three $1 bills; then one quarter; then two dimes. In symbols we&#8217;ll write a multiset Purse[123.45] = {100, 20, 1, 1, 1, 0.25, 0.10, 0.10} for a set of bill and coin denominations, D = {100, 50, 20, 10, 1, 0.25, 0.10, 0.05, 0.01}. Generally, we define Purse[S] recursively with Purse[0] = \u2205 Purse[S] = {m(S,D)} \u222a Purse[S-m(S,D)] \u2026 where m(S,D) is the largest value in D that does not exceed the value S. (Note that for this set D, Purse[S] is well defined only if S is a non-negative multiple of 0.01.) If you start with S in your purse, and are buying an item that costs C, you will finally end up with F=S-C in your purse. In terms of the actual bills and coins, you start with Purse[S] in your purse and you want to finish with Purse[F] in your purse. Consider this strategy for achieving this goal: Look at every bill and coin that is present in Purse[S] more often than it is in Purse[F], and write Purse[S]-Purse[F] for the multiset that contains only the excess amount of these bills and coins. Give Purse[S]-Purse[F] to the cashier. (Note that at least these bills and coins must be given to the cashier if there is to be any hope of finishing with Purse[F].) Receive the proper change R without telling the cashier which bills and coins you are hoping for; assume that the change is given with the largest denominations possible; that is, as Purse[R].<\/p>\n<p><strong>Questions: <\/strong><\/p>\n<p>1.With this strategy will you always end up with Purse[F]?<\/p>\n<p>2.Writing G=Value(Purse[S]-Purse[F]) for the value of the excess bills and coins given to the cashier, is it always the case that the multiset of given bills and coins, Purse[S]-Purse[F], is equal to Purse[G]?<\/p>\n<p>3. If you give the excess bills and coins, Purse[S]-Purse[F], in an order that saves an instance of the largest denomination until last, is it the case that you will not reach or exceed the item&#8217;s price until you have given every bill and coin? (This will be useful for those automated cashiers at the supermarket that give you your change the moment you reach or exceed the purchase price.)<\/p>\n<p>&nbsp;<\/p>\n<p>Lee Newberg, Ph.D.<\/p>\n<p>Research Scientist, Center for Bioinformatics, Wadsworth Center, NYS Department of Health,<\/p>\n<p>Research Associate Professor, Bioinformatics Research Group, Department of Computer Science, Rensselaer Polytechnic Institute<\/p>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Guest post by\u00a0Lee Newberg [but see Comment below] I stumbled across an old Math Chat column of yours, which mentioned that the number of ways to make change for a dollar is the coefficient of in the Taylor expansion of . But I don&#8217;t see there, or anywhere on the web, the general formula for [&hellip;]<\/p>\n","protected":false},"author":269,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[14042,14043],"tags":[],"class_list":["post-29","post","type-post","status-publish","format-standard","hentry","category-general-interest","category-math"],"acf":[],"_links":{"self":[{"href":"https:\/\/sites.williams.edu\/Morgan\/wp-json\/wp\/v2\/posts\/29","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/sites.williams.edu\/Morgan\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/sites.williams.edu\/Morgan\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/sites.williams.edu\/Morgan\/wp-json\/wp\/v2\/users\/269"}],"replies":[{"embeddable":true,"href":"https:\/\/sites.williams.edu\/Morgan\/wp-json\/wp\/v2\/comments?post=29"}],"version-history":[{"count":3,"href":"https:\/\/sites.williams.edu\/Morgan\/wp-json\/wp\/v2\/posts\/29\/revisions"}],"predecessor-version":[{"id":1786,"href":"https:\/\/sites.williams.edu\/Morgan\/wp-json\/wp\/v2\/posts\/29\/revisions\/1786"}],"wp:attachment":[{"href":"https:\/\/sites.williams.edu\/Morgan\/wp-json\/wp\/v2\/media?parent=29"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/sites.williams.edu\/Morgan\/wp-json\/wp\/v2\/categories?post=29"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/sites.williams.edu\/Morgan\/wp-json\/wp\/v2\/tags?post=29"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}