Explaining the bizarre pattern in making change for a googol dollars (infinite generating functions)

แชร์
ฝัง
  • เผยแพร่เมื่อ 21 พ.ค. 2024
  • Okay, as it says in the title of this video, today's mission is to figure out how many ways there are to make change for one googol, that is 10^100 dollars. The very strange patterns in the answer will surprise, as will the explanation for this phenomenon, promise.
    0:00 Intro
    1:15 Chapter 1: curious count
    9:05 Chapter 2: googol
    14:10 Chapter 3: infinite change
    28:41 Acknowledgements
    A very nice Mathematica file created by Andrew Neitsch in 2005 covers pretty much every aspect of change making mathematics. andrew.neitsch.ca/publications...
    Here is a pdf version of this file: andrew.neitsch.ca/publication...
    What I cover in the last part of this video is pretty much fleshing out and animating the section "Coin change revisited". All this is part of to Andrew's answer to a post on math.stackoverflow stackoverflow.com/questions/1...
    The visual algebra approach to calculate the number of ways to make change at the very beginning of this video was inspired by this article G. Pólya, On Picture-Writing, Am Math Monthly 63 (1956), 689-697. www.jstor.org/stable/2309555
    Concrete mathematics by Graham, Knuth and Patashnik, the book I mentioned at the end of the video does the whole analysis for the coin set 1, 5, 10, 25, 50 (so no dollar coins).
    A complete list of all the different ways to make change for a dollar appears in this post www.maa.org/frank-morgans-mat...
    The book "Generatingfunctionology" by Herbert Wilf, is a great intro to generating functions :) www2.math.upenn.edu/~wilf/Dow...
    Ron Graham to who this video is dedicated did a couple of videos with Numberphile. So if you'd like to see him in action, check out those videos. A lot of other interesting articles about Ron Graham can be found on his wife's (also a math professor) website. www.math.ucsd.edu/~fan/ron/
    As usual the music in the video is from the free TH-cam audio library: No. 2 Remembering her by Ester Abrami, Morning Mandolin by Chris Haugen, First time experience and T'is the season by Nate Blaze
    Today's t-shirts: google "only half evil t-shirt".
    Enjoy!
    Burkard

