Library

Video Player is loading.
 
Current Time 0:00
Duration 13:59
Loaded: 0%
 

x1.00


Back

Games & Quizzes

Training Mode - Typing
Fill the gaps to the Lyric - Best method
Training Mode - Picking
Pick the correct word to fill in the gap
Fill In The Blank
Find the missing words in a sentence Requires 5 vocabulary annotations
Vocabulary Match
Match the words to the definitions Requires 10 vocabulary annotations

You may need to watch a part of the video to unlock quizzes

Don't forget to Sign In to save your points

Challenge Accomplished

PERFECT HITS +NaN
HITS +NaN
LONGEST STREAK +NaN
TOTAL +
- //

We couldn't find definitions for the word you were looking for.
Or maybe the current language is not supported

  • 00:04

    Today I want to share with you a neat way to solve the towers of Hanoi puzzle
    Today I want to share with you a neat way to solve the towers of Hanoi puzzle

  • 00:08

    just by counting in a different number system,
    just by counting in a different number system,

  • 00:11

    and surprisingly this stuff relates to finding a curve that fills Sierpinski triangle.
    and surprisingly this stuff relates to finding a curve that fills Sierpinski triangle.

  • 00:16

    I learned about this from a former CS lecturer of mine, his name is Keith Schwarz.
    I learned about this from a former CS lecturer of mine, his name is Keith Schwarz.

  • 00:20

    And I've got to say, this man is one of the best educators that I've ever met.
    And I've got to say, this man is one of the best educators that I've ever met.

  • 00:25

    I actually recorded a bit of the conversation where he showed me this stuff,
    I actually recorded a bit of the conversation where he showed me this stuff,

  • 00:28

    so you guys can hear some of what he described directly.
    so you guys can hear some of what he described directly.

  • 00:31

    It's weird, I'm not normally the sort of person who likes little puzzles and games,
    It's weird, I'm not normally the sort of person who likes little puzzles and games,

  • 00:34

    but I just love looking at the analysis of puzzles and games,
    but I just love looking at the analysis of puzzles and games,

  • 00:37

    and I love just looking at mathematical patterns and (ask): where does that come from?
    and I love just looking at mathematical patterns and (ask): where does that come from?

  • 00:42

    In case you aren't unfamiliar,
    In case you aren't unfamiliar,

  • 00:43

    let's just lay down what the towers of Hanoi puzzle actually is.
    let's just lay down what the towers of Hanoi puzzle actually is.

  • 00:47

    So you have a collection of three pegs, and you have these discs of descending size.
    So you have a collection of three pegs, and you have these discs of descending size.

  • 00:54

    You think of these disks as having a hole in the middle, so that you can fit them onto a peg.
    You think of these disks as having a hole in the middle, so that you can fit them onto a peg.

  • 00:59

    The set I pictured here has five discs, which I'll label 0, 1, 2, 3, 4,
    The set I pictured here has five discs, which I'll label 0, 1, 2, 3, 4,

  • 01:04

    but in principle you could have as many discs as you want.
    but in principle you could have as many discs as you want.

  • 01:07

    So they all start up stacked up from biggest to smallest on one spindle,
    So they all start up stacked up from biggest to smallest on one spindle,

  • 01:11

    and the goal is to move the entire tower from one spindle to another.
    and the goal is to move the entire tower from one spindle to another.

  • 01:16

    The rule is you can only move one disc at a time,
    The rule is you can only move one disc at a time,

  • 01:18

    and you can't move a bigger disc on top of a smaller disk.
    and you can't move a bigger disc on top of a smaller disk.

  • 01:24

    For example, your first movemust involve moving disk 0,
    For example, your first movemust involve moving disk 0,

  • 01:28

    since any other disk has stuff on top of it
    since any other disk has stuff on top of it

  • 01:30

    that needs to get out of the way before it can move.
    that needs to get out of the way before it can move.

  • 01:33

    After that, you can move disc 1,
    After that, you can move disc 1,

  • 01:35

    but it has to go on whatever peg doesn't currently have disk 0,
    but it has to go on whatever peg doesn't currently have disk 0,

  • 01:39

    since otherwise you'll be putting a bigger disk on a smaller one, which isn't allowed.
    since otherwise you'll be putting a bigger disk on a smaller one, which isn't allowed.

  • 01:44

    If you've never seen this before,
    If you've never seen this before,

  • 01:46

    I highly encourage you to pause and pull out some books of varying sizes
    I highly encourage you to pause and pull out some books of varying sizes

  • 01:50

    and try it out for yourself, just kind of get a feel for what the puzzle is:
    and try it out for yourself, just kind of get a feel for what the puzzle is:

  • 01:54

    if it's hard, why it's hard, if it's not, why it's not, that kind of stuff.
    if it's hard, why it's hard, if it's not, why it's not, that kind of stuff.

  • 02:00

    Now, Keith showed me something truly surprising about this puzzle,
    Now, Keith showed me something truly surprising about this puzzle,

  • 02:03

    which is that you can solve it just by counting up in binary
    which is that you can solve it just by counting up in binary

  • 02:07

    and associating the rhythm of that counting with a certain rhythm of disc movements.
    and associating the rhythm of that counting with a certain rhythm of disc movements.

  • 02:12

    For anyone unfamiliar with binary,
    For anyone unfamiliar with binary,

  • 02:14

    I'm going to take a moment to do a quick overview here first.
    I'm going to take a moment to do a quick overview here first.

  • 02:17

    Actually, even if you are familiar with binary,
    Actually, even if you are familiar with binary,

  • 02:19

    I want to explain it with a focus on the rhythm of counting,
    I want to explain it with a focus on the rhythm of counting,

  • 02:22

    which you may or may not have thought about before.
    which you may or may not have thought about before.

  • 02:26

    Any description of binary typically starts off
    Any description of binary typically starts off

  • 02:28

    with an introspection about our usual way to represent numbers -
    with an introspection about our usual way to represent numbers -

  • 02:31

    what we call base-10 - since we use ten separate digits, 0123456789.
    what we call base-10 - since we use ten separate digits, 0123456789.

  • 02:38

    The rhythm of counting begins by walking through all ten of these digits,
    The rhythm of counting begins by walking through all ten of these digits,

  • 02:45

    Then, having run out of new digits, you express the next number, ten, with two digits: 10.
    Then, having run out of new digits, you express the next number, ten, with two digits: 10.

  • 02:52

    You say that one is in the tens place,
    You say that one is in the tens place,

  • 02:54

    since it's meant to encapsulate the group of 10 that you've already counted up to so far,
    since it's meant to encapsulate the group of 10 that you've already counted up to so far,

  • 02:58

    while freeing the ones place to reset to zero.
    while freeing the ones place to reset to zero.

  • 03:02

    The rhythm of counting repeats like this:
    The rhythm of counting repeats like this:

  • 03:04

    counting up nine, rolling over to the tens place,
    counting up nine, rolling over to the tens place,

  • 03:08

    counting up nine more, rolling over to the tens place, etc.
    counting up nine more, rolling over to the tens place, etc.

  • 03:12

    Until after repeating that process nine times,
    Until after repeating that process nine times,

  • 03:15

    you roll over to a hundreds place,
    you roll over to a hundreds place,

  • 03:19

    a digital that keeps track of how many groups of 100 you've hit,
    a digital that keeps track of how many groups of 100 you've hit,

  • 03:23

    freeing up the other two digits to reset to zero.
    freeing up the other two digits to reset to zero.

  • 03:29

    In this way, the rhythm of counting is kind of self-similar:
    In this way, the rhythm of counting is kind of self-similar:

  • 03:33

    even if you zoom out to a larger scale, the process looks like
    even if you zoom out to a larger scale, the process looks like

  • 03:37

    doing something, rolling over, doing that same thing, rolling over,
    doing something, rolling over, doing that same thing, rolling over,

  • 03:41

    and repeat nine times before an even larger roll over.
    and repeat nine times before an even larger roll over.

  • 03:49

    In binary, also known as base-2, you limit yourself to two digits, 0 and 1,
    In binary, also known as base-2, you limit yourself to two digits, 0 and 1,

  • 03:55

    commonly called 'bits', which is short for binary digits.
    commonly called 'bits', which is short for binary digits.

  • 03:59

    The result is that when you're counting, you have to roll over all the time.
    The result is that when you're counting, you have to roll over all the time.

  • 04:03

    After counting 01 you've already run out of bits, so you need to roll over to a two's place,
    After counting 01 you've already run out of bits, so you need to roll over to a two's place,

  • 04:09

    writing '10' and resisting every urge in your base-10-trained brain to read this as ten,
    writing '10' and resisting every urge in your base-10-trained brain to read this as ten,

  • 04:15

    and instead understand it to mean one group of 2 plus 0.
    and instead understand it to mean one group of 2 plus 0.

  • 04:19

    Then, increment up to 11, which represents three,
    Then, increment up to 11, which represents three,

  • 04:23

    and already you have to roll over again,
    and already you have to roll over again,

  • 04:26

    and since there's a one in that two's place, that has to roll over as well,
    and since there's a one in that two's place, that has to roll over as well,

  • 04:30

    giving you 100, which represents one group of four plus 0 groups of two plus 0,
    giving you 100, which represents one group of four plus 0 groups of two plus 0,

  • 04:37

    in the same way that digits in base-10 represent powers of 10,
    in the same way that digits in base-10 represent powers of 10,

  • 04:42

    bits in base-two represent different powers of 2.
    bits in base-two represent different powers of 2.

  • 04:46

    So instead of talking about a ten's place, a hundred's place, a thousand's place, things like that,
    So instead of talking about a ten's place, a hundred's place, a thousand's place, things like that,

  • 04:51

    you talk about a two's place, a four's place and an eight's place.
    you talk about a two's place, a four's place and an eight's place.

  • 04:55

    The rhythm of counting is now a lot faster,
    The rhythm of counting is now a lot faster,

  • 04:58

    but that almost makes it more noticeable:
    but that almost makes it more noticeable:

  • 05:00

    Flip the last, roll over once.
    Flip the last, roll over once.

  • 05:02

    Flip the last, roll over twice.
    Flip the last, roll over twice.

  • 05:04

    Flip the last, roll over once.
    Flip the last, roll over once.

  • 05:06

    Flip the last, roll over three times.
    Flip the last, roll over three times.

  • 05:10

    Again, there's a certain self-similarity to this pattern:
    Again, there's a certain self-similarity to this pattern:

  • 05:13

    at every scale the process is to do something, roll over, then do that same thing again.
    at every scale the process is to do something, roll over, then do that same thing again.

  • 05:22

    At the small-scale, say counting up to three, which is 11 in binary,
    At the small-scale, say counting up to three, which is 11 in binary,

  • 05:26

    this means flip the last bit, roll over to the two's,
    this means flip the last bit, roll over to the two's,

  • 05:30

    then flip the last bit.
    then flip the last bit.

  • 05:33

    At a larger scale, like counting up to fifteen, which is 1111 in binary,
    At a larger scale, like counting up to fifteen, which is 1111 in binary,

  • 05:38

    the process is to let the last three count up to seven,
    the process is to let the last three count up to seven,

  • 05:41

    roll over to the eight's place,
    roll over to the eight's place,

  • 05:43

    then let the last three bits count up again.
    then let the last three bits count up again.

  • 05:46

    Counting up to 255, which is eight successive ones,
    Counting up to 255, which is eight successive ones,

  • 05:51

    this looks like letting the last seven bits count up till they're full,
    this looks like letting the last seven bits count up till they're full,

  • 05:54

    rolling over to the 128's place,
    rolling over to the 128's place,

  • 05:56

    then letting the last seven bits count up again.
    then letting the last seven bits count up again.

  • 06:01

    Alright, so with that mini introduction,
    Alright, so with that mini introduction,

  • 06:03

    the surprising fact that Keith showed me
    the surprising fact that Keith showed me

  • 06:05

    is that we can use this rhythm to solve the towers of Hanoi.
    is that we can use this rhythm to solve the towers of Hanoi.

  • 06:10

    You start by counting from zero.
    You start by counting from zero.

  • 06:12

    Whenever you're only flipping that last bit from a 0 to a 1,
    Whenever you're only flipping that last bit from a 0 to a 1,

  • 06:16

    move disc 0 one peg to the right.
    move disc 0 one peg to the right.

  • 06:22

    If it was already on the rightmost peg, you just loop it back to the first peg.
    If it was already on the rightmost peg, you just loop it back to the first peg.

  • 06:28

    If in your binary counting,
    If in your binary counting,

  • 06:30

    you roll over once to the two's place, meaning you flip the last two bits,
    you roll over once to the two's place, meaning you flip the last two bits,

  • 06:35

    you move disc number 1.
    you move disc number 1.

  • 06:37

    "Where do you move it?" you might ask.
    "Where do you move it?" you might ask.

  • 06:39

    Well, you have no choice.
    Well, you have no choice.

  • 06:40

    You can't put it on top of disk 0 and there's only one other peg,
    You can't put it on top of disk 0 and there's only one other peg,

  • 06:43

    so you move it where you're forced to move it.
    so you move it where you're forced to move it.

  • 06:46

    So after this, counting up to 11, that involves just flipping the last bit,
    So after this, counting up to 11, that involves just flipping the last bit,

  • 06:50

    so you move disk 0 again.
    so you move disk 0 again.

  • 06:52

    Then, when your binary counting rolls over twice to the four's place, move disc number 2,
    Then, when your binary counting rolls over twice to the four's place, move disc number 2,

  • 06:59

    and the pattern continues like this:
    and the pattern continues like this:

  • 07:01

    flip the last, move disk 0, flip the last 2, move disc 1,
    flip the last, move disk 0, flip the last 2, move disc 1,

  • 07:05

    flip the last, move disk 0.
    flip the last, move disk 0.

  • 07:07

    And here we're gonna have to roll over three times to the eight's place,
    And here we're gonna have to roll over three times to the eight's place,

  • 07:11

    and that corresponds to moving disc number 3.
    and that corresponds to moving disc number 3.

  • 07:15

    There's something magical about it,
    There's something magical about it,

  • 07:16

    like when I first saw this, like this can't work.
    like when I first saw this, like this can't work.

  • 07:18

    I don't know how this works, I don't know why this works.
    I don't know how this works, I don't know why this works.

  • 07:21

    Now I know, but it's just magical when you see it
    Now I know, but it's just magical when you see it

  • 07:24

    and I remember putting together animation for this when I was teaching this,
    and I remember putting together animation for this when I was teaching this,

  • 07:28

    and just like... you know, I know how this works, I know all the things in it,
    and just like... you know, I know how this works, I know all the things in it,

  • 07:32

    it's still fun to just sit and just like you know...
    it's still fun to just sit and just like you know...

  • 07:35

    -Watch it play out? -Oh yeah.
    -Watch it play out? -Oh yeah.

  • 07:37

    I mean, it's not even clear at first that this is always going to give legal moves.
    I mean, it's not even clear at first that this is always going to give legal moves.

  • 07:41

    For example, how do you know that every time you're rolling over to the eight's place,
    For example, how do you know that every time you're rolling over to the eight's place,

  • 07:45

    the disc 3 is necessarily going to be freed up to move?
    the disc 3 is necessarily going to be freed up to move?

  • 07:49

    At the same time the solution just immediately raise these questions like:
    At the same time the solution just immediately raise these questions like:

  • 07:53

    where does this come from, why does this work,
    where does this come from, why does this work,

  • 07:55

    and is there a better way of doing this then having to do 2^(n-1) steps?
    and is there a better way of doing this then having to do 2^(n-1) steps?

  • 08:00

    It turns out not only does this solve towers of Hanoi,
    It turns out not only does this solve towers of Hanoi,

  • 08:03

    but it does it in the most efficient way possible.
    but it does it in the most efficient way possible.

  • 08:06

    Understanding why this works and how it works and what the heck is going on
    Understanding why this works and how it works and what the heck is going on

  • 08:10

    comes down to a certain perspective on the puzzle -
    comes down to a certain perspective on the puzzle -

  • 08:12

    what CS folk might call a recursive perspective.
    what CS folk might call a recursive perspective.

  • 08:16

    Disc 3 is thinking, okay 2 1 and 0, you have to get off of me,
    Disc 3 is thinking, okay 2 1 and 0, you have to get off of me,

  • 08:20

    I can't really function under this much weight and pressure.
    I can't really function under this much weight and pressure.

  • 08:24

    And so just from disc 3's perspective,
    And so just from disc 3's perspective,

  • 08:27

    if you want to figure out how is disc 3 going to get over here,
    if you want to figure out how is disc 3 going to get over here,

  • 08:29

    Somehow, I don't care how, disc 2 1 0 have to get to spindle B.
    Somehow, I don't care how, disc 2 1 0 have to get to spindle B.

  • 08:33

    That's the only way they can move,
    That's the only way they can move,

  • 08:36

    If any of these are on top of 3, I can't move it,
    If any of these are on top of 3, I can't move it,

  • 08:38

    any of these are at spindle C, it can't move there.
    any of these are at spindle C, it can't move there.

  • 08:40

    So somehow we have to get 2, 1 and 0 off.
    So somehow we have to get 2, 1 and 0 off.

  • 08:43

    Having done that then we can move disc 3 over there.
    Having done that then we can move disc 3 over there.

  • 08:47

    And then disc 3 says, I'm set,
    And then disc 3 says, I'm set,

  • 08:49

    you never need to move me again,
    you never need to move me again,

  • 08:51

    everyone else just figure out how to get here.
    everyone else just figure out how to get here.

  • 08:53

    And in a sense you now have a smaller version of the same problem:
    And in a sense you now have a smaller version of the same problem:

  • 08:57

    now you've got disc 0, 1 and 2 sitting on spindle B, we gotta get them to C.
    now you've got disc 0, 1 and 2 sitting on spindle B, we gotta get them to C.

  • 09:02

    So the idea is that if I just focus on one disc
    So the idea is that if I just focus on one disc

  • 09:04

    and I think about what I'm going to have to do to get this disc to work,
    and I think about what I'm going to have to do to get this disc to work,

  • 09:07

    I can turn my bigger problem into something slightly smaller.
    I can turn my bigger problem into something slightly smaller.

  • 09:10

    And then how do I solve that?
    And then how do I solve that?

  • 09:11

    Well it's exactly the same thing,
    Well it's exactly the same thing,

  • 09:13

    disc 2 is going to say, disc 1 and disc 0, you need to, you know,
    disc 2 is going to say, disc 1 and disc 0, you need to, you know,

  • 09:16

    it's not you, it's me, I just need some space, get off.
    it's not you, it's me, I just need some space, get off.

  • 09:18

    They need to move somewhere, then disc 2 can move to where it needs to go,
    They need to move somewhere, then disc 2 can move to where it needs to go,

  • 09:22

    then disc 1 and 0 can do this.
    then disc 1 and 0 can do this.

  • 09:25

    But the interesting point is that every single disc pretty much has the exact same strategy:
    But the interesting point is that every single disc pretty much has the exact same strategy:

  • 09:30

    They all say, everybody above me, get off, then i'm going to move,
    They all say, everybody above me, get off, then i'm going to move,

  • 09:34

    ok everyone come back on.
    ok everyone come back on.

  • 09:36

    When you know that insight you can code up something that will solve towers of Hanoi
    When you know that insight you can code up something that will solve towers of Hanoi

  • 09:40

    in I think five or six lines of code,
    in I think five or six lines of code,

  • 09:42

    which probably has the highest ratio of intellectual investment to lines of code ever.
    which probably has the highest ratio of intellectual investment to lines of code ever.

  • 09:50

    And if you think about it for a bit,
    And if you think about it for a bit,

  • 09:52

    it becomes clear that this has to be the most efficient solution.
    it becomes clear that this has to be the most efficient solution.

  • 09:56

    At every step you're only doing what is forced upon you.
    At every step you're only doing what is forced upon you.

  • 09:59

    You have to get discs 0 through 2 off before you can move disc 3,
    You have to get discs 0 through 2 off before you can move disc 3,

  • 10:04

    and you have to move disc three,
    and you have to move disc three,

  • 10:06

    and then you have to move disk 0 through 2 back on to it.
    and then you have to move disk 0 through 2 back on to it.

  • 10:09

    There's just not any room for inefficiency from this perspective.
    There's just not any room for inefficiency from this perspective.

  • 10:15

    So why does counting in binary capture this algorithm?
    So why does counting in binary capture this algorithm?

  • 10:19

    Well what's going on here is that this pattern of solving a subproblem,
    Well what's going on here is that this pattern of solving a subproblem,

  • 10:23

    moving a big disk, then solving a subproblem again,
    moving a big disk, then solving a subproblem again,

  • 10:26

    is perfectly paralleled by the pattern of binary counting:
    is perfectly paralleled by the pattern of binary counting:

  • 10:29

    count up some amount, roll over, count up to that same amount again.
    count up some amount, roll over, count up to that same amount again.

  • 10:35

    And this towers of Hanoi algorithm and binary counting are both self similar processes,
    And this towers of Hanoi algorithm and binary counting are both self similar processes,

  • 10:40

    in the sense that if you zoom out and count up to a larger power of 2,
    in the sense that if you zoom out and count up to a larger power of 2,

  • 10:44

    or solve towers of Hanoi with more discs,
    or solve towers of Hanoi with more discs,

  • 10:46

    they both still have that same structure:
    they both still have that same structure:

  • 10:48

    Subproblem, do a thing, subproblem.
    Subproblem, do a thing, subproblem.

  • 10:52

    For example, at a pretty small scale, solving towers of Hanoi for two discs,
    For example, at a pretty small scale, solving towers of Hanoi for two discs,

  • 10:56

    move disc 0, move disc 1, move disc 0,
    move disc 0, move disc 1, move disc 0,

  • 11:00

    is reflected by counting up to three in binary:
    is reflected by counting up to three in binary:

  • 11:03

    flip the last bit, roll over once, flip the last bit.
    flip the last bit, roll over once, flip the last bit.

  • 11:07

    At a slightly larger scale, solving towers of Hanoi for three discs looks like:
    At a slightly larger scale, solving towers of Hanoi for three discs looks like:

  • 11:12

    doing whatever it takes to solve two discs, move disc number 2,
    doing whatever it takes to solve two discs, move disc number 2,

  • 11:15

    then do whatever it takes to solve two discs again.
    then do whatever it takes to solve two discs again.

  • 11:18

    Analogously counting up to 111 in binary involves counting up to three,
    Analogously counting up to 111 in binary involves counting up to three,

  • 11:24

    rolling over all three bits, then counting up three more.
    rolling over all three bits, then counting up three more.

  • 11:27

    At all scales, both processes have this same breakdown.
    At all scales, both processes have this same breakdown.

  • 11:31

    So in a sense, the reason that this binary solution works,
    So in a sense, the reason that this binary solution works,

  • 11:34

    at least an explanation, I feel like there's no one explanation, but,
    at least an explanation, I feel like there's no one explanation, but,

  • 11:38

    I think the most natural one is that
    I think the most natural one is that

  • 11:40

    the pattern you would use to generate these binary numbers
    the pattern you would use to generate these binary numbers

  • 11:42

    has exactly the same structure as the pattern you would use for towers of Hanoi,
    has exactly the same structure as the pattern you would use for towers of Hanoi,

  • 11:47

    which is why if you look at the bits flipping, you're effectively reversing this process.
    which is why if you look at the bits flipping, you're effectively reversing this process.

  • 11:51

    You're saying what process generated these,
    You're saying what process generated these,

  • 11:54

    like if I were trying to understand how these bits were flipped to give me this thing,
    like if I were trying to understand how these bits were flipped to give me this thing,

  • 12:00

    you're effectively reverse engineering the recursive algorithm for tower of Hanoi,
    you're effectively reverse engineering the recursive algorithm for tower of Hanoi,

  • 12:04

    which is why it works out.
    which is why it works out.

  • 12:07

    That's pretty cool, right?
    That's pretty cool, right?

  • 12:09

    But it actually gets cooler,
    But it actually gets cooler,

  • 12:10

    I haven't even gotten to how this relates to Sierpinski triangle.
    I haven't even gotten to how this relates to Sierpinski triangle.

  • 12:14

    and that's exactly what I'm going to do in the following video, part 2.
    and that's exactly what I'm going to do in the following video, part 2.

  • 12:18

    Many thanks to everybody who is supporting these videos on Patreon.
    Many thanks to everybody who is supporting these videos on Patreon.

  • 12:22

    I just finished the first chapter of Essence of Calculus,
    I just finished the first chapter of Essence of Calculus,

  • 12:25

    and I'm working on the second one right now,
    and I'm working on the second one right now,

  • 12:27

    and Patreon supporters are getting early access to these videos
    and Patreon supporters are getting early access to these videos

  • 12:30

    before I publish the full series in a few months.
    before I publish the full series in a few months.

  • 12:34

    this video and the next one are also supported by Desmos.
    this video and the next one are also supported by Desmos.

