Binary, Hanoi and Sierpinski, part 1

26
3



Binary counting can solve the towers of Hanoi puzzle, and if this isn’t surprising enough, it can lead to a method for finding a curve that fills Sierpinski’s triangle (which I get to in part 2).

Thanks to Desmos for their help in supporting this video. They’re hiring, and anyone interested should check out

Thanks to all Patreon supporters as well, you can support and get early access to future “Essence of” series here:

I also want to give a special shoutout to the following patrons: CrypticSwarm, Ali Yahya, Dave Nicponski, Juan Batiz-Benet, Yu Jun, Othman Alikhan, Markus Persson, Joseph John Cox, Luc Ritchie, Einar Wikheim Johansen, Rish Kundalia, Achille Brighton, Kirk Werklund, Ripta Pasay, Felipe Diniz, Chris, Curtis Mitchell, Ari Royce, Bright , Myles Buckley, Robert P Zuckett, Andy Petsch, Otavio good, Karthik T, Steve Muench, Viesulas Sliupas, Steffen Persch, Brendan Shah, Andrew Mcnab, Matt Parlmer, Naoki Orai, Dan Davison, Jose Oscar Mur-Miranda, Aidan Boneham, Brent Kennedy, Henry Reich, Sean Bibby, Paul Constantine, Justin Clark, Mohannad Elhamod, Denis, Ben Granger, Jeffrey Herman, Jacob Young.

Nguồn: https://benxemientay.com

Xem thêm bài viết khác: https://benxemientay.com/tour-du-lich/

26 comments

  1. Llave de Luna 2 August, 2020 at 01:11 Reply

    Ojalá fuera un vídeo de física para que mi ahora ex novio me hubiese puesto atención 😔😔😔

  2. Pro Odermonicon 2 August, 2020 at 01:11 Reply

    There are 111 types of people in the world, those who understand binary, those who don't, and those who understand unary.

  3. SANKET CHARBHE 2 August, 2020 at 01:11 Reply

    In java: recursively
    Import java.util.Scanner;
    Public class ToH{
    Public static void main (String args[]){
    Scanner s=new Scanner(System.in);
    int disks=s.nextInt();
    int disk
    Char source='A';
    Char auxilary='B';
    Char destination='C';
    towerOfHanoi(disks,source,auxilary,destination);//ofcourse this is method
    }
    Public static void towerOfHanoi(int disks,char source,char auxiliary,char destination){
    if(disks==0){
    Return ;
    }towerOfHanoi(disk-1,source,destination,auxilary);
    System.out.print(source+""+destination);
    towerOfHanoi(disks-1,auxiliary,source,destination);
    }
    }// np

  4. Viki 2 August, 2020 at 01:11 Reply

    Men, that means 64 disks will be solved in 18 446 744 073 709 551 616 moves, phef.. good luck with that 😀

  5. Angel Mendez-Rivera 2 August, 2020 at 01:11 Reply

    a(1) = 1 & a(n) = 2·a(n – 1) + 1 imply a(n) = 2[2·a(n – 2) + 1] + 1 = 2^2·a(n – 2) + 2 + 1 = 2^m·a(n – m) + 2^m – 1 = 2^(n – 1)·a(1) + 2^(n – 1) – 1 = 2^(n – 1) + 2^(n – 1) – 1 = 2^n – 1. Therefore, a(n) = 2^n – 1.

  6. woulg 2 August, 2020 at 01:11 Reply

    you're in contact with desmos! ask them to integrate the triangle thing for log, pow, root in their graphing calculator! that would be a huge step for getting more people to using it (hopefully) – btw i love these videos thank you so much for all of this. i have learned so so so much from you and i really appreciate the way you explain things

  7. metalpachuramon 2 August, 2020 at 01:11 Reply

    I remember when I programmed this for the first time, it was one of my first times programming as well. They never explained us anything about the problem, I got to understand that it was recursive (although I didn't know that term formally), but didn't understand it completely, so I looked up for the flow diagram and implemented it.
    They didn't believe that I solved it, they were right, although an explanation like this could've helped me.

Leave a reply

More