Stanford Algorithms
Stanford Algorithms
  • 75
  • 1 847 141

Video

10 1 Graph Search Overview 23 min
zhlédnutí 15KPřed 7 lety
10 1 Graph Search Overview 23 min
9 5 Counting Minimum Cuts 7 min
zhlédnutí 9KPřed 7 lety
9 5 Counting Minimum Cuts 7 min
9 2 Graph Representations 14 min
zhlédnutí 19KPřed 7 lety
9 2 Graph Representations 14 min
8 6 Omegan log n Lower Bound for Comparison Based Sorting Advanced Optional 13 min
zhlédnutí 6KPřed 7 lety
8 6 Omegan log n Lower Bound for Comparison Based Sorting Advanced Optional 13 min
9 1 Graphs and Minimum Cuts 16 min
zhlédnutí 35KPřed 7 lety
9 1 Graphs and Minimum Cuts 16 min
8 5 Deterministic Selection Analysis II Advanced Optional 13 min
zhlédnutí 4,6KPřed 7 lety
8 5 Deterministic Selection Analysis II Advanced Optional 13 min
4 6 Proof II 16 min
zhlédnutí 9KPřed 7 lety
4 6 Proof II 16 min
9 3 Random Contraction Algorithm 9 min
zhlédnutí 19KPřed 7 lety
9 3 Random Contraction Algorithm 9 min
4 5 Interpretation of the 3 Cases 11 min
zhlédnutí 10KPřed 7 lety
4 5 Interpretation of the 3 Cases 11 min
8 2 Randomized Selection Analysis 21 min
zhlédnutí 11KPřed 7 lety
8 2 Randomized Selection Analysis 21 min
8 4 Deterministic Selection Analysis I Advanced Optional 22 min
zhlédnutí 6KPřed 7 lety
8 4 Deterministic Selection Analysis I Advanced Optional 22 min
4 4 Proof I 10 min
zhlédnutí 13KPřed 7 lety
4 4 Proof I 10 min
8 1 Randomized Selection Algorithm 22 min
zhlédnutí 33KPřed 7 lety
8 1 Randomized Selection Algorithm 22 min
8 3 Deterministic Selection Algorithm Advanced Optional 17 min
zhlédnutí 14KPřed 7 lety
8 3 Deterministic Selection Algorithm Advanced Optional 17 min
4 3 Examples 13 min
zhlédnutí 16KPřed 7 lety
4 3 Examples 13 min
7 2 Part II Review Optional 17 min
zhlédnutí 5KPřed 7 lety
7 2 Part II Review Optional 17 min
7 1 Part I Review Optional 25 min
zhlédnutí 13KPřed 7 lety
7 1 Part I Review Optional 25 min
4 2 Formal Statement 10 min
zhlédnutí 16KPřed 7 lety
4 2 Formal Statement 10 min
6 3 Analysis III Final Calculations Advanced Optional 9min
zhlédnutí 5KPřed 7 lety
6 3 Analysis III Final Calculations Advanced Optional 9min
4 1 Motivation 8 min
zhlédnutí 19KPřed 7 lety
4 1 Motivation 8 min
3 5 On log n Algorithm for Closest Pair II Advanced Optional 19 min
zhlédnutí 13KPřed 7 lety
3 5 On log n Algorithm for Closest Pair II Advanced Optional 19 min
6 2 Analysis II The Key Insight Advanced Optional 12min
zhlédnutí 6KPřed 7 lety
6 2 Analysis II The Key Insight Advanced Optional 12min
3 4 On log n Algorithm for Closest Pair I Advanced Optional 32 min
zhlédnutí 33KPřed 7 lety
3 4 On log n Algorithm for Closest Pair I Advanced Optional 32 min
6 1 Analysis I A Decomposition Principle Advanced Optional 22 min
zhlédnutí 13KPřed 7 lety
6 1 Analysis I A Decomposition Principle Advanced Optional 22 min
5 4 Choosing a Good Pivot 22min
zhlédnutí 17KPřed 7 lety
5 4 Choosing a Good Pivot 22min
14 2 Hash Tables Implementation Details, Part I 19 min
zhlédnutí 9KPřed 7 lety
14 2 Hash Tables Implementation Details, Part I 19 min
3 3 Strassen 's Subcubic Matrix Multiplication Algorithm 22 min
zhlédnutí 33KPřed 7 lety
3 3 Strassen 's Subcubic Matrix Multiplication Algorithm 22 min
2 2 Big Oh Notation 4 min
zhlédnutí 34KPřed 7 lety
2 2 Big Oh Notation 4 min
10 7 Computing Strong Components The Algorithm 29 min
zhlédnutí 15KPřed 7 lety
10 7 Computing Strong Components The Algorithm 29 min

