7. Randomization: Skip Lists

  Рет қаралды 88,417

MIT OpenCourseWare

MIT OpenCourseWare

Күн бұрын

Пікірлер: 60
@ruixue6955
@ruixue6955 6 жыл бұрын
0:26 today's lecture is about randomized data structure called skip list 0:36 because it is randomized, we have to do probabilistic analysis 4:01 context of skip list 4:51 you can think of the skip list as beginning with a simple linked list 5:09 first think of it as unsorted 6:00 go ahead to think of it as sorted double-linked list 6:20 you have a pointer to the front of the list 6:25 and it is double linked list 6:27 Q: what is the complexity of search in a sorted double linked list 7:30 sorting does not help with respect to the search 8:10 say we have two sorted linked list 9:30 there is not going to be another element on top of each element 10:21 the other linked list is randomized 10:38 the given example is the subway stops - 7th revenue express line in New York city 12:15 basic notion of skip list 12:53 it is really simple 14:15 expression of the search algorithm 16:00
@ufotofu9
@ufotofu9 4 жыл бұрын
God bless you!
@christianrosado8838
@christianrosado8838 3 жыл бұрын
Not only is he great at teaching, he is also super funny while at it lol Some quality teaching right here!
@주재빈-m2r
@주재빈-m2r 2 жыл бұрын
Comparing skip lists to express lines is amazing.
@Ludiusvox
@Ludiusvox 5 жыл бұрын
Thanks for the lecture. My university has a problem of having very limited curriculum for Upper division courses, and most of the staff is teaching lower division. So once I graduated with my bachelors degree I discovered OCW and I am just going to do independant self study and hopefully I can get some help from my school taking "special topics in computer science", over and over and hopefully I can gain higher proficiency than what is normally available to the University.
@efbdvtfbrt7027
@efbdvtfbrt7027 3 жыл бұрын
What school?
@Ludiusvox
@Ludiusvox 3 жыл бұрын
@@efbdvtfbrt7027 winston Salem state
@neerajvijay9258
@neerajvijay9258 4 жыл бұрын
My professor: skip lists hmmm, I am leaving it , do that in your assignment
@AchyutMujoo
@AchyutMujoo 4 жыл бұрын
skip lists... hmm.. let us just *skip* this.
@alexvilloria26
@alexvilloria26 4 жыл бұрын
Insertion in Skip Lists: 36:13
@darley436
@darley436 5 жыл бұрын
this guy teaches better than all my prof ; wish i was an MIT student !!!
@Ulkesh007
@Ulkesh007 4 жыл бұрын
True man❤️❤️❤️❤️❤️❤️
@shubhamlahoti9758
@shubhamlahoti9758 4 жыл бұрын
you are virtually one now!
@dlaminidlamini7844
@dlaminidlamini7844 Жыл бұрын
no cap
@ruantristancarlinsky3851
@ruantristancarlinsky3851 3 жыл бұрын
Chalk board: Every Brilliant teacher's best friend
@cphoover11
@cphoover11 7 жыл бұрын
dishing out knowledge and frisbees!
@dush
@dush 4 жыл бұрын
How i wish, my college professors were half this good with teaching
@louishector87
@louishector87 6 жыл бұрын
A Skip List needs a reference to 2 nodes, the previous and the next one. This helps positioning which gives the O(log n). Not gonna go deeper because it's based on Linked List and insert(e) function with a height level added to it.
@CodeAndLIfe
@CodeAndLIfe 6 жыл бұрын
Any idea how can I understand how log n is derived?
@cwash08
@cwash08 5 жыл бұрын
@@CodeAndLIfe simple way to think is that skip list structure looks like a binary (search) tree. Another way to think about it is that the number of remaining items to search by when going to other lists to search splits by a constant factor. This constant factor is the base of the log and the log is basically like an inverse of an exponent (repeated multiplication) . Each list we jump to divides the remaining number of inputs to search through. That's how I think of it
@markday3145
@markday3145 2 жыл бұрын
I think of a skip list as a multi-way tree with randomized balance. The skip list is like a tree with forward/backward pointers (to the next/previous node at the same level) that turn each level of the tree into a doubly linked list. For new insertions, you randomly choose a height for the node.
@gouravbansal994
@gouravbansal994 3 жыл бұрын
To reach 66, we will move to 72 and then backwards. That was a nice answer.
@Dante3085
@Dante3085 4 жыл бұрын
12:00 I don't understand why he avoids overshooting here. Since traveling on L1 is faster, going to 72 and then back to 66 should have the minimum amount of nodes, right ?
@patils22
@patils22 4 жыл бұрын
"That will be another algorithm and its analysis will be more painful than the painful analysis which he is already doing for the skip list."
@benisrood
@benisrood 10 ай бұрын
The issue comes down to this: We have a complete and stativ picture of the subway stops for L0 and L1, so we *know* that overshooting and then going one stop back is faster. Your software/algorithm doesn't have this picture. How does a piece of software get that complete picture? The only way it can get it for any given moment in time would be by iterating through the complete list, at all levels. Once you've done that, you've lost all of the performance/optimisation advantages that a skip-list offers over a regular linked-list, in fact it's slightly slower 😂 If computers could have a "bird-eve" view of a data structure, then they could just insert the value at the right place every time in one step. Unfortunately, there is no such magic.
@stevenjohnson9466
@stevenjohnson9466 3 жыл бұрын
every once in a while the chalk makes a screeching noise and it's the most painful sound in the universe like someone dragging their bare nails on the chalk board.
@boomerdev6122
@boomerdev6122 2 жыл бұрын
Where does that constant (2) comes from 22:33 2 Sorted Linked List -> 2 * Sqrt(n). Can anyone please explain
@egemensentin
@egemensentin 2 жыл бұрын
Search cost is already given as |L1| + (|L0|/|L1|). |L1| is found to be sqrt(n). So is |L0|/|L1|, making the sum 2 * sqrt(n).
@danielghenghea7104
@danielghenghea7104 3 ай бұрын
You can bound the cost |L1| + (|L0|/|L1|) = |L1| + n/|L1| by using AM-GM to get 2sqrt(n). For the cases of k lists you can also use AM-GM to minimize the cost.
@glithromal566
@glithromal566 3 жыл бұрын
Skip list is kind of like van Emde Boas Tree, right?
@taylorluttrell-williams6632
@taylorluttrell-williams6632 3 жыл бұрын
great lecture; thanks for sharing!
@黃柏瑋-o5u
@黃柏瑋-o5u 6 жыл бұрын
Great course!
@rustcpp
@rustcpp 2 жыл бұрын
excellent video, thanks
@barile007
@barile007 8 жыл бұрын
7:17 - It's a[i] (a of i, not AFI) - Meaning, the index place in an a array
@BoredChinese
@BoredChinese 7 жыл бұрын
You do realize that that's the way he pronounces 'of'?
@ГарикКубич
@ГарикКубич 4 жыл бұрын
That's great, thank you a lot!
@pradeepbalasundaram
@pradeepbalasundaram 4 жыл бұрын
Frisebee for wrong answer.. where do you teach? .. lol
@fathirendrawan5846
@fathirendrawan5846 2 жыл бұрын
Dude it's MIT, wrong answer is pretty rare there... I think lol
@efbdvtfbrt7027
@efbdvtfbrt7027 3 жыл бұрын
7:11 walk of shame
@hutonm2314
@hutonm2314 2 жыл бұрын
it's good
@0cramoi
@0cramoi 4 жыл бұрын
i said log n i want my frisbee :(
@ARSAGAMING69
@ARSAGAMING69 Жыл бұрын
Same here 😅
@peterpalumbo1963
@peterpalumbo1963 4 жыл бұрын
How bout express to 72nd street then back to 66th street?
@Ulkesh007
@Ulkesh007 4 жыл бұрын
Its Fails!
@Ulkesh007
@Ulkesh007 4 жыл бұрын
Its an Exception case
@andrasviczian9262
@andrasviczian9262 4 жыл бұрын
Thats what one of the students asked, he said we will not deal with going ahead than back, because it would be harder to analyze.
@cacojr5381
@cacojr5381 4 жыл бұрын
the answer that you came up with which precondition is u has scan L0 already
@cr74life96
@cr74life96 7 жыл бұрын
even i want a free frisbee
@rohitsharma-vf2tk
@rohitsharma-vf2tk 4 жыл бұрын
Check out Erik's Video, I liked it better though the video quality is bad, ocw.mit.edu/courses/electrical-engineering-and-computer-science/6-046j-introduction-to-algorithms-sma-5503-fall-2005/video-lectures/lecture-12-skip-lists/
@amirkhan355
@amirkhan355 3 жыл бұрын
The other teacher is a lot better.
@unnatisingh8569
@unnatisingh8569 8 жыл бұрын
The Skip list is not doublylinkedList rather it is a SinglyLikedList, every node has a pointer to the next element not to the previous one.
@madsboyd-madsen3463
@madsboyd-madsen3463 7 жыл бұрын
It's difficult to update a Skiplist efficiently without backpointers
@crazymigdet247
@crazymigdet247 7 жыл бұрын
every node has a pointer to the next element of the same height and the element below it.
@siddheshkandarkar235
@siddheshkandarkar235 6 жыл бұрын
every node is a quadnode in skiplist..correct me if im wrong.
@tratbagd4500
@tratbagd4500 5 жыл бұрын
It has to be a doubly linked list, other wise you would have disconnections between the levels as a node would not be able to be connected to two other nodes; the next one and the one at the level below.
@abhishekshah5961
@abhishekshah5961 5 жыл бұрын
@@siddheshkandarkar235 what is a quad node?
@peterpalumbo1963
@peterpalumbo1963 4 жыл бұрын
How bout express to 72nd street then back to 66th street?
@adityaashutosh9800
@adityaashutosh9800 3 жыл бұрын
Lol wow. That's a modification worth observing.
8. Randomization: Universal & Perfect Hashing
1:21:51
MIT OpenCourseWare
Рет қаралды 90 М.
Skip Lists
15:36
Algorithms Lab
Рет қаралды 42 М.
From Small To Giant 0%🍫 VS 100%🍫 #katebrush #shorts #gummy
00:19
Turn Off the Vacum And Sit Back and Laugh 🤣
00:34
SKITSFUL
Рет қаралды 9 МЛН
I thought one thing and the truth is something else 😂
00:34
عائلة ابو رعد Abo Raad family
Рет қаралды 16 МЛН
6. Randomization: Matrix Multiply, Quicksort
1:21:52
MIT OpenCourseWare
Рет қаралды 62 М.
Introduction to Poker Theory
30:49
MIT OpenCourseWare
Рет қаралды 1,4 МЛН
2. Divide & Conquer: Convex Hull, Median Finding
1:20:35
MIT OpenCourseWare
Рет қаралды 203 М.
12. Greedy Algorithms: Minimum Spanning Tree
1:22:10
MIT OpenCourseWare
Рет қаралды 229 М.
What is the i really doing in Schrödinger's equation?
25:06
Welch Labs
Рет қаралды 250 М.
2-3: Skip List
20:40
Shusen Wang
Рет қаралды 67 М.
2023 MIT Integration Bee - Finals
28:09
MIT Integration Bee
Рет қаралды 2,1 МЛН
16. Complexity: P, NP, NP-completeness, Reductions
1:25:25
MIT OpenCourseWare
Рет қаралды 414 М.
From Small To Giant 0%🍫 VS 100%🍫 #katebrush #shorts #gummy
00:19