{"id":253,"date":"2017-05-21T15:31:15","date_gmt":"2017-05-21T22:31:15","guid":{"rendered":"https:\/\/blogs.ubc.ca\/organizingchaos\/?p=253"},"modified":"2018-02-09T20:56:14","modified_gmt":"2018-02-10T04:56:14","slug":"mathematical-aside-golden-mean-shift-and-pascals-triangle","status":"publish","type":"post","link":"https:\/\/blogs.ubc.ca\/organizingchaos\/2017\/05\/21\/mathematical-aside-golden-mean-shift-and-pascals-triangle\/","title":{"rendered":"Mathematical Aside: Golden Mean Shift and Pascal&#8217;s Triangle"},"content":{"rendered":"<p>I noticed something curious when I was working on my <a href=\"https:\/\/www.math.ubc.ca\/Ugrad\/NSERC\/USRA-PDF\/S16_usra_report-Raina,Arman.pdf\">summer project<\/a> last year. Basically, you consider the set <img src='https:\/\/s0.wp.com\/latex.php?latex=c_n&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='c_n' title='c_n' class='latex' \/> of binary strings (strings of length <img src='https:\/\/s0.wp.com\/latex.php?latex=n&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='n' title='n' class='latex' \/> where each symbol is either a <img src='https:\/\/s0.wp.com\/latex.php?latex=1&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='1' title='1' class='latex' \/> or a <img src='https:\/\/s0.wp.com\/latex.php?latex=0&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='0' title='0' class='latex' \/> and <img src='https:\/\/s0.wp.com\/latex.php?latex=1&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='1' title='1' class='latex' \/>&#8216;s are non-adjacent).\u00a0 So we construct a table like<\/p>\n<p>&nbsp;<\/p>\n<table width=\"847\">\n<tbody>\n<tr>\n<td width=\"121\"><strong>Length<\/strong><\/td>\n<td width=\"121\"><strong>1<\/strong><\/td>\n<td width=\"121\"><strong>2<\/strong><\/td>\n<td width=\"121\"><strong>3<\/strong><\/td>\n<td width=\"121\"><strong>4<\/strong><\/td>\n<td width=\"121\"><strong>5<\/strong><\/td>\n<td width=\"121\"><strong>6<\/strong><\/td>\n<\/tr>\n<tr>\n<td><strong>Strings<\/strong><\/td>\n<td>0;1<\/td>\n<td>00;01;10<\/td>\n<td>000;001;010;100;101<\/td>\n<td>0000;0001;0010;0100;0101;1000;1001;1010<\/td>\n<td>\u2026<\/td>\n<td>\u2026<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>And then count the number of elements of length <img src='https:\/\/s0.wp.com\/latex.php?latex=n&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='n' title='n' class='latex' \/> with <img src='https:\/\/s0.wp.com\/latex.php?latex=m&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='m' title='m' class='latex' \/> ones.<\/p>\n<table width=\"847\">\n<tbody>\n<tr>\n<td><strong>Number of ones [m] (below)<\/strong><\/td>\n<td colspan=\"6\"><strong>Number of strings (below)<\/strong><\/td>\n<\/tr>\n<tr>\n<td><strong>Length of string [n] (right)<\/strong><\/td>\n<td><strong>1<\/strong><\/td>\n<td><strong>2<\/strong><\/td>\n<td><strong>3<\/strong><\/td>\n<td><strong>4<\/strong><\/td>\n<td><strong>5<\/strong><\/td>\n<td><strong>6<\/strong><\/td>\n<\/tr>\n<tr>\n<td><strong>0<\/strong><\/td>\n<td>1<\/td>\n<td>1<\/td>\n<td>1<\/td>\n<td>1<\/td>\n<td>1<\/td>\n<td>1<\/td>\n<\/tr>\n<tr>\n<td><strong>1<\/strong><\/td>\n<td>1<\/td>\n<td>2<\/td>\n<td>3<\/td>\n<td>4<\/td>\n<td>5<\/td>\n<td>6<\/td>\n<\/tr>\n<tr>\n<td><strong>2<\/strong><\/td>\n<td>0<\/td>\n<td>0<\/td>\n<td>1<\/td>\n<td>3<\/td>\n<td>6<\/td>\n<td>10<\/td>\n<\/tr>\n<tr>\n<td><strong>3<\/strong><\/td>\n<td><\/td>\n<td><\/td>\n<td>0<\/td>\n<td>0<\/td>\n<td>1<\/td>\n<td>4<\/td>\n<\/tr>\n<tr>\n<td><strong>4<\/strong><\/td>\n<td><\/td>\n<td><\/td>\n<td><\/td>\n<td><\/td>\n<td>0<\/td>\n<td>0<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>&nbsp;<\/p>\n<p>Do you see Pascal&#8217;s Triangle hiding inside? Starting from the top left and diagonally down to the left. First one is 1,2,1, then is 1,3,3,1 etc<img decoding=\"async\" class=\"aligncenter\" src=\"https:\/\/upload.wikimedia.org\/wikipedia\/commons\/thumb\/f\/f6\/Pascal%27s_triangle_5.svg\/540px-Pascal%27s_triangle_5.svg.png\" \/>The explanation is simple enough. We are using the fact that the subset of \u00a0<img src='https:\/\/s0.wp.com\/latex.php?latex=c_n&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='c_n' title='c_n' class='latex' \/> composed of strings with <img src='https:\/\/s0.wp.com\/latex.php?latex=m&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='m' title='m' class='latex' \/> ones (lets call this <img src='https:\/\/s0.wp.com\/latex.php?latex=c_%7Bn%2Cm%7D&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='c_{n,m}' title='c_{n,m}' class='latex' \/>) can be made by taking an\u00a0element in <img src='https:\/\/s0.wp.com\/latex.php?latex=c_%7Bn-1%2Cm%7D&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='c_{n-1,m}' title='c_{n-1,m}' class='latex' \/> and appending a zero to it or an element in <img src='https:\/\/s0.wp.com\/latex.php?latex=c_%7Bn-2%2Cm-1%7D&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='c_{n-2,m-1}' title='c_{n-2,m-1}' class='latex' \/> and appending a zero-one to it. We end up with the recurrence\u00a0<img src='https:\/\/s0.wp.com\/latex.php?latex=c_%7Bn%2Cm%7D%3D+c_%7Bn-1%2Cm%7D%2B+c_%7Bn-2%2Cm-1%7D&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='c_{n,m}= c_{n-1,m}+ c_{n-2,m-1}' title='c_{n,m}= c_{n-1,m}+ c_{n-2,m-1}' class='latex' \/>. If we consider <img src='https:\/\/s0.wp.com\/latex.php?latex=d_%7Bn%2Cm%7D&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='d_{n,m}' title='d_{n,m}' class='latex' \/> as the <img src='https:\/\/s0.wp.com\/latex.php?latex=n%5E%7Bth%7D&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='n^{th}' title='n^{th}' class='latex' \/> element in the <img src='https:\/\/s0.wp.com\/latex.php?latex=m%5E%7Bth%7D&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='m^{th}' title='m^{th}' class='latex' \/> diagonal, then we realize that <img src='https:\/\/s0.wp.com\/latex.php?latex=d_%7Bn.m%7D&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='d_{n.m}' title='d_{n.m}' class='latex' \/> follows the same recurrence. This reccurence is well documented in the literature for calculating <img src='https:\/\/s0.wp.com\/latex.php?latex=%7Cc_n%7C&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='|c_n|' title='|c_n|' class='latex' \/>, here we are just using this idea for subsets of <img src='https:\/\/s0.wp.com\/latex.php?latex=c_n&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='c_n' title='c_n' class='latex' \/> with exactly <img src='https:\/\/s0.wp.com\/latex.php?latex=m&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='m' title='m' class='latex' \/> ones to connect it with Pascal&#8217;s Triangle.<\/p>\n<p>The adventure continues in <a href=\"https:\/\/blogs.ubc.ca\/organizingchaos\/2017\/11\/15\/mathematical-aside-golden-mean-shift-and-pascals-triangle-part-2\/\">Part 2<\/a>!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I noticed something curious when I was working on my summer project last year. Basically, you consider the set of binary strings (strings of length where each symbol is either a or a and &#8216;s are non-adjacent).\u00a0 So we construct a table like &nbsp; Length 1 2 3 4 5 6 Strings 0;1 00;01;10 000;001;010;100;101 [&hellip;]<\/p>\n","protected":false},"author":28516,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":true,"template":"","format":"standard","meta":{"footnotes":""},"categories":[13426,1],"tags":[],"class_list":["post-253","post","type-post","status-publish","format-standard","hentry","category-asides","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/blogs.ubc.ca\/organizingchaos\/wp-json\/wp\/v2\/posts\/253","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blogs.ubc.ca\/organizingchaos\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blogs.ubc.ca\/organizingchaos\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blogs.ubc.ca\/organizingchaos\/wp-json\/wp\/v2\/users\/28516"}],"replies":[{"embeddable":true,"href":"https:\/\/blogs.ubc.ca\/organizingchaos\/wp-json\/wp\/v2\/comments?post=253"}],"version-history":[{"count":14,"href":"https:\/\/blogs.ubc.ca\/organizingchaos\/wp-json\/wp\/v2\/posts\/253\/revisions"}],"predecessor-version":[{"id":353,"href":"https:\/\/blogs.ubc.ca\/organizingchaos\/wp-json\/wp\/v2\/posts\/253\/revisions\/353"}],"wp:attachment":[{"href":"https:\/\/blogs.ubc.ca\/organizingchaos\/wp-json\/wp\/v2\/media?parent=253"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.ubc.ca\/organizingchaos\/wp-json\/wp\/v2\/categories?post=253"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.ubc.ca\/organizingchaos\/wp-json\/wp\/v2\/tags?post=253"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}