Komentáře

  • @omartolba1215
    @omartolba1215 Před 7 dny

    This is art, Thanks for sharing this <3

  • @bahabouali6886
    @bahabouali6886 Před 8 dny

    who came here from leetcode

  • @junaidkhankhan4260
    @junaidkhankhan4260 Před 10 dny

    worst course Your students are unlucky to have you

  • @johnmahugu
    @johnmahugu Před 16 dny

    perfect!!!

  • @ShamaMXgRlxYtrG
    @ShamaMXgRlxYtrG Před 19 dny

    How to solve the program in this

  • @Roman-d5l
    @Roman-d5l Před 19 dny

    Scary forces of evil 😂

  • @user-kn1fw3li1d
    @user-kn1fw3li1d Před měsícem

    😢😢

  • @sharpnova2
    @sharpnova2 Před 2 měsíci

    i was screaming in my head how we have four multiplications with 1/4 as many single digit multiplications as x*y so how is it any better.. as soon as you wrote out (a + b) ( c + d) near the end it clicked.... this simple product minus ac and bd gives us our ad + bc... and this is the entire reason why karatsuba hits that juicy O(n^log_2(3))

  • @zenicv
    @zenicv Před 4 měsíci

    So Barack Obama is now a Professor?

  • @ethan8983
    @ethan8983 Před 4 měsíci

    Great lecture thank you :) Don't know why people complain about speed when they can change playback speed. For me, it was too slow and I watched at 1.25x

  • @jaahnavijaanu8797
    @jaahnavijaanu8797 Před 4 měsíci

    That grid logic is so good!

  • @hesamrezamotiei2259
    @hesamrezamotiei2259 Před 5 měsíci

    man. the transcript of the video was entirely taken from Algorithms Illuminated part 1. even the word "inscrutable" hahahahahah

  • @MoTopiwala
    @MoTopiwala Před 5 měsíci

    The power Dr. Roughgarden holds is impeccable, the smirk at the beginning makes me weak

  • @emadjshah
    @emadjshah Před 5 měsíci

    No of videos : 75 Average length of video : 15 minutes, 55 seconds Total length of playlist : 19 hours, 54 minutes, 57 seconds At 1.25x : 15 hours, 55 minutes, 57 seconds At 1.50x : 13 hours, 16 minutes, 38 seconds At 1.75x : 11 hours, 22 minutes, 49 seconds At 2.00x : 9 hours, 57 minutes, 28 seconds

    • @-BarathKumarS
      @-BarathKumarS Před 5 měsíci

      THERE ARE 170 videos,not 75...

    • @emadjshah
      @emadjshah Před 5 měsíci

      @@-BarathKumarS that seems incorrect, only 75 videos are in the playlist titled "Algorithms 1"

  • @study_with_me_live_pomodoro

    Hello! I really like your book and your CZcams content. Thank you! I wanted to ask if I can take your video or text from the video and translate it into Russian. Thanks for reading!

    • @muhammed2174
      @muhammed2174 Před 6 měsíci

      the books are already translated in Russian by Рафгарден Т

  • @achronicstudent
    @achronicstudent Před 6 měsíci

    Where can i find the course slides?

  • @SlimReaper1530
    @SlimReaper1530 Před 7 měsíci

    It's not that hard to explain it with an example smh

  • @SayheeKim
    @SayheeKim Před 7 měsíci

    you are seriously the best, THANK YOU :)

  • @quocanalexdjentertaiment99996

    Thanks so much

  • @codingjhames
    @codingjhames Před 8 měsíci

    we were going well, until the recursion and the agebra started, I got completely lost in that part.

  • @JoeBaloney
    @JoeBaloney Před 9 měsíci

    Taking the base cases into consideration, we can have a max of 3 points on the left and a max of 3 points on the right, so the worst-case scenario for the ClosestSplitPair() function is to loop over 3X3=9 times to find the closest-split pair, which is a different number from the 8-square method. Where is the missing point? (no pun intended)

  • @viharivemuri7202
    @viharivemuri7202 Před 9 měsíci

    Dear professor, at 9:38 in the video you said, "We can construct G_rev,. an obvious optimization is to use the same Graph G but to go upwards in arcs". This is slightly confusing to me, When I represent a graph as an adjacency list, for a given vertex I only have access to vertices that are adjacent to this. How can we go upwards with this representation. When I implement SCC algorithm, I usually read the input edge list and construct both G and G_rev, is there a better way to do this?

  • @JRchchch
    @JRchchch Před 10 měsíci

    great content, thanks for this.

  • @TruthSeeker-vx4mo
    @TruthSeeker-vx4mo Před 10 měsíci

    The lecture videos are excellent professor. Just wanted to know if indeed the probability that zi and zj are compared is exactly 2 / (j - i + 1), "always"? The probability is upper bounded by 2 / (j - i + 1) right? For example consider an array of size k (k > (j - i + 1)), such that it contains all elements from zi to zj, passed recursively into quick sort. The probability that zi and zj would be compared at this stage would be 2/k (< 2/(j - i + 1)) right?

  • @Livy2964
    @Livy2964 Před 11 měsíci

    excellent! thanks a lot!!

  • @m.raflyyanuar9886
    @m.raflyyanuar9886 Před 11 měsíci

    Beautifully explained!

  • @vasudevsarraf7520
    @vasudevsarraf7520 Před rokem

    Amazing explanation

  • @gackerman99
    @gackerman99 Před rokem

    dunno if starting the book with something so frustratingly unintuitive is a great way to make people feel invited into the world of algorithm analysis. i spent most of this chapter feeling stupid.

  • @gackerman99
    @gackerman99 Před rokem

    confused in the book it says each "row" takes 3n operations, not 2n, because it takes "at most 2" additions for each carry. what does that mean? each carry is only ever a single addition. so the video says 2n per row seems right and the book is wrong or am I missing something obvious

    • @user-rk4rl3gd3k
      @user-rk4rl3gd3k Před 3 měsíci

      I'm reading the book and have the same doubt, did you solve it eventually?

    • @darksoul7442
      @darksoul7442 Před 24 dny

      Each row takes 3n operations: The book states that each row takes 3n operations because it considers the possibility of carries propagating during addition. When adding two n-digit numbers, the worst-case scenario involves a carry from each digit addition that could propagate all the way through the number. This carry handling involves additional operations. At most 2 additions for each carry: For each digit, the addition itself is one operation. If there's a carry, handling it might involve another addition. In the worst-case scenario, this carry might propagate to the next digit, which could involve another operation to manage the carry. Detailed Breakdown Single Digit Addition: In a simple addition of two single digits, one operation is performed. Carry Handling: If there is a carry from this addition, an additional operation is required to add the carry to the next digit. Propagation of Carries: If a carry propagates through multiple digits, each step of carry propagation involves additional operations. Calculating Total Operations Worst Case: The worst case for each digit addition might involve: The initial addition operation. Handling a carry. Possibly handling a propagated carry. Thus, for each of the n n digits, in the worst case, you might end up performing up to 3 operations (initial addition, carry handling, and carry propagation). Comparing with the Video 2n Operations: The video suggests 2 n 2n operations per row, likely assuming a more optimistic scenario where not every digit addition results in a carry, or it simplifies the carry handling to a single additional operation per digit. 3n Operations: The book's 3 n 3n operations per row reflect a more detailed accounting, considering the worst-case scenario of carry propagation. Conclusion Both perspectives are valid depending on the assumptions about carry propagation. The book's 3 n 3n operations per row consider the worst-case scenario, making it more conservative. The video's 2 n 2n operations per row might be based on average or simplified assumptions, making it more optimistic. So, you're not missing something obvious. The difference arises from different assumptions about how carries are handled during addition. The book is accounting for a more detailed worst-case scenario, while the video might be presenting a simplified view.

  • @tomfranky1744
    @tomfranky1744 Před rokem

    I first tried his Part 1 (The Basics) book but found it too complicated to figure out algorithms. Then cam here with that hope his videos are better and help me to understand the book better, but now I see he talks as fast as a human being can talk (I don't know why!).

  • @ademabdelmoula8080
    @ademabdelmoula8080 Před rokem

    Great Video ! but upon which criteria is the padding happening in 3:30? Why did we add 4 0's to the first, none to the second and 2 to the last?

  • @Vickeykesty
    @Vickeykesty Před rokem

    If n = 4 the number of levels j = 0, 1, 2. The maximum level is 2. But log n base 2 + 1 ≠ 2.

    • @re1konn
      @re1konn Před 4 měsíci

      You need to count the root level too

  • @asdg2271
    @asdg2271 Před rokem

    Thank you for the excellent series!

  • @ramimamadov9200
    @ramimamadov9200 Před rokem

    Thanks a lot.

  • @ChristineSeeman
    @ChristineSeeman Před rokem

    Just a heads up if anyone else is attempting to find the first video for Chapter 6 - Linear-Time Section for Algorithms Illuminated: Part 1 The Basics, this is the first video for that chapter. I know this video has "8 1" in the title, but this is the same material that is being discussed on page 159, for the 4th Printing, 2021 version of the book.

  • @rasiksawant7491
    @rasiksawant7491 Před rokem

    Amazing video sir ✌✌

  • @finaalfionita8392
    @finaalfionita8392 Před rokem

    it doesnt work with 2 digits multiple 2 digits, does it?

    • @moatef1886
      @moatef1886 Před rokem

      It does. This algorithm is correct; it works for any two integers, it will always output their product. That’s why they teach it in school.

  • @finaalfionita8392
    @finaalfionita8392 Před rokem

    it doesnt work with 2 digits multiple 2 digits right, does it?

  • @fillername4223
    @fillername4223 Před rokem

    Fantastic

  • @deeplearningpartnership

    Nice

  • @EnderKing79minecraft

    timmy rg

  • @letitrotfuckit
    @letitrotfuckit Před rokem

    I need to switch my major to EEE instead of CSE.

  • @CharbelMoutran-fo8br

    very good explanation but the formula: distance = square root((xi-yi)**2 + (xj-yj)**2) is wrong, you should take the square root of the sum of the differences between the x_coordinates and y_coordinates

    • @JRchchch
      @JRchchch Před 10 měsíci

      that can be done as the last step when the final result is returned, becasue square root is one on one and strictly increasing.

    • @JoeBaloney
      @JoeBaloney Před 9 měsíci

      for calculating delta, I would just use abs(x1-x2) + abs(y1-y2), we don't need accurate euclidean distance for comparing distances.

  • @aterribleyoutuber9039

    Thanks a lot!

  • @HHDoes
    @HHDoes Před rokem

    I want to know what Strassen was eating 😅

  • @rfowkes1185
    @rfowkes1185 Před rokem

    Fascinatingly counterintuitive algorithm, but difficult to optimize in reality. Eg. if a,b,c,d are 32-bit integers then (a+b) and (c+d) are 33-bit numbers, and their product is a 66-bit number, requiring extra operations to track, etc.

    • @chrisengland5523
      @chrisengland5523 Před 3 měsíci

      Yes, assuming that a computer has a single precision multiply instruction giving a double precision result, one can split a (software) double precision multiply into 4 single precision ones and do each of them with the hardware instruction. All you need to do then is to add the four results together with appropriate alignment (ie. shifting). So, can you apply Karatsuba's algorithm to reduce the number of multiplications to 3? In theory, yes, but in practice, as you point out the (a+b) and (c+d) parts no longer fit into single precision registers, so the multiply instruction can't be used without a lot of fiddling about. If you're writing it in assembler, it's probably slightly easier than in a high level language, because you've got access to the carry flag from the additions, so it's a case of an extra addition when the carry is 1. Still a nightmare, though. Therefore in practice it's probably easier and quicker just to do the 4 multiplications.

  • @movocode
    @movocode Před rokem

    Now we know what is the level of Stanford