All

Binary, Hanoi and Sierpinski, part 1

604,679 views

Video Language:

  • English

Caption Language:

  • English (en)

Accent:

  • English (US)

Speech Time:

82%
  • 11:28 / 13:58

Speech Rate:

  • 204 wpm - Fast

Category:

  • Education

Intro:

Today I want to share with you a neat way to solve the towers of Hanoi puzzle
just by counting in a different number system,. and surprisingly this stuff relates to finding a curve that fills Sierpinski triangle.
I learned about this from a former CS lecturer of mine, his name is Keith Schwarz.
And I've got to say, this man is one of the best educators that I've ever met.
I actually recorded a bit of the conversation where he showed me this stuff,
so you guys can hear some of what he described directly.
It's weird, I'm not normally the sort of person who likes little puzzles and games,
but I just love looking at the analysis of puzzles and games,
and I love just looking at mathematical patterns and (ask): where does that come from?
In case you aren't unfamiliar,. let's just lay down what the towers of Hanoi puzzle actually is.
So you have a collection of three pegs, and you have these discs of descending size.
You think of these disks as having a hole in the middle, so that you can fit them onto a peg.
The set I pictured here has five discs, which I'll label 0, 1, 2, 3, 4,
but in principle you could have as many discs as you want.
So they all start up stacked up from biggest to smallest on one spindle,
and the goal is to move the entire tower from one spindle to another.
The rule is you can only move one disc at a time,. and you can't move a bigger disc on top of a smaller disk.

