![Stanford Algorithms](/img/default-banner.jpg)
- 75
- 1 847 141
Stanford Algorithms
Registrace 11. 03. 2016
9 4 Analysis of Contraction Algorithm 30 min
9 4 Analysis of Contraction Algorithm 30 min
zhlédnutí: 13 228
Video
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
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
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
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
6 3 Analysis III Final Calculations Advanced Optional 9min
zhlédnutí 5KPřed 7 lety
6 3 Analysis III Final Calculations Advanced Optional 9min
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
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
10 7 Computing Strong Components The Algorithm 29 min
zhlédnutí 15KPřed 7 lety
10 7 Computing Strong Components The Algorithm 29 min
This is art, Thanks for sharing this <3
who came here from leetcode
worst course Your students are unlucky to have you
perfect!!!
How to solve the program in this
Scary forces of evil 😂
😢😢
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))
So Barack Obama is now a Professor?
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
That grid logic is so good!
man. the transcript of the video was entirely taken from Algorithms Illuminated part 1. even the word "inscrutable" hahahahahah
The power Dr. Roughgarden holds is impeccable, the smirk at the beginning makes me weak
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
THERE ARE 170 videos,not 75...
@@-BarathKumarS that seems incorrect, only 75 videos are in the playlist titled "Algorithms 1"
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!
the books are already translated in Russian by Рафгарден Т
Where can i find the course slides?
It's not that hard to explain it with an example smh
you are seriously the best, THANK YOU :)
Thanks so much
we were going well, until the recursion and the agebra started, I got completely lost in that part.
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)
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?
great content, thanks for this.
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?
excellent! thanks a lot!!
Beautifully explained!
Amazing explanation
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.
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
I'm reading the book and have the same doubt, did you solve it eventually?
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.
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!).
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?
If n = 4 the number of levels j = 0, 1, 2. The maximum level is 2. But log n base 2 + 1 ≠ 2.
You need to count the root level too
Thank you for the excellent series!
Thanks a lot.
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.
Amazing video sir ✌✌
it doesnt work with 2 digits multiple 2 digits, does it?
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.
it doesnt work with 2 digits multiple 2 digits right, does it?
Fantastic
Nice
timmy rg
I need to switch my major to EEE instead of CSE.
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
that can be done as the last step when the final result is returned, becasue square root is one on one and strictly increasing.
for calculating delta, I would just use abs(x1-x2) + abs(y1-y2), we don't need accurate euclidean distance for comparing distances.
Thanks a lot!
I want to know what Strassen was eating 😅
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.
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.
Now we know what is the level of Stanford