Representation of graph using adjacency matrix and adjacency list

  Рет қаралды 85,830

Techdose

4 жыл бұрын

This video explains the method to represent an undirected graph as well as a directed graph using adjacency matrix and adjacency list. I have also explained the advantages and disadvantages of using adjacency matrix and adjacency list and also the different situations suitable for them to be used in. If you find any difficulty or have any query then do COMMENT below. PLEASE help our channel by SUBSCRIBING and LIKE our video if you found it helpful...CYA :)

Пікірлер: 72
@TomerBenDavid
@TomerBenDavid 4 жыл бұрын
Cool searched for "adjacency list tech doze" because I knew there would be the best concise explanation in a short time and it prooved right.
@techdose4u
@techdose4u 4 жыл бұрын
:P thanks but it's dose Hahaha :)
@RANAND-xd3zu
@RANAND-xd3zu 4 жыл бұрын
Sir, you made a mistake from the adjacent list 1 pointing through 0,2 and 3 you forget the 0 this is an undirected graph
@muhammadzakiahmad8069
@muhammadzakiahmad8069 2 жыл бұрын
Yes i noticed aswell.
@abrarmojahidrafi4509
@abrarmojahidrafi4509 11 ай бұрын
RIGHT
@indraalapati989
@indraalapati989 4 жыл бұрын
Nice explanation. I would like to add one more point under adjacency list -> If your model frequently manipulates vertices, the adjacency list is a better choice.
@techdose4u
@techdose4u 4 жыл бұрын
Thanks :)
@MyboyCelticSteel786
@MyboyCelticSteel786 2 жыл бұрын
Great video! Super clear and one of the better ones available on KZbin! Much thanks Sir!
@sidharthpurohit3670
@sidharthpurohit3670 3 жыл бұрын
Keep up the great work sir :) Very well curated lectures. Thank you.
@techdose4u
@techdose4u 3 жыл бұрын
Welcome :)
@udithweerasinghe6402
@udithweerasinghe6402 Жыл бұрын
in the adjacency list , you marked from 1 to 2 & 3 only, don't we need to mark for 0 as well since there is a link from 1 to 0?
@atharvameher5880
@atharvameher5880 Жыл бұрын
He forgor☠
@emmanuelnsiah8036
@emmanuelnsiah8036 6 ай бұрын
it is undirected graph so you are right
@SiddharthRay1
@SiddharthRay1 4 жыл бұрын
why array of pointer "1" don't have node 1 to 0 ? since "2" does have 2 ti 1 and 2 to 3
@techdose4u
@techdose4u 4 жыл бұрын
Yes you are correct. I should have included 0. 0 will be present in array of pointers for node 1.
@SiddharthRay1
@SiddharthRay1 4 жыл бұрын
@@techdose4u thanks for the response. video was awesome 👌
@techdose4u
@techdose4u 4 жыл бұрын
Thanks for pointing out the mistake bdw.
@atharvameher5880
@atharvameher5880 Жыл бұрын
He forgor💀
@RanjanaShinde-e1l
@RanjanaShinde-e1l 7 ай бұрын
Thank you so much sir for giving nice explanation ☺️
@antiviruskaif8297
@antiviruskaif8297 2 ай бұрын
awesome explainer
@DineshSharma-pp3ox
@DineshSharma-pp3ox 2 жыл бұрын
This video tutorial is very helpful
@techdose4u
@techdose4u 2 жыл бұрын
Thanks :)
@saipraneethtalluri652
@saipraneethtalluri652 3 жыл бұрын
Commenting as it can reach to more people ❤️
@thetechmasum
@thetechmasum 2 жыл бұрын
Code implementation is missed. I have one doubt if we have nodes with big number like 160, 300, 2000, 5000 how that will be mapped to array index while representing by adjacency list.
@atharvsatpute7889
@atharvsatpute7889 7 ай бұрын
Sir. Their was 3 edges from vertex 1 =1-0, 1-3, 1-2 You don't mention in adjacency list at video time 5:28 please check ti if I write
@toobaa3919
@toobaa3919 3 жыл бұрын
which software you are using for drawing adjacency matrix and list in this video?
@dangelokwakye6658
@dangelokwakye6658 4 жыл бұрын
This video was a very big help ♥
@techdose4u
@techdose4u 4 жыл бұрын
:)
@rahulsaw8838
@rahulsaw8838 2 жыл бұрын
Does graph only contains the sequence labelling of data such as 0 1 2 3 for 4 nodes can we have 34 79 82 12 in vertice labelling
@sakshidongare9346
@sakshidongare9346 2 жыл бұрын
Great video sir😍👍..... it's very easy to understand but I need inverse adjacency list examples
@eramali3237
@eramali3237 3 жыл бұрын
Amazing bht achi samjh ai sir
@techdose4u
@techdose4u 3 жыл бұрын
Badhiya 👌🏼
@mcmouli2002
@mcmouli2002 3 жыл бұрын
Simply excellent narration
@techdose4u
@techdose4u 3 жыл бұрын
Thanks
@impatientgaming9868
@impatientgaming9868 10 ай бұрын
good one
@naveenkumar-rb4ug
@naveenkumar-rb4ug 3 жыл бұрын
Sir you used Source nodes as node pointers. But in real world there is lot of information associated with a node. So how can we implement that as pointer only. Dont we need to have an array of Vertices nodes instead of Vertices pointer array. Plz clarify
@darellarocho5729
@darellarocho5729 Жыл бұрын
It's the same thing in this case. It just serves to visualize it, it's not an actual linked list.
@sot5789
@sot5789 2 жыл бұрын
great video
@mwshubham
@mwshubham 3 жыл бұрын
Finally I am at Graph.
@techdose4u
@techdose4u 3 жыл бұрын
👍🏼
@Yoshi-bw8ds
@Yoshi-bw8ds 3 жыл бұрын
Huge help bro, thanks
@techdose4u
@techdose4u 3 жыл бұрын
Welcome
@dewman7477
@dewman7477 3 жыл бұрын
@@techdose4u Hey I have a question. How do I implement an algorithm to reduce the graph from weighted to an unweighted graph? Let’s say I’m given a set of edge weights like {1, 2} in a weighted undirected graph. How do I transform a graph so that all edge weights in a graph are equal (where preferably each edge weight in new graph equals to 1)? I know I may have to add or remove edges and intermediate vertices but is there a way to think about this?
@sanjaykumar7798
@sanjaykumar7798 3 жыл бұрын
What is the application of adjacency matrix and list
@techdose4u
@techdose4u 3 жыл бұрын
You will understand as see more of the videos in graph playlist.
@sanjaykumar7798
@sanjaykumar7798 3 жыл бұрын
Can yoy share some link of application because i am needy for that
@techdose4u
@techdose4u 3 жыл бұрын
To store a graph or to represent it, you need either adjacency list or matrix.
@jk-xo8rc
@jk-xo8rc 3 ай бұрын
@abhaytiwari6411
@abhaytiwari6411 4 жыл бұрын
that's impressive
@techdose4u
@techdose4u 4 жыл бұрын
Thanks :)
@MDIRFAN-cp7ol
@MDIRFAN-cp7ol 2 жыл бұрын
where is code sir
@vikasrai4915
@vikasrai4915 4 жыл бұрын
Great Explaination Sir. I have a request,can you please make a video on ways to implement the graph DS in C++, because there are lot of ways(vectors, set, array of LL etc) and it quite confusing. Thanks in advance. @techdose
@techdose4u
@techdose4u 4 жыл бұрын
Yes I will make after including all videos of graph.
@dfrsacw3988
@dfrsacw3988 4 жыл бұрын
@@techdose4u How many videos ????
@techdose4u
@techdose4u 4 жыл бұрын
@@dfrsacw3988 5-6 videos approx. You can remind me after couple of weeks for this topic.
@dfrsacw3988
@dfrsacw3988 4 жыл бұрын
@@techdose4u OK. Thank you. :)
@janvimyadventures1310
@janvimyadventures1310 3 жыл бұрын
Pls I am reminding my problem 😂
@English-zv3jk
@English-zv3jk 2 жыл бұрын
5:07 here 1 should be linked with 0 also naa?? He hasn't written that
@justtavi1238
@justtavi1238 Жыл бұрын
Yes
@rahulagarwal8059
@rahulagarwal8059 3 жыл бұрын
👍
@techdose4u
@techdose4u 3 жыл бұрын
👍
@akashtanajigurav8226
@akashtanajigurav8226 Жыл бұрын
adj list is wrong the 1 have the 0,2,3 b relations
@abhaytiwari6411
@abhaytiwari6411 4 жыл бұрын
adjancy matrix is easy
@techdose4u
@techdose4u 4 жыл бұрын
Yaa it is :)
@abhaytiwari6411
@abhaytiwari6411 4 жыл бұрын
guru you make it easy
@techdose4u
@techdose4u 4 жыл бұрын
Thanks :P
@YashDEVELOPER12
@YashDEVELOPER12 4 жыл бұрын
Everything is easy.. sikhne k liye bas junoon chahiye
@YashDEVELOPER12
@YashDEVELOPER12 3 жыл бұрын
@We Can 🤣
@sayantaniguha8519
@sayantaniguha8519 3 жыл бұрын
From this explanation it isn't clear that how do we represent a flower-like directed graph using Adjacency List. 🌻-like i.e., where the "black thing at center" is node 0 / petals are edges & petal tips are other nodes...
@varundawan3637
@varundawan3637 10 ай бұрын
Not great video bros he didn't explained loop in directed graph for adjacency list
@ahmadbodayr7203
@ahmadbodayr7203 2 жыл бұрын
READ ABOUT ISLAM ❤
Миллионер | 1 - серия
34:31
Million Show
Рет қаралды 2,9 МЛН
НАШЛА ДЕНЬГИ🙀@VERONIKAborsch
00:38
МишАня
Рет қаралды 2,4 МЛН
Officer Rabbit is so bad. He made Luffy deaf. #funny #supersiblings #comedy
00:18
Funny superhero siblings
Рет қаралды 19 МЛН
1 сквиш тебе или 2 другому? 😌 #шортс #виола
00:36
Миллионер | 1 - серия
34:31
Million Show
Рет қаралды 2,9 МЛН