Data Structure: Transitive closure of graph

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

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

  • @Only_Study461
    @Only_Study461 6 месяцев назад +1

    Very good explanation ❤
    Make more content like this.

  • @atifalam2190
    @atifalam2190 2 года назад +3

    amazing 2 marks aapki wajah and topic understandable. Your explanation is super sir!

    • @vinaysingh-xi1sw
      @vinaysingh-xi1sw  2 года назад +1

      Thanks for the compliment. I am glad to hear that content is helpful for you... :)

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

    Is the whole video in english? There are chunks that I cannot understand at all.

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

    Thanks sir!

  • @nishatfatima2277
    @nishatfatima2277 3 года назад +3

    Sir for self loop should we take always 1?? Am I right

  • @vishalreddy4621
    @vishalreddy4621 8 месяцев назад +1

    Sir I couldn't understand how At A matrix 1 came could u please explain me in detail?? It would be a great help to me

    • @vinaysingh-xi1sw
      @vinaysingh-xi1sw  4 месяца назад +1

      Actually you are getting confused between adjacency matrix and transitive closure. Both are different from each other. We use adjacency matrix to calculate transitive closure using warshell algo. In case of transitive closure we assume that every node is reachable from itself.

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

    Whats the procedure for undirected graph .???

    • @vinaysingh-xi1sw
      @vinaysingh-xi1sw  3 года назад

      In undirected graph we dont care for direction in the process of reaching a node. for example in the explained graph node B is reachable from other nodes but from B no node can be accessed in case of directed graph. On the other hand if we remove directions from this graph u can see now other nodes can also be reachable by B.
      In short in directed graph we can move in only one direction through the edge, but in undirected we can move in both the directions.

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

      @@vinaysingh-xi1sw yes i knw that sir i am just confused about diagonal entry
      In some video they have said there will be 0 in A to A if there is no self loop in some video they have said there will be 1

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

    Nicely Explained - Is this math based or Cs based?

    • @vinaysingh-xi1sw
      @vinaysingh-xi1sw  2 года назад

      It is CS based relevant to Data Structure and Algorithms syllabus

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

    Super sir tqq

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

    What is adjacency matrix then ?

    • @vinaysingh-xi1sw
      @vinaysingh-xi1sw  4 года назад +2

      Adjacency matrix gives information about only neighbor nodes while transitive closure give information about accessibility of one node to other node. For example in the graph i mentioned in the above lecture from A to D their is a path to access node D from A but node D is not directly connected to D through any edge. So we put 1 for A to D in transitive closure but in adjacency matrix we will put 0 in the same position because A is not neighbor of D. For more clarity you can go through lecture for adjacency matrix and find out transitive closure and adjacency matrix of the same graph i mentioned above. Adjacency matrix: ruclips.net/video/6I-FWG4w9dM/видео.html and ruclips.net/video/R1QH42JA9_E/видео.html

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

      @@vinaysingh-xi1sw , thanks

    • @vinaysingh-xi1sw
      @vinaysingh-xi1sw  4 года назад

      @@Adivasilover10 Welcome

  • @beauties8464
    @beauties8464 Год назад +1

    "A" doesn't have self loop how can you take A to A is 1
    We take 1 on A to A when there is self loop

    • @vinaysingh-xi1sw
      @vinaysingh-xi1sw  8 месяцев назад

      Transitive closure is a boolean matrix to shows reachability of the nodes in a graph. So we have to take diagonal values i.e. A to A, B to B etc as 1 because both are same vertex.

    • @joemama9375
      @joemama9375 4 месяца назад +1

      @@vinaysingh-xi1sw sir, only when we take transitive closure, we give value one for adjacency matrix and if we just take normal adjacency matrix, then self loop will be 0, correct sir ?

    • @vinaysingh-xi1sw
      @vinaysingh-xi1sw  4 месяца назад

      @@joemama9375in case of normal adjacency matrix, if self loop is only one edge like A to A, it is taken as 1. If self loop include path more than two edges like A to B to C, it is taken as 0.