Maths Puzzle: The self descriptive number solution

Поделиться
HTML-код
  • Опубликовано: 3 окт 2024
  • Solution to the self descriptive number puzzle • Maths Puzzle: The self...
    Here is the original version of the proof presented in the video singingbanana.c...
    [I've added some notes to the proof I presented in the video below]
    Thanks to kshitij Ranganekar for the suggestion.
    Katie Steckles: / st3cks
    Matt Parker: / standupmaths
    That puzzle again:
    I have a ten digit number. The first digit tells me how many zeros are in the number. The second digit tells me how many ones are in the number. The third digit tells me how many twos are in the number, and so on until the tenth digit which tells me how many nines are in the number. What is my number?
    Proof:
    We have an n-digit number a_0a_1a_2....a_n-1, where a_i is the tally of the value i in the number. Also note the sum of the a_i will be n.
    a_0 is greater than 0. It cannot equal 0 without being a contradiction.
    Let the rest contain p non-zero values
    So the tally of non-zero values is a_1 + a_2 + a_3 + ... + a_n-1
    We have also said we have p+1 non-zero values.
    So a_1 + a_2 + a_3 + ... + a_n-1 = p+1
    In other words, we have p non-zero values summing to p. This means most of the digits are 1, 0 and a 2. Except for a_0.
    If a_0 is greater than 2, write j for a_0. Put 1 for a_j, which forces a_1=2 and a_2=1. Put in j zeros to make a j+4 digit number which had a sum of values which is also j+4. So we are done. No other values can be added without breaking it.
    In other words, these are numbers of the form j2100....1000
    So we have;
    3211000
    42101000
    521001000
    6210001000
    72100001000
    821000001000
    9210000001000
    If a_0 less than or equal to 2 then the length of the number will be short. This is because the sum of a_i is equal to n, and all values are less than 2 - meaning a_3, a_4, a_5 etc equal 0.
    This gives the sporadic cases:
    1210
    2020
    21200
    That is a complete list of all self-describing numbers in base ten.

Комментарии • 537

  • @Seth_M-T
    @Seth_M-T 8 лет назад +241

    I half expected Brady to pop up at the last second!

    • @Shepherdshekler
      @Shepherdshekler 8 лет назад +65

      Brady is discarded because they did not use brown paper

    • @KasabianFan44
      @KasabianFan44 8 лет назад +13

      I was half-expecting Tom Scott to pop up :D

    • @KasabianFan44
      @KasabianFan44 8 лет назад +1

      ***** I know but still :D

    • @SomeRandomFellow
      @SomeRandomFellow 8 лет назад +14

      that would be a parker square of a cast

  • @22NightWing
    @22NightWing 8 лет назад +127

    The BBC should just employ these three to have a mathematical TV sitcom.
    I would watch that every day!

    • @SamiSioux
      @SamiSioux 8 лет назад +2

      BBC and BBC america ! cuz I want to watch tooooooo lol it would be my new favorite show.

    • @IamGrimalkin
      @IamGrimalkin 8 лет назад +4

      It could be the new new top gear. I think it would be better than what Chris Evans can come up with.

    • @hanniffydinn6019
      @hanniffydinn6019 8 лет назад

      Dave or ch4 already have a maths show, with that comedian Dan o Bara I think. It's very good.

    • @joshuahadams
      @joshuahadams 8 лет назад +1

      I've seen Matt on "Outrageous Acts of Science", I think.

    • @adheesh2secondsago630
      @adheesh2secondsago630 2 года назад +1

      They can have there own channels ;)

  • @TheDraftsDrawer
    @TheDraftsDrawer 8 лет назад +153

    look James, I've got to be honest, Numberphile just isn't the same without you... I mean, when I first started to watch that channel it was all about you (and Matt, and that Italian surnamed guy... but mostly you!). the stuff you did back then is what made me fall in love with maths. I've heard you talking about the shows you used to watch as a child, the one's that made maths fun and interesting to you, well I've never seem those shows, haven't got them in my country, all I had was your brilliant Numberphile vids. trying to say you made me love math... if it's sounds like an accusation its probably because it is :D
    at any rate, after videos like this, which was funny and insightful and just so much fun to watch, it reminded me how much I missed you and how big of a part you play in my love of maths.
    just do me a favor, keep up the good work. I mean it, you don't know how much that means to some of us...
    oh, and do more vids with Matt, you guys are great together.
    regards from way here in Israel.

    • @singingbanana
      @singingbanana  8 лет назад +69

      +Adam Srugo Thank you for this kind comment! I will take the blame.

    • @sohamdutta5827
      @sohamdutta5827 8 лет назад +8

      +Adam Srugo I agree with pretty much _everything_ you wrote.

    • @TheDraftsDrawer
      @TheDraftsDrawer 8 лет назад +1

      Soham Dutta tnx lady :)

    • @TheRedstoneTaco
      @TheRedstoneTaco 8 лет назад +2

      God bless Isreal

    • @mchlbk
      @mchlbk 2 года назад

      @@TheRedstoneTaco God is busy murdering children with malaria.

  • @eyesofphysics97
    @eyesofphysics97 8 лет назад +115

    I loved the screenshot bits! That was pretty funny

    • @SSGranor
      @SSGranor 8 лет назад +10

      +EyesofPhysics SRG It was beautifully recursive!

    • @kuro13wolf
      @kuro13wolf 8 лет назад +11

      +EyesofPhysics SRG The amazing part is that the screenshot Katie held was taken from the video itself, edited and printed while it was being recorded. Brilliant.

  • @General_Nothing
    @General_Nothing 7 лет назад +40

    "People who just answer 42 to every question. And happened to be right this time." XD

  • @Nixitur
    @Nixitur 8 лет назад +39

    I have to admit that it took me until 9 minutes in to realize that the whole self-referential video screenshot thing fit with the self-referential number.
    Also, James' proof as presented in the video is all well and good, but I still don't quite understand _why_ all self-descriptive numbers have that exact structure.

    • @Huntracony
      @Huntracony 8 лет назад

      Neither did I, so this comment is only here so G+ notifies me when someone explains it.

    • @singingbanana
      @singingbanana  8 лет назад +10

      +Nixitur Write j for a_0 put 1 for a_j, this forces a_1=2 and a_2=1. Put in j zeros to make a j+4 digit number and the sum of the values is also j+4. So we are done. No other values can be added without breaking it. There is (I think less clear) version of the whole proof in the description.

    • @Huntracony
      @Huntracony 8 лет назад

      singingbanana Thank you.

  • @xXsolar99Xx
    @xXsolar99Xx 8 лет назад +13

    The holding up of screenshots is fantastic!

  • @jonathanlandham5342
    @jonathanlandham5342 8 лет назад +3

    James,
    Your posting of this video has brought me back to the time a couple of months ago you had me up half the night trying to generalize(se) the solution to an n-digit number with random tallies (that is, perhaps three digits indicating the number of 7s, none indicating 2s, etc.). So, thanks for that. You've put the n-digit bit to bed far more cleanly than I had, but I've still got no insight into all other (nontrivial) tally configurations. There are too many possibilities for me to get my head around any concrete patterns, and approaching it iteratively has led me into an infinite loop every time.
    So, hopefully it's now bugging you as much as it did me, and we'll have a video by someone much brighter than I explaining the solution in another couple months' time. Seriously though, love the channel; thanks for giving people like me an outlet to stretch their atrophied math(s) muscles, and the younger generation a chance to get interested in a wonderful but traditionally vilified field.

    • @singingbanana
      @singingbanana  8 лет назад

      +Jonathan Landham Ha! I'm glad it got you thinking! And thanks for the kind words.

  • @TheAwarenessNow
    @TheAwarenessNow 8 лет назад +5

    Dear Dr. James. I'm not really good at math but nevertheless I love watching your numberphile videos and I love your enthusiasm about mathematical truths. That enthusiasm shines through in your videos and I think you are a born math teacher. Thank you for making these videos and thank you for trying to educate humanity. I think you and Brady are doing a good job at that!

  • @tymo7777
    @tymo7777 8 лет назад +9

    Loved this group together

  • @Yamahapsr200
    @Yamahapsr200 8 лет назад +93

    3:56 was so gorgeous :'D

    • @missingno9
      @missingno9 8 лет назад +6

      +Yamahapsr200 So was 9:58 XD

    • @rphxx6906
      @rphxx6906 7 лет назад

      Yamahapsr200 WTF are you doing here?

  • @JamieThelin
    @JamieThelin 8 лет назад +10

    1:02 wonderful, I was just waiting for that

    • @JamieThelin
      @JamieThelin 8 лет назад +3

      +A Knife It got better !!

    • @U014B
      @U014B 8 лет назад

      +A Knife She turned it into a newt?

  • @electromika
    @electromika 8 лет назад +6

    A graphing paper and a whiteboard full of calculations popped up in my room through the sheer concentration of intelligence in this video.

  • @oafkad
    @oafkad 8 лет назад +2

    Katie has a youtube channel too?
    Well jeeze...you guys are dangerous. My subscription list is growing!
    Very fun episode. All three of you are super cool folks :).

  • @variancytphul
    @variancytphul 8 лет назад

    I think Matt has a wonderful future as a wall if need be. Great video, really enjoyed the collaboration.

  • @박수연-w1t3l
    @박수연-w1t3l 8 лет назад +10

    ???? You have your own channel?? I only saw you on Numberphile! This is amazing!! :D

  • @Amadman99
    @Amadman99 8 лет назад

    James, I am a 16 year old boy who absolutely loves mathematics, and I would like to thank you very much for all the mathematics, whether I remember it or not, that you have put out on the Internet to find…I absolutely loved everything you did on numberphile, whenever I looked for a video from numberphile, most times I would hope it's by you, because you have a good attitude toward teaching mathematics. Not to exclude Matt from any of this, I enjoy his attitude towards teaching math almost as much as yours. Anyways, I just wanted to thank you for all the math I learned from you, and if you don't post things on numberphile I ask if you could continue posting great math videos on your channel…until a new one comes out I'll likely continue watching all the old videos you and Matt made on numberphile until I have watched every one…so if you want to make an algorithm for how long that would take it would be appreciated. In conclusion, thank you very much for all you've taught me, and I hope

    • @Amadman99
      @Amadman99 8 лет назад

      You continue to teach more interesting things in the future

    • @Amadman99
      @Amadman99 8 лет назад

      Also, I solved this problem in around 3-4 mins using deductive reasoning…first thing I did was made a list of all the possibilities for each number, I started with 9, I noticed there could only be 1 or 0 9's in the problem, I noticed the only possible place the 9 could be put is the place tallying 0's, but when put there it caused issues, so 0 9's, I then noticed that that applied with majority of the larger scaled #'s, so instead of going through all of them, I just ruled numbers 6-9 as 0's, then I said their could be 1 5 and so I plugged it in and saw what I got, I got 5?00010000 so I noticed that a number can't be the number it's tallying or it causes a paradox so I needed another 1 somewhere I always noticed I had more 0's than stated, so I noticed by putting another 1 I'd have 2 1's, and therefore 1 2 and 1 less 0 than I counted, so my number would have to be 6210001000

    • @singingbanana
      @singingbanana  8 лет назад

      +AMad Eb Hi! Thank you very much for the kind comment. I'm glad you enjoy the videos. I will be back soon.

  • @wood-eye
    @wood-eye 8 лет назад +4

    I was able to use the fact that Σia_i=Σa_i=10 to prove that a_0>5. Then I proved that the solution was unique, but I had to split into many cases. Namely, I had to prove that a_0 couldn't be 9, 8 or 7. That p+1 insight was really clever. I wish I had noticed that.

    • @singingbanana
      @singingbanana  8 лет назад +6

      To be fair, no one had that insight, including me.

  • @donnydean21
    @donnydean21 8 лет назад +2

    Hey James you came to Gibraltar and to my school and I just wanna say that all my friends and I we just wanna say that you have a lot of energy and enthusiasm!!!

    • @singingbanana
      @singingbanana  8 лет назад

      +PurpleSatanWeed Hey guys! It was nice to meet you!

  • @michaelholland5424
    @michaelholland5424 8 лет назад +2

    James: "I went a little more mathsy"
    Matt: "I see how it is.."

  • @isnerdy
    @isnerdy 8 лет назад

    RUclips just recommended one of your videos tonight, and now I'm hooked. I adore everything I've seen so far, despite your disparaging of Computer Scientists *ahem*.

    • @singingbanana
      @singingbanana  8 лет назад

      +isnerdy Welcome to the rabbit hole. Sorry to computer scientists (not sorry).

  • @alkankondo89
    @alkankondo89 8 лет назад

    Y'all are HILARIOUS! I love the running joke at 0:50, 1:00, and 8:51!

  • @Fiyaaaahh
    @Fiyaaaahh 8 лет назад

    It was a nice touch that you also demonstrated the droste effect. It never hurts to hit two birds with one stone.

  • @Jayder845
    @Jayder845 8 лет назад

    I positively loved this video. Never think that the effort you put into your videos isn't noticed and appreciated!

  • @proyc95
    @proyc95 8 лет назад

    Matt makes a really nice writing board, very stable, also very quiet...

  • @shivtekoriginal
    @shivtekoriginal 7 лет назад

    I'm going to study mathematics at university in september and you two are a massive part of the reason why.

  • @NikolajLepka
    @NikolajLepka 8 лет назад +8

    Brady's channels all-star lineup :D

  • @Kahadi
    @Kahadi 8 лет назад +2

    This makes me think of my favourite math puzzle, a very simple one my dad taught me when I was in grade 7
    The algebraic expression (a-x) (b-x) (c-x) ... (z-x) has one set answer. No matter what any of the variables are defined as, there is only one possible numerical value for the answer. What is the answer, and how does the equation work out?
    Solution for those who can't figure it out, likely due to not trying: 0. Continuing on will eventually give you (x-x), which will always make the final total 0

  • @nemoyatpeace
    @nemoyatpeace 8 лет назад +31

    hmmm, so I didn't post my method before, so I'll post it here:
    I worked this out with my 9 yr old son talking through the possibilities
    Call the digits a0, a1, a2... a9
    I started with a9 and realized that it had to be 0, because if it were a 1, then there must be 9 of some other digit, and that digit would have to be a 1, so then every digit occurs once and we have to many numbers.
    Similarly I realized a8 = 0. I continued this process until I got to a6. With a6 = 1, a1 = 2, a2 = 1, a0 = 6. Done.
    Then I went and looked at what happens if a6=0 and a5=1, because I wasn't satisfied finding one solution, I had to find them all. Quickly realized that a5 wouldn't work.

    • @singingbanana
      @singingbanana  8 лет назад +85

      What really makes me happy is you did it with your son.

    • @michaels4340
      @michaels4340 8 лет назад

      I'm going to try following your logic. I started doing this, but I wasn't very rigorous in my proof. I basically just tried it once, figured out what the major hurdle was, and tried a few ways to fix that. OK, so you know the first digit can't be 0, so for ?????????1 there must be 9 1s, and clearly that means there should be one of almost all other digits.
      Obviously the number of 1s must be 5 or less, or there wouldn't be enough digits. And if you remember the first digit is 0, it must be ≤ 4. So until we get to a4, we can assume the last nonzero digit is the number of 0s.
      8???????10 could have 8 0s, which would be 8000000010. However, that doesn't work because a1 shouldn't be 0 if there's a 1.
      Now for 7??????100, we know the first two digits are non-zero. But it could be 7?00000100. But in that case, a1 is paradoxical.
      Once you get to a6, 6??0001000 can't have ?=1, but ?=2 means the number must be 6210001000...and it works perfectly.
      Now, a5 would pretty much have to be 5???010000. But a1 can't be greater than 1, or a2 and/or a3 would be ≥1, which means there has to be 2 or 3 of something. Not enough digits.
      I guess a4=1 would mean it's not the last nonzero digit.
      I wonder, though, if there might in some variation be a need to worry that the last nonzero digit is a 2 rather than a 1. I guess not, because each of the preceding digits would have to be ≥ 1, and then there are too many digits. But my major concern about this problem has been it seems fairly difficult to show that a1 can't be greater than 2, and that everything else must be less than 2.

    • @GameCarpenter
      @GameCarpenter 7 лет назад

      At the end, it helps to see that there are no solutions where the last 5 digits are 0, because then there are at least 5 0's, which is a contradiction. numbers 5 or higher also can't be 2 or more because then you run out of digits filling them in (each number describes a digit in a 10 digit number, so they sum to 10)

    • @uganasilverhand
      @uganasilverhand 4 года назад

      Proof by contradiction ...

  • @pbp6741
    @pbp6741 8 лет назад

    Love puzzles and loved the quirkiness of this solution video.

  • @tggt00
    @tggt00 8 лет назад +9

    I love how this is actually connected to the last numberphile video, maths are crazy man.

    • @lolatomroflsinnlos
      @lolatomroflsinnlos 8 лет назад +2

      +tggt00 Can I pay two hearts for your profile pic?

    • @outputcoupler7819
      @outputcoupler7819 8 лет назад

      +lolatomroflsinnlos You can, but you won't be able to get into heaven afterward.
      Whatever. That item pool sucks anyway.

    • @Bobobhehe
      @Bobobhehe 8 лет назад

      -_-

  • @mistercorzi
    @mistercorzi 8 лет назад +27

    Another type of "self-descriptive" number:
    21322314
    Explain why!

    • @mistercorzi
      @mistercorzi 8 лет назад +1

      +Benjamin Samra
      How many others can you find? (Note the increasing numerical order rule!)

    • @Reydriel
      @Reydriel 8 лет назад +6

      +mistercorzi
      Split the number in pairs, and in each pair, the first digit tells you how many there are of the second digit number in the overall number :D
      2 "ones", 3 "twos", 2 "threes", and 1 "four" :)

    • @Yamahapsr200
      @Yamahapsr200 8 лет назад

      +mistercorzi something like 2x1, 3x2, 2x3, 1x4?
      I now wonder how these go in other bases :D

    • @bendswny
      @bendswny 8 лет назад +2

      +mistercorzi These are some I found:
      3122331415
      41322324151617
      5132231425161718
      613223141526171819
      22

    • @mistercorzi
      @mistercorzi 8 лет назад +2

      +bendswny You can start with any number eg 5 then start a sequence of descriptions: 15, 1115, 3115, 211315, 31121315, 41122315, 3122131415 etc until you (hopefully) arrive at a self-descriptive number, in this case it ends up with 3122331415 which is the first on your list.

  • @tasherratt
    @tasherratt 8 лет назад +5

    Three of my favourite (living) mathematicians (I don't get out much) in one video.

    • @HM-sc4to
      @HM-sc4to 8 лет назад +1

      tbh same & me neither

  • @U014B
    @U014B 8 лет назад +71

    Dear James,
    I don't have anything witty or clever to say, but I really want you to reply to one of my comments. Is there anything I can do to get your attention?
    Your Faithful Reader,
    Me

    • @singingbanana
      @singingbanana  8 лет назад +225

      No. Nothing.

    • @U014B
      @U014B 8 лет назад +66

      Dang. Well, at least I tried...

    • @michaels4340
      @michaels4340 8 лет назад +7

      +Noel Goetowski It's a shame

    • @U014B
      @U014B 8 лет назад +17

      +Michael S A Gryim shame...

    • @michaels4340
      @michaels4340 8 лет назад +2

      ***** xD Nice pun!

  • @chantelm9255
    @chantelm9255 8 лет назад

    James, I would love to see you do more videos with Matt. I'm subscribed to each of your channels, but there's this wonderful multiplier effect when you're both on screen simultaneously.

  • @vkillion
    @vkillion 8 лет назад

    Before I found the solution by the "guess and fix" method, I also stumbled upon the same oscillating situation. My first attempt was to try a random 10 digit number, apply the "count the digits" functions, then take that new number as my next iteration. The first several "seeds" of this I tried all ended up in that oscillating pattern. I decided that this method wasn't going to work very well, so I tried a more hands on approach.

  • @Zoxesyr
    @Zoxesyr 8 лет назад +1

    I hope they do more videos together. They are adorable

  • @Galakyllz
    @Galakyllz 8 лет назад

    Awesome! It's great to see you all together!
    Also, I'm still wondering how the fact that it would add up to 10 eluded me... I'm blown away by my own ignorance, at this point... Thanks for the video!

  • @Mustardear
    @Mustardear 8 лет назад

    Katie's approach was interesting to me, I'm a big fan of dynamical systems. I guess it's too much to ask for chaos in a finite state space, but perhaps looking at different values of n could lead to different length cycles and other fun stuff. Cool problem, thanks for sharing

  • @morgengabe1
    @morgengabe1 6 лет назад +2

    Lol at Parker pulling the poster down to speak and grime just shoving it back up and over his face immediately
    Was that planned?
    You two could to a sketch comedy for maths and pitch it to the BBC

  • @miurkahidalgo4028
    @miurkahidalgo4028 8 лет назад

    Dr.Grime, please make more videos!I and all of your subs love your content and your math.Also you are amazing

  • @BC1ZM3
    @BC1ZM3 8 лет назад +3

    all bases I could solve up to hexadecimal, it's pretty obvious the pattern:
    2. None
    3. None
    4. 1210
    5. 21200
    6. WIP
    7. 3211000
    8. 42101000
    9. 521001000
    A. 6210001000
    B. 72100001000
    C. 821000001000
    D. 9210000001000
    E. A2100000001000
    F. B21000000001000

  • @htmlguy88
    @htmlguy88 8 лет назад

    one thing I would point out is that programming efficiently means knowing your data for example for finding prime numbers on approach for low numbers is checking remainders when they are divided by primorials if they have a remainder that's not coprime to the primorial they have a common divisor with that primorial and therefore are composite. knowing about this you can make code that makes a primorial then checks the number against it if it fails you can prove the number is composite if it succeeds then you can do other tests on it.

  • @yaneesdobberstein6994
    @yaneesdobberstein6994 8 лет назад

    Our method was similar to Danny Whittaker's (I did this one with my dad).
    We began with 3 ideas.
    ◆ Idea A: the sum of the digits must equal the total number of digits or 10 (as you mentioned).
    ◆ Idea B: there cannot be n n's outside of a place that represents the numbers of n's.
    ◆ Idea C: the value in an n's place (m) plus that value times n (m+nm) is less than or equal to the total number of digits, in this case 10. This can be manipulated to be that the value at an n's place is less than or equal to the total amount of digits divided by n plus one (m ≤ 10/(n+1) ).
    Also we noted that the leading digit could not be zero for two reasons: it would not be a ten digit number and it would cause a contradiction. The reasoning behind Idea B also sparks from a contradiction.
    From these ideas, we proceeded to solve the problem. First, we used Idea C to produce a certain possible range for each digit. If we got some sort of decimal, we would just find the greatest integer less than it. For example, the second to last digit would have to be less than or equal to 1.
    # of _0s_ _1s_ _2s__ _3s_ _4s_ _5s_ _6s_ _7s_ _8s_ _9s_
    ≥1 ≤5 ≤3 ≤2 ≤2 ≤1 ≤1 ≤1 ≤1 ≤1
    We had focused down the problem a little once we had the range for these digits from using Idea C, but we needed a definite answer or answers. So, we went from right to left, checking what the digit could be using the Ideas we had developed and some logic. Incidentally, it was a quick process accelerating to the answer. Once we had found the first 1 in the number, we were practically done.
    To get to the answer was fun but I was kind of sad when I got it. I think that's one of the only times I've ever done any Mathematics with my dad since times tables.

  • @ulilulable
    @ulilulable 8 лет назад

    I also solved it programmatically. I realized that whatever number I started with, I would get a chain of numbers that eventually would either end in a solution or a loop. So I built a small program that checked both for loops and stable solutions for all numbers in range (since I were lazy), and ended up with the same result as in the video.

  • @kwinvdv
    @kwinvdv 8 лет назад +1

    I initial tried the iterative way and ended up at the correct number. From that value I also realized a solution any sequence of more than 6 numbers, namely: {,,,(N-7)*,,,,}. For smaller numbers I did find 21200, 2020 and 1210, but was not certain if there was no solution to the 6 digit number.

    • @ozmick26
      @ozmick26 8 лет назад

      I can't see a solution for 6 digits either. Anyone have an answer?

    • @chrisg3030
      @chrisg3030 8 лет назад

      +Michael Ryan Looks like there's no solution for 6 digits, just as it seems generally accepted there's none for 1, 2, and 3 digits either. James mentioned partitions in his proof, so I'm wondering if the lack of solution for 6 (despite the existence of solutions to smaller numbers 4 and 5) has something to do with 1+2+3 being a partition of 6.

  • @johnboyjjb
    @johnboyjjb 8 лет назад

    Nice to see Matt Parker getting quality face time on a different channel.

  • @TheBigBemaster
    @TheBigBemaster 8 лет назад

    In defence of programming James, for me the fun of programming isn't always the solution in and of itself. But instead, asking the question, can I do better? Like the first time you have to write a program to sort a list, chances are you're going to come up with some brute force makeshift version of a selection sort algorithm that's too inefficient to sort a list larger then 20 numbers. But when you're professor puts the merge sort algorithm on the board for the first time and explains how it works, the fact that it took your crappy O(n^2) algorithm and turned it into a O(nlogn) algorithm with such simplicity and grace really is a thing of beauty.

  • @otakuribo
    @otakuribo 8 лет назад +8

    At 1:00 we are four levels deep...
    At 8:48 Inception occurs.
    *bwwaaaaaahhn

  • @lopyus
    @lopyus 8 лет назад

    Love these puzzle videos! Hope more are coming soon.

  • @o0WillDaBeast0o
    @o0WillDaBeast0o 8 лет назад

    Wow James, you finally found a proper use for Matt!

  • @aeongod
    @aeongod 8 лет назад

    More videos with the Maths Gang please! Loved it!

  • @nytrex2001
    @nytrex2001 8 лет назад

    An exceptionally well scripted, acted and produced video. Well done.

  • @stoneskull
    @stoneskull 7 лет назад

    love you guys.. hope there are many more videos to come

  • @michaelsheffield6852
    @michaelsheffield6852 8 лет назад

    Very enjoyable watching you all work together.

  • @EebstertheGreat
    @EebstertheGreat 8 лет назад +3

    Exhaustive proofs may not be the most elegant or illuminating proofs, but they are surely the most convincing.

    • @IAlreadyHaveAKey
      @IAlreadyHaveAKey 8 лет назад +1

      +EebstertheGreat By "most convincing" you mean "easiest to understand".

    • @tpat90
      @tpat90 8 лет назад

      +EebstertheGreat I honestly prefer 'direct proofs' and 'reductio ad absurdum' since they are mostly more stable.
      Exhaustive proofs for me always feel like a workaround.
      I use them if I have to, but I mostly prefer other ways.
      PS.: Every time I see an exhaustive proof, I am firstly not convinced by it's form and most likely check it myself a bunch of times. So I have to disagree with you, they aren't convincing at all, at least for me.

    • @EebstertheGreat
      @EebstertheGreat 8 лет назад

      I don't understand how an exhaustive proof could fail to convince you. For instance, consider a hypothesis that there are no twin primes between 10^10 and 10^10+100. Now suppose you factor all 49 odd numbers in that range one by one and find no adjacent primes. What could be more convincing than that? No matter what contrived proof you can produce for that fact, it is unlikely to be more persuasive or less subject to error than just checking for yourself.

    • @tpat90
      @tpat90 8 лет назад

      EebstertheGreat I would have to check it.
      That's the point.
      The prove is not convincing, if I have to check everything myself.
      If a prove convinces me, I can assume it has no flaw WITHOUT checking it fully myself.

    • @EebstertheGreat
      @EebstertheGreat 8 лет назад

      How can any proof be more or less convincing than any other if you don't actually check the proof?

  • @sigurjonmyrdal3873
    @sigurjonmyrdal3873 8 лет назад

    Wonderful! I wish I had seen this problem a little sooner. Thanks anyhow!

  • @joebykaeby
    @joebykaeby 7 лет назад

    When that cardboard popped up in front of Matt's face I actually spit out my drink laughing... luckily it didn't damage my keyboard badly enough that I couldn't tell you about it XD

  • @peppybocan
    @peppybocan 8 лет назад

    James in 50 frames of a second (and also in HD)! Whoaaa!

  • @agentdelta569
    @agentdelta569 8 лет назад +2

    i have a math question
    i am currently doing translations and dilatation's of graphs in my math class
    we are turning the formula
    y=a(bx-h)^2+k
    into the form of
    y'=y and x'=x
    i managed too turn these into formula's of
    x'=(x+h)/b
    and
    y'=ay+k
    since i was told
    __________
    y=A | (bx-h)^2 | +k
    ========
    to find y' you replace the box with y and you get y' = ay+k
    HOWEVER
    this doesn't seem too work for all questions SOME questions get incorrect answers and SOME get the correct answer
    works here 2(x-2)^2+3 y'=2y+3 (which is correct according to the book)
    and some don't work (5x-1)^2 +6 where you get y'=y+6 (which is incorrect according to the book) and wanted me to replace the box with y' and then solve for y' which gets you the formula y'=(y-k)/a
    could someone please give a reason that each work in each example?
    or has the book made a mistake that my teacher also coincidentally made
    PS: the book doesn't mention any formulas which makes it seem like they don't want me to create formulas

  • @TheWhitePianoKeyProductions
    @TheWhitePianoKeyProductions 8 лет назад +10

    wow 50 fps, what a fancy camera you must be using.

  • @chraketcm8608
    @chraketcm8608 8 лет назад

    My two favorite mathematicians in one video... love it :)

  • @andrewlouie2
    @andrewlouie2 8 лет назад

    I agree with James that it's much better to understand why than to just use code but I often think that he could have a lot of fun with some future quantum computers that could calculate things like the number of possible chess games

  • @DemolitionTurtle
    @DemolitionTurtle 8 лет назад

    Great video; really interesting, and also very well executed with the 3 of you to make it funny too!
    I had fun solving this one, please keep making more of these puzzle videos! :)
    BTW, I'd recommend putting the channel links in the description too, as some people who watch on mobile/disable annotations might not find them.

  • @factsverse9957
    @factsverse9957 8 лет назад +4

    1:00 Matt, I saw a blooper. This video is 13 minutes 11 seconds. That is 10 minutes 10 seconds.

  • @Emselone
    @Emselone 8 лет назад +12

    there is a zero missing in the 710101000 number, i think it's supposed to be 7101001000

    • @singingbanana
      @singingbanana  8 лет назад +9

      +Emselone Well spotted. There is an annotation on screen to correct that.

  • @prawnrao97
    @prawnrao97 8 лет назад +1

    love these collaboration videos! :D

  • @niwasox3
    @niwasox3 8 лет назад

    It's interesting to see that in your proof, the distribution for pretty much every number gets close to that of Benfords law

  • @miki_cz
    @miki_cz 8 лет назад

    Matts contribution to this videos is amaaazing! :D He's just so funny :D

  • @pegy6384
    @pegy6384 8 лет назад

    Yay! I was wishing that the three of you would make a video when I saw Matt's tweet of you all playing Rythmomachy. What is the new blue gadget next to your watch, Dr. Grime? Calculator, watch, FitBit...?

  • @MichelNabil
    @MichelNabil 8 лет назад +16

    the video that includes all the beautiful people xD

  • @mash8742
    @mash8742 8 лет назад

    This was a great video, more like this with Matt and guests! : D

  • @HerrLavett
    @HerrLavett 8 лет назад

    Entertaining as always. Thank you!

  • @chrisdrew1768
    @chrisdrew1768 8 лет назад +4

    matt makes an amazing whiteboard

  • @benmuskler
    @benmuskler 8 лет назад

    An interesting thing I noticed with 4- and 5-digit self descriptive numbers is that you can obtain them by starting out with an arbitrary 4/5-digit number, then generate a new number by counting the digits of the previous one, and repeat until you have the self descriptive number. Here's an example:
    Start out with 16604:
    16604 (one 0, one 1, zero 2, zero 3, one 4) ->
    11001 (two 0, three 1, zero 2, zero 3, zero 4 ->
    23000 (three 0, zero 1, one 2, one 3, zero 4) ->
    30110 (two 0, two 1, zero 2, one 3, zero 4) ->
    22010 (two 0, one 1, two 2, zero 3, zero 4) ->
    21200 (two 0, one 1, two 2, zero 3, zero 4) ->
    21200 (Same as last number, which means it's self descriptive)
    Why do you think this works for 4- and 5-digit numbers only? Are there more n-digit numbers for which this works?
    I wish I had time to look into all this, but I have a test coming up in a few days :C

  • @chandrachurbanerjee4369
    @chandrachurbanerjee4369 8 лет назад +1

    Actually its IMO Shortlist 2001 C5 - basically find all self-describing numbers.

  • @nerdbot4446
    @nerdbot4446 8 лет назад +24

    My solution was to iterate through the RUclips comments

  • @VibratorDefibrilator
    @VibratorDefibrilator 7 лет назад

    I did it in Excel, I mean I wrote a recursive program that generates all solutions in any base. Besides all the self descriptive numbers and pairs of numbers like that one in the video (7101001000 / 6300000100) there is an exception for base=7 where we have a three amicable numbers: (3300100 / 4110100 / 4102000). All cycles for base7 contain anly 2 numbers, for example in hexadecimal system we have C300000000000100 / D101000000001000. The proof that this is the only case is slightly different than that one in the video, but is sufficient enough.

  • @donaldasayers
    @donaldasayers 6 лет назад +1

    This sentence contains As, Bs, ...... and one Z??? Where is written in words.

  • @moanilsson3448
    @moanilsson3448 5 лет назад

    Now I ship James and Matt. I just can't help it. That hand on shoulder moment made it inevitable.

  • @clover7359
    @clover7359 8 лет назад

    1:01 That was so funny and ridiculous, I love it!

  • @heyandy889
    @heyandy889 8 лет назад

    I found the same pair-loop as Katie. Yay!

  • @DustinRodriguez1_0
    @DustinRodriguez1_0 8 лет назад

    Programming doesn't HAVE to involve brute force! My very first thought was to use a backtracking stack-based algorithm. (I have some generic code where you just give it a start state, a function for enumerating legal next states from a given state, and a function to test whether the state is a 'win' state that comes in handy) Just give Project Euler problems a shot and you're not going to get far at all if brute force is your strategy...

  • @AtakarBaSahlnyonmyy
    @AtakarBaSahlnyonmyy 8 лет назад

    This was one of my favorite videos ever... I want to unsubscribe just so I can subscribe again. But that wouldn't make sense, so I'll just... keep watching!

  • @Razzfazz87
    @Razzfazz87 8 лет назад

    Originally I found the video with the problem while on the loo. I came up with the check sum bit rather quickly and then thought about the methodology of iterating numbers until I got the (or a) result. I looked in the comments, saw the result, checked it with the check sum and then I had to leave to meet a friend and watch Star Wars. On my way I came up with a smarter methodology (I believe it to be smarter), that works for any number of digits from 7 and above (if you change the number system to be more than decimal).
    1. Assume zeros will be most numerous.
    2. Assume there always must be at least one 1 to mark the value of the zeros counter.
    3. Notice that marking a one to count the ones will always elevate that counter to 2.
    4. Put down two 1s and one 2.
    5. Substract 4 (2 + 1 + 1, 2 ones, 1 two, 1 for the value of the zero counter) from the number of digits (e.g. 10)
    6. Put that value in the zero counter and mark the one at the corresponding value.
    Sounds a bit convoluted but I wanted it to be step by step to be easily followed.
    Doesn't work for numbers from 1-6 and the solution for 5 is 21200 which follows the same reasoning with a twist. Was rather difficult for me to keep counting in my head as increasing alcohol levels and nothing to take notes were demanding on my attention span.

    • @Razzfazz87
      @Razzfazz87 8 лет назад

      Okay, now that I saw the video. Whelp, there are solutions for 4 decimals, which I didn't find sitting in the pub.

    • @ZipplyZane
      @ZipplyZane 8 лет назад

      +Razzfazz87 I like it. Sure, it's the iterative version backwards, but it works with different assumptions.

  • @danielleanderson6371
    @danielleanderson6371 8 лет назад +2

    I didn't know Katie had a channel!

  • @marc8561
    @marc8561 8 лет назад

    I was laughting my ass off on Matt holding the paper the whole time XD.

  • @Smileynb
    @Smileynb 8 лет назад

    I solved the original problem by drawing a 10x10 grid, and labelled the rows and columns from 0 to 9. I realised that the digits in the whole number had to add up to 10, so I eliminated every cell where the multiple of row and column came to more than 10 (eg there can't be a 4 in the 3 spot). Then I started at the 9s position (you could only have 0 or 1 - this was also true for all digits down to the 6, and probably 5) and went through what would happen if I put a 1 in that column. It didn't take too long to get down to putting a 1 in the 6 column, and that's where the answer was. I went a bit further to see if there were any other solutions, but quickly came to the realisation that no other solutions were likely, though it got too complicated to actually prove.

  • @matteopascoli
    @matteopascoli 8 лет назад

    Hello, I have found the following number: 156.
    What is interesting ( to me :P ) is that its representation in base 4 is 2130 and its representation in base 5 is 1111. Get it? its base 5 rep describes its base 4 rep! I'm so excited and I'll look for more.

  • @NonTwinBrothers
    @NonTwinBrothers Год назад

    Damn I was just googling the output of a javascript program I was writing and the first video just so happened to be a singingbanana video. I love the internet sometimes

  • @wingszepoon8418
    @wingszepoon8418 8 лет назад

    after all this time, I finally figure out the picture they hold are not real screen captures (i mean not pause the recording and print it out as there are no cut) thanks to whoever mess up the timeline or I'll still be repeating it again and again it still blow my mind though :O

  • @Vulcapyro
    @Vulcapyro 8 лет назад

    I discarded the notion of it being a 10-digit number and solved the more general problem where you have a sequence of length n with the same properties as in the problem, and its domain are the integers {0, 1, 2, ..., n-1}.
    Then I started with an extreme example: What about a sequence of length 100? Clearly most elements/digits would have to be 0, so the first element would be nearly 100. Suppose a_0 = 99, then we just walk through: a_99 = 1 -> a_1 = 1 -> a_1 = 2 -> a_2 = 1, which altogether gets rid of three zeros. In other words, a_0 = 96, a_1 = 2, a_2 = 1, a_96 = 1.
    The final sequence is then generally (n-4)21000...001000. For the case where n=10, we get 6210001000. I did notice the digits added up to n but it ended up not being necessary since iterating through was so simple.

  • @PyroBurnem
    @PyroBurnem 8 лет назад

    i remember whem i was young i came up with this sequence when i was bored:
    1
    11
    21
    1112
    3112
    211213
    312213
    212223
    114213
    31121314
    41122314
    31221324
    21322314
    21322314...
    this fascinated me till no end how 1 became 21322314 because you just repeatedly describe the number in numerical order

  • @Reydriel
    @Reydriel 8 лет назад

    I had figured out 1210 to be another self-describing number as well (through random experimenting), but I didn't know that it wasn't the only "small number" solution :O

  • @jamesmitchell7916
    @jamesmitchell7916 8 лет назад

    I got 62100010000 after a couple of minutes, a really fun ( sometimes frustrating ) challenge. Thanks James 👍🏻

  • @PopeLando
    @PopeLando 8 лет назад

    I forgot about it until just now, so I paused James right at the start and then programmed in in Javascript (using match()). It found the "amicable" solutions they reveal at the end, and I immediately decided 'Aha! So it isn't possible!'). Then I ran the rest of the video and immediately felt a fool.

  • @naota3k
    @naota3k 8 лет назад +4

    Holy crap this video was epic.

  • @sanesanyo
    @sanesanyo 8 лет назад

    Hi James, my solution is slightly different. Assume at first digit (indicating number of zeroes) the value is j and that means at place j we have value 1 but 2nd digit (number of ones) can't be 1, so it means it can be 2, which makes the 3rd digit(number of 2s) equal to 1..therefore our number is j21000..1...00 where j is equal to n-4 (not to forget the position of second 1 is n-3 and n>6). I am writing this in a hurry but I hope you will get where I am coming from. Looking forward to your response.

  • @Richard_is_cool
    @Richard_is_cool 8 лет назад

    loool Matt Parker appears on the scene and in 10 seconds i literally rolled onto my floor laughing....

  • @stefanbontekoe9123
    @stefanbontekoe9123 8 лет назад

    I tried numbering down the possibilities by knowing that a large number at the end wouldn't be possible and a number couldn't be itself, so I just tried out all the possibilities that were left