Transitive closure of a Graph (Reachability Matrix)

Поделиться
HTML-код
  • Опубликовано: 31 дек 2024

Комментарии • 66

  • @AnnoyedUnicorn
    @AnnoyedUnicorn 5 лет назад +29

    I'm a French student the day before my exam, and thank you very much for this video ;)

    • @coconut1010
      @coconut1010 4 года назад +1

      Pareil c est fou, ya peu de contenu en français sur ça

    • @AnnoyedUnicorn
      @AnnoyedUnicorn 4 года назад +12

      Oh I failed it btw, but still ^^

    • @aniketbhoite7168
      @aniketbhoite7168 4 года назад +7

      @@AnnoyedUnicorn ohhh you still came back after a year .....😅

  • @dulamshiva5340
    @dulamshiva5340 4 года назад +6

    sir can you please explain how A will reach to A again in the adjacent matrix...i feel their is a flaw in solution

  • @dontknowwhatagoodnameis
    @dontknowwhatagoodnameis 6 лет назад +33

    sir i don't think in a directed graph each vertex is obviously reachable to itself. i think what it means is "starting from a vertex v, can we get back to v following any path in the graph?". Let me know your thoughts.

    • @sanjeewanigunasekara4304
      @sanjeewanigunasekara4304 6 лет назад +6

      I think you are correct.

    • @AnnoyedUnicorn
      @AnnoyedUnicorn 5 лет назад +4

      With the methode I learned with my math professor, we addition to the identity Matrix, so obviously, he is right ;)

    • @matthewstruble8881
      @matthewstruble8881 4 года назад

      of course not, but that's not what the graph is saying. think, if we knew that [2,1] is a path, then of course [2,1] -> [1,1] is also a valid way to reach node 1. if the matrix is not made this way the algorithm will fail

    • @missakasms
      @missakasms Год назад

      Yes u are correct i guess

    • @cicakmuhamed
      @cicakmuhamed Год назад

      You're right. Otherwise, the diagonal from left-to-right would always be filled with 1's in the transitive closure and that would not convey much useful information. Also, in the video, you cannot reach A starting from A (there exists no path, at 1:10) but he marked it as 1 in the transitive closure, which means he actually meant that "it is obvious every vertex can reach itself".

  • @Tyokok
    @Tyokok 5 лет назад +25

    thanks for the video! quick Question: is diagonal always 1? meaning any vertex can reach itself? it doesn't need a self-circle edge? i thought without self-circle edge self reach=0.

    • @vibranteye4369
      @vibranteye4369 3 года назад

      I learned it this way as well...

    • @Tyokok
      @Tyokok 3 года назад

      @@vibranteye4369 what you mean? can you make it clear please? So it should 0 or 1, and the meaning of each? Thanks a lot!

    • @manognadevineni8901
      @manognadevineni8901 2 года назад +1

      Noo here if we start from say a.. we will get back to a ; So here we'll take diagonal as 1.. i.e. if we do have a closed path for any vertex we can take its diagonal one as 1 or else 0 ..

    • @Tyokok
      @Tyokok 2 года назад

      @@manognadevineni8901 so you saying regardless we have self-circle edge, we always set diagonal to 1, like convention ?

    • @manognadevineni8901
      @manognadevineni8901 2 года назад +1

      @@Tyokok if a node has a self circle then its quite good it will be having 1 in its diagonal...but here look into the question if we start from 1 we will get back to 1.. that means a path exsits .. so we will take it as 1 .

  • @pg9227
    @pg9227 5 лет назад +3

    sir your videos on graph theory is good and no doubt everybody can easily understand. sir i am requesting you please make videos on graph coloring ,vertex coloring,np completeness and linear programming in graph theory. I am eagerly waiting for response. Thanking you sir

  • @rohansodhi4713
    @rohansodhi4713 7 месяцев назад +2

    There is no path from A to A
    So how did you write the path from A to A?

  • @tomsonthomas7658
    @tomsonthomas7658 4 года назад +3

    In a digraph D, prove that a vertex y is reachable from a vertex x if and only if D
    contains an (x, y)− path.
    2. Show that a digraph D is strong if every vertex of V (D) is reachable from every vertex
    other vertex of V (D).
    3. Show that a digraph D is strong if and only if it has a closed Hamilton walk.
    4. Develop a strong digraph D = (V, A) and extract possible separator from D.

  • @mayurwarpe2763
    @mayurwarpe2763 6 лет назад +2

    Great sir...you have clear my doubt
    Please make video on DFS algorithm

  • @craigruchman7007
    @craigruchman7007 4 года назад +1

    My text book mentions transitive closure but did not give an example. Thanks so much for the clear example. Question: Closure is when we perform said operations on ALL vertices without adding any new elements to our set. Yes? Also, the edges don’t alow paths in both directions. So this makes it non-commutative. If they were bi-directional, it would be commutative - yes?

  • @imchaul1901
    @imchaul1901 22 дня назад

    The teacher is making a critical mistake. There are two types of transitive closure matrices that can be made. One is called Strict Transitive Closure and is represented by A+ (plus symbol superscript). In this matrix, we do NOT include the selected vertex, meaning A cannot reach itself unless there is a loop that allows it to reach itself (loop length must BE greater than 0! IMPORTANT)
    Then there's the other transitive closure matrix known as the Reflexive Transitive Closure. It is represented by A* (* symbol superscript). In this matrix, we DO include the selected vertex, meaning A can reach itself since this matrix accepts loops of length greater or equal than 0
    The difference between two is, A+ only accepts passage way to other vertexes that are greater than 1 or 1.
    A* accepts passage ways to other vertexes (this time including itself, since passage way to itself is 0) that are greater than 0 or 0.

  • @vaibhavgupta777
    @vaibhavgupta777 Месяц назад +1

    Thank You So So Much Sir🙏🙏🙏🙏

  • @revanth6476
    @revanth6476 3 года назад

    we can also use bfs right..?

  • @HemantBansal_Ki_Mummy
    @HemantBansal_Ki_Mummy 2 года назад +1

    i think the diagonals should be 0 as there is no selfloop

  • @bwbs7410
    @bwbs7410 2 года назад +5

    this is wrong. First, this isn't how the algorithm to obtain the transitive matrix is preformed. Second, a path from A to A signifies a looped edge. Thus, all values on the main diagonal [top left corner to bottom right corner] should all be zero because this graph has no looping edges.

    • @Anime_Animation_Illustration
      @Anime_Animation_Illustration Год назад

      You are talking about Adjacent matrix 😅

    • @jethanpaul818
      @jethanpaul818 11 месяцев назад +3

      you're confusing between adjacent matrix representation of a graph and transitive closure , get a book cormen to be specific and see the algorithm on transitive closure maybe you can understand that he is correct.

    • @sameerasangadi686
      @sameerasangadi686 5 месяцев назад

      He is correct check algorithm first ​@@Anime_Animation_Illustration

  • @SOURABHGOLCHHABCE
    @SOURABHGOLCHHABCE 6 лет назад +1

    sir can u upload more questions on dynamic programming for interview purpose
    and sir upload daily one algorithm please sir i request you you should daily upload one algorithm please sir

  • @madanagopal5585
    @madanagopal5585 4 года назад

    Today my xm this is video is very helpful ❤️

  • @samudralashanmukrao2185
    @samudralashanmukrao2185 4 года назад +2

    How can reach form a to a 🤔

  • @tekbssync5727
    @tekbssync5727 3 года назад

    please provide the code for this Qs.

  • @Nisha_thakur07
    @Nisha_thakur07 7 месяцев назад +1

    Thank you sir ❤❤❤❤

  • @jongmagee
    @jongmagee 5 лет назад +1

    Big help again, thank you!

  • @JananiAnbarasan
    @JananiAnbarasan 6 лет назад +1

    Sir, please explain TSP!

  • @abdultamim1428
    @abdultamim1428 2 года назад +1

    Thank you, sir; it was great.
    Please send me some material about(Transit function and betweenness) if you have any!

  • @balasrinivas7517
    @balasrinivas7517 6 лет назад

    please teach particle swarm algorithm

  • @hashcodez757
    @hashcodez757 Год назад

    thanks alot sir!!

  • @tazelhossan2838
    @tazelhossan2838 5 лет назад +4

    Wrong teaching. There is no path for node a.
    Please check it Again.

  • @Jjmashe
    @Jjmashe 6 лет назад

    thank you. very useful

  • @gangireddyakula6395
    @gangireddyakula6395 5 лет назад

    Ossm sir I'm easily understand to see ur videos 🥰TQ u so much sir

  • @masakkali9996
    @masakkali9996 4 года назад

    Is the transitive closure of this graph is correct??

  • @arifulislamhabib2937
    @arifulislamhabib2937 3 года назад

    Thank You.

  • @tayebdz8581
    @tayebdz8581 9 месяцев назад

    thank you

  • @ManiTeluguGamer23
    @ManiTeluguGamer23 2 года назад

    Tqu so much sir

  • @setYourHandleHttp404
    @setYourHandleHttp404 5 лет назад

    7 minutes for only describing a matrix!!! I thought you are also describing the Floyd-Warshall algorithm.

  • @mt03adventures
    @mt03adventures 5 лет назад

    Ty

  • @tauchainagoras6044
    @tauchainagoras6044 2 года назад

    check this out.. shortest code ever

  • @52_sopansharma52
    @52_sopansharma52 6 лет назад +1

    galat padha rh ho

  • @AlphaCoderOfficial
    @AlphaCoderOfficial 3 месяца назад

    dimaag ki dahi ho gya kuch samj nhi aya

  • @venkyg6745
    @venkyg6745 2 года назад +1

    A to C there is no path ..

    • @deepakshidahiya540
      @deepakshidahiya540 6 месяцев назад

      Direct path from a to c is not there. But indirectly we can approach c from a by d in middle.

  • @nitinsingh9604
    @nitinsingh9604 5 лет назад

    Jake khud padh le pahele

  • @ossamabinhassanietstudent3418
    @ossamabinhassanietstudent3418 5 лет назад

    Abey chutiye.... Loop kahan dikhaaya gaya hai Harr vertex Pai

  • @gokuljs837
    @gokuljs837 5 лет назад

    Teach properly

  • @rymoni
    @rymoni Месяц назад

    Thank u from Algeria u really helped me 😭 😭🫶🏻