Editing Graph theory

Jump to: navigation, search

Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision Your text
Line 1: Line 1:
A '''graph''' is a mathematical object with '''vertices''' (also known as '''nodes'''), discrete objects, and '''edges''' (also known as '''arcs'''), relationships between pairs of objects. Because of the wide variety of objects and relationships that may be abstracted as vertices and edges, graphs are highly versatile, and may be used to model a great number of different real-world entities, such as cities and highways, social networks, and the positions of the Rubik's Cube. Likewise, many interesting problems in computer science concern graphs themselves. The subdiscipline of mathematics and computer science concerning graphs is known as ''graph theory''.
+
A '''graph''' is a mathematical object with '''vertices''' (also known as '''nodes'''), discrete objects, and '''edges''', relationships between pairs of objects. Because of the wide variety of objects and relationships that may be abstracted as vertices and edges, graphs are highly versatile, and may be used to model a great number of different real-world entities, such as cities and highways, social networks, and the positions of the Rubik's Cube. Likewise, many interesting problems in computer science concern graphs themselves. The subdiscipline of mathematics and computer science concerning graphs is known as ''graph theory''.
  
 
==Structure of a graph==
 
==Structure of a graph==
Line 10: Line 10:
  
 
===Directed and undirected graphs===
 
===Directed and undirected graphs===
Some relationships are two-way, but some are only one-way. For example, suppose that in the social network example given in the preceding section, we place an edge between the vertices representing two people if and only if one of them has a crush on the other. The trouble here is that clearly, Alice having a crush on Bob is different than Bob having a crush on Alice, and hence these two scenarios ought to be represented by ''different graphs''. In order to arrange this, we stipulate that each edge also has a ''direction'', and that an edge from <math>u</math> to <math>v</math> is not the same as an edge from <math>v</math> to <math>u</math>. A graph that encodes this one-way information is known as a '''directed graph''' or '''digraph''', whereas one that does not is an '''undirected graph'''. When an edge from <math>u</math> to <math>v</math> is drawn in the diagram of a graph, generally an arrowhead is added on the end of the line segment representing that edge near <math>v</math>, so that the segment "points" from <math>u</math> to <math>v</math>. Note that it is possible for two-way relationships to be represented by directed graphs; maybe Alice and Bob secretly have a crush on each other. This would be represented by both edges existing in <math>E</math> and a double-ended arrow. The point is that directed graphs must be used when it is not guaranteed that all relationships will be bidirectional. An edge from <math>u</math> to <math>v</math> is said to '''enter''' <math>v</math> and '''leave''' <math>u</math>. An edge in a directed graph is also known as an '''arc'''.
+
Some relationships are two-way, but some are only one-way. For example, suppose that in the social network example given in the preceding section, we place an edge between the vertices representing two people if and only if one of them has a crush on the other. The trouble here is that clearly, Alice having a crush on Bob is different than Bob having a crush on Alice, and hence these two scenarios ought to be represented by ''different graphs''. In order to arrange this, we stipulate that each edge also has a ''direction'', and that an edge from <math>u</math> to <math>v</math> is not the same as an edge from <math>v</math> to <math>u</math>. A graph that encodes this one-way information is known as a '''directed graph''', whereas one that does not is an '''undirected graph'''. When an edge from <math>u</math> to <math>v</math> is drawn in the diagram of a graph, generally an arrowhead is added on the end of the line segment representing that edge near <math>v</math>, so that the segment "points" from <math>u</math> to <math>v</math>. Note that it is possible for two-way relationships to be represented by directed graphs; maybe Alice and Bob secretly have a crush on each other. This would be represented by both edges existing in <math>E</math> and a double-ended arrow. The point is that directed graphs must be used when it is not guaranteed that all relationships will be bidirectional. An edge from <math>u</math> to <math>v</math> is said to '''enter''' <math>v</math> and '''leave''' <math>u</math>.
  
 
===Weighted graphs===
 
===Weighted graphs===

Please note that all contributions to PEGWiki are considered to be released under the Attribution 3.0 Unported (see PEGWiki:Copyrights for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource. Do not submit copyrighted work without permission!

Cancel | Editing help (opens in new window)