<?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>data structure graph Archives -</title>
	<atom:link href="https://mitindia.in/tag/data-structure-graph/feed/" rel="self" type="application/rss+xml" />
	<link>https://mitindia.in/tag/data-structure-graph/</link>
	<description></description>
	<lastBuildDate>Sat, 31 Dec 2016 06:04:40 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9.4</generator>

<image>
	<url>https://mitindia.in/wp-content/uploads/2023/03/cropped-android-chrome-512x512-1-32x32.png</url>
	<title>data structure graph Archives -</title>
	<link>https://mitindia.in/tag/data-structure-graph/</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>Data structure Graph</title>
		<link>https://mitindia.in/data-structure-graph/</link>
		
		<dc:creator><![CDATA[SKB]]></dc:creator>
		<pubDate>Fri, 09 Dec 2016 10:54:54 +0000</pubDate>
				<category><![CDATA[C Programming]]></category>
		<category><![CDATA[C++]]></category>
		<category><![CDATA[data structure graph]]></category>
		<category><![CDATA[graph]]></category>
		<category><![CDATA[operations on data structure]]></category>
		<guid isPermaLink="false">http://www.mitindia.in/?p=624</guid>

					<description><![CDATA[<p>Introduction to Graphs The limitation of tree is that it cannot represent many to many relation. This limitation is overcome by using Graph. Definition of a Graph &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;- Graphs is a data structure consisting of a set of vertices (or nodes) A set of edges (or links) connecting the vertices G = (V, E) where V [&#8230;]</p>
<p>The post <a href="https://mitindia.in/data-structure-graph/">Data structure Graph</a> appeared first on <a href="https://mitindia.in"></a>.</p>
]]></description>
										<content:encoded><![CDATA[<h1><span style="color: #003300;">Introduction to Graphs</span></h1>
<hr />
<p><strong>The limitation of <a href="http://www.mitindia.in/2016/11/24/trees-data-structure/">tree</a> is that it cannot represent many to many relation.</strong><br />
<strong>This limitation is overcome by using Graph.</strong></p>
<p><strong> <script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<!-- mylink -->
<ins class="adsbygoogle"
     style="display:block"
     data-ad-client="ca-pub-1696390399604457"
     data-ad-slot="7690934410"
     data-ad-format="link"></ins>
<script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script></strong></p>
<p><strong>Definition of a Graph</strong><br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
Graphs is a data structure consisting of a set of vertices (or nodes)<br />
A set of edges (or links) connecting the vertices<br />
G = (V, E) where<br />
V = set of vertices<br />
E = set of edges, each edge is formed from a<br />
pair of distinct vertices</p>
<p><strong>Graph Representation</strong><br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br />
A set of items connected by edges. Each item is called a vertex or node. Formally, a graph is a set of vertices and a binary relation between vertices, adjacency.</p>
<p>The Graph is most widely represented in linked lists.</p>
<p>To represent a graph, a linked list is created for each vertex.</p>
<figure id="attachment_625" aria-describedby="caption-attachment-625" style="width: 300px" class="wp-caption alignright"><img fetchpriority="high" decoding="async" class="size-medium wp-image-625" src="http://www.mitindia.in/wp-content/uploads/2016/12/gr-300x200.png" alt="Data Structure Graph representation " width="300" height="200" srcset="https://mitindia.in/wp-content/uploads/2016/12/gr-300x200.png 300w, https://mitindia.in/wp-content/uploads/2016/12/gr-262x175.png 262w, https://mitindia.in/wp-content/uploads/2016/12/gr.png 427w" sizes="(max-width: 300px) 100vw, 300px" /><figcaption id="caption-attachment-625" class="wp-caption-text"><span style="color: #ff6600;">Data Structure Graph representation</span></figcaption></figure>
<p><strong>Graph Terminologies</strong><br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
Directed and Undirected Graph</p>
<p>If there is no order or direction by which the vertices are connected then the graph is called undirected graph.</p>
<p>If there is a specific order by which the vertices are connected, it is called directed graphs.</p>
<p>Adjacency: If two vertex such as vertex b is connected to vertex a by an edge. The vertices b and a are called adjacent to each other.</p>
<p>Incidence: The edge of two vertices is said to be incident.</p>
<p>Degree: The degree of a vertex in undirected graph is the number of edges incident on the vertex.</p>
<p>Path: A path in a graph is the sequence of vertices visited while traveling from one vertex to another where any two consecutive vertices in the sequence are adjacent.</p>
<p>Cycle: If a path originates and terminates at the same vertex, it is called a cycle.</p>
<p>Connected graph: A graph is said to be connected, if there exists a path between any two vertices in the graph.</p>
<p>Weighted Graphs: In a graph, if the edges connecting vertices are given weights (values) then it is a weighted graph.</p>
<p>Sub Graphs: A graph is a subgraph of another graph, when its vertices and edges are subsets of that graph.</p>
<p style="text-align: justify;"><strong>Graph Traversals</strong><br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
Depth First Search: It is an algorithm for traversing or searching a tree, tree structure, or graph. Intuitively, you start at the root (selecting some node as the root in the graph case) and explore as far as possible along each branch before backtracking.</p>
<p style="text-align: justify;">Formally, DFS is an uninformed search that progresses by expanding the first child node of the search tree that appears and thus going deeper and deeper until a goal state is found, or it hits a node that has no children. Then the search backtracks and starts off on the next node.</p>
<ul style="list-style-type: circle;">
<li><span style="color: #ff0000;"><strong>Conclusion</strong></span><strong>Graphs contain a finite set of vertices or elements</strong><strong>The vertices are connected by edges, the line joining the vertices</strong><strong>If there is a specific order by which the vertices are connected, it is called directed graphs</strong>
<p><strong>If the vertex b is connected to vertex a by an edge, then the vertices b and a are adjacent to each other</strong></p>
<p><strong>The edge (b, a) is said to be incident on vertices b and a.</strong></li>
</ul>
<p><a class="a2a_button_whatsapp" href="https://www.addtoany.com/add_to/whatsapp?linkurl=https%3A%2F%2Fmitindia.in%2Fdata-structure-graph%2F&amp;linkname=Data%20structure%20Graph" title="WhatsApp" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_facebook" href="https://www.addtoany.com/add_to/facebook?linkurl=https%3A%2F%2Fmitindia.in%2Fdata-structure-graph%2F&amp;linkname=Data%20structure%20Graph" title="Facebook" rel="nofollow noopener" target="_blank"></a><a class="a2a_dd addtoany_share_save addtoany_share" href="https://www.addtoany.com/share#url=https%3A%2F%2Fmitindia.in%2Fdata-structure-graph%2F&#038;title=Data%20structure%20Graph" data-a2a-url="https://mitindia.in/data-structure-graph/" data-a2a-title="Data structure Graph"><img src="https://static.addtoany.com/buttons/favicon.png" alt="Share"></a></p><p>The post <a href="https://mitindia.in/data-structure-graph/">Data structure Graph</a> appeared first on <a href="https://mitindia.in"></a>.</p>
]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>