Video Vocabulary

/rəˈkôrdəd/

adjective verb

set down in writing or some other permanent form for later reference. To put music, sounds onto a device to store it.

/ˈpadərn/

noun other verb

repeated decorative design. Colors or shapes which are repeated on objects. decorate with pattern.

/stakt/

adjective other verb

put or arranged in stack or stacks. To be put on top of others. To arrange cards in a certain order, to cheat.

/ˈnôrməlē/

adverb

In the manner that is usual or ordinary.

/kəˈlekSH(ə)n/

noun

action of collecting.

/ˈkoun(t)iNG/

preposition verb

taking account of when reaching total. To add things together to find the total number.

/(h)wətˈevər/

adjective adverb determiner exclamation pronoun

Referring to any particular kind, type, quantity. at all. Anything or everything needed; no matter what. said as response indicating reluctance to discuss something, often implying indifference. used for emphasis instead of 'what' in questions.

/ˈpik(t)SHər/

adjective verb

Shown or displayed in a photo or painting. represent in picture.

/sərˈprīziNGlē/

adverb

In an unexpected manner; to an unexpected degree.

/ˈspindl/

noun verb

Part of a tool used to wind thread or wool. impale piece of paper on metal spindle for temporary filing purposes.

/ˈfīndiNG/

noun verb

Something you discover or find out; a result. To discover or meet by chance.

/inˈvälv/

verb

To have or be included as a part of something.

/əˈnaləsəs/

noun

Careful study to better understand something.

/ˈlek(t)SHərər/

noun

person who gives lectures.