Lecture 13: Breadth-First Search (BFS)

แชร์
ฝัง
  • เผยแพร่เมื่อ 23 พ.ย. 2024

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

  • @lifeoftomi_
    @lifeoftomi_ 4 ปีที่แล้ว +336

    You know what I like about the MIT lectures? They tell you the application/use case of what you're being taught. That makes a huge difference for beginners who have no way of visualizing these abstract concepts. Many people who get discouraged with stuff like this aren't able to relate with the content and feel like it's something crazy out there. It's the simple things.

    • @manavarora7644
      @manavarora7644 4 ปีที่แล้ว +13

      I could not agree more with this. The biggest difference that I spotted along the lecture

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

      That's not the case for junior or senior level MIT OCW courses. The same professor teaches an advanced data structures course on TH-cam and those are so academic and abtruse that he doesn't write code and only sometimes gives applications. Like his succinct binary trees data structure video. He gives one use (the Oxford English dictionary), but besides that he just explains its math.

    • @R14-m4z
      @R14-m4z 3 ปีที่แล้ว +6

      The secret is that some of the professors actually don't KNOW why they are teaching what they are teaching. Professors aren't always allowed to just "profess" what they know these days. This is the grand illusion of academia, many who know what's going on, don't teach. Many who teach would simply prefer to waste their time in a laboratory doing research work.

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

      Right you are my friend.

    • @missriri-if9yl
      @missriri-if9yl 10 หลายเดือนก่อน

      u so real

  • @thepeopleofblore
    @thepeopleofblore 8 ปีที่แล้ว +364

    20:57: Representation of graphs
    31:10: BFS

    • @cheemtu2375
      @cheemtu2375 8 ปีที่แล้ว

      thanks man

    • @balkan917
      @balkan917 8 ปีที่แล้ว +43

      why would you wanna skip? this guys chit chat is excellent, I can listen to it all day :)

    • @eric3970
      @eric3970 7 ปีที่แล้ว +11

      it helps me save up some time thx

    • @devinjackson6437
      @devinjackson6437 7 ปีที่แล้ว

      thanks so much

    • @sunelkora9503
      @sunelkora9503 6 ปีที่แล้ว

      BF

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

    00:40 graph search
    02:00 recall graph
    05:20 applications of graph search
    10:30 pocket cube 2x2x2 example
    20:25 graph representations
    20:40 adjacency lists
    26:00 implicit representation of graph
    29:05 space complexity for adj list
    31:05 breadth-first search
    34:05 BFS pseudo-code
    36:58 BFS example
    43:27 shortest path
    48:35 running time of BFS

    • @solwex
      @solwex ปีที่แล้ว

      Hey there! There are some other videos in this course playlist that explain the terms used in this one.
      - represent graph in Python: th-cam.com/video/5JxShDZ_ylo/w-d-xo.html
      - adjacency list in Python: th-cam.com/video/C5SPsY72_CM/w-d-xo.html
      - examples of theta, O, omega: th-cam.com/video/P7frcB_-g4w/w-d-xo.html
      - what is hashing: th-cam.com/video/0M_kIqhwbFo/w-d-xo.html
      - python implementation of iterator: th-cam.com/video/-DwGrJ8JxDc/w-d-xo.html

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

    Can we just take a moment to appreciate how brilliantly the camera work accompanied this already perfect lecture!

  • @jessielucky5530
    @jessielucky5530 6 ปีที่แล้ว +49

    Super genus guy!
    From Wikipedia
    Demaine was born in Halifax, Nova Scotia, to artist sculptor Martin L. Demaine and Judy Anderson. From the age of 7, he was identified as a child prodigy and spent time traveling across North America with his father.[1] He was home-schooled during that time span until entering university at the age of 12.[2][3]
    Demaine completed his bachelor's degree at 14 years old at Dalhousie University in Canada, and completed his PhD at the University of Waterloo by the time he was 20 years old.[4][5]

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

      omg can't believe I graduated from the same university as him.

  • @chanpol321
    @chanpol321 8 ปีที่แล้ว +31

    Breadth-first search (BFS) is an algorithm for traversing or searching tree or graph data structures. It starts at the tree root (or some arbitrary node of a graph, sometimes referred to as a 'search key'[1]) and explores the neighbor nodes first, before moving to the next level neighbors.
    BFS was invented in the late 1950s by E. F. Moore, who used it to find the shortest path out of a maze,[2] and discovered independently by C. Y. Lee as a wire routing algorithm (published 1961).[3][4]

  • @rikampalkar
    @rikampalkar 2 ปีที่แล้ว +6

    One of THE best explanation of BFS, I’ve came across. It’s something about the way he explains. Brilliant.

  • @seansmith1685
    @seansmith1685 8 ปีที่แล้ว +57

    I think Erik's lectures are very good

  • @RobinLinus
    @RobinLinus 9 ปีที่แล้ว +34

    Totally appreciate you mentioning the diameter O(n^2/log n) of n x n x n rubic's cube!!!

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

    His friendly tone makes the revising process so much easier!

  • @NewtonCazzaro
    @NewtonCazzaro 7 ปีที่แล้ว +16

    This is amazing, I am a student of Algorithms at the University of Nevada, Las Vegas. I really appreciate this class, thank you so much for the TH-cam videos MIT!!!!

    • @awful999
      @awful999 7 หลายเดือนก่อน

      damn that’s crazy i’m studying cs there right now, im taking algorithms at the moment

  • @farhan787
    @farhan787 4 ปีที่แล้ว +49

    "There are more configurations in a 7*7*7 cube than the number of particles in the known universe" 27:35
    - Erik Demaine (2011)

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

      So how does anyone solve it?

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

      @@wetbadger2174 by not trying all possible combinations/permutations but trying only the ones that make sense.

  • @sahilvelhal1435
    @sahilvelhal1435 5 ปีที่แล้ว +33

    MIT teachers make student love the subject they teach :)

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

    Much better than the newer version. Glad I come back and watch this.

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

    When I was a kid I used a screw driver to pry the Rubics cube apart and put it back together solved. That's when my parents knew I would be an engineer and not a mathematician.

  • @chanpol321
    @chanpol321 8 ปีที่แล้ว +2

    Time and space complexity[edit]
    The time complexity can be expressed as
    O ( | V | + | E | ) {\displaystyle O(|V|+|E|)}
    ,[5] since every vertex and every edge will be explored in the worst case.
    | V | {\displaystyle |V|}
    is the number of vertices and
    | E | {\displaystyle |E|}
    is the number of edges in the graph. Note that
    O ( | E | ) {\displaystyle O(|E|)}
    may vary between
    O ( 1 ) {\displaystyle O(1)}
    and
    O ( | V | 2 ) {\displaystyle O(|V|^{2})}
    , depending on how sparse the input graph is.
    When the number of vertices in the graph is known ahead of time, and additional data structures are used to determine which vertices have already been added to the queue, the space complexity can be expressed as
    O ( | V | ) {\displaystyle O(|V|)}
    , where
    | V | {\displaystyle |V|}
    is the cardinality of the set of vertices (as said before). If the graph is represented by an adjacency list it occupies
    Θ ( | V | + | E | ) {\displaystyle \Theta (|V|+|E|)}
    [6] space in memory, while an adjacency matrix representation occupies
    Θ ( | V

  • @alexandrugheorghe5610
    @alexandrugheorghe5610 4 ปีที่แล้ว +1

    Don't understand why people complain about the chalk. As he writes down so am I doing in my notebook and I find this to be working very smoothly [especially as I can pause the video and also think for myself and try to prove what he said] - I'm getting most of what he says - less so to get a proof on the spot for n x n x n - but hey, he published a paper with et al. on this subject so :) that's accessible for later.

  • @devyashsanghai585
    @devyashsanghai585 8 ปีที่แล้ว +31

    Love the way he is wearing a t-shirt with 5 vertices and and 5 directed edges. Whcih would require a space complexity of O(10) to be stored.

    • @m.yousafjaved6039
      @m.yousafjaved6039 7 ปีที่แล้ว +1

      undirected ?

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

      It's a reference from a rock paper scissors game from the big bang theory, so it is directed.

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

      So 0(1)

  • @99DaNtEmAN23
    @99DaNtEmAN23 10 ปีที่แล้ว +21

    This guy's lectures really puts the Computer Science lectures at UofT to shame. But then again he is a prodigy, still doesn't justify why we get grad-students as "profs" though. Just my 2 cents

    • @lolpe1000
      @lolpe1000 6 ปีที่แล้ว

      Well in the UoC, our prof doesn't even go into much depth... The guy in this video is amazing.

    • @bharasiva96
      @bharasiva96 6 ปีที่แล้ว +5

      They go "Breadth-First" I suppose.

    • @raymondlion314
      @raymondlion314 5 ปีที่แล้ว

      At UIUC, we were taught such stuff in C++ :(

  • @siddhantjain9596
    @siddhantjain9596 7 ปีที่แล้ว +21

    My god! His t-shirt also has a graph!! Brilliant!

  • @48_subhambanerjee22
    @48_subhambanerjee22 5 หลายเดือนก่อน +1

    Ayo.... ☠️ MIT FOR A REASON... Such in depth lecture 😁

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

    Absolutely must watch, adding where they are used and application gives good perception which otherwise made graph dry subject for me.

  • @IamFilter94
    @IamFilter94 8 ปีที่แล้ว +193

    Scissors cuts Paper
    Paper covers Rock
    Rock crushes Lizard
    Lizard poisons Spock
    Spock smashes Scissors
    Scissors decapitates Lizard
    Lizard eats Paper
    Paper disproves Spock
    Spock vaporizes Rock
    (and as it always has) Rock crushes Scissors

  • @robertalaverdyan3150
    @robertalaverdyan3150 4 ปีที่แล้ว +2

    Wonderful. I wake up watching these lectures and sleep watching them.

  • @andreportaro
    @andreportaro 4 ปีที่แล้ว +2

    42:40 Just want to applaud at an amazing explanation and demo 👏

  • @sujivsontitus5463
    @sujivsontitus5463 10 ปีที่แล้ว +22

    May be the camera person should consider finding a balance between landscape and portrait shooting,
    instead of taking the actions in portrait always. It gets difficult to see the contents in the board with the staff,
    since the focus is set to one "focussed" part of the black board. This is just my thought. btw MIT rocks!

    • @MaicahRu
      @MaicahRu 9 ปีที่แล้ว +2

      Sujivson Titus True, a little frustrating when he's pointing at something but it's off the screen, or you're reading through something but part of it is cut off

  • @panagiotistzakis6799
    @panagiotistzakis6799 ปีที่แล้ว

    Amazing lecture sir and of course your are from MIT because your level of knowledge is very high!!Thanks for your time..

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

    Best lecture on BFS..
    Erik Demaine rockss....

  • @vivekmittal229
    @vivekmittal229 4 ปีที่แล้ว +9

    I really like the sound of the chalk.

  • @janmadle4243
    @janmadle4243 8 ปีที่แล้ว +198

    This lecture was really "Breadth"-takíng :-D ty Erik

  • @shreyakjain9692
    @shreyakjain9692 4 ปีที่แล้ว +1

    Thank you MIT for providing these lectures. These are very helpful.

  • @devmahad
    @devmahad ปีที่แล้ว

    [FOR MY REFERENCE]
    1) Graph Applications
    2) Graph BFS Algo.
    3) Time Complexity

  • @soonshin-sam-kwon
    @soonshin-sam-kwon 2 ปีที่แล้ว +1

    Very clear and intuitive 💎 Thanks for sharing this invaluable resouces! Big shout out to MIT 🔥🎓

  • @hnupadhyaya
    @hnupadhyaya 4 ปีที่แล้ว +1

    Dear all,
    In this lockdown stage in home, please provide game equipments to your children/students to play. If not help them to watch "Math Art Studio" in you tube. They will play with their names and learn different concepts in mathematics.Those who have seen it they have learnt maths and enjoyed its beauty every day.

  • @vedient
    @vedient 5 ปีที่แล้ว +16

    Lectures like this make me feel how lucky MIT students are !!!

    • @hortsss
      @hortsss 4 ปีที่แล้ว +1

      @@SimonWoodburyForget but I think the point is to just give students an introduction of the subject so they can work on real problems

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

      @Simon WoodburyForget Because you are forgetting that Computer Science is a...science. CS is not programming. Programming is monkey work. Algorithms are at the heart of CS. You don't need code because this isn't meant for practical uses. CS is just math for computers.

  • @rollercoasterer
    @rollercoasterer 5 ปีที่แล้ว

    Erik is the best teacher who explains data structure and algorithms so clearly and in a simple way.

  • @rohitsurana9281
    @rohitsurana9281 8 ปีที่แล้ว +16

    Thanks MIT and Eric.Best teaching that too for free.

  • @seansmith1685
    @seansmith1685 8 ปีที่แล้ว +11

    "There are more configurations in this cube than there are particles in the known universe. Yeah. I just calculated that in my head, haha" - Erik

  • @josh54
    @josh54 5 ปีที่แล้ว +22

    Wish my professor wasn't lazy and wrote all the notes on the board like this instructor. I can't keep up with half-assed powerpoints that my professor rushes through

    • @HanifCarroll
      @HanifCarroll 4 ปีที่แล้ว

      I don't know if he gave you guys the powerpoint slides, but if he did, then you wouldn't have to spend time copying them down because you'd know you would get them. That way, you can spend time writing down the things that will be more helpful for you.

    • @David-kx3xf
      @David-kx3xf 3 ปีที่แล้ว

      Mine used wolphram mathematica live, and it was an absolute mess 🤦🏻‍♂️

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

    This is a great lecture. i really appreciate the level of teaching from MIT. This is what makes a good university: its professors.
    even though this video is 7 years old, i cant believe they're using chalk boards at MIT. White boards are so much cleaner and easier to read / write on.

  • @ILikeItPicasso
    @ILikeItPicasso 2 ปีที่แล้ว +1

    Thank YOUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUU, it took me 3 days to understand how to track the path in bfs

  • @RICHUNCLEPENNYBAGS77
    @RICHUNCLEPENNYBAGS77 10 ปีที่แล้ว

    Clear. I read the chapter corresponding to this in the Algorithm Design Manual but I wasn't feeling like it really all came together but this did it for me.

  • @날아뚱
    @날아뚱 3 ปีที่แล้ว

    30:40 BFS
    14:44 bookmark

  • @nbro5529
    @nbro5529 9 ปีที่แล้ว +21

    Erik Demaine - "...but in the textbook, and I guess in the world..." lol

  • @sarpersar8010
    @sarpersar8010 8 ปีที่แล้ว +4

    Thanks to Erik Demaine

  • @sam.kendrick
    @sam.kendrick 7 ปีที่แล้ว +4

    Thank you! Love Erik's lectures!

  • @David-kx3xf
    @David-kx3xf 3 ปีที่แล้ว +3

    There are two ways to study algorithms: the MIT way, or the hard way

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

    this guy is the man. his lectures are awesome.

  • @yl4441
    @yl4441 4 ปีที่แล้ว

    Thank you so much for posting this video!!! Its too hard to find videos explain algorithms clearly and easy to understand.

  • @ReaRalte
    @ReaRalte 10 ปีที่แล้ว +1

    Better than my College's class, thumbs up.

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

    Man I feel smarter just by sitting here even though I have no clue what happened in those 50 minutes.

  • @erics.4113
    @erics.4113 3 ปีที่แล้ว +1

    This makes me think about the extraordinary gap in intellect between human beings.

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

    I can smell the chalk dust through the video. Takes me back, great stuff.

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

    MIT is amazing for postgrad and PhD work. But really you don’t have to go tho MIT to learn this info. Maybe the junior and senior years are probably where it is differentiated from other universities.

  • @adamvoliva
    @adamvoliva 4 ปีที่แล้ว

    In that code frontier will never be False resulting in an infinite loop. It should be while len(frontier):

  • @rafiaqutab8174
    @rafiaqutab8174 9 ปีที่แล้ว +6

    You are such an amazing teacher! I wish I had you in college

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

      I wish I had u 🥺👉👈

  • @Buutyful
    @Buutyful 8 หลายเดือนก่อน +1

    school is so outdated, 50 mins of chalk work for a 7\10 mins of content

  • @benaya6
    @benaya6 5 ปีที่แล้ว +9

    amazing lecturer. Mr. cameraman, please dring cofee or something and keep up

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

      Cameraman did a good job of knowing when we'd rather look at the board than him walking.

  • @ΓΕΩΡΓΙΟΣ-ΔΑΥΙΔΜΠΟΥΛΑΣ
    @ΓΕΩΡΓΙΟΣ-ΔΑΥΙΔΜΠΟΥΛΑΣ 6 ปีที่แล้ว +1

    At 34:13, if anyone cares to change the subtitles from (INAUDIBLE), what he says sounds like "pseudocode".

    • @mitocw
      @mitocw  6 ปีที่แล้ว +2

      Changed! Thanks for the feedback. :)

  • @andreswang6666
    @andreswang6666 6 ปีที่แล้ว +1

    Just looked up this lecturer in Wikipedia. Holy sh*t he's a genius.

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

    Prof. Demaine is just incredible. Enjoyable lecture, lots of examples and applications. Would love to meet him in person!

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

    Here are points in other videos in this course's playlist that explain terms used in this video:
    - represent graph in Python: watch?v=5JxShDZ_ylo&t=1709s
    - adjacency list in Python: watch?v=C5SPsY72_CM&t=189s
    - examples of theta, O, omega: watch?v=P7frcB_-g4w&t=130
    - what is hashing: watch?v=0M_kIqhwbFo&t=22
    - python implementation of iterator: watch?v=-DwGrJ8JxDc&t=978
    I found this useful. Hope some of you find it useful as well. If you find more terms for which I can add pointers, let me know.
    If a few people think that this is useful, I can add this information for a few more videos. If you are looking for this info in any specific videos, let me know. If I have made these notes for those videos, I will add.
    Cheers!

    • @solwex
      @solwex ปีที่แล้ว

      Very useful. Would be more convenient if the link was properly given.

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

    I like the way he writes.

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

    Love Erik's lecture, but the sound when he scrubs the blackboard...

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

    2*2*2 cube has 8!*3^7 vertices not 8!*3^8

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

    he is a great teacher

  • @ruchirmumbarkar8758
    @ruchirmumbarkar8758 4 ปีที่แล้ว

    Thank you!
    His t-shirt also has graph on it!

  • @akshanshthakur9235
    @akshanshthakur9235 8 ปีที่แล้ว +38

    How can someone dislike this video?

    • @balkan917
      @balkan917 8 ปีที่แล้ว +4

      eksisozlukbirsikibeyenmemetimi

    • @Promixro
      @Promixro 7 ปีที่แล้ว

      Akshansh Thakur Good question

    • @mysteriousbillionaire7349
      @mysteriousbillionaire7349 7 ปีที่แล้ว +26

      by just clicking on the thumbs down button

    • @akshanshthakur9235
      @akshanshthakur9235 7 ปีที่แล้ว

      you made me laugh very hard, good day to you :P

    • @noguide
      @noguide 6 ปีที่แล้ว

      Fat fingers & envy

  • @lifanzhong9782
    @lifanzhong9782 ปีที่แล้ว

    Thanks for the wonderful lectures Erik!

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

    His T-Shirt: Scissors cuts paper, paper covers rock, rock crushes lizard, lizard poisons Spock, Spock smashes scissors, scissors decapitates lizard, lizard eats paper, paper disproves Spock, Spock vaporizes rock, and as it always has, rock crushes scissors.

  • @lcsjr70
    @lcsjr70 5 ปีที่แล้ว +1

    Maybe someone can help me:
    I'm from Brazil and I study CS. I noticed that in Introduction to Algorithms ppl there already knows algorithm analysis, study graphs and this kind of stuff. Here we just learn the basics (we start with C, since the basics of the language till structs and we see a bit of divide and conquer, sorting (qsort, merge, and the n^2 algorithms) and we work with matrix and files (bin and text). Then in the second year we study design and analysis of algorithms, which is when we learn algorithms analysis and paradigms like dynamic programming, divide and conquer (deeply), greedy algorithms and so on. Now I'm in the third year and I'm studying graphs. Id like to know if the students dont get confused by studying these kind of stuff early (and if they actually study it early cuz I don really know if this assignment is a 1st year assignment)

    • @AMoore-qx6vv
      @AMoore-qx6vv 5 ปีที่แล้ว

      Luciano My CS courses are very intense, we start with Intro to Programming (2D,3D arrays, OOP,, Big Oh, Merge Sort, a ton of other fundamentals), Data Structures and Algs include Topological Graphs, Greedy Algs, Heaps, etc. this is done in our first year. We tend to go super fast and learn C for Comp Arc and Systems Ops (the next semester of classes that is usually coupled with Discrete Structures, Multi Calc, and Linear Algebra).They teach us Java in our reg CS classes so they make Comp Arc and Systems Ops very rigorous since we’re beginning C (to appreciate and completely understand memory allocation). So basically if you take 3 cs classes a semester, we’ll take Artificial Intelligence in our second year, that way we can go onto learning machine learning, advanced data structures, and top level engineering classes. Most of us are coupling our CS degree with Math so most likely we do Calc 5, and pure maths by our second year or third year. Anyways, I hope this gave you an insight. It’s hard to measure difficulty with others since this is the pace that I’ve adapted to.

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

      In case someone else sees this and wants to know, according to MITs website on this course MIT 6.006, there are 2 prerequisite classes that must be taken before this one. Introduction to EECS I (6.01) and Mathematics for Computer Science (6.042) this is likely a 2nd year course, tho I’m sure a 1st year could take it their 2nd semester as long as they took or tested out of the prerequisites.

  • @dpydys
    @dpydys 2 ปีที่แล้ว +1

    Thank you for a very clear explanation.

  • @lhc6340
    @lhc6340 4 ปีที่แล้ว +2

    nowadays it goes on slides, missing the old fashion teaching

  • @lancepereira9337
    @lancepereira9337 7 ปีที่แล้ว +2

    Is that the guy from the Nova Origami special that proved you can make and 3 dimensional shape by folding a flat sheet of something?

    • @mitocw
      @mitocw  7 ปีที่แล้ว +4

      Yes, Erik Demaine was in that Nova program on Origami. :)

  • @isbestlizard
    @isbestlizard 4 ปีที่แล้ว

    I've always wanted to know HOW a rubics cube is actually mechanically put together that it allows so much random rotation of everything without breaking or getting gummed up. :O

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

    Why is it n^2 cubies and not n^3? Since 2×2×2 has 8 cubies I think and 3×3×3 has 27

  • @cl3375
    @cl3375 6 ปีที่แล้ว +1

    You deserve a white board set up like that #neverSettle

  • @princebansal7500
    @princebansal7500 ปีที่แล้ว

    The lectures are awesome but the camera work is bad, its much better in the recent MIT Algorithm series, however, I was missing Prof. Domaine for not teaching graphs

  • @jordanholling7054
    @jordanholling7054 10 ปีที่แล้ว

    I'm interested to see whether or not quantum computers will be able to find god's number for larger sized rubik's cubes, or if we will never know them.

  • @solwex
    @solwex ปีที่แล้ว

    Simply evergreen content!!

  • @lockersrandom6161
    @lockersrandom6161 4 ปีที่แล้ว

    Thank You MIT.

  • @niharpatil4046
    @niharpatil4046 7 ปีที่แล้ว +1

    How are there 24 possible symmetries?

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

    There is a undirected graph on his shirt!

  • @TransformationDiares
    @TransformationDiares 8 ปีที่แล้ว +1

    Can any one tell me how he came to conclusion about the total number of moves required to solve a cube of n*n*n ?
    Thanks

    • @3090id
      @3090id 8 ปีที่แล้ว

      +deepthi g In the video, the professor mentioned a paper where its research was publicated, this is the paper : erikdemaine.org/papers/Rubik_ESA2011/paper.pdf

  • @musfiqniazrahman
    @musfiqniazrahman 11 ปีที่แล้ว

    it's, in fact, from 34:14

  • @allene_
    @allene_ 4 ปีที่แล้ว +1

    yay MIT lecture in my room

  • @leonchen4609
    @leonchen4609 4 ปีที่แล้ว

    I think in the python psudo code of 36:05 he means frontier += next ( instead of frontier = next), the data structure needs to be a queue to ensure every node been traversed, what he wrote on the black board produce a unstable state of frontier

    • @adamvoliva
      @adamvoliva 4 ปีที่แล้ว +1

      Also would result in an infinite loop because frontier will always be true, because next is set to an empty list at the beginning of each loop. Should be while len(frontier)

  • @SuperMaDBrothers
    @SuperMaDBrothers ปีที่แล้ว

    wait, I didn't google "how to overcomplicate BFS as much as possible"...

  • @DavidFreeseLee
    @DavidFreeseLee 6 ปีที่แล้ว

    I really thought the example at 42:30 was just a setup for a final frontier joke. I left disappointed, but educated. Alas.

  • @onurduygu3281
    @onurduygu3281 4 ปีที่แล้ว

    Thank you Eric! Eric choupo moting

  • @shashwattyagi1417
    @shashwattyagi1417 4 ปีที่แล้ว

    Time stamp: 32:27

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

    46:17 How do you find the shortest path from "f" to "c"? Though they are connected through an edge but according to this algorithm, parent of "f" is "d" and parent of "d" is "x" and parent of "x" is "s". You cannot reach to "c" from "f".

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

      the path you are talking about is where 's' is the starting point, so it will give the shortest path from 's' to any node in the graph. To compute the shortest path between 'f' and 'c' , you need to set 'f' or 'c' as the starting point...

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

      if f and c are connected some way then, you can get the path from f to c buy back tacking from parnet[c], assuming the verices have some sort of pointer. If they are class type of Node/vertex with parent pointer, it a lot easier to trace.

  • @Ivankarongrafema
    @Ivankarongrafema 10 ปีที่แล้ว

    I think it could be possible to implement multiple graphs even using object-oriented programming. Instead of v.neighbours, this property can be an array, so v.neighbours[0] would be the 1st graph, v.neighbours[1] the second, and so on.. Am i wrong?

    • @alfag4074
      @alfag4074 9 ปีที่แล้ว +4

      No you're not wrong. But it is not practical.
      You will have to remember for each vertex the number of graphs it belongs to. So, if you need to analyse say vertex v and u, you need to make sure that v.neighbours[0] & u.neighbours[0] are refering to the same graph (you need to allign - 'synchronize'- the array indices - which can be a headacke )

  • @SaiVineet
    @SaiVineet 10 ปีที่แล้ว +4

    This guy is so cool!

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

    great lectures, thank you for uploading this

  • @9033664044
    @9033664044 7 ปีที่แล้ว

    Can Someone explain how the number of possible states is derived for 2*2*2 cube?

  • @manas_singh
    @manas_singh 5 ปีที่แล้ว +1

    It must be 8! * 3^7 and not 3^8 because the positions are relative to a single cubelet.

  • @Zero-bl6ym
    @Zero-bl6ym 8 ปีที่แล้ว +1

    Eric is great!

  • @bhaveshgupta3846
    @bhaveshgupta3846 11 ปีที่แล้ว

    what if i want to know all the shortest paths to a node in the example that is there in this lecture! for example there might my exponentially many ways to get to node f from s. and there might be many shortest paths.But BFS gives us only one! i want to know the no. of all the shortest paths between two nodes s and f. How can I achieve this?

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

    40:35 minutes the example of the implementation