ความคิดเห็น • 854

  • @Mathologer
    @Mathologer  3 ปีที่แล้ว +426

    A "short" video for a change, "only" 30 minutes long :)

    • @karangupta1825
      @karangupta1825 3 ปีที่แล้ว +23

      Sir please make a video on collatz conjecture and staircase paradox

    • @candiman4243
      @candiman4243 3 ปีที่แล้ว +38

      For a "change," I see what you did there.

    • @AlexanderQ689
      @AlexanderQ689 3 ปีที่แล้ว +11

      A short video on change

    • @Kram1032
      @Kram1032 3 ปีที่แล้ว +6

      @@candiman4243 dangit I was gonna make that joke

    • @davids9522
      @davids9522 3 ปีที่แล้ว +4

      They are never long enough my friend. I could watch these for days.

  • @AlRoderick
    @AlRoderick 3 ปีที่แล้ว +87

    "We started with an infinite sum so let's count our blessings"
    Well it does seem like there are countably many...

  • @KusacUK
    @KusacUK 3 ปีที่แล้ว +182

    As we’re all home-schooling at the moment, the school is sending challenge sheets out to all the kids. The final question on my daughter’s maths one was “how many different ways can you make £3.10 using coins”.
    She’s 7 years old...
    I just changed the question to “think of a few ways you could” instead, because even I didn’t know how to solve it. But now I do! I don’t think I’ll be teaching this to her yet though.

    • @MrApolloTom
      @MrApolloTom 3 ปีที่แล้ว +49

      One of those cases where I wonder if the question setter properly understood what they were asking.

    • @MrApolloTom
      @MrApolloTom 3 ปีที่แล้ว +20

      Don't forget to re-compile the formulas for 20p instead of 25c coins and to include 2p.

    • @Craphtex
      @Craphtex 3 ปีที่แล้ว +37

      I'd say the sentence is open for interpretation, "how many different ways can you make £3.10 using coins" is not strictly the same as "given the official GBP coins, what is the maximum number of different ways possible to combine any number of each, to sum up to exactly £3.10".
      When I read it as a task for a 7 year old, I myself put stress on the word "you", which then makes the question referring to the subjective ability of the girl in question. A little like her English teacher might give her the assignment "in how many ways can you express 'I love my parents'", where the girl will explore her vocabulary, not deduce all possible ways of expressing affection on a certain level using the English language.
      Feels like the task at hand is great for stimulating her exploration of arithmetic addition of natural numbers, where she herself will create the terms and add them up, as opposed to writing the answer to "3+5=_", "5+1=_", "9+1=_", "2+3+4=_", etc. over and over again. Who knows maybe she'll even bring out some coins on the desk and start playing around, thus naturally start connecting mathematics to the real world around her.
      In my opinion a great assignment, but I do indeed giggle along seeing the irony when interpreted from some more strictly mathematical perspective.

    • @annaclarafenyo8185
      @annaclarafenyo8185 3 ปีที่แล้ว +16

      A child should solve it by brute force. It's not that hard.

    • @trueriver1950
      @trueriver1950 3 ปีที่แล้ว

      @@Craphtex and we have a £2 coin too

  • @maxwchase
    @maxwchase 3 ปีที่แล้ว +13

    Programming challenge (did this around 13:41): because all of the coins evenly divide a dollar, it must be the case that a sum of coins to a multiple of a dollar can be separated into some groups of coins in which no single denomination adds up to a dollar, and the rest, in which each single denomination adds up to a multiple of a dollar. The former cases can be enumerated by doing the product trick without the exponent of 100, and taking the coefficient of each exponent divisible by 100, including 0. There are ways to make change like this for zero through four dollars inclusive. This gives us one part of the solution. The other part is to determine how many ways the remainder could be made. But this is a simpler problem, because it's equivalent to asking "How many ways are there to add five (number of denominations - 1) boundaries to a set of a given size" which is equivalent to asking for (size of set + 5) choose 5, which can be hard-coded as a sequence of multiplications followed by a division. (I could have tried expanding out the polynomial explicitly, but that sounds like effort).
    So, the final answer is to, for each amount of dollars that can be made without using a dollar's worth of a single denomination, multiply that by the number of combinations for the remaining dollars.
    I coded this up in Python, and it's pretty fast. I just started added zeroes to the exponent on the ten, and it was pretty acceptable performance up to 2 * 10 ^ 100,000. I'll post the value for 2 * 10 ^ 1,000,000 when it finishes, because that's much slower. Okay, yeah, that took a few minutes. One sec... Oh geez, it overflowed the buffer.
    I'm not pasting five million digits in here. See pastebin.com/MA2a9p3R
    EDIT: At 23:02 I'm seeing the same coefficients in the center row that I had my program calculate for "ways to make dollars without a single denomination adding up to a dollar" So I guess this is going in the same direction.

  • @suqichen5576
    @suqichen5576 3 ปีที่แล้ว +72

    I studied the infinite generating function for high school math competitions. They are very useful in combinatorics problem!

  • @thedoublehelix5661
    @thedoublehelix5661 3 ปีที่แล้ว +36

    I already knew about generating functions, but seeing that automated algebra and the reason for all those 3s and 0s was seriously amazing

  • @Xubono
    @Xubono 3 ปีที่แล้ว +71

    Some of us will recognise Donald Knuth as the creator of the typesetting language TeX. For that alone, he has been responsible for the professional quality appearance of thousands of PhD theses.

    • @tomkerruish2982
      @tomkerruish2982 3 ปีที่แล้ว +3

      He also devised the potrzebie system of weights and measures, the quarter-imaginary numeral system, and named the surreal numbers.

    • @prometheus7387
      @prometheus7387 3 ปีที่แล้ว

      Massive props to the dude

    • @coleabrahams9331
      @coleabrahams9331 3 ปีที่แล้ว +1

      Don’t you mean LaTeX? By yeah, it is the best!!!

    • @Xubono
      @Xubono 3 ปีที่แล้ว +7

      @@coleabrahams9331 LaTeX is built on top to TeX. It is basically a set of macros, written in the TeX language.

    • @steviebudden3397
      @steviebudden3397 3 ปีที่แล้ว +1

      Yup, amazing man. I notice that you, quite rightly, specify that he's responsible for the professional quality appearance - rather than professional quality content. That's an important distinction. But yes, they do look nice.

  • @subhasish-m
    @subhasish-m 3 ปีที่แล้ว +114

    The power of 2 coins can make any amount in exactly one way! (binary representations :))

    • @Mathologer
      @Mathologer  3 ปีที่แล้ว +36

      That was quick :)

    • @subhasish-m
      @subhasish-m 3 ปีที่แล้ว +9

      @@Mathologer I could hardly wait on seeing a Mathologer video! Still trying to make a program to find the coefficients without using your trick with generating functions

    • @Mathologer
      @Mathologer  3 ปีที่แล้ว +12

      @@subhasish-m Well will be interesting to see what you and others come up with :)

    • @Darkstar159
      @Darkstar159 3 ปีที่แล้ว +5

      @@subhasish-m I think it's a common problem in dynamic programming

    • @tomlamarre1362
      @tomlamarre1362 3 ปีที่แล้ว +2

      It's cool to see "unique representation in base 2 exists" formulated differently. Works for other bases too, except for example in base 3 you say "I can have 0, 1, or 2 coins worth 1 each, 3 each, 9 each, ..." So the polynomial you have for, say 3 digits in base 3 would be (1 + x + x^2)(1 + x^3 + x^6)(1 + x^9 + x^18) and as expected that is equal to the sum of all x^j for j from 0 to 26 (because 26 = 3^3 - 1) so base 3 numbers can represent natural numbers uniquely too.

  • @alimimir
    @alimimir 3 ปีที่แล้ว +147

    quick answer: a lot

    • @bludeat7398
      @bludeat7398 3 ปีที่แล้ว +6

      I think its more than 3...

    • @farmertree8
      @farmertree8 3 ปีที่แล้ว +6

      @@bludeat7398 No it is higher than 3.14!

    • @MatthewJacksonTheMuuj
      @MatthewJacksonTheMuuj 3 ปีที่แล้ว +3

      Or none, because there's not enough currency in existence to do it. 🤔

  • @matthewjensen8681
    @matthewjensen8681 3 ปีที่แล้ว +5

    Wow... I liken watching Mathologer to watching Bob Ross. I’m watching a man explain something far beyond my capabilities but just listening to him talk about something he loves and the intricacies therein is beautiful. I can follow the minutia but I can’t keep track of all of it. It’s just lovely watching these long strings of equations getting simplified and expanded and simplified again. Never stop, Mathologer, never stop.

  • @mebamme
    @mebamme 3 ปีที่แล้ว +252

    This video makes a lot of cents.

    • @Mathologer
      @Mathologer  3 ปีที่แล้ว +30

      Very funny :)

    • @prometheus7387
      @prometheus7387 3 ปีที่แล้ว +2

      Oh my god

    • @garychap8384
      @garychap8384 3 ปีที่แล้ว +1

      Mebamme, NO! Go stand in the corner till you learn _'shame'_ ; ))))))))

    • @gabenugget114
      @gabenugget114 3 ปีที่แล้ว +1

      MAKE GOGOOL CENTS

    • @kasperjoonatan6014
      @kasperjoonatan6014 3 ปีที่แล้ว +1

      It's like pennies from heaven!

  • @kotschi93
    @kotschi93 3 ปีที่แล้ว +65

    Having coins worth 1, 2, 4, 8, ..., 2^n each exactly once will allow you to represent each number up to 2^(n+1) - 1 exactly once, because it's just the binary represantation of that choosen number. It will work for any number system in general. As long as you've got enough coins to fill up each digits place to its maximum, you will be able to represent each number up to the next digits value minus 1.
    For example:
    - 2 coins worth 1, 2 coins worth 3 and 2 coins worth 9 can represent each number up to 26 in base 3 exactly once and
    - 1 coin worth 1, 2 coins worth 2, 3 coins worth 6 and 4 coins worth 24 can represent each number up to 119 in base factorial exactly once.

    • @parpid
      @parpid 3 ปีที่แล้ว +3

      Woah, brilliant insight! I couldn't figure it out

    • @EssexJames65
      @EssexJames65 3 ปีที่แล้ว +7

      Yep. Realised that instantly

    • @AlRoderick
      @AlRoderick 3 ปีที่แล้ว +6

      In the classic set of hollywood apple crates, you have a 1 inch, 2 inch, 4 inch and 8 inch, which lets you raise whatever it whoever you want to raise any integer number of inches from 1-15.

    • @canaDavid1
      @canaDavid1 3 ปีที่แล้ว +3

      Base factorial is a thing? Amazing!

    • @lockeisback
      @lockeisback 3 ปีที่แล้ว +2

      i am actually not convinced of this, its true if you limit yourself to having exaxtly 0 or 1 of each coin type, otherwise i could represent 4 as both 2(4)'s or 4(1)'s. since binary doesnt allow for digit values over 1, this excludes a great many other partitions

  • @WillToWinvlog
    @WillToWinvlog 3 ปีที่แล้ว +63

    I've been a fan ever since your humble beginning, and I'm more excited than ever for new Mathologer vids!

    • @Mathologer
      @Mathologer  3 ปีที่แล้ว +21

      Actually I always wondered whether TH-cam would ever consider making a list of subscribers in chronological order available in a reasonable way. Still waiting :(

    • @SaveSoilSaveSoil
      @SaveSoilSaveSoil 3 ปีที่แล้ว +6

      Actually, TH-cam should have sent you an email each time someone subscribed. If you rank your 647K subscription emails, you will know who subscribed before whom.

    • @Tiessie
      @Tiessie 3 ปีที่แล้ว +4

      @@SaveSoilSaveSoil any reasonable person will have turned that off :)

    • @Mathologer
      @Mathologer  3 ปีที่แล้ว +5

      @@SaveSoilSaveSoil They only send you an e-mail if you tick a certain box and if you've got lots of subscribers you most definitely don't want to tick that box :)

    • @BrendonGreenNZL
      @BrendonGreenNZL 3 ปีที่แล้ว +1

      @@Mathologer that sounds more like an argument for filtering your emails through Python

  • @johnchessant3012
    @johnchessant3012 3 ปีที่แล้ว +29

    21:15 "Oh wow, this formula implies that the coefficients for 5n, 5n+1, 5n+2, 5n+3, 5n+4 must be the same!"
    *thinks about original problem for a minute*
    ... Oh.

  • @BrentDeJong
    @BrentDeJong 3 ปีที่แล้ว +7

    The formula shown at 24:00 works for any dollar amount if you let n choose m = 0 for n

  • @tobiasgorgen7592
    @tobiasgorgen7592 3 ปีที่แล้ว +178

    Last time i was this early, The sum of all natural numbers still equaled infinity

    • @Mathologer
      @Mathologer  3 ปีที่แล้ว +55

      Last time it was this early for me (5 a.m.) was yesterday :)

    • @grantorino2325
      @grantorino2325 3 ปีที่แล้ว +21

      The last time that I was this early, Kaliningrad had 7 bridges and was still called *Königsberg* !

    • @tcadityaa
      @tcadityaa 3 ปีที่แล้ว +6

      @@Mathologer On an unrelated note, which do you prefer sir, math or maths?
      Edit: I really want a t-shirt with your catchphrase - "Cool isn't it?" or "Exactly what we started with!"

    • @sofia.eris.bauhaus
      @sofia.eris.bauhaus 3 ปีที่แล้ว +8

      it always has been -1/12
      source: the astronaut behind you.

    • @Danielagostinho21
      @Danielagostinho21 3 ปีที่แล้ว

      @@sofia.eris.bauhaus "Wait there's an astronaut behind me?"

  • @gabrielmel3972
    @gabrielmel3972 3 ปีที่แล้ว +8

    Extremely cool! Made me realize there’s a very practical strategy for handling these problems that, in my opinion, beats the pure programming AND pure math approach: programming this sort of thing correctly is nontrivial, and even with a smart implementation isn’t that fast (my quick and dirty python version takes about 20 seconds for $2500 - I just remembered I only bothered with 1, 5, 10, and 25 cent coins). The pure math approach to obtain a closed form expression through generating functions is mechanical and straightforward (and beautiful) but incredibly unwieldy for generating functions of this size. Even if you use Mathematica to do the algebra, you still face the problem of convincing yourself you didn’t make a mistake in writing the code! My approach, inspired by your video, is to simply observe that since the generating function is a rational function, its coefficients will be exponentials times polynomials in the index (and I think a bit more reasoning gets you to the fact that if you only extract coefficients with the same residue mod 100, they’ll just be polynomials (as you show for residue 0, of course)). For N coins, this polynomial will be of degree N-1. So pages and pages of computer algebra, in the end, are just to get N rational numbers! A much more direct way is to write a piece of code that is just barely fast enough to deliver N values of the function, and then solve the resulting linear system for the coefficients of the polynomial! No need for super slick iterative implementations, which will top out way before a million of dollars anyway; no need for huge amounts of algebra. Fast, easy, and delivers an essentially O(1) algorithm for a huge number of problems (ie. anything with a rational generating function, so anything produced by a finite state machine)!

  • @wompastompa3692
    @wompastompa3692 3 ปีที่แล้ว +10

    For anyone working on the problem at about 16:20 with derivatives, do yourself a favor and use (1-x)^(-1) instead of the fraction. Power rule & Chain rule is sooooo much easier than Quotient rule when it comes to taking more and more derivatives in this case.

    • @dramwertz4833
      @dramwertz4833 3 ปีที่แล้ว

      ye i agree totally. i just seem to be stuck on the left side somehow. not sure where my error of thought is

    • @jadegrace1312
      @jadegrace1312 3 ปีที่แล้ว

      @@dramwertz4833 Induction is a better way to do it if you know induction.

  • @davidbarnett8617
    @davidbarnett8617 3 ปีที่แล้ว +1

    This is simply a brilliant explanation. Your videos are getting better and better. I am astounded at the ideas and creativity you have in the topics you cover. Thanks!

  • @Jordan-zk2wd
    @Jordan-zk2wd 3 ปีที่แล้ว +2

    There's something beautifully simple about this, once you get to the end it just feels completely obvious that it works. Love all your content, definitely helps me to see things in different perspectives and to engage with problems better! Now and then I get into little mathematical rabbit holes of my own and end up taking between a couple weeks and months to intermittently chip away at them til I get somewhere satisfactory, I actually just got started right now on a new such thing and probably am gonna have to break into programming cause the spreadsheets won't cut it. Thanks for the inspiration

  • @mallard1139
    @mallard1139 3 ปีที่แล้ว +144

    Glasses: +50 iq
    Nerdy math t-shirt: +80 iq
    German accent: +6000 iq

    • @Mathologer
      @Mathologer  3 ปีที่แล้ว +43

      Looks like I've got is all covered :) How about bald vs. Einstein hair ?

    • @dogslife4831
      @dogslife4831 3 ปีที่แล้ว +37

      @@Mathologer
      Bald +10IQ
      No need to scratch head to solve problems 😁

    • @Bruno_Noobador
      @Bruno_Noobador 3 ปีที่แล้ว +1

      @@dogslife4831 Nice

    • @gabor6259
      @gabor6259 3 ปีที่แล้ว +16

      @@Mathologer Bald → mathematicians
      Einstein hair → physicists

    • @wolfgangwilhelm9699
      @wolfgangwilhelm9699 3 ปีที่แล้ว

      @@Mathologer Sabine Hossenfelder machte vor kurzer Zeit ein Video zum Thema deutscher Akzent, damit sich das Englisch wie jenes von Einstein anhört ;)

  • @marco_gallone
    @marco_gallone 3 ปีที่แล้ว +1

    This is absolutely mind blowing. Please never stop producing content like this! I absolutely love the channel.

  • @rafaelmoreira4189
    @rafaelmoreira4189 3 ปีที่แล้ว +12

    8:58- I think it is 292 (one less the result you gave us due to the fact we exclude the possibility of using the 100 cent coin).

  • @maxsch.6555
    @maxsch.6555 3 ปีที่แล้ว +2

    Everyday you upload feels like christmas. I was always fascinated by generating functions. Thanks for the great content as always! Greetings from Germany :)

  • @Matiburon04
    @Matiburon04 3 ปีที่แล้ว +2

    This was a particularly fun one. I feel like I was able to follow pretty much every part of the proof. Enough hand-holding for casual viewers but no tricky stuff shoved to the background.
    Even the algebra autopilot is fun to watch, as its pace and animation make it easy to understand and apreciate the cleverness involved. Many channels like to focus more on geometric proofs only (which are also nice) but algebra has some charm too.

  • @landsgevaer
    @landsgevaer 3 ปีที่แล้ว +5

    23:56 It doesn't work for k

    • @Mathologer
      @Mathologer  3 ปีที่แล้ว +2

      Exactly :)

    • @richardschreier3866
      @richardschreier3866 3 ปีที่แล้ว +1

      @@Mathologer You had me pondering this for a while. Since I already understood that nCk = 0 when n

    • @landsgevaer
      @landsgevaer 3 ปีที่แล้ว

      @@richardschreier3866 It depends how you define the nCk function and how you choose its domain, I guess?
      It is quite natural to define it as n!/(k!(n-k)!) and restrict it to integers n ≥ k ≥ 0; but if it is extended beyond that, then these other integer cases normally equal 0 indeed.

  • @AkashKumarInWonderland
    @AkashKumarInWonderland 3 ปีที่แล้ว +1

    Loved your dedication, Professor Polster.
    A side story: I interviewed with Ron Graham years ago for a PhD position at UCSD. While I did not get the offer, my conversation with him is one of my treasured memories.

  • @ethanjensen7967
    @ethanjensen7967 3 ปีที่แล้ว

    :) I love this video! I have just been learning about q series! It's so strange how your videos are always surprisingly relevant

  • @10gbo_pizza
    @10gbo_pizza 3 ปีที่แล้ว

    Sir I love all of your videos, gotta admit dont understand some parts of them because I am very not familiar with stuff like the geometric series, but anyway, I just started watching your videos and do really like all the aha moments you give to us to find, and I also love the tightly-knit community. KEEP UP THE GOOD WORK. The long videos make it a tiny bit difficult to watch em but I like em! Thank you!

  • @inciaradible7144
    @inciaradible7144 3 ปีที่แล้ว +1

    This is a really cool video and reminded me of when I first came across generating functions when figuring out the probability in regard to the sums of the outcome of dice, and this actually deepened my understanding of them a bit as they always felt a bit like magic to me.

  • @KCSutherland
    @KCSutherland 3 ปีที่แล้ว

    This feels like all those math lectures that really made me realize how amazing Mathematics is. Thoroughly enjoyed this, and such a cool result!!

  • @m2a2x2000
    @m2a2x2000 3 ปีที่แล้ว +3

    Thank you, for your videos. "fresh" ideas and content and ton of work behind them.

  • @ardinchesters128
    @ardinchesters128 3 ปีที่แล้ว

    great video!! I'm really grateful that as a high school student wanting to become a mathematician I have access to such inspiring channels as mathologer and 3b1b, giving beautiful yet still accessible mathematics to sink your teeth in to!

  • @obchardon
    @obchardon 2 ปีที่แล้ว

    "Do you understand why ? Weeeelll... [insert any magical mathematical tricks here]". Your channel is great ! And thank you for the subtitle, as a non native english speaker it help me a lot to keep concentrate on the demonstration :)

  • @ritteraxt2105
    @ritteraxt2105 3 ปีที่แล้ว +2

    I love how the 9 flips at 24:45!
    Lovely video!

  • @davidrosa9670
    @davidrosa9670 3 ปีที่แล้ว +8

    23:56 I guess that the formula doesn't work because the binomial coefficient "isn't defined" if the number on the top is smaller than the one on the bottom. I think that, if we define the choose function to be 0 in those cases, it works just fine. When you replaced them by algebraic expresions, you indeed set them to be 0 in those cases, so the last formula works in general.

  • @hewhomustnotbenamed5912
    @hewhomustnotbenamed5912 3 ปีที่แล้ว +94

    Imagine not getting a heart and reply from Mathologer.

    • @Mathologer
      @Mathologer  3 ปีที่แล้ว +56

      Okay, I have to admit that I was tempted ...

    • @gabor6259
      @gabor6259 3 ปีที่แล้ว +3

      Harry Potter is dead! Huuuh huh huuuuuuuh!

    • @coleabrahams9331
      @coleabrahams9331 3 ปีที่แล้ว

      @@gabor6259 Do you too love Harry Potter?

    • @gabor6259
      @gabor6259 3 ปีที่แล้ว

      @@coleabrahams9331 Of course.

  • @pharaohgarmar5611
    @pharaohgarmar5611 3 ปีที่แล้ว

    Mathologer, wonderful video! You are a legend and you explain things so beautifully.

  • @dibenp
    @dibenp 3 ปีที่แล้ว +2

    Great video! Quite approachable and always enjoyable. 😁
    And RIP Ron Graham. ❤️

  • @JMUDoc
    @JMUDoc 3 ปีที่แล้ว +18

    Viewer in 2030: "what is "change"?"
    Viewer in 2040: "what are "dollars"?"

    • @riadsouissi
      @riadsouissi 3 ปีที่แล้ว +4

      Viewer in 2100: "what?"

    • @thenasadude6878
      @thenasadude6878 3 ปีที่แล้ว +2

      @@riadsouissi in 2200: algebra autopilot
      w -> m
      h -> a
      a -> t
      t -> h

  • @MGRVE
    @MGRVE 3 ปีที่แล้ว

    Magic all around, not the least in the graphical animations. Wonderful - as always. Viele Grüße!

  • @jazzabighits4473
    @jazzabighits4473 3 ปีที่แล้ว +1

    Great video as always, even after chapter 1 I was amazed. Thanks for this :)

  • @baileybussiere1310
    @baileybussiere1310 3 ปีที่แล้ว +6

    This will come in useful in the gym later when I am scratching my head figuring out how to load up the barbell.

  • @mathwithjanine
    @mathwithjanine 3 ปีที่แล้ว

    This is so fascinating! Really enjoyed watching this video :)

  • @nimzi4479
    @nimzi4479 3 ปีที่แล้ว

    it feels like forever since the last Mathologer video. Good to see you,again.

  • @jorn-jorenjorenson5028
    @jorn-jorenjorenson5028 3 ปีที่แล้ว

    Love to watch your videos! Though this time I must admit I could not really follow, probably have to watch it again and stop at many steps to think about. : )

  • @donaastor
    @donaastor 3 ปีที่แล้ว

    We are impatient to see the next video, I need more of this great content!

  • @powertomato
    @powertomato 2 ปีที่แล้ว

    At university I did a discrete mathematics course which featured generating functions and could never fully wrap my head around why they are such an effective tool for counting. I wish I had this coin example back then, such a great explaination really shows the intuition behind them

  • @johnredberg
    @johnredberg 3 ปีที่แล้ว

    Choosing _this_ particular t-shirt for _this_ particular topic is a stroke of satirical genius. My highest compliments! (Not just for the t-shirt ;-) )

  • @KillianDefaoite
    @KillianDefaoite 3 ปีที่แล้ว +1

    I thoroughly enjoyed this video, but it definitely reminded me why I've done my best to avoid serious combinatorics :)

  • @mrmeow3924
    @mrmeow3924 3 ปีที่แล้ว +1

    This is the most satisfying video of 2021 so far ^^

  • @amaralberem2184
    @amaralberem2184 3 ปีที่แล้ว

    Amazing video as always!! Love it

  • @vincentbatens7656
    @vincentbatens7656 3 ปีที่แล้ว +2

    Mathologer is reading my mind... During the last video, I had to make a presentation about tilings, now I have an exam about discrete mathematics including these infinite generating functions in 3 days. Coïncidence? I think not!

  • @alvarezjulio3800
    @alvarezjulio3800 3 ปีที่แล้ว

    Amazing video: I really enjoy it. Thank you Mr. Mathologer.

  • @VibratorDefibrilator
    @VibratorDefibrilator 3 ปีที่แล้ว +2

    Aww, this is sweet!... I knew it, that this clever way of dealing with the coin change problem must have been done already!
    I've played with this coin change problem recently, deliberetely not knowing about backtracking approach or dynamic programming - I just wanted to see what can I discover on my own (later on, I found that I did not do anything radically new, but I was pleased anyway). I'd loved, of course, to find some formula for it, but theoretical approach was not my goal back then, I just wanted to make my computer to calculate the damn thing.
    I was not particularly interested in calculating the minimum number of coins (of certain denominations) that add up to a given amount of money, but only in the number of ways such amount of money can be presented. I was also not very keen in writing computer program to do the job, just to make a table, filled with formulae that are calculating everything. The reason for all this is that for many years dealing with various problems I developed for myself a lazy approach to programming - part of the work (a huge chunk of it, if possible) can be done in table forms, another part - with much simpler program, if writing such a program is inevitable, otherwise custom functions are good enough in many cases (I mean, in Excel spreadsheets). So, practising such "programming" style helped me to learn how to compartmentalise any heuristic problem in smaller, more "edible" problems.
    Firstly, I made a counter that gives me the answer, just for verifying the results (for relatively small amount of money, of course; for bigger ones it has to count for hours). Easy-peasy.
    The analysis of the problem resulted in following table:
    1. The number of columns = the number of 'n' distinct positive integer values (whole numbers), arranged in increasing order as c(1) through c(n); oddly, the results do appear in the leftmost column, associated with the smaller coin in the set, c(1).
    The set of coins may be whichever one wants {1; 2; 5; 10; 20; 50; 100;...}, {1; 2; 5; 10; 25; 50; 100;...}, or some exotic: {3; 7; 12; 19}, {1; 2; 3; 5; 7; 11; 13; 17; 19;...}. One even can play dumb and use a set as {6; 9; 18; 30}, but the table will give back zeroes for all odd and not divisible by 3 sums anyway.
    2. The number of rows is not limited above, with increment of 1 cent per row. Naturally, you should have 100 rows if you want to calculate the function for 1 dollar, or 250 rows if the target is 2 dollars and 50 cents.
    3. In every cell [x, y] there is a formula that does one simple thing (for the leftmost column is slightly different) - it calculates the ways 'x' dollars can be presented by coins with nominal value >= c(y): cell[x, y] = sum( cell[x - c(y), j] ) for j = y to n / for 1st column: cell[x, 1] = cell[x-1, 1] + sum( cell[x, j] ) for j = 2 to n.
    This is all, now every row will give you the corresponding number, for example, in the sequence A000008 (it is only for set [1, 2, 5, 10], doesn't include coins of 20, 50, 100 cents). If we use all coins and banknotes up to 20$ , {1; 2; 5; 10; 20; 50; 100; 200; 500; 1000; 2000}, the sum $20,21 will be presented in 30,399,653,516
    ways. Clearly my counter will outlive me here ;-).
    Now on, the hypothetical program is easy to be written and if one looks closer a little bit on the method, will see that this program will have to memorise maximum n*c(n) numbers to do its job (or even less, if you are greedy), for arbitrary large amount of money.
    I was delighted that this problem has such simple practical solution, but thankfully, here I learned about the heavy, theoretical stuff, and they are also so elegant. The practical approach has some similarity with Pascal's triangle, so, no wonder that binomial coefficients do appear here and there.

  • @notabotta3901
    @notabotta3901 3 ปีที่แล้ว

    What a gift! I never expected another video so soon.

    • @Mathologer
      @Mathologer  3 ปีที่แล้ว +2

      Well, this video is a bit shorter than the last couple of videos. That really helps. Sadly semester 1 here in Australia will start at the beginning of March and full-time teaching will again slow me down quite a bit again :(

    • @SaveSoilSaveSoil
      @SaveSoilSaveSoil 3 ปีที่แล้ว

      I always thought Mathologer was in Germany. How surprising!

  • @Conreik
    @Conreik 3 ปีที่แล้ว

    I love this, amazing work !

  • @spiritbears
    @spiritbears 3 ปีที่แล้ว +1

    Hope you will never stop making videos
    :)

  • @Kommandant7
    @Kommandant7 2 ปีที่แล้ว

    "One over x-ey looking, aren't they?" is one of my favorite sentences in the English language; thanks professor!

  • @taibilimunduan
    @taibilimunduan 3 ปีที่แล้ว

    Once you get there, it´s so obvious where all those threes come from!
    (but you have to get there first; thanks for taking us along in this trip)

  • @konstantinkalashnikov8389
    @konstantinkalashnikov8389 3 ปีที่แล้ว

    Hey Burkard, thank you for your amazing videos, now that's my fav Friday night entertainment! Just out of curiosity, what kind of software do you use to make such a beautiful animation (and how much time does it take to prepare a video like this one?) Thanks!

  • @PopeGoliath
    @PopeGoliath 3 ปีที่แล้ว +44

    "Coins will be gone soon!"
    *Laughs in Zinc Lobbyists*

    • @SirDerpinson
      @SirDerpinson 3 ปีที่แล้ว +1

      I sure wouldn't want to live in a world without zinc.

    • @iamdigory
      @iamdigory 3 ปีที่แล้ว

      @@SirDerpinson you wouldn't, but I think that's what you ment

    • @binaryagenda
      @binaryagenda 3 ปีที่แล้ว +1

      @@SirDerpinson Come back zinc, come baaack

    • @isaacnguyen6944
      @isaacnguyen6944 3 ปีที่แล้ว

      @@binaryagenda In french zinc is the name of the bar in a bar

  • @biggie_kellogs7919
    @biggie_kellogs7919 2 ปีที่แล้ว

    fantastic video! this may have given me to tools i needed to solve a math problem i’ve banged my head against for years!

  • @ProfessorBeautiful
    @ProfessorBeautiful 3 ปีที่แล้ว

    Lots of marvelous generating functions-- moment generating function, Laplace transform, Fourier transform, and my personal fave, probability generating function.
    A bunch more that I don't know, I'll bet.

  • @danielauto3767
    @danielauto3767 3 ปีที่แล้ว

    Loved the counterpoint music at the end.

  • @namantenguriya
    @namantenguriya 3 ปีที่แล้ว +1

    Really much entertaining and informative. 🤗🤗🤗

  • @nemecsek69
    @nemecsek69 3 ปีที่แล้ว

    Great explanation! Thank you
    (nice t-shirt, by the way)

  • @Abdul_5L
    @Abdul_5L 3 ปีที่แล้ว +1

    Best thing I watched this week even though it was uploaded 4 mins ago

  • @chiragp2182
    @chiragp2182 3 ปีที่แล้ว

    visualizing combinations in ths way is amazing

  • @OblateBede
    @OblateBede 3 ปีที่แล้ว

    This is ingenious. Thanks for the video.!

  • @arahankumar2293
    @arahankumar2293 3 ปีที่แล้ว

    Love you mathologer
    Please make more videos like this

  • @xCorvus7x
    @xCorvus7x 3 ปีที่แล้ว

    Ron Graham seems to have been a man of many talents.
    Juggling, out of all things...
    reminds me of your video on the mathematics of juggling.

  • @mostly_mental
    @mostly_mental 3 ปีที่แล้ว

    Thanks for putting out such great content. This is way better than my video on generating functions. Do you have any tips for someone with a new math channel looking to improve?

  • @marcozarantonello2180
    @marcozarantonello2180 2 ปีที่แล้ว

    Amazing video as always

  • @jlpsinde
    @jlpsinde 3 ปีที่แล้ว

    You are amazing! Love your videos.

  • @newtonmigosi5277
    @newtonmigosi5277 3 ปีที่แล้ว

    great stuff as always, thumbs up
    first time patreon, seeing my name felt real good
    bit disappointed it was only 30min long rather than full hour

  • @jamaluddin9158
    @jamaluddin9158 3 ปีที่แล้ว

    Yes I very much indeed love algebra autopilot, the music, the pace, the ending...

  • @ignacioperezlarrain4632
    @ignacioperezlarrain4632 8 หลายเดือนก่อน

    Great video! The answer of how many ways of summing any number (equivalent to make change with coins of all numbers) does not come following the same argument/procedure without much troubles?

  • @peterflom6878
    @peterflom6878 3 ปีที่แล้ว

    Wonderful as usual.

  • @Nar235
    @Nar235 3 ปีที่แล้ว

    as always: EXCELLENT

  • @FLScrabbler
    @FLScrabbler 3 ปีที่แล้ว

    Great dedication..! 💙

  • @alanfbelleza1085
    @alanfbelleza1085 3 ปีที่แล้ว

    I am from Brazil and your videos are absolutely amazing

  • @victorpaesplinio2865
    @victorpaesplinio2865 3 ปีที่แล้ว +2

    I like the idea of coins with powers of 2.
    Having coins of 1, 2, 4 and 8 allows us to make charge for all values up to 15.
    It is basically binary numbers.
    If each coin is a bit and you have 4 of those bits (1, 2, 4 and 8) you can make charge for 0 to 15, exactly 2^4=16 different amounts.

  • @rafaelmoreira4189
    @rafaelmoreira4189 3 ปีที่แล้ว +2

    9:33- I don’t know if it is correct but I think we can make all the integers between 1 and 15 (including 1 and 15) only once. I didn’t use the product it’s just the same idea of binary notation.
    If you have infinitely many coins with all the powers of two it is the same idea: all the integers only once.

  • @dcterr1
    @dcterr1 3 ปีที่แล้ว

    Wow, you never stop blowing me away with your videos! I'd offer you a googol dollars for letting me watch it, but I'm afraid I don't have the exact change!

  • @macambrona
    @macambrona 3 ปีที่แล้ว

    Thanks so much for the video!

  • @calebvuli5476
    @calebvuli5476 3 ปีที่แล้ว +1

    Touching dedication to Ron Graham at the end of the video ❤️

  • @mridul2987
    @mridul2987 3 ปีที่แล้ว

    youtube never recommends mathologer.... but, it's a part of youtube we mathologists love.

  • @mgsxx
    @mgsxx 3 ปีที่แล้ว

    This channel is the jewel of youtube

  • @DS-xh9fd
    @DS-xh9fd 3 ปีที่แล้ว +1

    The change-making problem, when dealing with small numbers, is a good introductory problem when learning dynamic programming. You define a two-dimensional array dp[i][j] = (the number of ways to make i cents using only the first j denominations). Then it satisfies the recurrence dp[i][j] = dp[i][j-1] + dp[i-value[j]][j]. A common optimization is to note that each row only depends on the previous row, so it can be implemented using only a one-dimensional array. But you still need an array as big as the total amount you're trying to make. Another approach is to compute column-by-column. In this case you need to keep track of a number of values in each row equal to the corresponding denomination, as sort of a sliding window. The key is to notice that the operation of sliding the window can be expressed as a matrix multiplication. The size of the matrix is equal to the sum of the denominations. The repeated matrix multiplications are just a matrix exponentiation, and there are efficient algorithms for matrix exponentiation that will let you efficiently compute the result even when the total amount is as big as googol.
    For an interesting programming challenge, see how far you can optimize things when the denominations that happen to be relatively prime (yes, I know, a highly impractical money system).

  • @gabrielwu5787
    @gabrielwu5787 3 ปีที่แล้ว

    Awesome video!

  • @vitorluiz7538
    @vitorluiz7538 3 ปีที่แล้ว

    I believe I left a similar comment on the previous video, but the book Analytic Combinatorics covers the topic of this video extensively. It was the main reference of a class I took last year, though the introduction was through Knuth’s Concrete Mathematics.

  • @XiaoyongWu
    @XiaoyongWu 3 ปีที่แล้ว

    As some one familiar in computer science, the 1, 2, 4, 8 question comes easy answer as all the binary representation of numbers from 1 to 15. Using the (1+x), (1+x^2), (1+x^4), (1+x^8), it can be seen by multiplying all with (1-x), we will get (1-x^16), and divide that of (1-x), we will get (1+x+x^2+x^3+...+x^15), aka the same answer. This is such a very interesting connection between polynomials and binary numbers!

  • @accountname1047
    @accountname1047 3 ปีที่แล้ว

    I can get behind the incredible power of generating functions and think this was fantastic. I would love to see the rep theory of Sn get mathologerized soon!

    • @Mathologer
      @Mathologer  3 ปีที่แล้ว +2

      So much amazing stuff to cover but sadly so little time. Anyway, if I keep making these videos for another 30 years I'd say there is hope for the video you have in mind :(

    • @accountname1047
      @accountname1047 3 ปีที่แล้ว

      @@Mathologer I'll still be around then waiting :) love your videos

  • @ArminVollmer
    @ArminVollmer 3 ปีที่แล้ว

    Once again, great work, Mathologer! However, I see a tiny error there in the distribution of terms at 4:22 You would expect the empty set in the "first column" in the cross product, but you made the leading empty terms disappear (except for the very first partial product).
    In Mathematica, by the way, it would look like this: with Distribute[{{}, {1}, {1, 1}, {1, 1, 1}}, {{}, {3}, {3, 3}}, List, List] you get {{},{}},{3}},{{},{3, 3}},{{1},{}},{{1},{3}},{{1},{3,3}},{{1,1},{}},{{1,1},{3}},{{1,1},{3,3}},{{1,1,1},{}},{{1,1,1},{3}},{{1,1,1},{3,3}}}
    Anyway: a very exciting topic! As a chemist, I see great applications there: e.g. if you ask for the possible elementary compositions for a given (exact) molar mass, you can get all conceivable "sum formulas" this way (and with a few chemoinformatics tricks even the valid molecular formulas).
    Looking forward to future videos! Here are a few "wish titles": Polya-enumerations of isomers, automorphism groups of graphs or even solving functional equations.

  • @kkt1986
    @kkt1986 3 ปีที่แล้ว

    "And of course we also get that one way of making zero sense".
    I chuckled a few times throughout the video :)

  • @Simon-ir6mq
    @Simon-ir6mq 3 ปีที่แล้ว +2

    9:49 has the interesting conclusion that 1/(1-x)=sum[x^i,{i,0,Infinity}]=product[(1+x^(2^i)), {i,0,Infinity}] (at least if i didnt do anything wrong). very nice!

    • @Mathologer
      @Mathologer  3 ปีที่แล้ว +2

      Yes, very nice isn't it. Really worth actually expanding a partial product :)

  • @Fun_maths
    @Fun_maths 3 ปีที่แล้ว +8

    Those crazy polynomials are going to hunt me in my dreams

    • @Fun_maths
      @Fun_maths 3 ปีที่แล้ว

      @@masonhunter2748 I would have to factor it in my sleep

  • @iyui
    @iyui 3 ปีที่แล้ว

    Great content 👍

  • @rosinatricanico7729
    @rosinatricanico7729 3 ปีที่แล้ว

    First time I see a Mathologer video where I have already seen everything on the university. Great stuff by the way.
    ...Probably last time as well.

    • @Mathologer
      @Mathologer  3 ปีที่แล้ว +1

      Are you sure you already knew the times table stuff and the explanation for the strings of 3s? I am not aware of this being covered anywhere :)

    • @rosinatricanico7729
      @rosinatricanico7729 3 ปีที่แล้ว +1

      @@Mathologer Hah, you got me there. I should've been more careful while writing!