<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>vertex list Archives - NeuralLantern.com</title>
	<atom:link href="https://www.NeuralLantern.com/tag/vertex-list/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.NeuralLantern.com/tag/vertex-list/</link>
	<description></description>
	<lastBuildDate>Sun, 13 Sep 2026 19:29:07 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=7.1.1</generator>

<image>
	<url>https://www.NeuralLantern.com/wp-content/uploads/2025/04/cropped-2025-04-04-Lantern-03-32x32.png</url>
	<title>vertex list Archives - NeuralLantern.com</title>
	<link>https://www.NeuralLantern.com/tag/vertex-list/</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>Directed Weighted Graph Edge List Representation</title>
		<link>https://www.NeuralLantern.com/directed-weighted-graph-edge-list-representation/</link>
					<comments>https://www.NeuralLantern.com/directed-weighted-graph-edge-list-representation/#respond</comments>
		
		<dc:creator><![CDATA[mike]]></dc:creator>
		<pubDate>Sun, 13 Sep 2026 19:29:05 +0000</pubDate>
				<category><![CDATA[Computer Science]]></category>
		<category><![CDATA[Data Structures]]></category>
		<category><![CDATA[Graphs]]></category>
		<category><![CDATA[Videos]]></category>
		<category><![CDATA[adjacency]]></category>
		<category><![CDATA[algorithms]]></category>
		<category><![CDATA[computer science]]></category>
		<category><![CDATA[data structures]]></category>
		<category><![CDATA[directed graph]]></category>
		<category><![CDATA[directed weighted graph]]></category>
		<category><![CDATA[edge list]]></category>
		<category><![CDATA[graph representation]]></category>
		<category><![CDATA[graph theory]]></category>
		<category><![CDATA[graph tutorial]]></category>
		<category><![CDATA[index mapping]]></category>
		<category><![CDATA[nodes and edges]]></category>
		<category><![CDATA[vertex list]]></category>
		<category><![CDATA[weighted graph]]></category>
		<guid isPermaLink="false">https://www.NeuralLantern.com/?p=433</guid>

					<description><![CDATA[<p>A directed weighted graph can be stored as a pair of lists: every vertex in one list, and every edge as a three-part tuple of start node, end node, and weight. Replacing the node values with indexes into the vertex list lets you jump to those nodes in constant time after you find an edge.</p>
<p>The post <a href="https://www.NeuralLantern.com/directed-weighted-graph-edge-list-representation/">Directed Weighted Graph Edge List Representation</a> appeared first on <a href="https://www.NeuralLantern.com">NeuralLantern.com</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<figure class="wp-block-embed is-type-video is-provider-youtube wp-block-embed-youtube wp-embed-aspect-16-9 wp-has-aspect-ratio"><div class="wp-block-embed__wrapper">
<iframe title="Directed Weighted Graph Edge List Representation" width="1380" height="776" src="https://www.youtube.com/embed/OOyWpB5Pijk?feature=oembed" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe>
</div></figure>



<p class="wp-block-paragraph">Learn how to represent a directed and weighted graph using an edge list.</p>



<p class="wp-block-paragraph">We start from a directed unweighted example, add weights to every edge, then store the graph as a tuple of a vertex list and an edge list. Each edge is a tuple of start node, end node, and weight. Order matters because the graph is directed.</p>



<p class="wp-block-paragraph">Then we convert node values to indexes so you can jump straight to a vertex in constant time instead of scanning the vertex list. That keeps edge scans closer to O(E) instead of O(E + V).</p>



<p class="wp-block-paragraph">This is part of a series covering all four combinations: directed vs undirected and weighted vs unweighted. Watch the earlier videos for basic graph terms and the other representations.</p>



<p class="wp-block-paragraph">Leave a comment if you want a topic covered next.</p>



<p class="wp-block-paragraph">00:00 Intro to directed weighted edge lists<br>01:05 Starting from the directed unweighted graph<br>01:35 Adding a weight to every edge<br>02:48 Graph as a vertex list plus edge list<br>03:35 Writing the vertex list<br>04:18 Node classes versus raw values<br>05:18 Writing directed weighted edges<br>05:45 Order matters on directed edges<br>06:38 Walking remaining outgoing edges<br>09:08 Why value-based edges scan slowly<br>10:29 Replacing node values with indexes<br>12:36 Constant-time jumps after an edge scan<br>14:13 Series wrap-up<br>14:45 Subscribe and outro</p>



<p class="wp-block-paragraph">=-=-=-=-=-=-=-=-=</p>



<p class="wp-block-paragraph">Thanks for watching!</p>



<p class="wp-block-paragraph">Find us on other social media here:</p>



<ul class="wp-block-list">
<li><a href="https://www.NeuralLantern.com/social">https://www.NeuralLantern.com/social</a></li>



<li>Twitter / X: <a href="https://x.com/NeuralLantern">https://x.com/NeuralLantern</a></li>



<li>Rumble: <a href="https://rumble.com/c/c-3696939">https://rumble.com/c/c-3696939</a></li>



<li>BitChute: <a href="https://www.bitchute.com/channel/pg1Pvv5dN4Gt">https://www.bitchute.com/channel/pg1Pvv5dN4Gt</a></li>



<li>Daily Motion: <a href="https://www.dailymotion.com/neurallantern">https://www.dailymotion.com/neurallantern</a></li>



<li>Minds: <a href="https://www.minds.com/neurallantern/">https://www.minds.com/neurallantern/</a></li>



<li>Odysee: <a href="https://odysee.com/@NeuralLantern:5">https://odysee.com/@NeuralLantern:5</a></li>
</ul>



<p class="wp-block-paragraph">Please show your support!</p>



<ul class="wp-block-list">
<li>Buy me a coffee: <a href="https://ko-fi.com/neurallantern">https://ko-fi.com/neurallantern</a></li>



<li>Subscribe + Sharing on Social Media</li>



<li>Leave a comment or suggestion</li>



<li>Subscribe to the Blog: <a href="https://www.NeuralLantern.com">https://www.NeuralLantern.com</a></li>



<li>Watch the main &#8220;pinned&#8221; video of this channel for offers and extras</li>
</ul>



<p class="wp-block-paragraph">Hello there! Let&#8217;s talk about representing a directed and weighted</p>



<p class="wp-block-paragraph">graph inside your machine using an edge list representation.</p>



<p class="wp-block-paragraph">That&#8217;s a lot of words, a lot of words. Okay, so I hope you watched my previous videos. You didn&#8217;t</p>



<p class="wp-block-paragraph">necessarily need to watch the previous three where we talked about edge list</p>



<p class="wp-block-paragraph">representation.</p>



<p class="wp-block-paragraph">where we talked about edgeless representation on the other types of graphs we&#8217;re doing a directed</p>



<p class="wp-block-paragraph">versus uh undirected and weighted versus unweighted and all four combinations of those</p>



<p class="wp-block-paragraph">so uh you don&#8217;t need to watch those others if you&#8217;re just only interested in this but it&#8217;s</p>



<p class="wp-block-paragraph">probably a good idea if you watch my other graph videos because we talk about basic graph</p>



<p class="wp-block-paragraph">terminology and like you know what is a graph and stuff like that but for now we&#8217;re just going to</p>



<p class="wp-block-paragraph">continue um the screenshot you&#8217;re looking at right now was the last part of the last video where we</p>



<p class="wp-block-paragraph">Thank you.</p>



<p class="wp-block-paragraph">the last part of the last video where we did a directed unweighted graph so I&#8217;m</p>



<p class="wp-block-paragraph">gonna duplicate this real fast and I&#8217;m gonna start modifying it so we can</p>



<p class="wp-block-paragraph">basically just move on with our lives so this is gonna be directed and also</p>



<p class="wp-block-paragraph">weighted then I&#8217;m gonna erase a whole bunch of other stuff because it&#8217;s fun to</p>



<p class="wp-block-paragraph">draw again I don&#8217;t know why but it is I like to do my drawings get that and then</p>



<p class="wp-block-paragraph">And I&#8217;m going to get rid of that stuff.</p>



<p class="wp-block-paragraph">Okay.</p>



<p class="wp-block-paragraph">that stuff okay and i&#8217;ll get rid of this because i&#8217;d like to draw it okay i probably should have</p>



<p class="wp-block-paragraph">gotten rid of it first so i guess the real first thing that i&#8217;m going to do after erasing all that</p>



<p class="wp-block-paragraph">stuff is add weights to all the edges remember this has to be a weighted graph so this particular</p>



<p class="wp-block-paragraph">graph you&#8217;re looking at right now is directed and unweighted so we have to add weights to all of</p>



<p class="wp-block-paragraph">the edges in my previous videos we talked about what is the meaning of weights you know these</p>



<p class="wp-block-paragraph">could be a cost these could be like some property like in a video game</p>



<p class="wp-block-paragraph">property like in a video game uh whatever you want them to mean uh these could even be classes</p>



<p class="wp-block-paragraph">with like complicated values um but for now i&#8217;m going to say i don&#8217;t know maybe this is an airport</p>



<p class="wp-block-paragraph">map and the weights are how much gas it takes to fly from one city to another maybe a node is a</p>



<p class="wp-block-paragraph">city number six and city number 12 you want to fly between them it&#8217;s like five million jillion</p>



<p class="wp-block-paragraph">gallons of gas so let me just take a look real fast and make sure that i&#8217;m not forgetting</p>



<p class="wp-block-paragraph">I mean, any edge.</p>



<p class="wp-block-paragraph">getting any edge every single edge should have a weight i think there were nine edges here one two</p>



<p class="wp-block-paragraph">three four five six seven eight nine so i should see nine weights one two three four five six seven</p>



<p class="wp-block-paragraph">eight nine okay we&#8217;re now ready to start representing this and what&#8217;s going on with</p>



<p class="wp-block-paragraph">this computer okay the first thing uh that we talk about in all of these you know recent related</p>



<p class="wp-block-paragraph">videos is that in an edge list representation we&#8217;ll say</p>



<p class="wp-block-paragraph">edge list representation, we&#8217;ll say that our graph is a tuple, meaning just like a collection of some</p>



<p class="wp-block-paragraph">things. A tuple where the first item in the tuple is a vertex list or a node list, and the second</p>



<p class="wp-block-paragraph">item is an edge list. Again, in previous videos, we talked about representing paths using nodes or</p>



<p class="wp-block-paragraph">using edges. So the edge list path is going to come back to haunt us where we do our edge list</p>



<p class="wp-block-paragraph">graph representation, which is different than an edge list path.</p>



<p class="wp-block-paragraph">path. So how do we do our vertex list? That&#8217;s going to be pretty easy for this diagram.</p>



<p class="wp-block-paragraph">I&#8217;m going to say that V is equal to, oh, it&#8217;s pink. Let me change the color to be more serious.</p>



<p class="wp-block-paragraph">Okay. The vertex list is going to be a collection of just all the nodes, just naming all the nodes</p>



<p class="wp-block-paragraph">or having all the nodes. I&#8217;m going to say it&#8217;s a vertex list or a node list, but really you</p>



<p class="wp-block-paragraph">probably want this to be a vector I&#8217;ve been saying that recently because it&#8217;s faster to</p>



<p class="wp-block-paragraph">because it&#8217;s faster to jump to a particular index in a vector</p>



<p class="wp-block-paragraph">than it is in an actual linked list or some other list-like data structure.</p>



<p class="wp-block-paragraph">So we&#8217;ve got a vertex list.</p>



<p class="wp-block-paragraph">I&#8217;m just going to name all the nodes.</p>



<p class="wp-block-paragraph">So for me particularly, I like to go from left to right.</p>



<p class="wp-block-paragraph">You can sort them, you can do whatever you want.</p>



<p class="wp-block-paragraph">They just need to all be in there.</p>



<p class="wp-block-paragraph">So I&#8217;m just going to say every node that we see in the graph</p>



<p class="wp-block-paragraph">is going to end up in this vertex list.</p>



<p class="wp-block-paragraph">So we&#8217;ve got 1, 2, 3, 4, 5, 6, 1, 2, 3, 4, 5, 6.</p>



<p class="wp-block-paragraph">So we&#8217;ve got all the nodes in there.</p>



<p class="wp-block-paragraph">another point that I&#8217;ve been making in the in these recent videos is that in real life in your</p>



<p class="wp-block-paragraph">code in your in your computer you don&#8217;t really want to just have this value three here you don&#8217;t</p>



<p class="wp-block-paragraph">want to have this 12 value here that the 12 value that&#8217;s just the value that the node holds I mean</p>



<p class="wp-block-paragraph">if you want everything to be really fast maybe you know keep it bare bones but for me I like to</p>



<p class="wp-block-paragraph">have a full node class a full vertex class and make an instance of it so I can add a whole bunch</p>



<p class="wp-block-paragraph">of custom properties and function</p>



<p class="wp-block-paragraph">bunch of custom properties and functionality and other stuff onto my node so that that means i</p>



<p class="wp-block-paragraph">couldn&#8217;t really put an integer there i would have to put a full node so keep in mind for yourself</p>



<p class="wp-block-paragraph">you probably want to try it both ways but um you probably want to want an instance of a node class</p>



<p class="wp-block-paragraph">and maybe stick the instance right there in the vector or maybe make a smart pointer and so like</p>



<p class="wp-block-paragraph">you allocate you know a new pointer of an instance of the class or it&#8217;s a raw pointer it&#8217;s a smart</p>



<p class="wp-block-paragraph">point or whatever so just keep in mind this diagram is</p>



<p class="wp-block-paragraph">So just keep in mind, this diagram is more simple than your code, but we&#8217;re just diagramming</p>



<p class="wp-block-paragraph">today.</p>



<p class="wp-block-paragraph">Anyway, so we put all the nodes in there.</p>



<p class="wp-block-paragraph">The next thing I need to do is represent the edges.</p>



<p class="wp-block-paragraph">So I&#8217;m going to put E is equal to another list.</p>



<p class="wp-block-paragraph">And this probably does need to be a linked list or a list like data structure and not</p>



<p class="wp-block-paragraph">a vector.</p>



<p class="wp-block-paragraph">There&#8217;s not much point in jumping to an index.</p>



<p class="wp-block-paragraph">I don&#8217;t know.</p>



<p class="wp-block-paragraph">You could probably come up with one.</p>



<p class="wp-block-paragraph">But anyway, so the edge list is going to be a list of tuples that describe one edge at</p>



<p class="wp-block-paragraph">a time.</p>



<p class="wp-block-paragraph">at a time so every little parenthesis that i put here that&#8217;s going to represent one edge so again</p>



<p class="wp-block-paragraph">for me i like to go from left to right i&#8217;m going to start on the left node and i&#8217;m going to say</p>



<p class="wp-block-paragraph">that the start node is three and remember this is a directed graph which means the order if you</p>



<p class="wp-block-paragraph">looked at my previous videos the hang on the order of the nodes actually matters a lot like i can put</p>



<p class="wp-block-paragraph">3 and 13 but i cannot put 13 comma 3 because the first item in the tuple is supposed to be the</p>



<p class="wp-block-paragraph">The first item in the tuple is supposed to be the starting node.</p>



<p class="wp-block-paragraph">And if you see, I only have like an edge going from 3 to 13.</p>



<p class="wp-block-paragraph">I don&#8217;t have one going from 13 to 3.</p>



<p class="wp-block-paragraph">So 13 comma 3 would be invalid.</p>



<p class="wp-block-paragraph">It would be totally bad.</p>



<p class="wp-block-paragraph">So I&#8217;m going to say the 3 goes out to the 13.</p>



<p class="wp-block-paragraph">So the 3 comes first and the 13 is second.</p>



<p class="wp-block-paragraph">And then I have to describe how much it costs.</p>



<p class="wp-block-paragraph">So that&#8217;s the third item in that one particular tuple.</p>



<p class="wp-block-paragraph">It&#8217;s going to be a 1 because the cost of that one particular edge is 1.</p>



<p class="wp-block-paragraph">one gasoline one</p>



<p class="wp-block-paragraph">one millisecond delay one time whatever so then the next item is going to be where else does the</p>



<p class="wp-block-paragraph">three go to the three doesn&#8217;t go anywhere else so we&#8217;re done representing the three at least as a</p>



<p class="wp-block-paragraph">start node so next up uh i&#8217;m going to look at the 13 where does the 13 go to it goes to the six it</p>



<p class="wp-block-paragraph">doesn&#8217;t go to the three the three goes to 13 but this the 13 doesn&#8217;t go to the three so 13 goes to</p>



<p class="wp-block-paragraph">six and it costs six because that&#8217;s the cost of the edge there&#8217;s two sixes here</p>



<p class="wp-block-paragraph">the edge. There&#8217;s two 6s here, a little confusing, but that&#8217;s because one is a node and one is a</p>



<p class="wp-block-paragraph">weight. The 13 does not go out anywhere else, so we&#8217;re done with the 13. I like to make, you know,</p>



<p class="wp-block-paragraph">different rows for every single start node. You don&#8217;t have to do that. Next up, I&#8217;m going to look</p>



<p class="wp-block-paragraph">at the 6. The 6 does not go out to the 13. The 6 does not go out to the 18. There is a connection</p>



<p class="wp-block-paragraph">there, but it&#8217;s going in the other direction. The 6 goes to the 12 and also to the 15. So the 6 goes</p>



<p class="wp-block-paragraph">to the 12, and that cost us $5,000.</p>



<p class="wp-block-paragraph">to the 12 and that cost us five because that was the weight we assigned and the six also goes to</p>



<p class="wp-block-paragraph">the 15 with a cost of i think i just wrote seven in a weird way um so we go from six to fifteen it</p>



<p class="wp-block-paragraph">costs us seven and then we&#8217;re done looking at the outgoing edges of these six let me just double</p>



<p class="wp-block-paragraph">check out out yes now we&#8217;re ready to move on to the uh the 12 node the 12 node has one outgoing</p>



<p class="wp-block-paragraph">connection it goes out to the three did i get that wrong in the last video leave a comment</p>



<p class="wp-block-paragraph">Did I get that wrong in the last video?</p>



<p class="wp-block-paragraph">Leave a comment.</p>



<p class="wp-block-paragraph">I don&#8217;t know.</p>



<p class="wp-block-paragraph">And then we&#8217;re done with the 12 node.</p>



<p class="wp-block-paragraph">Now we look at the 15 node.</p>



<p class="wp-block-paragraph">Oh, that&#8217;s why I had that feeling,</p>



<p class="wp-block-paragraph">because the 15 didn&#8217;t go anywhere.</p>



<p class="wp-block-paragraph">15 has incoming connections, but no outgoing connections,</p>



<p class="wp-block-paragraph">so we actually can&#8217;t write it down here.</p>



<p class="wp-block-paragraph">There&#8217;s no need.</p>



<p class="wp-block-paragraph">Then we look at the 18 node.</p>



<p class="wp-block-paragraph">The 18 has outgoing connections to four other nodes.</p>



<p class="wp-block-paragraph">To the three, with a cost of three.</p>



<p class="wp-block-paragraph">Am I mind-tripping myself when I&#8217;m doing these duplicates?</p>



<p class="wp-block-paragraph">18 also goes out to the 6 with the cost of 8.</p>



<p class="wp-block-paragraph">Didn&#8217;t trick myself that time.</p>



<p class="wp-block-paragraph">The 18 also goes out to the 12 with the cost of 2.</p>



<p class="wp-block-paragraph">And then the 18 also goes out to 15 with the cost of 9.</p>



<p class="wp-block-paragraph">I just realized recently it&#8217;s a good idea to make faces at the camera for emotional thumbnails.</p>



<p class="wp-block-paragraph">I don&#8217;t know if you&#8217;ve picked up on that yet, but yeah.</p>



<p class="wp-block-paragraph">if you&#8217;ve picked up on that yet but yeah so let me just double check that i&#8217;ve got like nine edges</p>



<p class="wp-block-paragraph">and nine entries one two three four five six seven eight nine so i think i probably did it all right</p>



<p class="wp-block-paragraph">now there&#8217;s a problem um i&#8217;ve been talking about this in in the recent videos there&#8217;s a problem</p>



<p class="wp-block-paragraph">with this type of representation what if you are scanning through the edge list and you&#8217;re like</p>



<p class="wp-block-paragraph">well i&#8217;m scanning this edge and that edge and that edge and that edge and that edge and then i come</p>



<p class="wp-block-paragraph">to the 18-6 edge</p>



<p class="wp-block-paragraph">and I think, well now I found</p>



<p class="wp-block-paragraph">and i think well now i found some edge that was interesting for whatever reason</p>



<p class="wp-block-paragraph">maybe if i was scanning or doing some kind of like a operation that might have costed linear time so</p>



<p class="wp-block-paragraph">you don&#8217;t have to know about this uh this is in other videos but basically it&#8217;s not incredibly</p>



<p class="wp-block-paragraph">scalable it&#8217;s not incredibly fast it is technically scalable just not incredible</p>



<p class="wp-block-paragraph">linear time based on the number of edges so that kind of sucks because if i wanted to do something</p>



<p class="wp-block-paragraph">with those nodes with the 18 and</p>



<p class="wp-block-paragraph">with those nodes with the 18 and the six node i would then have to do another linear scan</p>



<p class="wp-block-paragraph">to find each node i&#8217;d have to go into my vertex list and i&#8217;d have to say well where the heck are</p>



<p class="wp-block-paragraph">those things where&#8217;s 18 nope nope nope nope nope uh found the 18 and then there&#8217;s another scan</p>



<p class="wp-block-paragraph">to find the six so really this is going to end up being um linear time based on the number of edges</p>



<p class="wp-block-paragraph">and also the number of vertices so that&#8217;s a little bit slower not</p>



<p class="wp-block-paragraph">a little bit slower not too great the upgrade that we&#8217;re going to do which we&#8217;ve been doing</p>



<p class="wp-block-paragraph">in all the other videos of of these recent edge list representations is i&#8217;m going to</p>



<p class="wp-block-paragraph">first i&#8217;m going to duplicate the vertex list like this</p>



<p class="wp-block-paragraph">and then i&#8217;m going to show you that each node each vertex has an index so i&#8217;m going to say</p>



<p class="wp-block-paragraph">one this is index two it&#8217;s index three when i type too hard i think my hand shakes the table</p>



<p class="wp-block-paragraph">that kind of sucks i need shock absorbers for my galumpiness oh so we have uh an index for every</p>



<p class="wp-block-paragraph">single vertex what if we uh what if we copy pasted the edge list over here on the left</p>



<p class="wp-block-paragraph">um what&#8217;s going on it&#8217;s not oh there it is dumb okay what if we copy pasted it and then we</p>



<p class="wp-block-paragraph">converted all of the values.</p>



<p class="wp-block-paragraph">at all of the values uh or um i guess you maybe on the left side if you if you&#8217;re doing this in</p>



<p class="wp-block-paragraph">the code you might put pointers instead of values so we&#8217;ll just say that we&#8217;ll convert the pointers</p>



<p class="wp-block-paragraph">or these values into indexes so this first tuple we&#8217;re describing the edge that goes between 3 and</p>



<p class="wp-block-paragraph">13 with the cost of 1 3 is sitting at index 0 in the vertex list so i&#8217;m going to change it to a 0</p>



<p class="wp-block-paragraph">13 is sitting at index 1 I&#8217;m going to leave the weight alone and</p>



<p class="wp-block-paragraph">I&#8217;m going to leave the weight alone, and then I&#8217;m just going to convert every other tuple</p>



<p class="wp-block-paragraph">to indexes. So the 13 node, that&#8217;s sitting at index 1. The 6 node is sitting at index 2,</p>



<p class="wp-block-paragraph">leave the weight alone. The 6 node is at index 2, the 12 node is at index 3.</p>



<p class="wp-block-paragraph">The 6 node again is at index 2. The 15 node is at index 4, again leave the weights alone.</p>



<p class="wp-block-paragraph">The 12 node is sitting at index 3, the 3 node is sitting at index 0, leave the weight alone.</p>



<p class="wp-block-paragraph">The 18 node is sitting at index 5.</p>



<p class="wp-block-paragraph">The 3 node is sitting at index 0.</p>



<p class="wp-block-paragraph">I think I&#8217;m going too fast.</p>



<p class="wp-block-paragraph">I&#8217;m probably going to screw something up.</p>



<p class="wp-block-paragraph">We&#8217;ve got index 5 there for the 18, and then 6 is index 2.</p>



<p class="wp-block-paragraph">18 is index 5.</p>



<p class="wp-block-paragraph">12 is index 3.</p>



<p class="wp-block-paragraph">18 is index 5.</p>



<p class="wp-block-paragraph">15 is index 4.</p>



<p class="wp-block-paragraph">So all I did was just convert every node value or pointer, if it&#8217;s in your code, to an index that references the vertex list.</p>



<p class="wp-block-paragraph">the vertex list why would I want to do this okay so like last time we said we</p>



<p class="wp-block-paragraph">would do O of E it would be linear time based on the number of edges if we&#8217;re</p>



<p class="wp-block-paragraph">performing some sort of a search or examination of all the edges so we have</p>



<p class="wp-block-paragraph">to like scan all the edges and then eventually we come to something we&#8217;re</p>



<p class="wp-block-paragraph">interested in maybe we realize oh that&#8217;s that&#8217;s a special edge we want to see</p>



<p class="wp-block-paragraph">what&#8217;s going on there maybe we want to grab those nodes and extract more</p>



<p class="wp-block-paragraph">information from them or modify them or do something to them this representation</p>



<p class="wp-block-paragraph">tells us</p>



<p class="wp-block-paragraph">this representation tells us exactly where to go,</p>



<p class="wp-block-paragraph">because this 5 is an index, it&#8217;s not a node value.</p>



<p class="wp-block-paragraph">Same thing for the 2.</p>



<p class="wp-block-paragraph">So index 5 gives us the 18,</p>



<p class="wp-block-paragraph">and index 2 gives us the 6.</p>



<p class="wp-block-paragraph">Notice how we still actually were looking for the 18 and 6 nodes,</p>



<p class="wp-block-paragraph">like we were in the previous, I guess, representation.</p>



<p class="wp-block-paragraph">So now, instead of scanning the vertex list,</p>



<p class="wp-block-paragraph">we can just jump directly to an index,</p>



<p class="wp-block-paragraph">jump directly to an index and you know remember like if you&#8217;re using an array or a vector it&#8217;s</p>



<p class="wp-block-paragraph">going to be constant time to jump to an index it&#8217;s like very very fast it&#8217;s the holy grail</p>



<p class="wp-block-paragraph">of time complexities so it&#8217;s really going to be something like o of e plus c or one or whatever</p>



<p class="wp-block-paragraph">you want to call it but it&#8217;s going to reduce to just o of e so it&#8217;s going to be a little bit</p>



<p class="wp-block-paragraph">faster notice how you know this one is going to take more time than that one maybe i&#8217;ll put it in</p>



<p class="wp-block-paragraph">red to make the</p>



<p class="wp-block-paragraph">it in red to make the the more than the greater than operator feel feel bad and evil but anyway</p>



<p class="wp-block-paragraph">this is how you do edgeless representation if you&#8217;re interested in the in all four uh types</p>



<p class="wp-block-paragraph">of graphs being represented with an edgeless representation check out all my other videos</p>



<p class="wp-block-paragraph">please leave a comment with ideas for stuff you want me to go over but i think i&#8217;m finished with</p>



<p class="wp-block-paragraph">this video it&#8217;s been 15 minutes already i don&#8217;t remember what i forgot to say but i guess we&#8217;re</p>



<p class="wp-block-paragraph">done now thank you so much for watching</p>



<p class="wp-block-paragraph">we&#8217;re done now thank you so much for watching i hope you learned a little bit of stuff and had a</p>



<p class="wp-block-paragraph">little bit of fun i&#8217;ll see you in the next video i&#8217;m gonna get my gear i&#8217;m just kidding i&#8217;m gonna</p>



<p class="wp-block-paragraph">eat a bunch of cookies i&#8217;m just kidding i shouldn&#8217;t do that but i probably will</p>



<p class="wp-block-paragraph">hey everybody thanks for watching this video again from the bottom of my heart i really</p>



<p class="wp-block-paragraph">appreciate it i do hope you did learn something and have some fun uh if you could do me a please</p>



<p class="wp-block-paragraph">a small little favor could you please subscribe and follow</p>



<p class="wp-block-paragraph">subscribe and follow this channel or these videos or whatever it is you do on</p>



<p class="wp-block-paragraph">the current social media website that you&#8217;re looking at right now it would</p>



<p class="wp-block-paragraph">really mean the world to me and it&#8217;ll help make more videos and grow this</p>



<p class="wp-block-paragraph">community so we&#8217;ll be able to do more videos longer videos better videos or</p>



<p class="wp-block-paragraph">just I&#8217;ll be able to keep making videos in general so please do do me a kindness</p>



<p class="wp-block-paragraph">and and subscribe you know sometimes I&#8217;m sleeping in the middle of the night and</p>



<p class="wp-block-paragraph">I just wake up because I know somebody subscribed or followed it just wakes me</p>



<p class="wp-block-paragraph">up and I could feel</p>



<p class="wp-block-paragraph">followed it just wakes me up and i get filled with joy that&#8217;s exactly what happens every single time</p>



<p class="wp-block-paragraph">so you could do it as a nice favor to me or you could you could troll me if you want to just wake</p>



<p class="wp-block-paragraph">me up in the middle of the night just subscribe and then i&#8217;ll i&#8217;ll just wake up i promise that&#8217;s</p>



<p class="wp-block-paragraph">what will happen also uh if you look at the middle of the screen right now you should see a qr code</p>



<p class="wp-block-paragraph">which you can scan in order to go to the website which i think is also named somewhere at the</p>



<p class="wp-block-paragraph">bottom of this video and it&#8217;ll take you to my main website where you can just kind of like see</p>



<p class="wp-block-paragraph">all the videos I published, and the services, and</p>



<p class="wp-block-paragraph">I published and the services and tutorials and things that I offer and all that good stuff and</p>



<p class="wp-block-paragraph">If you have a suggestion for</p>



<p class="wp-block-paragraph">Clarifications or errata or just future videos that you want to see please leave a comment or if you just want to say hey</p>



<p class="wp-block-paragraph">What&#8217;s up? What&#8217;s going on? You know, just send me a comment, whatever</p>



<p class="wp-block-paragraph">I also wake up for those in the middle of the night. I get I wake up in a cold sweat. I&#8217;m like this</p>



<p class="wp-block-paragraph">It would really it really mean the world to me. I would really appreciate it. So again, thank you</p>



<p class="wp-block-paragraph">it. So again, thank you so much for watching this video and, um, enjoy the cool music as,</p>



<p class="wp-block-paragraph">as I fade into the darkness, which is coming for us all.</p>



<p class="wp-block-paragraph">ご視聴ありがとうございました</p>



<p class="wp-block-paragraph">Teksting av Nicolai Winther</p>



<p class="wp-block-paragraph">Hey there!</p>
<p>The post <a href="https://www.NeuralLantern.com/directed-weighted-graph-edge-list-representation/">Directed Weighted Graph Edge List Representation</a> appeared first on <a href="https://www.NeuralLantern.com">NeuralLantern.com</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.NeuralLantern.com/directed-weighted-graph-edge-list-representation/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>How to Represent Undirected Weighted Graphs Using Edge Lists</title>
		<link>https://www.NeuralLantern.com/how-to-represent-undirected-weighted-graphs-using-edge-lists/</link>
					<comments>https://www.NeuralLantern.com/how-to-represent-undirected-weighted-graphs-using-edge-lists/#respond</comments>
		
		<dc:creator><![CDATA[mike]]></dc:creator>
		<pubDate>Wed, 26 Aug 2026 17:23:28 +0000</pubDate>
				<category><![CDATA[Computer Science]]></category>
		<category><![CDATA[Data Structures]]></category>
		<category><![CDATA[Graphs]]></category>
		<category><![CDATA[Videos]]></category>
		<category><![CDATA[big o complexity]]></category>
		<category><![CDATA[computer science]]></category>
		<category><![CDATA[constant time lookup]]></category>
		<category><![CDATA[data structures]]></category>
		<category><![CDATA[edge list]]></category>
		<category><![CDATA[edge list representation]]></category>
		<category><![CDATA[graph algorithms]]></category>
		<category><![CDATA[graph representation]]></category>
		<category><![CDATA[graph theory]]></category>
		<category><![CDATA[node index]]></category>
		<category><![CDATA[programming graphs]]></category>
		<category><![CDATA[undirected graphs]]></category>
		<category><![CDATA[undirected weighted graph]]></category>
		<category><![CDATA[vertex list]]></category>
		<category><![CDATA[weighted graphs]]></category>
		<guid isPermaLink="false">https://www.NeuralLantern.com/?p=428</guid>

					<description><![CDATA[<p>Learn the edge list representation for undirected weighted graphs. Build a vertex list and an edge list of triples that store both endpoints and the weight of each edge. Convert the list to use indexes so node lookups become constant time when the vertices are stored in a vector or array. This approach keeps each undirected edge only once and improves the speed of operations that need both edges and nodes.</p>
<p>The post <a href="https://www.NeuralLantern.com/how-to-represent-undirected-weighted-graphs-using-edge-lists/">How to Represent Undirected Weighted Graphs Using Edge Lists</a> appeared first on <a href="https://www.NeuralLantern.com">NeuralLantern.com</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p class="wp-block-paragraph">In the last video we talked about representing an unweighted and undirected graph using the edge list representation inside your machine. Now let&#8217;s talk about how to do that exact same thing with undirected weighted graphs.</p>



<figure class="wp-block-embed is-type-video is-provider-youtube wp-block-embed-youtube wp-embed-aspect-16-9 wp-has-aspect-ratio"><div class="wp-block-embed__wrapper">
<iframe title="How to Represent Undirected Weighted Graphs Using Edge Lists" width="1380" height="776" src="https://www.youtube.com/embed/p1sD8ZQxFgg?feature=oembed" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe>
</div></figure>



<p class="wp-block-paragraph">We start from the previous diagram and add weight costs on every single edge. The graph is a tuple consisting of a vertex list and an edge list. Vertices are listed from left to right. Edges are stored as triples with starting node, ending node, and weight.</p>



<p class="wp-block-paragraph">We build the edge list by scanning nodes left to right so each undirected edge appears only once. Then we convert the representation to use indexes instead of node values. This lets you jump to any node in constant time when using a vector or array for the vertex list.</p>



<p class="wp-block-paragraph">This makes operations on edges and nodes much faster than linear scans for both. Next up: directed graphs, both unweighted and weighted.</p>



<p class="wp-block-paragraph">0:00 Introduction to Weighted Graphs<br>1:00 Adding Edge Weights<br>3:16 Creating the Vertex List<br>5:19 Building the Edge List<br>10:34 Completing the Value-Based List<br>10:44 Why Value-Based Is Slow<br>13:04 Converting to Index-Based<br>15:29 Benefits of Index Lookups<br>17:49 Wrap-Up and Next Videos<br>18:22 Thank You and Outro</p>



<p class="wp-block-paragraph">=-=-=-=-=-=-=-=-=</p>



<p class="wp-block-paragraph">Thanks for watching!</p>



<p class="wp-block-paragraph">Find us on other social media here:</p>



<ul class="wp-block-list">
<li><a href="https://www.NeuralLantern.com/social">https://www.NeuralLantern.com/social</a></li>



<li>Twitter / X: <a href="https://x.com/NeuralLantern">https://x.com/NeuralLantern</a></li>



<li>Rumble: <a href="https://rumble.com/c/c-3696939">https://rumble.com/c/c-3696939</a></li>



<li>BitChute: <a href="https://www.bitchute.com/channel/pg1Pvv5dN4Gt">https://www.bitchute.com/channel/pg1Pvv5dN4Gt</a></li>



<li>Daily Motion: <a href="https://www.dailymotion.com/neurallantern">https://www.dailymotion.com/neurallantern</a></li>



<li>Minds: <a href="https://www.minds.com/neurallantern/">https://www.minds.com/neurallantern/</a></li>



<li>Odysee: <a href="https://odysee.com/@NeuralLantern:5">https://odysee.com/@NeuralLantern:5</a></li>
</ul>



<p class="wp-block-paragraph">Please show your support!</p>



<ul class="wp-block-list">
<li>Buy me a coffee: <a href="https://ko-fi.com/neurallantern">https://ko-fi.com/neurallantern</a></li>



<li>Subscribe + Sharing on Social Media</li>



<li>Leave a comment or suggestion</li>



<li>Subscribe to the Blog: <a href="https://www.NeuralLantern.com">https://www.NeuralLantern.com</a></li>



<li>Watch the main &#8220;pinned&#8221; video of this channel for offers and extras</li>
</ul>



<p class="wp-block-paragraph">Hey there! Hello there. Hey there. In the last video we talked about representing</p>



<p class="wp-block-paragraph">an unweighted and undirected graph using the edge list representation inside your</p>



<p class="wp-block-paragraph">machine. Now let&#8217;s talk about how to do that exact same thing with undirected</p>



<p class="wp-block-paragraph">weighted graphs.</p>



<p class="wp-block-paragraph">seeing on the screen right now is basically the last diagram that I drew on my previous video</p>



<p class="wp-block-paragraph">where we talked about how to represent unweighted undirected graphs in the machine. You don&#8217;t</p>



<p class="wp-block-paragraph">necessarily need to watch that video to understand this video but you probably want to watch a few</p>



<p class="wp-block-paragraph">of my other previous graph videos to know the basics of graphs and edge lists and edge-based</p>



<p class="wp-block-paragraph">paths and node-based paths and all that stuff. So for now I&#8217;m just going to continue from this</p>



<p class="wp-block-paragraph">document. So let&#8217;s see, I&#8217;m going to duplicate</p>



<p class="wp-block-paragraph">I&#8217;m going to duplicate this real fast I am going to just kind of modify the captions here because</p>



<p class="wp-block-paragraph">we&#8217;re not going to do unweighted anywhere we&#8217;re going to say a weighted undirected graph did I</p>



<p class="wp-block-paragraph">get that backwards I think sometimes people say undirected and then the weighted part after so</p>



<p class="wp-block-paragraph">I&#8217;m just going to I&#8217;m just going to change it so it&#8217;s still undirected which means the edges don&#8217;t</p>



<p class="wp-block-paragraph">have arrows so that&#8217;s fine but it&#8217;s going to be weighted now which means I have to assign a cost</p>



<p class="wp-block-paragraph">of traveling along every single edge.</p>



<p class="wp-block-paragraph">So I am going to just</p>



<p class="wp-block-paragraph">so i am going to just sort of like erase a bunch of this stuff real fast erase these notations</p>



<p class="wp-block-paragraph">uh you know what i&#8217;m going to erase all of this because i want you to you know see it</p>



<p class="wp-block-paragraph">from start to finish okay so now i&#8217;m going to add weight costs on every single edge</p>



<p class="wp-block-paragraph">um in the last video what i mentioned is that the the edge list representation of a graph in</p>



<p class="wp-block-paragraph">the machine uh is basically your graph is a tuple that&#8217;s the orange you know marking</p>



<p class="wp-block-paragraph">a tuple that&#8217;s the orange you know markings up here your graph is a tuple where the tuple consists</p>



<p class="wp-block-paragraph">of a vertex list and also an edge list so we&#8217;ll do that from scratch together again but um let</p>



<p class="wp-block-paragraph">me get the weights on there first what color do you want i don&#8217;t know i&#8217;m going to put arbitrary</p>



<p class="wp-block-paragraph">numbers on all the edges just to say that every edge has a cost remember in a graph when you</p>



<p class="wp-block-paragraph">travel along an edge if the edge has a weight then you consider that weight to be part of the cost</p>



<p class="wp-block-paragraph">usually of traveling there so like if this was a network diagram</p>



<p class="wp-block-paragraph">traveling there so like if this was a network diagram maybe these weights represent pings or</p>



<p class="wp-block-paragraph">lags or bandwidth cost or something like that if this is like an airport diagram maybe the weights</p>



<p class="wp-block-paragraph">represent gasoline or time or something like that so i&#8217;m going to do like four there we can repeat</p>



<p class="wp-block-paragraph">weights if we really want to i&#8217;m going to line this up a little bit better that 12 looks gross</p>



<p class="wp-block-paragraph">okay i think we&#8217;re okay now i have 14 all right did i forget anything raise your hand if i forgot</p>



<p class="wp-block-paragraph">something</p>



<p class="wp-block-paragraph">raise your hand if i forgot something oh i forgot okay did you raise your hand okay</p>



<p class="wp-block-paragraph">i&#8217;m going to do the 13 and 6 uh let&#8217;s just put a 2 weight there you could put ones everywhere</p>



<p class="wp-block-paragraph">if you wanted to i mean any any number is fine um also in an unweighted graph you kind of can</p>



<p class="wp-block-paragraph">consider the number of hops to be a path cost which means you can kind of consider every uh</p>



<p class="wp-block-paragraph">edge to just have a weight of one but for now we&#8217;re just gonna say this is the weighted graph</p>



<p class="wp-block-paragraph">Okay, so the first&#8230;</p>



<p class="wp-block-paragraph">okay so the first thing we need to do uh after that is make a vertex list so our vertex list</p>



<p class="wp-block-paragraph">is just going to be a list of all of our vertices all of our nodes in the graph</p>



<p class="wp-block-paragraph">how do we list them so for starters like we usually say vertex list but for me personally</p>



<p class="wp-block-paragraph">this this particular data structure just that we&#8217;re going to type up on the bottom</p>



<p class="wp-block-paragraph">i usually like to consider that a vector or an array at least because you can jump into a</p>



<p class="wp-block-paragraph">Thank you.</p>



<p class="wp-block-paragraph">uh because you can jump into a specific index in constant time which is really really fast if you</p>



<p class="wp-block-paragraph">don&#8217;t know uh big o and time complexities check out my other videos but um it&#8217;s just really really</p>



<p class="wp-block-paragraph">fast to jump to an index when you&#8217;re using an array or a vector but it&#8217;s kind of slow when</p>



<p class="wp-block-paragraph">you&#8217;re using an actual linked list or some other data structure that makes you scan through it so</p>



<p class="wp-block-paragraph">i&#8217;m going to say that my vertex list is actually a vector but i&#8217;ll keep calling it a list anyway</p>



<p class="wp-block-paragraph">so we got the vertices uh we have to start naming them okay so the first thing is i&#8217;m going to do</p>



<p class="wp-block-paragraph">we got the three there and we got the 13 and we got the 6 and the 12 and the 15 i&#8217;m just naming</p>



<p class="wp-block-paragraph">all of the nodes in my graph i like to go from left to right because that makes it easier for</p>



<p class="wp-block-paragraph">me to debug what i&#8217;m doing um you probably in your code i said this in the last video you probably</p>



<p class="wp-block-paragraph">don&#8217;t want to store the actual value in your vertex list you probably actually want to create</p>



<p class="wp-block-paragraph">an object of type node or of type vertex and give it the template data</p>



<p class="wp-block-paragraph">and give it the template data type of in this case integer and then set the 13 inside of the class</p>



<p class="wp-block-paragraph">it&#8217;s not as fast and memory efficient as just putting a number there but uh you know for me</p>



<p class="wp-block-paragraph">i like more flexibility and i like to be able to do more powerful things with my stuff so i&#8217;m going</p>



<p class="wp-block-paragraph">to say that 13 and all of the other nodes really that represents to me i made a brand new instance</p>



<p class="wp-block-paragraph">of a class called node or vertex and then i set it up however i wanted and one of the things i did</p>



<p class="wp-block-paragraph">set it up, we&#8217;ll stick to number 30.</p>



<p class="wp-block-paragraph">things i did to set it up we&#8217;ll stick the number 13 inside of the class but for the for the diagram</p>



<p class="wp-block-paragraph">it&#8217;s fine like this okay so we have our vertex list that&#8217;s the v if you&#8217;re looking at the uh</p>



<p class="wp-block-paragraph">you know the v comma e the v part now we need to do the edge list so i&#8217;m going to say here&#8217;s my</p>



<p class="wp-block-paragraph">edge list and we&#8217;re going to use the edge list representation like i talked about in previous</p>



<p class="wp-block-paragraph">videos, which is basically a tuple where one tuple describes one edge. So in our</p>



<p class="wp-block-paragraph">So, in our graph that we have right now, we definitely need a starting point and an ending point.</p>



<p class="wp-block-paragraph">So, let me just start by looking at the 3 node, and I want to describe one of the edges for the 3.</p>



<p class="wp-block-paragraph">So, the 3 goes to the 18 and the 13 and the 12.</p>



<p class="wp-block-paragraph">I&#8217;m going to scan my eyes from left to right to make it a little more simple.</p>



<p class="wp-block-paragraph">So, the 3 node, it connects to the 13 node, so I&#8217;m going to put a 3, 13.</p>



<p class="wp-block-paragraph">the nodes doesn&#8217;t matter in an undirected graph so i could have easily put 13 and 3 it&#8217;s fine</p>



<p class="wp-block-paragraph">you don&#8217;t want to duplicate it by putting 13 comma 3 sorry you don&#8217;t want to put 3 comma 13 and then</p>



<p class="wp-block-paragraph">later put 13 comma 3. you don&#8217;t want to double it up because that would be like representing two</p>



<p class="wp-block-paragraph">separate edges i&#8217;m just going to sort it in my mind before so that i don&#8217;t have to sort it again</p>



<p class="wp-block-paragraph">later when i&#8217;m reading the graph which makes it faster for read operations but so 3 goes to 13</p>



<p class="wp-block-paragraph">And then we have to represent the weight, so the tuple gets a little more complicated.</p>



<p class="wp-block-paragraph">so the tuple gets a little more complicated than the last video just by a little bit i&#8217;m going to</p>



<p class="wp-block-paragraph">say 3 comma 13 comma the weight which is just a 1 here and i think i mentioned this in my other</p>



<p class="wp-block-paragraph">videos like a while back but uh the weight doesn&#8217;t have to be integer it could be a float it could be</p>



<p class="wp-block-paragraph">any data type you wanted really as long as your algorithms support it and you have you know your</p>



<p class="wp-block-paragraph">operator overloads all done and all that could be a full class just for the weight if you wanted to</p>



<p class="wp-block-paragraph">but for this video it&#8217;s just going to be the weight is an integer so that&#8217;s the cost of</p>



<p class="wp-block-paragraph">traveling</p>



<p class="wp-block-paragraph">is an integer so that&#8217;s the cost of traveling along that one edge so notice how all of our</p>



<p class="wp-block-paragraph">tuples have three items each it&#8217;s a triple tuple so i&#8217;m going to continue trying to represent uh</p>



<p class="wp-block-paragraph">what the three touches so the three uh it touches the 13 and it also touches the 12 so i&#8217;m going to</p>



<p class="wp-block-paragraph">say 3 goes to 12. what does that edge cost it costs us six because that&#8217;s the little pink six</p>



<p class="wp-block-paragraph">there we&#8217;re done with that tuple so what else does three touch uh touches the 13 and then it touches</p>



<p class="wp-block-paragraph">the</p>



<p class="wp-block-paragraph">touches the 13 and then it touches the uh 12 and then it touches the 18. so i&#8217;m going to put an 18</p>



<p class="wp-block-paragraph">there what does that edge cost it costs a four because there&#8217;s a pink little four at the very</p>



<p class="wp-block-paragraph">top of the graph surprise you didn&#8217;t know that okay so then uh i&#8217;m sorry we&#8217;re going to move on</p>



<p class="wp-block-paragraph">to the next node so we did the three already so i&#8217;m done with that i&#8217;m going to look at the 13.</p>



<p class="wp-block-paragraph">where does the 13 connect it connects to the three but that&#8217;s to the left</p>



<p class="wp-block-paragraph">because i&#8217;m this is why i like to scan my eyes from left to right i already know stuff on the</p>



<p class="wp-block-paragraph">left is handled i don&#8217;t have to do it again so forget about the three i already described it</p>



<p class="wp-block-paragraph">up here in the very first tuple three comma thirteen comma one i don&#8217;t want to describe it</p>



<p class="wp-block-paragraph">again so forget about the three now the thirteen connects to the six so thirteen comma six and what</p>



<p class="wp-block-paragraph">does that cost it costed two for our arbitrary labeling thirteen doesn&#8217;t touch any other node</p>



<p class="wp-block-paragraph">so we&#8217;re done with the thirteen row and by the way i&#8217;m doing a line new lines here you don&#8217;t have to</p>



<p class="wp-block-paragraph">to do that, I just</p>



<p class="wp-block-paragraph">here you don&#8217;t have to do that i just like to i like to do one you know row per per start node</p>



<p class="wp-block-paragraph">to make it look cooler and nicer okay so the uh 13 is done now let&#8217;s do the six</p>



<p class="wp-block-paragraph">six touches the 13 but remember in the previous row we just handled that so i&#8217;m not going to do</p>



<p class="wp-block-paragraph">it again the six to the right touches three other nodes you can see there are three lines</p>



<p class="wp-block-paragraph">protruding on the right side of the six so um i&#8217;m just going to take those from left to right</p>



<p class="wp-block-paragraph">It&#8217;s.</p>



<p class="wp-block-paragraph">I&#8217;m just going to take those from left to right.</p>



<p class="wp-block-paragraph">It&#8217;s touching the 12 at a cost of 14.</p>



<p class="wp-block-paragraph">The 6 is also touching the 15 at a cost of 12, I think.</p>



<p class="wp-block-paragraph">And the 6, you know, if I make mistakes, just leave it in a comment.</p>



<p class="wp-block-paragraph">I will leave the video up so you can always remember my humiliation.</p>



<p class="wp-block-paragraph">But I&#8217;m going to try my best.</p>



<p class="wp-block-paragraph">I did not practice this.</p>



<p class="wp-block-paragraph">6 touches the 15, and then the 6 touches the 18.</p>



<p class="wp-block-paragraph">So 6 touches 18, and then it costs 9.</p>



<p class="wp-block-paragraph">So now we&#8217;re probably done with the 6.</p>



<p class="wp-block-paragraph">we&#8217;re probably done with the six um moving on uh one node to the right now we&#8217;re going to look at</p>



<p class="wp-block-paragraph">the 12 okay so the 12 it touches 3 and 13 and 6 but those are already handled so forget it</p>



<p class="wp-block-paragraph">the 12 touches the 15 we did not handle that right yeah because we&#8217;re going from left to right</p>



<p class="wp-block-paragraph">uh and and then it costs us from going from 12 what am i doing it doesn&#8217;t touch the 15 oh my god</p>



<p class="wp-block-paragraph">so the 12 touches the</p>



<p class="wp-block-paragraph">uh so the 12 touches the uh the three which is already handled and it touches the</p>



<p class="wp-block-paragraph">six which is already handled and then it only goes to the right to the 18. okay</p>



<p class="wp-block-paragraph">anyway you know when i make mistakes on camera and i say do over i always go i don&#8217;t know why</p>



<p class="wp-block-paragraph">so the 12 and the 18 uh it&#8217;s going to cost us three so then we&#8217;re done with the 12th so i&#8217;m</p>



<p class="wp-block-paragraph">I&#8217;m going to go to the next one. We&#8217;ll look at the 15. The 15. 6 is already handled. 8.</p>



<p class="wp-block-paragraph">6 is already handled, 18 is not handled yet, so I&#8217;m going to put 18 there, and it cost us $88, and then the 18 is the last one.</p>



<p class="wp-block-paragraph">There&#8217;s nothing to do, because every node is on the left of the 18.</p>



<p class="wp-block-paragraph">If you carefully, if you pause the video and look at every single node, you&#8217;ll see it&#8217;s already represented in a previous node.</p>



<p class="wp-block-paragraph">So we&#8217;re officially done with the basic edge list representation of this graph, this undirected but weighted graph.</p>



<p class="wp-block-paragraph">We need to do something else, though.</p>



<p class="wp-block-paragraph">we need to do something else though i mentioned in the last video i&#8217;m going to repeat it in case</p>



<p class="wp-block-paragraph">you didn&#8217;t watch the last video but we need to make sure that uh oh i guess i forgot to separate</p>



<p class="wp-block-paragraph">those two things that means i have to duplicate the vertex list over here on the right side too</p>



<p class="wp-block-paragraph">okay um so on the left this is okay but it&#8217;s kind of slow because what if we&#8217;re trying to look at uh</p>



<p class="wp-block-paragraph">you know one particular edge let&#8217;s say that we we want to see what&#8217;s going on with this uh this</p>



<p class="wp-block-paragraph">edge right here. Let&#8217;s say the 3 and the 13 edge, for whatever reason.</p>



<p class="wp-block-paragraph">13 edge for whatever reason um i don&#8217;t know green 3 and the 13 edge okay so we&#8217;re looking at that</p>



<p class="wp-block-paragraph">edge maybe for some reason we had just finished scanning uh maybe that&#8217;s not a fun edge well</p>



<p class="wp-block-paragraph">what&#8217;s going on hello uh oh i forgot to set up a thing where you can make your cursor really</p>



<p class="wp-block-paragraph">visible okay um actually so so this is not the most fun edge let me let me see about the 15 and</p>



<p class="wp-block-paragraph">and 18-inch.</p>



<p class="wp-block-paragraph">18 edge excuse me i had to take a drink of water so we&#8217;re going to look at this edge connecting</p>



<p class="wp-block-paragraph">the 15 and the 18 node that&#8217;s a little more interesting so you can imagine maybe you were</p>



<p class="wp-block-paragraph">doing a little scan uh if you know big o complexity by now we had to check out every single edge in</p>



<p class="wp-block-paragraph">this edge list until we found the one that connected the 15 and the 18 so this was a linear</p>



<p class="wp-block-paragraph">time scan based on the number of edges so this is just it&#8217;s scalable but it&#8217;s not very fast right so</p>



<p class="wp-block-paragraph">We ended up kind of looking at this one.</p>



<p class="wp-block-paragraph">so we ended up kind of looking at this one right here not fast um but what if we want to examine</p>



<p class="wp-block-paragraph">uh some properties of the nodes or the vertices uh involved like the 15 and the 18.</p>



<p class="wp-block-paragraph">here in this representation on the left we have the values we have the 15 value and the 18 value</p>



<p class="wp-block-paragraph">we don&#8217;t really have a pointer to a full node object if that&#8217;s what you&#8217;re doing in your code</p>



<p class="wp-block-paragraph">so um how do we get those those node objects we&#8217;re gonna have to do another linear scan we&#8217;re gonna</p>



<p class="wp-block-paragraph">I&#8217;m gonna have to look at this one right here.</p>



<p class="wp-block-paragraph">to look at this one right here oh that doesn&#8217;t match the value of 15 look at this one look at</p>



<p class="wp-block-paragraph">this one look at this one we&#8217;re gonna have to scan every single node until we realize that it&#8217;s those</p>



<p class="wp-block-paragraph">two at the end this is true even if it&#8217;s a vector uh holding your vertices because if we don&#8217;t know</p>



<p class="wp-block-paragraph">the index then we have to actually just sweep through the whole vector so that&#8217;s really slow</p>



<p class="wp-block-paragraph">it&#8217;s still kind of scalable but uh it&#8217;s not the best instead let&#8217;s update the the representation</p>



<p class="wp-block-paragraph">on the right to have index</p>



<p class="wp-block-paragraph">on the right to have indexes we did this in the last video but basically if you just kind of look</p>



<p class="wp-block-paragraph">at this three node here the three node well let me let me copy this one more time the three node</p>



<p class="wp-block-paragraph">corresponds to index zero which i forgot to write down my bad let me write that down for you real</p>



<p class="wp-block-paragraph">fast get rid of that get rid of that get rid of that okay so i&#8217;m just going to update this vertex</p>



<p class="wp-block-paragraph">list to just show you that if we have a vector or in a</p>



<p class="wp-block-paragraph">that if we have a vector or an array then every single item has an index here&#8217;s index one index</p>



<p class="wp-block-paragraph">two index three and four and five and then i guess i&#8217;ll just copy paste that to the other one since</p>



<p class="wp-block-paragraph">i was too dumb to make an extra separated graph there um separated item okay so the uh the 15</p>



<p class="wp-block-paragraph">sorry no the 13 the 3 and the 13 i guess i got to get rid of that that&#8217;s distracting me</p>



<p class="wp-block-paragraph">I guess I gotta get rid of that, that&#8217;s distracting me.</p>



<p class="wp-block-paragraph">The three and the 13,</p>



<p class="wp-block-paragraph">those correspond to indexes zero and one</p>



<p class="wp-block-paragraph">in the vertex list, right?</p>



<p class="wp-block-paragraph">So zero and one, that&#8217;s the three and the 13.</p>



<p class="wp-block-paragraph">So I&#8217;m just gonna change the values,</p>



<p class="wp-block-paragraph">the T-type values, to the raw indexes.</p>



<p class="wp-block-paragraph">It&#8217;s gonna seem a little weird at first,</p>



<p class="wp-block-paragraph">and I&#8217;m gonna leave the weight alone,</p>



<p class="wp-block-paragraph">because that&#8217;s totally fine.</p>



<p class="wp-block-paragraph">We&#8217;re not gonna jump to a weight,</p>



<p class="wp-block-paragraph">unless maybe you had a weight list, a weight vector,</p>



<p class="wp-block-paragraph">if you wanted to make instances of weights.</p>



<p class="wp-block-paragraph">You could do that, I&#8217;m not gonna do it.</p>



<p class="wp-block-paragraph">do that i&#8217;m not going to do it so then again the 3 is a 0 the 12 is index 3 the 3 is another 0</p>



<p class="wp-block-paragraph">the 18 is index 5. i&#8217;ll just do this for every single row so the 13 here is index 1 and then</p>



<p class="wp-block-paragraph">the 6 index 2 notice how i&#8217;m just looking up here at the indexes of the vertex list and i&#8217;m just</p>



<p class="wp-block-paragraph">changing the node values to the indexes where the nodes actually are in the vertex list so that&#8217;s a</p>



<p class="wp-block-paragraph">So two.</p>



<p class="wp-block-paragraph">vertex list so that&#8217;s a 2 and then the 12 is going to be a 3 and then the 6 is also going to be a 2</p>



<p class="wp-block-paragraph">and the 15 is going to be a 4 and then the 6 is going to be a 2 and 18 is going to be 5</p>



<p class="wp-block-paragraph">on to the next row the 12 node is index 3 the 18 node is index 5 uh the 15 node is index 4 and the</p>



<p class="wp-block-paragraph">18 node is index 5 so whoa whoa correct me if i made a typo in the comments please i&#8217;ll release</p>



<p class="wp-block-paragraph">another video as a thank you.</p>



<p class="wp-block-paragraph">i&#8217;ll release another video as a thank you but uh now i&#8217;ve converted the whole entire representation</p>



<p class="wp-block-paragraph">on the right side to an index based uh uh you know edge list so i&#8217;m gonna do this one over</p>



<p class="wp-block-paragraph">here is by value and the one on the right is by index why is the one on the right better now</p>



<p class="wp-block-paragraph">remember at some point we might have been scanning to find an edge well what did i just do wrong oh i</p>



<p class="wp-block-paragraph">clicked over there okay we might have been scanning to find you know some edge so we&#8217;re like</p>



<p class="wp-block-paragraph">Like, subscribe, and hit the bell icon to be notified when I post a new video. Thanks for watching, and I&#8217;ll see you in the next one.</p>



<p class="wp-block-paragraph">Bye-bye.</p>



<p class="wp-block-paragraph">edge so we&#8217;re like scanning scanning scanning scanning and then maybe we decide we&#8217;re trying</p>



<p class="wp-block-paragraph">to figure out what&#8217;s going on with the two and the not the two and the four the uh the six and</p>



<p class="wp-block-paragraph">the fifteen node right so that&#8217;s uh the six and the fifteen node that&#8217;s basically you know this</p>



<p class="wp-block-paragraph">right here uh so now what if we want to do something with the nodes we want to do something</p>



<p class="wp-block-paragraph">with the six node do something with the 15 node we don&#8217;t want to scan through the vertex list again</p>



<p class="wp-block-paragraph">we don&#8217;t want to go scan scan scan scan scan that&#8217;s linear time that&#8217;s not as fast as it could</p>



<p class="wp-block-paragraph">Could be.</p>



<p class="wp-block-paragraph">That&#8217;s linear time, that&#8217;s not as fast as it could be.</p>



<p class="wp-block-paragraph">So instead, we&#8217;ve already converted here so that we have indexes.</p>



<p class="wp-block-paragraph">So if I look at the 2 and the 4, the 2 and the 4 represent indexes, not node values.</p>



<p class="wp-block-paragraph">So this 2 tells me that I can go to index 2 to get the 6 node,</p>



<p class="wp-block-paragraph">and the 4 tells me I can go to index 4 to get the 15 node.</p>



<p class="wp-block-paragraph">Notice how I did not have to scan the vertex list to figure out where those nodes are.</p>



<p class="wp-block-paragraph">And if you&#8217;re using a vector for your vertex list,</p>



<p class="wp-block-paragraph">list then you can jump to every index in constant time so now if we were going to you know search</p>



<p class="wp-block-paragraph">and do a bunch of stuff on edges we probably only had to spend linear time on the edge list but then</p>



<p class="wp-block-paragraph">we only spent constant time uh to to manipulate each node whereas it would have been linear plus</p>



<p class="wp-block-paragraph">linear uh in the past like on the left side that would have been uh you know if we&#8217;re going to do</p>



<p class="wp-block-paragraph">stuff with with both the edges and the nodes it would have been o of linear time based on the</p>



<p class="wp-block-paragraph">number of edges if we&#8217;re gonna do every</p>



<p class="wp-block-paragraph">on the number of edges if we&#8217;re going to do every you know something to every single edge</p>



<p class="wp-block-paragraph">plus linear time based on number of vertices but over here it&#8217;s going to be linear time of the</p>



<p class="wp-block-paragraph">edges plus just constant time which basically means it&#8217;s going to be you know big o of just</p>



<p class="wp-block-paragraph">the number of edges and i&#8217;m talking about a you know a fantasy scenario where we&#8217;re just going</p>



<p class="wp-block-paragraph">to scan a bunch of stuff you can imagine there&#8217;s a whole bunch of different operations you could</p>



<p class="wp-block-paragraph">do on a graph, and it would be very advantageous and fast.</p>



<p class="wp-block-paragraph">very advantageous and fast if you could just jump to a node if you wanted to be able to manipulate</p>



<p class="wp-block-paragraph">it directly um let&#8217;s see so i did i think 20 minutes already so i think this is going to be</p>



<p class="wp-block-paragraph">it for for today&#8217;s video um and i&#8217;m going to do another video after this where we start working</p>



<p class="wp-block-paragraph">with directed graphs so i&#8217;m going to do directed unweighted and then directed weighted so by the</p>



<p class="wp-block-paragraph">time you watch all four of these videos</p>



<p class="wp-block-paragraph">by the time you watch all four of these videos you&#8217;ll know how to represent all four types of</p>



<p class="wp-block-paragraph">graphs in the machine okay anyway so thank you for watching this video i hope you learned a little</p>



<p class="wp-block-paragraph">bit of stuff and had a little bit of fun i&#8217;ll see you next time tell your friends eat a chocolate</p>



<p class="wp-block-paragraph">okay i&#8217;m outie hey everybody thanks for watching this video again from the bottom of my heart i</p>



<p class="wp-block-paragraph">really appreciate it i do hope you did learn something and have some fun uh if you could do</p>



<p class="wp-block-paragraph">me a please a small little favor could you please</p>



<p class="wp-block-paragraph">please, a small little favor. Could you please subscribe and follow this channel or these videos</p>



<p class="wp-block-paragraph">or whatever it is you do on the current social media website that you&#8217;re looking at right now?</p>



<p class="wp-block-paragraph">It would really mean the world to me and it&#8217;ll help make more videos and grow this community.</p>



<p class="wp-block-paragraph">So we&#8217;ll be able to do more videos, longer videos, better videos, or just I&#8217;ll be able to keep making</p>



<p class="wp-block-paragraph">videos in general. So please do me a kindness and subscribe. You know, sometimes I&#8217;m sleeping</p>



<p class="wp-block-paragraph">in the middle of the night and I just wake up because I know somebody subscribed.</p>



<p class="wp-block-paragraph">just wake up because i know somebody subscribed or followed it just wakes me up and i get filled</p>



<p class="wp-block-paragraph">with joy that&#8217;s exactly what happens every single time so you could do it as a nice favor to me or</p>



<p class="wp-block-paragraph">you could you could troll me if you want to just wake me up in the middle of the night just subscribe</p>



<p class="wp-block-paragraph">and then i&#8217;ll i&#8217;ll just wake up i promise that&#8217;s what will happen also uh if you look at the middle</p>



<p class="wp-block-paragraph">of the screen right now you should see a qr code which you can scan in order to go to the website</p>



<p class="wp-block-paragraph">which i think is also named somewhere at the bottom of this video and it&#8217;ll take you to my</p>



<p class="wp-block-paragraph">main website where you can just kind of like see all the</p>



<p class="wp-block-paragraph">where you can just kind of like see all the videos i published and the services and tutorials and</p>



<p class="wp-block-paragraph">things that i offer and all that good stuff and uh if you have a suggestion for uh uh clarifications</p>



<p class="wp-block-paragraph">or errata or just future videos that you want to see please leave a comment or if you just want to</p>



<p class="wp-block-paragraph">say hey what&#8217;s up what&#8217;s going on you know just send me a comment whatever i also wake up for</p>



<p class="wp-block-paragraph">those in the middle of the night i get i wake up in a cold sweat and i&#8217;m like it would really it</p>



<p class="wp-block-paragraph">really mean the world to me I would really appreciate</p>



<p class="wp-block-paragraph">it really mean the world to me i would really appreciate it so again thank you so much for</p>



<p class="wp-block-paragraph">watching this video and enjoy the cool music as as i fade into the darkness which is coming for us all</p>



<p class="wp-block-paragraph">Teksting av Nicolai Winther</p>



<p class="wp-block-paragraph">Thanks for watching!</p>



<p class="wp-block-paragraph">Thank you.</p>
<p>The post <a href="https://www.NeuralLantern.com/how-to-represent-undirected-weighted-graphs-using-edge-lists/">How to Represent Undirected Weighted Graphs Using Edge Lists</a> appeared first on <a href="https://www.NeuralLantern.com">NeuralLantern.com</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.NeuralLantern.com/how-to-represent-undirected-weighted-graphs-using-edge-lists/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>How to Represent an Unweighted Undirected Graph with an Edge List</title>
		<link>https://www.NeuralLantern.com/how-to-represent-an-unweighted-undirected-graph-with-an-edge-list/</link>
					<comments>https://www.NeuralLantern.com/how-to-represent-an-unweighted-undirected-graph-with-an-edge-list/#respond</comments>
		
		<dc:creator><![CDATA[mike]]></dc:creator>
		<pubDate>Sat, 15 Aug 2026 13:59:02 +0000</pubDate>
				<category><![CDATA[Computer Science]]></category>
		<category><![CDATA[Data Structures]]></category>
		<category><![CDATA[Graphs]]></category>
		<category><![CDATA[Videos]]></category>
		<category><![CDATA[adjacency alternative]]></category>
		<category><![CDATA[coding graphs]]></category>
		<category><![CDATA[constant time lookup]]></category>
		<category><![CDATA[edge list]]></category>
		<category><![CDATA[edge tuples]]></category>
		<category><![CDATA[graph algorithms]]></category>
		<category><![CDATA[graph data structure]]></category>
		<category><![CDATA[graph representation]]></category>
		<category><![CDATA[graph theory basics]]></category>
		<category><![CDATA[index based edges]]></category>
		<category><![CDATA[node list]]></category>
		<category><![CDATA[undirected graph]]></category>
		<category><![CDATA[undirected unweighted]]></category>
		<category><![CDATA[unweighted graph]]></category>
		<category><![CDATA[vertex list]]></category>
		<guid isPermaLink="false">https://www.NeuralLantern.com/?p=424</guid>

					<description><![CDATA[<p>Represent an unweighted undirected graph as a tuple of a vertex list and an edge list. Store nodes as indexable objects and list each edge once as a pair of indexes so you can reach any vertex in constant time.</p>
<p>The post <a href="https://www.NeuralLantern.com/how-to-represent-an-unweighted-undirected-graph-with-an-edge-list/">How to Represent an Unweighted Undirected Graph with an Edge List</a> appeared first on <a href="https://www.NeuralLantern.com">NeuralLantern.com</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<figure class="wp-block-embed is-type-video is-provider-youtube wp-block-embed-youtube wp-embed-aspect-16-9 wp-has-aspect-ratio"><div class="wp-block-embed__wrapper">
<iframe title="How to Represent an Unweighted Undirected Graph with an Edge List" width="1380" height="776" src="https://www.youtube.com/embed/eIBfYgU1QIk?feature=oembed" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe>
</div></figure>



<p class="wp-block-paragraph">Learn how to represent an unweighted undirected graph using an edge list. We build a sample graph with nodes and edges, then show the vertex list and edge list as tuples. See why storing indexes instead of node values makes lookups faster in constant time. Follow along as we list every connection without duplicates. This is the first in a series covering all four combinations of weighted and directed graphs with edge lists.</p>



<p class="wp-block-paragraph">00:00 Introduction to Edge List Representation<br>00:56 Drawing a Sample Graph with Nodes<br>02:05 Adding Undirected Unweighted Edges<br>03:10 Graph as a Tuple of Vertex and Edge Lists<br>03:40 Building the Vertex List<br>04:24 Storing Nodes as Objects with Indexes<br>06:13 Creating the Edge List of Tuples<br>07:00 Listing Edges by Node Values<br>11:36 Limitations of Storing Node Values<br>12:30 Switching to Index-Based Edge List<br>14:08 Constant-Time Lookups with Indexes<br>16:54 Summary of the Edge List Method<br>17:16 Preview of Next Videos in the Series<br>17:44 Closing Remarks and Subscribe Request</p>



<p class="wp-block-paragraph">=-=-=-=-=-=-=-=-=</p>



<p class="wp-block-paragraph">Thanks for watching!</p>



<p class="wp-block-paragraph">Find us on other social media here:</p>



<ul class="wp-block-list">
<li>https://www.NeuralLantern.com/social</li>



<li>Twitter / X: https://x.com/NeuralLantern</li>



<li>Rumble: https://rumble.com/c/c-3696939</li>



<li>BitChute: https://www.bitchute.com/channel/pg1Pvv5dN4Gt</li>



<li>Daily Motion: https://www.dailymotion.com/neurallantern</li>



<li>Minds: https://www.minds.com/neurallantern/</li>



<li>Odysee: https://odysee.com/@NeuralLantern:5</li>
</ul>



<p class="wp-block-paragraph">Please show your support!</p>



<ul class="wp-block-list">
<li>Buy me a coffee: https://ko-fi.com/neurallantern</li>



<li>Subscribe + Sharing on Social Media</li>



<li>Leave a comment or suggestion</li>



<li>Subscribe to the Blog: https://www.NeuralLantern.com</li>



<li>Watch the main &#8220;pinned&#8221; video of this channel for offers and extras</li>
</ul>



<p class="wp-block-paragraph">Hello there! Let&#8217;s talk about representing an unweighted,</p>



<p class="wp-block-paragraph">undirected graph in your machine using an edge list representation.</p>



<p class="wp-block-paragraph">Okay, so hopefully you watched my previous videos. If you haven&#8217;t, you might want to take a step back</p>



<p class="wp-block-paragraph">and check them out. We talked about, you know, what is a graph? What are some basic rules and</p>



<p class="wp-block-paragraph">terminology of a graph? Not graph and paper, but a graph. And we talked about representing paths</p>



<p class="wp-block-paragraph">in graphs.</p>



<p class="wp-block-paragraph">representing paths in graphs using either a list of nodes or a list of edges and we&#8217;re going to</p>



<p class="wp-block-paragraph">take the edge list concept one step further and we&#8217;re going to actually just say this whole graph</p>



<p class="wp-block-paragraph">is being represented as an edge list it&#8217;ll make sense in a little bit but uh so the first thing</p>



<p class="wp-block-paragraph">i&#8217;m going to do is try to set up my stuff which is always set up wrong because i&#8217;m the one setting it</p>



<p class="wp-block-paragraph">up and it always gets messed up okay so i got a graph paper and uh oh i got to make this other</p>



<p class="wp-block-paragraph">thing full screen. Sorry.</p>



<p class="wp-block-paragraph">um i&#8217;m going to draw a random graph just real fast so i&#8217;m going to do i don&#8217;t know just some random</p>



<p class="wp-block-paragraph">nodes so remember a graph is a collection of nodes and edges doesn&#8217;t even have to have edges but you</p>



<p class="wp-block-paragraph">know we&#8217;ll just say so we&#8217;re going to do that&#8217;s bad let me try one more time we&#8217;ll get that okay</p>



<p class="wp-block-paragraph">so we get i&#8217;m trying to get this circle perfect because i&#8217;m gonna have to duplicate it rare okay</p>



<p class="wp-block-paragraph">i&#8217;ve got a node here and i&#8217;m just going to give it an arbitrary value i&#8217;m going to say it&#8217;s got a 3</p>



<p class="wp-block-paragraph">and then i&#8217;m going to duplicate it a few times just to make a graph that is a little bit</p>



<p class="wp-block-paragraph">interesting so we have something uh something to kind of challenge us i guess so it&#8217;s not</p>



<p class="wp-block-paragraph">incredibly boring um and then i&#8217;m going to change some of the values here and then well i&#8217;ll change</p>



<p class="wp-block-paragraph">the next ones and then we&#8217;ll start looking at edges which edges do we want to make okay so</p>



<p class="wp-block-paragraph">right now we&#8217;re just making a graph make this graph along with me if you want to or uh you</p>



<p class="wp-block-paragraph">you know, after you.</p>



<p class="wp-block-paragraph">to or uh you know after you think you understand do another graph on your own</p>



<p class="wp-block-paragraph">okay so i&#8217;m gonna make some edges right now remember this is going to be an undirected</p>



<p class="wp-block-paragraph">unweighted graph so the edges are just going to be lines they&#8217;re not going to have direction on</p>



<p class="wp-block-paragraph">them and they&#8217;re not going to have weights on them i&#8217;m going to do a line over here i&#8217;m just</p>



<p class="wp-block-paragraph">randomly doing lines doesn&#8217;t really matter um what we do exactly the point is going to be let&#8217;s</p>



<p class="wp-block-paragraph">practice represented</p>



<p class="wp-block-paragraph">be let&#8217;s practice representing this graph okay so i&#8217;m just making a random graph it&#8217;s kind of like</p>



<p class="wp-block-paragraph">a little bit dense i don&#8217;t know um maybe i&#8217;ll just stop there and then i&#8217;ll add a wonky line just</p>



<p class="wp-block-paragraph">just to prove we can be cool about this i don&#8217;t know we&#8217;ll do another one right here so it&#8217;s a</p>



<p class="wp-block-paragraph">slightly more interesting graph okay so um that&#8217;s just a graph and uh what i&#8217;m going to do is i&#8217;m</p>



<p class="wp-block-paragraph">going to say this is a, you know, an unweighted, oops, weighted.</p>



<p class="wp-block-paragraph">oops waited undirected uh graph and we&#8217;re going to use the edge list of representation</p>



<p class="wp-block-paragraph">i have spell check on this i really hope i do nope okay i guess i forgot to fix that months ago</p>



<p class="wp-block-paragraph">all right so then the next thing we&#8217;re going to do is uh we&#8217;re going to look at the idea of like</p>



<p class="wp-block-paragraph">how do we start with the edge list representation okay um the first thing i&#8217;m going to say is that</p>



<p class="wp-block-paragraph">our graph</p>



<p class="wp-block-paragraph">that the our graph in an edge list representation is a tuple just meaning it&#8217;s you know some things</p>



<p class="wp-block-paragraph">put together if you know tuples encoding already uh the tuple is going to consist of a collection</p>



<p class="wp-block-paragraph">of vertices and edges what&#8217;s going to be an edge list don&#8217;t make fun of my ease please</p>



<p class="wp-block-paragraph">anyway so uh let&#8217;s do the first thing is going to be the vertex list so how do we represent the</p>



<p class="wp-block-paragraph">vertex list or the node list well i&#8217;m just going to say that my vertex list v</p>



<p class="wp-block-paragraph">to say that my vertex list v is equal to something and we&#8217;ll just put inside of this</p>



<p class="wp-block-paragraph">some vertices so the easiest way when you&#8217;re kind of drawing this right now is i&#8217;m just going to</p>



<p class="wp-block-paragraph">start putting the values of the node i&#8217;m going to say well here&#8217;s a three and uh i guess i could</p>



<p class="wp-block-paragraph">sort them for whatever reason uh if we&#8217;re going to do binary search on them later but we&#8217;re not</p>



<p class="wp-block-paragraph">going to i&#8217;m just going to maybe you know what i&#8217;ll go from left to right so that&#8217;ll make more</p>



<p class="wp-block-paragraph">sense, just visually. So I&#8217;ll go from left to right. 3, 13, 6, 12.</p>



<p class="wp-block-paragraph">3, 13, 6, 12, and a 15, and an 18.</p>



<p class="wp-block-paragraph">You can see all of those are nodes, right?</p>



<p class="wp-block-paragraph">Somebody stop me if I forgot a node.</p>



<p class="wp-block-paragraph">Okay, here&#8217;s the thing though.</p>



<p class="wp-block-paragraph">What are we actually storing in this vertex list?</p>



<p class="wp-block-paragraph">You probably don&#8217;t want to store the node values.</p>



<p class="wp-block-paragraph">I mean, you could be a little slow and dumb though,</p>



<p class="wp-block-paragraph">but we want the option to be a little bit faster later</p>



<p class="wp-block-paragraph">and also the option to turn these vertices into full classes,</p>



<p class="wp-block-paragraph">like give them extra properties and whatever.</p>



<p class="wp-block-paragraph">So what I&#8217;m going to say is that…</p>



<p class="wp-block-paragraph">So what I&#8217;m going to say is that I&#8217;m writing down the number 3 and the number 13 here for you, but you should imagine in your code you would have an object of type vertex or node, like a full class, and you would basically be stuffing pointers inside of that vector, inside of that list.</p>



<p class="wp-block-paragraph">I keep saying list. It is called an edge list representation, but you can probably imagine</p>



<p class="wp-block-paragraph">that this could just as easily be a vector. If you&#8217;ve seen my other videos, you know what that is.</p>



<p class="wp-block-paragraph">but uh so i want to be able to index this uh faster so for me personally i make this a vector</p>



<p class="wp-block-paragraph">and not an actual list but we&#8217;re going to call it a list anyway so three should be a pointer</p>



<p class="wp-block-paragraph">uh to a full node object uh smart pointer raw pointer whatever you want 13 should be a full</p>



<p class="wp-block-paragraph">pointer to an entire uh entirely different node object with just 13 assigned as its uh template</p>



<p class="wp-block-paragraph">type value because we&#8217;re making this a vector we can actually index</p>



<p class="wp-block-paragraph">can actually index uh the nodes right so like this is like index 0 for the 3 node index 1 for the 13</p>



<p class="wp-block-paragraph">node so i&#8217;m just going to put the indexes here whoops just to drive the point home a little</p>



<p class="wp-block-paragraph">bit further so if i told you hey let&#8217;s do uh the node at index 2 you would know that is the node</p>



<p class="wp-block-paragraph">that is in the very middle with the value of 6 because index 0 and 1 and 2 brings you to this</p>



<p class="wp-block-paragraph">node right here um which is a 6 so this is going to this is going to help us later let me save this</p>



<p class="wp-block-paragraph">Real fast, by the way.</p>



<p class="wp-block-paragraph">let me save this real fast by the way i&#8217;m just going to do that okay so uh the next thing that</p>



<p class="wp-block-paragraph">we need to do is uh make an edge list the edge list is really where it&#8217;s all at that&#8217;s really</p>



<p class="wp-block-paragraph">where all the data is it&#8217;s going to tell us exactly where everything is or it&#8217;s going to</p>



<p class="wp-block-paragraph">describe the whole graph pretty much so the edge list is another we&#8217;ll say that&#8217;s a list this could</p>



<p class="wp-block-paragraph">be like a linked list or vector or whatever you want i&#8217;m just going to say it&#8217;s a linked list</p>



<p class="wp-block-paragraph">and every item in the list is going to be another tuple so remember above the graph itself was a</p>



<p class="wp-block-paragraph">tuple containing a vertex list and an edge list so the edge list is a list of tuples</p>



<p class="wp-block-paragraph">meaning you know items bundled together for one tuple and then just like a list of those</p>



<p class="wp-block-paragraph">so what i&#8217;m going to try to do is describe every single edge uh one by one using one tuple each</p>



<p class="wp-block-paragraph">inside of the edge list so the first thing i&#8217;m going to do just you know to make this a little</p>



<p class="wp-block-paragraph">little bit easier.</p>



<p class="wp-block-paragraph">thing I want to do just you know to make this a little bit easier is I&#8217;m going to ignore the</p>



<p class="wp-block-paragraph">indexes for the vertex list and I&#8217;m going to say let&#8217;s describe everything happening from the three</p>



<p class="wp-block-paragraph">node outwards or just to every other node so the three node itself I&#8217;m going to look at its</p>



<p class="wp-block-paragraph">connections from left to right so the three node let&#8217;s just start by putting a three here</p>



<p class="wp-block-paragraph">maybe I should describe the legend real fast the tuples will basically be the start node</p>



<p class="wp-block-paragraph">and then the end node</p>



<p class="wp-block-paragraph">and then the end node and then the uh well the weight if there was a weight but we&#8217;re doing an</p>



<p class="wp-block-paragraph">unweighted graph so it&#8217;s really just going to be a tuple of two items the other thing to keep</p>



<p class="wp-block-paragraph">in mind is that because this is an undirected graph it really doesn&#8217;t make a difference what</p>



<p class="wp-block-paragraph">node is the start node and what node is the end node you can just swap them and it&#8217;s totally fine</p>



<p class="wp-block-paragraph">for me personally i&#8217;d rather you know sort before assigning the start node and end node that way</p>



<p class="wp-block-paragraph">when i read the graph later it&#8217;s a little bit faster because i wouldn&#8217;t have to check in both</p>



<p class="wp-block-paragraph">directions but</p>



<p class="wp-block-paragraph">wouldn&#8217;t have to check in both directions but it really honestly doesn&#8217;t matter right now so</p>



<p class="wp-block-paragraph">start node and end node so the start node here is 3 and the end node is going to be 13 so that&#8217;s the</p>



<p class="wp-block-paragraph">first thing that we&#8217;re doing that&#8217;s the first tuple and then i&#8217;m going to say what else does</p>



<p class="wp-block-paragraph">the 3 connect to it connects to the not the 6 it connects to the 12. okay so the 3 connects to the</p>



<ol start="12" class="wp-block-list">
<li>again we could have said 12 comma 3 wouldn&#8217;t have mattered but i&#8217;m just going to try to keep</li>
</ol>



<p class="wp-block-paragraph">it sorted so then</p>



<p class="wp-block-paragraph">keep it sorted so then what else does the three connect to it connects to the uh the 18 doesn&#8217;t</p>



<p class="wp-block-paragraph">connect to the 15 and just confirm that if i&#8217;m looking at the three i can see three lines</p>



<p class="wp-block-paragraph">touching it so that means okay there&#8217;s got to be three tuples for the for the e for the three so</p>



<p class="wp-block-paragraph">i&#8217;m going to say three connects to the 18. and now i&#8217;ve described everything happened to do with the</p>



<p class="wp-block-paragraph">three note i will simply continue let&#8217;s see should i do like a new line maybe i should try to do a</p>



<p class="wp-block-paragraph">new line for every</p>



<p class="wp-block-paragraph">try to do a new line for every start node so this is easier to look at okay so i&#8217;m going to do that</p>



<p class="wp-block-paragraph">and i&#8217;m going to say the next line is we&#8217;ll start at the 13 this time so the 13 the 13 is also</p>



<p class="wp-block-paragraph">connected to the 3 because it goes in both directions with an undirected graph but we</p>



<p class="wp-block-paragraph">already described that connection with that first row so 3 comma 13 describes 13 comma 3 i don&#8217;t</p>



<p class="wp-block-paragraph">want to duplicate edges so forget about that let&#8217;s look at what else 13 is connected to it&#8217;s connected</p>



<p class="wp-block-paragraph">it to the six</p>



<p class="wp-block-paragraph">connected to it&#8217;s connected to the six so I&#8217;m just going to put 13 comma 6 and then that&#8217;s the end of</p>



<p class="wp-block-paragraph">the 13&#8217;s connections oh I could have used tabs for that hang on let me do that okay so now let&#8217;s look</p>



<p class="wp-block-paragraph">at the six node six is not connected to the three it is connected to the 13 but we already described</p>



<p class="wp-block-paragraph">the 13 6 connection in the previous row so forget that and then I&#8217;m just going to look to the right</p>



<p class="wp-block-paragraph">So the 6 is connected to the 12 and the 15.</p>



<p class="wp-block-paragraph">the 12 and the 15 12 and the 15 and also the 18 so i&#8217;m going to do 6 comma 12 maybe i&#8217;m going to</p>



<p class="wp-block-paragraph">do a copy paste here real fast just to make it easier 6 12 and 6 15 and 6 18 so again all i&#8217;m</p>



<p class="wp-block-paragraph">doing is describing you know what other nodes the current node is touching and i&#8217;m going to do that</p>



<p class="wp-block-paragraph">using a tuple that just has one node and has another node and that&#8217;s pretty much it so when</p>



<p class="wp-block-paragraph">we&#8217;re done with this</p>



<p class="wp-block-paragraph">it so when we&#8217;re done with this uh we&#8217;re going to look at the 12 node 12 node it&#8217;s connected to</p>



<p class="wp-block-paragraph">the six already handled it&#8217;s connected to the three it&#8217;s already handled and it&#8217;s connected</p>



<p class="wp-block-paragraph">to the 18 not handled yet so i&#8217;m going to say 12 goes out to 18. okay then we&#8217;re going to look at</p>



<p class="wp-block-paragraph">the 15 node 15 and 6 that&#8217;s already handled in that third row so forget that 15 and 18 that is</p>



<p class="wp-block-paragraph">is not</p>



<p class="wp-block-paragraph">15 and 18 that is not handled yet so we&#8217;re going to do 15.18 by the way this is one benefit of</p>



<p class="wp-block-paragraph">going from left to right visually all i really have to do is just look my eyes to the right and</p>



<p class="wp-block-paragraph">i&#8217;ll see nodes that i need to take care of and if i look my eyes to the left i&#8217;ll see nodes that i</p>



<p class="wp-block-paragraph">already took care of if that makes sense so now that we&#8217;re done with the 15 let&#8217;s see we did 3 13</p>



<p class="wp-block-paragraph">6 12 15 let&#8217;s just take care of the 18 if there&#8217;s anything left to take care of i can guarantee</p>



<p class="wp-block-paragraph">there&#8217;s not going to be.</p>



<p class="wp-block-paragraph">there&#8217;s not going to be because every node the 18 is the node on the farthest you know the furthest</p>



<p class="wp-block-paragraph">to the right so everything on the left is already handled so we don&#8217;t even have to put anything for</p>



<p class="wp-block-paragraph">the 18 node okay give me a second to clean up this graph real fast i think i want to maybe</p>



<p class="wp-block-paragraph">move this up a little bit okay uh now here&#8217;s the thing though we&#8217;ve only named node values so if</p>



<p class="wp-block-paragraph">we wanted to i don&#8217;t know let&#8217;s say check to see if the uh let&#8217;s say we have an edge we&#8217;re looking</p>



<p class="wp-block-paragraph">Thank you.</p>



<p class="wp-block-paragraph">let&#8217;s say we have an edge we&#8217;re looking at the 3 comma 13 edge and we&#8217;re asking now do both of</p>



<p class="wp-block-paragraph">those nodes exist the edge describes these two nodes do they exist or uh maybe let&#8217;s look at</p>



<p class="wp-block-paragraph">the three here and we want to figure out just you know what other nodes does three touch so we start</p>



<p class="wp-block-paragraph">iterating through all the edges here how can we actually get a pointer to that node to manipulate</p>



<p class="wp-block-paragraph">it in the code right now it&#8217;s okay because it&#8217;s a diagram but you know this is not very</p>



<p class="wp-block-paragraph">diagram but you know this is not very good storing values directly in this notation in your code you</p>



<p class="wp-block-paragraph">probably want to store pointer uh pointers there but maybe not necessarily smart pointers they take</p>



<p class="wp-block-paragraph">a little bit of extra memory and it&#8217;s kind of cumbersome but um we could store an index into</p>



<p class="wp-block-paragraph">this vertex list to make things a little bit faster let me show you what i mean but first i&#8217;m</p>



<p class="wp-block-paragraph">going to duplicate this list that we just made already, duplicate it over here, and</p>



<p class="wp-block-paragraph">over here and maybe i&#8217;ll label the first one and i&#8217;ll say so we already have start node and end</p>



<p class="wp-block-paragraph">node i&#8217;m going to say e underscore by value so we&#8217;re storing the edge list by node values and</p>



<p class="wp-block-paragraph">then here we&#8217;re going to store nodes by their index in the vertex list so what do i mean by</p>



<p class="wp-block-paragraph">index well okay right here the first node that we&#8217;re mentioning is the three well look at the</p>



<p class="wp-block-paragraph">three node in the vertex list it&#8217;s at index zero right so i&#8217;m just going to put a zero</p>



<p class="wp-block-paragraph">zero right so i&#8217;m just gonna put a zero that&#8217;s it change it to an index then i look at the 13</p>



<p class="wp-block-paragraph">that&#8217;s index one and then i look at the three again that&#8217;s index zero um and then the 12 is</p>



<p class="wp-block-paragraph">index three and then the three again is index zero and the 18 is index five um if that was too fast</p>



<p class="wp-block-paragraph">i&#8217;m sorry just rewind and play it back in slow motion i think this video is already getting way</p>



<p class="wp-block-paragraph">too long so then i do the same thing for every single other tuple so the 13 node um that is</p>



<p class="wp-block-paragraph">node um that is index one so i&#8217;m going to put a one there the sixth node is index two go on to</p>



<p class="wp-block-paragraph">the next node so the sixth node is index two and then the 12 is index three and the six is two and</p>



<p class="wp-block-paragraph">the 15 is actually four the six again is two the 18 is five move on to the 12 node here uh that&#8217;s</p>



<p class="wp-block-paragraph">index 3, 18 node is index 5, and then</p>



<p class="wp-block-paragraph">the 15</p>



<p class="wp-block-paragraph">and then uh the 15 is index 4 and then 18 again is index 5 so now on you know on both sides like</p>



<p class="wp-block-paragraph">in both of these edge lists uh i&#8217;m representing the graph it&#8217;s just that one can be a little bit</p>



<p class="wp-block-paragraph">more efficient than the other uh for example if i was going to let&#8217;s just say i wanted to scan</p>



<p class="wp-block-paragraph">every single edge in the graph well i could scan this list right here in linear time so linear time</p>



<p class="wp-block-paragraph">based on the number of edges and every single time i see an edge i can jump directly to the</p>



<p class="wp-block-paragraph">Corresponding.</p>



<p class="wp-block-paragraph">jump directly to the corresponding vertex or node in constant time because i have an index</p>



<p class="wp-block-paragraph">so for example let&#8217;s say uh you know this uh the sixth node um touching the 15 node so that</p>



<p class="wp-block-paragraph">particular edge right there let me i want to be more interactive here how can i do this okay</p>



<p class="wp-block-paragraph">uh suppose i want to do</p>



<p class="wp-block-paragraph">612 node and so that&#8217;s going to be pointing to this edge right up here i want to see you know</p>



<p class="wp-block-paragraph">what&#8217;s going on with both of those nodes well if i was looking at the value-based edge list</p>



<p class="wp-block-paragraph">and i wanted to get a hold of let&#8217;s say the sixth node itself so i can like do something with that</p>



<p class="wp-block-paragraph">vertex like delete it or move it or just whatever i would have to then scan the entire vertex list</p>



<p class="wp-block-paragraph">i&#8217;d have to go you know this one this one this one this one this one until i eventually found</p>



<p class="wp-block-paragraph">the corresponding value.</p>



<p class="wp-block-paragraph">uh the corresponding value this wouldn&#8217;t really support duplicate values either</p>



<p class="wp-block-paragraph">uh it would be kind of hard to do that but uh i&#8217;ve i&#8217;ve slowed down the program it&#8217;s linear</p>



<p class="wp-block-paragraph">time based on the number of vertexes and if you&#8217;re already doing linear time based on the number of</p>



<p class="wp-block-paragraph">edges this is like it&#8217;s technically still a scalable data structure but it&#8217;s not super fast</p>



<p class="wp-block-paragraph">it could be faster on the other hand uh so like i just said uh sorry for repeating myself if we did</p>



<p class="wp-block-paragraph">the index</p>



<p class="wp-block-paragraph">the index based uh edge list it says two three here which is the 612 how can i find the sixth</p>



<p class="wp-block-paragraph">node well i just look at index two and instead of scanning oh gosh hang on</p>



<p class="wp-block-paragraph">i&#8217;m not as fast as i used to be okay dude there&#8217;s like did you see that uh</p>



<p class="wp-block-paragraph">a whole bunch of pink dots everywhere now what have i done okay</p>



<p class="wp-block-paragraph">So, uh…</p>



<p class="wp-block-paragraph">so uh i&#8217;m looking at the 612 edge i see that the indexes are two and three that means in constant</p>



<p class="wp-block-paragraph">time i can just jump directly to i guess i&#8217;ll put it in red in constant time index two right there</p>



<p class="wp-block-paragraph">and index three right there i do not have to scan the vertex list or the vector i guess if it was a</p>



<p class="wp-block-paragraph">vertex list like an actual linked list then i&#8217;d still have to scan because it&#8217;s linear time to do</p>



<p class="wp-block-paragraph">it but if it&#8217;s a vector</p>



<p class="wp-block-paragraph">But if it&#8217;s a vector or an array, I can just jump to an index in constant time, so it&#8217;s way faster.</p>



<p class="wp-block-paragraph">So what I&#8217;m trying to say is that this representation is what you want to do in the code when it comes to, I don&#8217;t know, representing diagrams and stuff.</p>



<p class="wp-block-paragraph">I don&#8217;t know. The one on the left is more human friendly.</p>



<p class="wp-block-paragraph">So this is the basic idea for how to represent an unweighted and also undirected graph in the machine using the edge list method of representation.</p>



<p class="wp-block-paragraph">i guess i&#8217;m going to cut the video i hope you learned a little bit of stuff and had</p>



<p class="wp-block-paragraph">a little bit of fun in the next video i think i&#8217;m going to do uh weighted uh undirected graphs</p>



<p class="wp-block-paragraph">and this i&#8217;m going to do four videos for this one representation type i&#8217;m going to do unweighted</p>



<p class="wp-block-paragraph">undirected and then weighted and undirected and then unweighted and directed i&#8217;m gonna</p>



<p class="wp-block-paragraph">do all four combinations all right see you in the next video thanks for watching</p>



<p class="wp-block-paragraph">hey everybody thanks for watching this video again from the bottom of my heart i really appreciate it</p>



<p class="wp-block-paragraph">i do hope you did learn something and have some fun if you could do me a please a small little</p>



<p class="wp-block-paragraph">favor could you please subscribe and follow this channel or these videos or whatever it is you do</p>



<p class="wp-block-paragraph">on the current social media website that you&#8217;re looking at right now it would really mean the</p>



<p class="wp-block-paragraph">world to me and it&#8217;ll help make more videos and grow this community so we&#8217;ll be able to do more</p>



<p class="wp-block-paragraph">videos, longer videos, better videos, or just I&#8217;ll be able to keep making videos in general.</p>



<p class="wp-block-paragraph">just i&#8217;ll be able to keep making videos in general so please do do me a kindness and uh and subscribe</p>



<p class="wp-block-paragraph">you know sometimes i&#8217;m sleeping in the middle of the night and i just wake up because i know</p>



<p class="wp-block-paragraph">somebody subscribed or followed it just wakes me up and i get filled with joy that&#8217;s exactly what</p>



<p class="wp-block-paragraph">happens every single time so you could do it as a nice favor to me or you could you could troll me</p>



<p class="wp-block-paragraph">if you want to just wake me up in the middle of the night just subscribe and then i&#8217;ll i&#8217;ll just</p>



<p class="wp-block-paragraph">wake up i promise that&#8217;s what will happen also uh if you look at the middle of the screen right now</p>



<p class="wp-block-paragraph">you should see a QR code, which</p>



<p class="wp-block-paragraph">screen right now you should see a QR code which you can scan in order to go to the website which</p>



<p class="wp-block-paragraph">I think is also named somewhere at the bottom of this video and it&#8217;ll take you to my main website</p>



<p class="wp-block-paragraph">where you can just kind of like see all the videos I published and the services and tutorials and</p>



<p class="wp-block-paragraph">things that I offer and all that good stuff and if you have a suggestion for clarifications or</p>



<p class="wp-block-paragraph">errata or just future videos that you want to see please leave a comment or if you just want to say</p>



<p class="wp-block-paragraph">hey what&#8217;s up what&#8217;s going on you know just send</p>



<p class="wp-block-paragraph">what&#8217;s going on? You know, just send me a comment, whatever. I also wake up for those in the middle</p>



<p class="wp-block-paragraph">of the night. I get, I wake up in a cold sweat and I&#8217;m like, it would really, it really mean</p>



<p class="wp-block-paragraph">the world to me. I would really appreciate it. So again, thank you so much for watching this video</p>



<p class="wp-block-paragraph">and, um, enjoy the cool music as, as I fade into the darkness, which is coming for us all.</p>



<p class="wp-block-paragraph"></p>



<p class="wp-block-paragraph">Thanks for watching!</p>
<p>The post <a href="https://www.NeuralLantern.com/how-to-represent-an-unweighted-undirected-graph-with-an-edge-list/">How to Represent an Unweighted Undirected Graph with an Edge List</a> appeared first on <a href="https://www.NeuralLantern.com">NeuralLantern.com</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.NeuralLantern.com/how-to-represent-an-unweighted-undirected-graph-with-an-edge-list/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
