Lecture 18: Speeding up Dijkstra

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

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

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

    04:27 Dijkstra single-source optimization
    07:18 bi-directional search
    12:25 bi-directional search: termination condition
    15:50 bi-directional search: shortest-path (incorrect)
    17:03 mistake fixed in 20:08
    28:22 bi-directional search: shortest-path example (incorrect)
    41:55 bi-directional search: shortest-path correction
    46:14 goal-directed search
    51:08 landmarks

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

    Prof. Srini Devadas is awesome teacher ..

  • @MrMusicluv69
    @MrMusicluv69 11 ปีที่แล้ว +58

    I think a lot of MIT professors like to write on the board because it's stimulating and helps them come up with new ideas...

    • @fgfanta
      @fgfanta 5 ปีที่แล้ว +20

      It also gives the right pace to the lecture. Teachers who blast through the content like it is the weather forecast abuse of their students, in my opinion.

  • @jacksonlenhartmusic
    @jacksonlenhartmusic 6 ปีที่แล้ว +68

    I dream of a day when I will answer a question and this professor will say "Exactly right."

    • @bro...5849
      @bro...5849 4 ปีที่แล้ว +1

      Has it happened yet?

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

      @@bro...5849 it happened to me multiple times and i seriously get goosebumps

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

      @@neuron8186 Got multiple cushions? xD

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

      maybe a question like what's your name?

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

    I really appreciate his step by step approach to explaining the algorithm.

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

    I can't believe I met this teacher in Cebu Philippines in a student conference organized by Accenture. Wish I had a selfie

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

    I really like this teacher. It's very pleasant to listen to it.

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

    flipping chalk! expert ;) 15:00

  • @Saganist420
    @Saganist420 6 ปีที่แล้ว +35

    18:16 awesome robot dance

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

      xDDDDD

    • @lennyb.9616
      @lennyb.9616 2 ปีที่แล้ว +1

      LMAO

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

      😂🤣🤣

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

    It seems that bi-directional search is very useful in a very large graph and u can employ multiprocessing

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

    28:25 example of bi-directional search termination condition with correctly constructing shortest path

  • @nikitakovalyov5785
    @nikitakovalyov5785 9 ปีที่แล้ว +23

    >Why not use powerpoint presentations?
    The point of University is to teach students on how to think and learn new things by unfolding ideas from minimum information/requirements to complete and correct theorem. The best way to achieve this is to show the thought process behind theorems. If you will show students static pictures there will not be much innovation in the future because the art of deduction would be lost. But they will learn what is already known faster, in this regard you are correct.

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

      +Nikita Kovalyov I think it would be better if they used powerpoint to demonstrate obvious or trivial things and wrote what is necessary or inspiring.

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

      Please don't come to MIT.

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

      When watching someone writes on blackboard in 2017 I feel like watching a caveman writes on a stone wall. This is very outdated and boring.

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

      If you get entertained by powerpoint animations then don't worry about it, you're not going to MIT anyways

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

      Do I need to go to MIT to find a dude writing on blackboard in 2017 boring? MIT coming to me how bout that?

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

    44:40 the professor corrected what he wrote. Actually there was no need for that correction

  • @ODDin17
    @ODDin17 8 ปีที่แล้ว +12

    The statement that naive bi-directional Dijkstra finds the path with the smallest number of edges is incorrect. In his example, if w(s,w) and w(w,t) were both 10 instead of 5, the algorithm would have found the correct path. One can also construct an example where it would find a path that is neither the shortest path in weights nor has the smallest number of edges.

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

      +Michael Pevzner - Agreed. Also , another aspect he did not highlight about the termination condition -
      What if the upper path had a lot more than 4 nodes ( but it was the optimal
      path , maybe you could modify the weights to sum up < 10 ) ?
      How long would you need to wait for the front and the backward frontier
      to meet ?

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

      +Michael Pevzner You are correct. If there is a path from s to t directly in one edge but with extremely high weight and the rest of the edges have low weights, the naive bi-directional Dijkstra will not return that path with only one edge.
      +malharjajoo It was not really examined in the lecture, but I think you can prove the correctness of the termination condition plus frontier check using proof by contradiction. (Assume that you have terminated and there exists a shortest path that cannot be found using the existing frontier, then show that it contradicts the premise that you have terminated.)

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

    My personal goal in life is to go to MIT to get hit in the head with a cushion.

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

    Every mathematician should use a chalkboard. No better medium for brain-storming.

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

    Great lecturer! Clear expositions, witty style.

  • @malharjajoo7393
    @malharjajoo7393 8 ปีที่แล้ว +6

    The bi-drectional djikstra was not clear.
    What if the upper path had more than 4 nodes ( but it was the optimal path , maybe you could modify the weights to sum up < 10 ) ?
    How long would you need to wait for the front and the backward frontier to meet ?

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

      Thinking the same here. I think this is a problem. Maybe we should relax only one vertex for each alternation and every time we relax the first vertex in the min priority queue for the forward/backward direction?

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

      If this is the case, then it is likely that two of the vertices in the upper path would be selected from either of the queues before the bottom vertex is selected. Actually I think it will be guaranteed. Remember, Djikstra is a shortest path algorithm, so it will not leave such a "gap" by selecting the bottom vertex.

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

    Seems that the idea of frontiers meeting at the shortest edges path is incorrect though. If the top edge was off weight 1, they wouldn’t meet on w

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

    21:54 Pib[V2] = t

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

      38:16 df[s] = 10 should be db[s] = 10

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

    Single source, single target; termination failure example is not mentioned when source are target somehow become split into two different sets of nodes: effectively a loss of adjacency, which beaks the path,, thus then when no nodes exists to be pulled for the forward and backward search.. real world problem.

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

    Is Fibonacci heap included in this Lecture ??

    • @arintiwari6419
      @arintiwari6419 5 หลายเดือนก่อน

      There was a small part in the dijkstra lecture but it was only regarding complexity

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

    He talks in statements.

  • @the.rajkumar.sawant
    @the.rajkumar.sawant 3 ปีที่แล้ว

    What thing they give to students for correct answers?

  • @李愚-f7j
    @李愚-f7j 6 ปีที่แล้ว

    thanks this is so clear and patient ..

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

    43:54
    Prof. asks to find an x which has minimum value of Df[x] + Db[x].
    My question is how do we know that there is AN x which has some finite value for both Df[x] and Db[x]?
    For a u in forward frontier (which has a finite Df[u] ), how do we know that Db[u] is not infinity?

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

      If it was infinity the the path won't be detected by the algorithm, so won't be considered

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

      @@khd1451 Thanks

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

    termination condition can be if the priority ques have same frontier

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

      it could be except that it will be overkill, as one vertex will be enough to match in both queues, considering it will be the minimum as we are going greedy.

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

    Was soll jetzt an bidirektionaler Suche schneller sein? Etwa weil man mit 2 Task arbeiten kann?

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

      Man muss sich da weniger nodes betrachten. Stell dir vor, die Knoten sind Kreise auf der Erde, und benachbarte Knoten sind immer ein Meter entfernt. Du rammst einen Pfahl in den Startknoten, und machst einen Seil darum. Jedes Mal wenn du Dijkstra ausführst, ist das so wie als ob du den Seil um 1 Meter verlängerst. Da die Knoten die ein Meter entfernt sind, mehrere Knoten haben können, die 1 Meter entfernt sind, betrachtest du dir jedes Mal exponentiell mehr Knoten. Du hörst auf wenn das Seil den Endknoten berührt.
      Damit du nicht so viele Knoten anschauen musst, machst du das selbe auch beim Endknoten, wobei du bei jedem Schritt von Dijkstra alle Knoten betrachtest die zum Endknoten führen.
      Du hörst auf wenn die Seile sich berühren können. Gegen Ende ist die verwendete Seillänge bei beidem ungefähr gleich, aber die beiden Kreise sind zusammen kleiner als der eine große Kreis den du gemacht hättest wenn du nur beim Startknoten geblieben wärst.
      Translation:
      Question: Why is bidirectional search faster? Because you can do them in parallel?
      Answer: Imagine the start and ending points are the inner point of a circle, and with each application of Dijkstra you increase the radius by 1. With bidirectional search, though the overall length of the radius is probably even longer than had you done one directional search, the area covered is less than had you done one directional search. The area represents the amount of nodes visited that are "nearby". I used some kind of analogy (of ramming stuff into the ground and drawing a circle then) to make it more anecdotal but can't really be bothered for this small recap.

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

      @@zeronothinghere9334 sehr einleuchtende Erklärung!

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

      th-cam.com/play/PLtcAJ_IPSDBafyyyVo_DuNiNSn-KPfS7R.html
      jupp. Vielleicht verdeutlicht die Gegenüberstellung den Vorteil der jeweiligen bidirektionalen Ansätze. Man kann erkennen, dass der zu expandierende Raum kleiner ist, die Lösung somit schneller gefunden wird.
      Translation: I hope this comparison of various uni- and bidirectional algorithms shows the advantage of bidirectional. The searchspace is smaller, therefore the performance is better

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

    Thankyou.

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

    maybe start with an example dose better.

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

    That's my ass over here

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

      😂🤣

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

    Is there anyone ? 🤓 3:38

  • @someone-oj8xx
    @someone-oj8xx 7 ปีที่แล้ว +7

    28:50 lol

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

    24:2

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

    Why not use powerpoint presentations? He can reuse the lecture notes in the next sessions. It's quite a time waster chalking on the board as well. It may significantly reduce the lecture time as well.

    • @dylancutler1978
      @dylancutler1978 6 ปีที่แล้ว +32

      You shouldn't teach STEM from powerpoint, professors tend to go through the material faster than students can absorb the information. Taking the time to write helps slow the professor's rate of going through the info to a rate that someone who does not know it already can learn it.