Articulation Points Graph Algorithm

  Рет қаралды 121,312

Tushar Roy - Coding Made Simple

Tushar Roy - Coding Made Simple

Күн бұрын

Пікірлер: 90
@aaronlamoreaux5854
@aaronlamoreaux5854 8 жыл бұрын
Thank you for this video and all your other videos! I really appreciate all the effort you put into your videos. They are incredibly useful. I hope you never stop making them.
@tongzhang3474
@tongzhang3474 3 жыл бұрын
line 84 and 85 lowTime.compute(vertex, (currentVertex, time) -> Math.min(time, visitedTime.get(adj)) why do we compare current lowTime with adj's visitedTime, instead of adj's lowTime, if adj is visited? Thank you.
@ShekharPrasadRajak
@ShekharPrasadRajak 5 жыл бұрын
While DFS (say for non root node u), when we came across the visited node (say v) then it should be low[u] = min of node low value (low[u] )and visitedTime[v]. That means there is back edge from node u to v and all the ancestors of u should have low value as visitedTime[v] (until those ancestors are visited after the node u).
@PabloRausch
@PabloRausch 4 жыл бұрын
This video is great. I've been struggling to understand this algo for hours before this video
@SriramNagaraj
@SriramNagaraj 6 жыл бұрын
For D to be recognized as articulation point, it doesn't have to wait till it visits both C and E. It becomes a articulation point when the control is returned from C to D.
@ankitkushwaha633
@ankitkushwaha633 2 жыл бұрын
what if we don't have e
@mihaidogaru9938
@mihaidogaru9938 5 жыл бұрын
Polytechnic University of Bucharest, Automatica si Calculatoare, thumbs up!
@venupriyasivaraman1962
@venupriyasivaraman1962 7 жыл бұрын
Hi, thanks a lot for your videos. I have referred your videos for my exams and i scored good marks. Thanks again
@arungopalan
@arungopalan 8 жыл бұрын
I think there is a small mistake. The low timer of F is 7 (because of H) and low time of E is then 7 (because of F). However this does not change the list of articulation points you arrive at.
@limychelseafc
@limychelseafc 6 жыл бұрын
but we are always taking the minimum of the two right, so we dont update if 7 > 4??
@nisharege857
@nisharege857 4 жыл бұрын
superb explanation!!! thank you very much!
@madhavgaba7617
@madhavgaba7617 2 жыл бұрын
Looks like some issue in the condition-2: Visited time
@mohammedalhanooti3967
@mohammedalhanooti3967 4 жыл бұрын
this is the best explanation of the problem
@22PARTHGUPTA18
@22PARTHGUPTA18 9 жыл бұрын
Please post similar explanatory video for finding bridges in an undirected graph.
@sidrajpal9
@sidrajpal9 9 жыл бұрын
Thank you so much, the example you took explained the concept beautifully.
@GauthamBangalore
@GauthamBangalore 5 жыл бұрын
Thanks for the video. Very nicely explained.
@supreethbaliga7353
@supreethbaliga7353 5 жыл бұрын
Hey. I appreciate these videos a lot. They really help me understand complex problems and algorithms.
@akshayavenkatesan2912
@akshayavenkatesan2912 4 жыл бұрын
You are the best! Don't stop making these videos!!
@idiot7leon
@idiot7leon 4 жыл бұрын
Here are my newbie questions: 1. why does D have only 1 child? Why is E NOT counted as the child of D? 2. how to save/keep the relationship of parent-children? 3. how is B's low time updated with "minimum of whatever the current low time is", programmtically? 4. why is H's lowest time NOT updated with F's? Under what condition should one's lowest time be updated? With what? (It looks like the lowest time/value among itself and both/all of connected points). 5. how is backtrack retrieved/performed? D -> C -> A -> B (backtrack starts) -> A -> C I will come up with my solutions if understanding them.
@idiot7leon
@idiot7leon 4 жыл бұрын
Answers: 1. around 9:03, E is counted as the other child of D. So D has 2 children.
@idiot7leon
@idiot7leon 4 жыл бұрын
A few tutorials that help me understand those newbie problems better: kzbin.info/www/bejne/iqq6pattppd3bbs&feature=emb_logo kzbin.info/www/bejne/l4u7mmSro6eXgKM
@GauravGupta-zw7hz
@GauravGupta-zw7hz 5 жыл бұрын
Thanks a lot for making this video with simple explanation.
@shahriyarnovruzov2986
@shahriyarnovruzov2986 8 жыл бұрын
great explanation, thank you very much Tushar Roy, great job :)
@kanimozhikalaichelvan6927
@kanimozhikalaichelvan6927 4 жыл бұрын
Excellent Explanation. Thanks a lot :-)
@pallavivenkatesh8319
@pallavivenkatesh8319 8 жыл бұрын
very nice and interesting videos...was actually looking for an algorithm to find articulation points in a graph....quite helpful...can u plz tell me any other algorithm for the same...i need to compare and bring the statistics
@groovymav1038
@groovymav1038 6 жыл бұрын
Can we say that the nodes with same low time belong in a cycle? eg A,B,C have same low time; E,F,G have same low time. Is this assumption correct??
@jdragon8184
@jdragon8184 4 жыл бұрын
yeah kosaraju algo does it for me otherwise if we have multimap to store and update the low times we can easily call them when needed but it will take too much time
@cashflow9156
@cashflow9156 8 жыл бұрын
At 19:35, vertex C is in the visited set, so why does the code go into the if statement and not the else statement?
@Klaster961
@Klaster961 7 жыл бұрын
Nice video, thanks But there is an error, A's low time should not be updated from 2->1, because min(lowTime(a), visitedTime(b)) = 2. So it should stay 2
@SonuSonu-tk5pk
@SonuSonu-tk5pk 7 жыл бұрын
minimum of 2 and 1 is 1 u should compare with the low time of B which is 1
@hamedo.khaled4824
@hamedo.khaled4824 8 жыл бұрын
In A->B->C graph . why aren't A and C articulation points although removal any of them will result increasing in number of connected components ?
@svanegasgil
@svanegasgil 8 жыл бұрын
No, their removal won't result in increasing the number of connected components. If you got: A -- B -- C and you remove A, the resulting graph will have 2 connected nodes: B -- C then, neither A nor C are articulation points.
@hamedo.khaled4824
@hamedo.khaled4824 7 жыл бұрын
got it..thx
@kunjalrupala7753
@kunjalrupala7753 6 жыл бұрын
Why do we update the low time of 'B' as 1 and not as 2 (time taken by C+1 i.e., the time taken to reach it)?
@jaydeepdugar5612
@jaydeepdugar5612 8 жыл бұрын
would u put a video regarding the proof of this algorithm as in how does this algo works ?
@thealgorists60
@thealgorists60 4 жыл бұрын
It is explained here: www.thealgorists.com/Algo/Graph/ArticulationPoint
@vipulsharma1897
@vipulsharma1897 8 жыл бұрын
sir in the code you are just checking for the number of children for a root node.if it's value is greater than 2,it is an attriculation point.but what if the two children are connected?it isn't an articulation point then?is it?
@sudhanshumongamonga3031
@sudhanshumongamonga3031 7 жыл бұрын
he said independent, had they been connected the counter of the child count wouldn't increase in the first place because it would haven't gone into the second condition where the child counter is incremented.
@kaustubhkislay3126
@kaustubhkislay3126 6 жыл бұрын
if the children are connected as was in the example(B & C) , children would remain 1 because C will be discovered by B (not by A) and thus it remains to be 1 and hence its not an articulation point.
@ikrambk5848
@ikrambk5848 9 жыл бұрын
Excellent explanation (y) big thank you
@hemantsuthar20
@hemantsuthar20 8 жыл бұрын
superb explanation
@starc701
@starc701 4 жыл бұрын
why H is not a articulation point, if we remove H the graph will get disconnected
@Sarthakz99
@Sarthakz99 3 жыл бұрын
what if there is a cycle, then root won't be an articulation point even after having >2 children.
@shobhitsrivastava4496
@shobhitsrivastava4496 4 жыл бұрын
thank you for the video!
@YogeshPersonalChannel
@YogeshPersonalChannel 7 жыл бұрын
Which software do you use for screen recording?
@snilmayya
@snilmayya 4 жыл бұрын
Thank you
@PranayKumarAggarwal
@PranayKumarAggarwal 8 жыл бұрын
Thank you very much :) .. I could never understand this algo before your tutorial..
@anilkatakam2738
@anilkatakam2738 4 жыл бұрын
Code Explanation is too good.
@SonuSonu-tk5pk
@SonuSonu-tk5pk 7 жыл бұрын
Amazing and clear Explanation.. Great .. Thanks for the code..
@neerpatel4647
@neerpatel4647 7 жыл бұрын
It will be good if you rename this video as Tarjan's algorithm... cos other videos comes first when we look for Tarjan's algo,,,
@priyankarrajgupta4198
@priyankarrajgupta4198 5 жыл бұрын
Thanks for your hard work :)
@cashflow9156
@cashflow9156 8 жыл бұрын
At 19:30 when you say to go back into the recursion, what part of the code does that? I've tried it and my code ends at vertex D without going back again.
@cashflow9156
@cashflow9156 8 жыл бұрын
nvm it was due to the fact that i was returning too early
@iam_kundan
@iam_kundan 4 жыл бұрын
Great Video !!
@ranvijaysingh4400
@ranvijaysingh4400 5 жыл бұрын
Why did you go back to E from F not to G ?
@dharmendrabhojwani
@dharmendrabhojwani 8 жыл бұрын
v1 -- > v2 --> v3 ? what about this situation. I see that v1 is becoming AP which is wrong. Please explain
@dharmendrabhojwani
@dharmendrabhojwani 8 жыл бұрын
+Dharmendra Bhojwani thanks Tushar
@visheshsrivastav2107
@visheshsrivastav2107 6 жыл бұрын
Thanks.It was a brilliant explanation
@vducky0110
@vducky0110 4 жыл бұрын
This algorithm takes some time to sink in for me.
@devanshbhatia6951
@devanshbhatia6951 4 жыл бұрын
+1
@harshitagarwal5188
@harshitagarwal5188 8 жыл бұрын
as u told atleast one of the 2 conditions be satisfied must be satisfied for a point to be an articulation point, but i could not think of a case when for a point P condition 2 is not satisfied but condition 1 is, ( which makes P an articulation point ). does such a case exists ? moreover if i run that algo. for the case in the figure postimg.org/image/kn02fzdgh/ i would get the answer as 1 (because vertex B have 2 independent child ) although the answer is 0. please tell me where i am going wrong
@tempregex8520
@tempregex8520 6 жыл бұрын
@tushar why is the vertex H not in the visited set?
@sumatraroast1513
@sumatraroast1513 4 жыл бұрын
Thanks!
@swapnilnathgosavi7663
@swapnilnathgosavi7663 8 жыл бұрын
Nice video sir
@abhinavgupta6438
@abhinavgupta6438 5 жыл бұрын
what is the intution behind this low time logic ?
@SnoozeDog
@SnoozeDog 5 жыл бұрын
Why isn't C's low change to 0?
@cantwaittowatch
@cantwaittowatch 7 жыл бұрын
Tushar - After following your approach and seeing the video clip in here - kzbin.info/www/bejne/goTUk5ScpbaUaZo, I think the following clip is easier to understand, of course they need to be traced to understand well. Just sharing my observation and no means to undermine - Thanks again for sharing your knowledge.
@quantlfc
@quantlfc 4 жыл бұрын
Boss thanks a ton
@Abhishek-nn2qw
@Abhishek-nn2qw 8 жыл бұрын
EDIT: I got it now :D kzbin.info/www/bejne/aJy1dnyhe56Id9U at this point in else condition why you have considered the visited time of A why not its low time? I was solving a problem and was getting WA when using low time but when I changed this to visited time it got AC. But I am not able to understand why that is wrong. If we consider the low time of A instead of visited time then what is wrong with this. Please explain .
@newworldorder25
@newworldorder25 7 жыл бұрын
Nice
@ajr1791ze
@ajr1791ze 5 жыл бұрын
why we didn't unpdate low time for c as 0 .
@ajr1791ze
@ajr1791ze 5 жыл бұрын
ok , we don't update low for parent node
@prateeprajput8407
@prateeprajput8407 9 жыл бұрын
can u help me for understanding code for dijkstra
@kartikayy
@kartikayy 8 жыл бұрын
How to check two independent children of a parent?
@iAdrianT
@iAdrianT 7 жыл бұрын
1 year later: if they dont have an edge connecting them, in the video, nothing connects C and E
@ashketchum7768
@ashketchum7768 7 жыл бұрын
I think you are wrong. In the above graph, of course, they are independent. But, sometimes, even if there is no edge connecting those two, they may not be independent because of an edge between their children at any depth (also note that these children need not be at same depth).
@satyadevchandak3783
@satyadevchandak3783 8 жыл бұрын
sir was really a nice video. got the algo clearly :)
@swadhindas5853
@swadhindas5853 6 жыл бұрын
Your video is very good but the problem is in the written statements floating on screen.For this a part of the main video can't seen
@ShubhamGupta-fm7lv
@ShubhamGupta-fm7lv 6 жыл бұрын
Swadhin Das you can turn it off by switching off the captions
@swadhindas5853
@swadhindas5853 6 жыл бұрын
Shubham Gupta how sir
@물리화학
@물리화학 6 жыл бұрын
좋은설명 ㅎㅎ 코드가 C엿으면 더좋앗을텐데 아쉽지만
@vivekntl
@vivekntl 6 жыл бұрын
Whats with the accent🤔
@mondal1839
@mondal1839 4 жыл бұрын
Unpleasant voice! Though the video is informative.
@shubhamkumar-hx1fb
@shubhamkumar-hx1fb 4 ай бұрын
Why do you sfeak and not speak 😂😂
@experimantalboye8711
@experimantalboye8711 6 жыл бұрын
fack english acsense
@mahbuburrahmanmukdha1002
@mahbuburrahmanmukdha1002 7 жыл бұрын
I was searching for this this topic and found this. This doesn't make sense. The video is good but it could a little more interesting and the writing could be a little bigger so that all the written things can be seen. Its hard to see all that writings in the white board.
@SonuSonu-tk5pk
@SonuSonu-tk5pk 7 жыл бұрын
itne me itna hi milega
Johnson's Algorithm - All simple cycles in directed graph
26:09
Tushar Roy - Coding Made Simple
Рет қаралды 68 М.
Find Articulation Points using Tarjans Algorithm | Cut vertex
33:55
Flipping Robot vs Heavier And Heavier Objects
00:34
Mark Rober
Рет қаралды 59 МЛН
What's in the clown's bag? #clown #angel #bunnypolice
00:19
超人夫妇
Рет қаралды 27 МЛН
Smart Sigma Kid #funny #sigma
00:14
CRAZY GREAPA
Рет қаралды 64 МЛН
😜 #aminkavitaminka #aminokka #аминкавитаминка
00:14
Аминка Витаминка
Рет қаралды 1,8 МЛН
Strongly Connected Components Kosaraju's Algorithm Graph Algorithm
24:30
Tushar Roy - Coding Made Simple
Рет қаралды 226 М.
Introduction to Graph Theory: A Computer Science Perspective
16:26
G-56. Articulation Point in Graph
22:00
take U forward
Рет қаралды 102 М.
Think Fast, Talk Smart: Communication Techniques
58:20
Stanford Graduate School of Business
Рет қаралды 41 МЛН
Tarjans Strongly Connected Components algorithm | Graph Theory
17:03
Prim's Algorithm Minimum Spanning Tree Graph Algorithm
19:13
Tushar Roy - Coding Made Simple
Рет қаралды 294 М.
Articulation Point in Graph Algorithm Detail | Graph Theory #20
40:32
Vivekanand Khyade - Algorithm Every Day
Рет қаралды 19 М.
Skyline Problem
22:54
Tushar Roy - Coding Made Simple
Рет қаралды 193 М.
Flipping Robot vs Heavier And Heavier Objects
00:34
Mark Rober
Рет қаралды 59 МЛН