# Difference between revisions of "Graph (graph theory)"

Line 1: | Line 1: | ||

− | In [[graph theory]], a '''graph''' is a set of [[vertex|vertices]] | + | In [[graph theory]], a '''graph''' is a (usually [[finite]]) [[empty set | nonempty]] [[set]] of [[vertex|vertices]] that are joined by a number (possibly zero) of [[edge]]s. Graphs are frequently represented graphically, with the vertices as points and the edges as smooth curves joining pairs of vertices. |

− | == | + | |

− | + | {{image}} | |

− | ==Types of Graphs== | + | |

− | ===Complete Graph=== | + | Formally, a graph <math>G</math> is a pair, <math>G = (V, E)</math>, of a set <math>V</math> of vertices together with a subset <math>E</math> of pairs of elements of <math>V</math>. Note that this definition describes ''simple, loopless'' graphs: there is at most one edge joining two vertices, and no edge may join a vertex to itself. For graphs with multiple edges, see [[multigraph]]. |

− | A complete graph | + | |

− | ===Null Graph=== | + | ==Important Related Definitions== |

− | + | * If <math>v \in V</math>, <math>e \in E</math> and <math>v \in e</math> then we say <math>e</math> and <math>v</math> are ''incident.'' If <math>e, f \in E</math> and <math>v \in e, f</math> we say the edges <math>e</math> and <math>f</math> are ''coincident'' at <math>v</math>. | |

− | ===Connected | + | * The number of edges in <math>E</math> containing <math>v</math> is the ''degree'' of <math>v</math> and is often denoted <math>d(v)</math>. |

− | A graph is | + | * A vertex <math>v</math> is ''isolated'' if <math>d(v) = 0</math>, i.e. if there are no edges incident to <math>v</math>. |

+ | * If <math>G_1 = (V_1, E_1)</math> and <math>G_2 = (V_2, E_2)</math> are graphs such that <math>V_2 \subseteq V_1</math> and <math>E_2 \subseteq E_1</math> then we say <math>G_2</math> is a ''subgraph'' of <math>G_1</math>. If <math>E_2 = \{\{v_1, v_2\} \mid \{v_1, v_2\} \in E \textrm{ and } v_1, v_2 \in V_2</math> (informally, if <math>E_2</math> contains all those edges of <math>E_1</math> whose vertices are in <math>V_2</math>) then we say that <math>G_2</math> is an ''induced subgraph'' of <math>G_1</math>. | ||

+ | |||

+ | ==Types of Graphs and Subgraphs== | ||

+ | ===Complete Graph or Clique=== | ||

+ | A ''complete graph'' is a graph in which there is an edge joining every pair of vertices is connected. The complete graph on <math>n</math> vertices is denoted <math>K_n</math>. If <math>H</math> is a complete subgraph of <math>G</math> then the vertices of <math>H</math> are said to form a ''clique'' in <math>G</math>. | ||

+ | |||

+ | ===Complementrary Graphs=== | ||

+ | If <math>G_1 = (V, E_1)</math> and <math>G_2 = (V, E_2)</math> are two graphs on the same vertex set such that <math>G = (V, E_1 \cup E_2)</math> is a complete graph and <math>E_1 \cap E_2 = \emptyset</math> then <math>G_2</math> is said to be the ''complement'' of <math>G_1</math> and vice-versa. | ||

+ | |||

+ | ===Null Graph or Independent Set=== | ||

+ | A ''null graph'' (or ''independent set'') is the complement of a complete graph. Equivalently, a null graph is a graph in which every vertex is isolated. When drawn in the usual fashion, a null graph is simply a collection of scattered points (the vertices) with no edges connecting them. The terminology "independent set" is used most frequently to refer to a subgraph. In other words, one says <math>V_1 \subseteq V_1</math> is an independent set in <math>G= (V, E)</math> if and only if <math>V_1</math> is a clique in the complement of <math>G</math>. | ||

+ | |||

+ | ===Paths and Cycles=== | ||

+ | A ''path'' in a graph <math>G = (V, E)</math> is a sequence <math>v_0, e_1, v_1, \ldots, e_n, v_n</math> such that <math>v_i \in V</math>, <math>e_i \in E</math> and <math>e_i = \{v_{i - 1}, v_i\}</math> for all <math>i</math>. A ''cycle'' is a path in which the initial and final vertices are the same. | ||

+ | |||

+ | ===Connected Graph=== | ||

+ | A graph is ''connected'' if any two vertices can be connected by a path. That is, there are no isolated vertices with no paths coming from them, nor can the vertex set be partitioned into two parts with no edge between them. | ||

+ | |||

===Planar Graphs=== | ===Planar Graphs=== | ||

A graph is said to be planar if it can be drawn in a [[plane]] with no intersecting edges. For example, <math>K_1,K_2,K_3,</math> and <math>K_4</math> are planar. | A graph is said to be planar if it can be drawn in a [[plane]] with no intersecting edges. For example, <math>K_1,K_2,K_3,</math> and <math>K_4</math> are planar. | ||

+ | |||

+ | {{image}} | ||

In a planar graph, we can define faces of the graph, or the smallest regions bounded by edges. (An alternate definition is the regions bounded by edges which do not have any edges going through them.) Note that the area outside the planar graph is also a face, called the unbounded face. The degree of the face is the number of edges that bound the face. (Note that the same term is used for vertices, which can become confusing) | In a planar graph, we can define faces of the graph, or the smallest regions bounded by edges. (An alternate definition is the regions bounded by edges which do not have any edges going through them.) Note that the area outside the planar graph is also a face, called the unbounded face. The degree of the face is the number of edges that bound the face. (Note that the same term is used for vertices, which can become confusing) | ||

Line 35: | Line 55: | ||

===Hypergraph=== | ===Hypergraph=== | ||

A hypergraph is an extension of the concept of a graph where the edges can encompass more than two vertices, and essentially become sets themselves. Hypergraph theory is often difficult to visualize, and thus is often studied based on the sets that make it up. | A hypergraph is an extension of the concept of a graph where the edges can encompass more than two vertices, and essentially become sets themselves. Hypergraph theory is often difficult to visualize, and thus is often studied based on the sets that make it up. | ||

+ | |||

==See Also== | ==See Also== |

## Revision as of 13:01, 11 January 2008

In graph theory, a **graph** is a (usually finite) nonempty set of vertices that are joined by a number (possibly zero) of edges. Graphs are frequently represented graphically, with the vertices as points and the edges as smooth curves joining pairs of vertices.

*An image is supposed to go here. You can help us out by creating one and editing it in. Thanks.*

Formally, a graph is a pair, , of a set of vertices together with a subset of pairs of elements of . Note that this definition describes *simple, loopless* graphs: there is at most one edge joining two vertices, and no edge may join a vertex to itself. For graphs with multiple edges, see multigraph.

## Important Related Definitions

- If , and then we say and are
*incident.*If and we say the edges and are*coincident*at . - The number of edges in containing is the
*degree*of and is often denoted . - A vertex is
*isolated*if , i.e. if there are no edges incident to . - If and are graphs such that and then we say is a
*subgraph*of . If (informally, if contains all those edges of whose vertices are in ) then we say that is an*induced subgraph*of .

## Types of Graphs and Subgraphs

### Complete Graph or Clique

A *complete graph* is a graph in which there is an edge joining every pair of vertices is connected. The complete graph on vertices is denoted . If is a complete subgraph of then the vertices of are said to form a *clique* in .

### Complementrary Graphs

If and are two graphs on the same vertex set such that is a complete graph and then is said to be the *complement* of and vice-versa.

### Null Graph or Independent Set

A *null graph* (or *independent set*) is the complement of a complete graph. Equivalently, a null graph is a graph in which every vertex is isolated. When drawn in the usual fashion, a null graph is simply a collection of scattered points (the vertices) with no edges connecting them. The terminology "independent set" is used most frequently to refer to a subgraph. In other words, one says is an independent set in if and only if is a clique in the complement of .

### Paths and Cycles

A *path* in a graph is a sequence such that , and for all . A *cycle* is a path in which the initial and final vertices are the same.

### Connected Graph

A graph is *connected* if any two vertices can be connected by a path. That is, there are no isolated vertices with no paths coming from them, nor can the vertex set be partitioned into two parts with no edge between them.

### Planar Graphs

A graph is said to be planar if it can be drawn in a plane with no intersecting edges. For example, and are planar.

*An image is supposed to go here. You can help us out by creating one and editing it in. Thanks.*

In a planar graph, we can define faces of the graph, or the smallest regions bounded by edges. (An alternate definition is the regions bounded by edges which do not have any edges going through them.) Note that the area outside the planar graph is also a face, called the unbounded face. The degree of the face is the number of edges that bound the face. (Note that the same term is used for vertices, which can become confusing)

All planar graphs have dual graphs, which involve turning the planes of one graph into vertices, and the vertics into planes, with edges connecting if two planes are adjacent. The dual of the dual of a graph is returns the original graph.

An interesting result is Euler's Polyhedral Formula, which states that in a planar graph with vertices, edges, and faces, then The proof of this is simple using induction, but the derivation of the formula is much trickier.

Other interesting results for planar graphs are that:

- if the the sum of the degrees of the faces of the graph is , then .

### Bipartite graph

A graph is called bipartite if its vertex set can be split into two disjoint subsets such that no edge exists within each subset. A graph is bipartite if and only if it has no odd cycles, which is related to the Two Color Theorem. Bipartite graphs have many applications including matching problems.

### Euler Trail

A Euler trail is a graph where it is possible to form a trail which uses all the edges. A Euler trail has at most two vertices with odd degrees. The sum of all the degrees of the vertices equals twice the number of edges in the graph.

### Trees

A tree is a graph which does not have any cycles.

### Weighted Graphs

The edges of a graph can have weights assigned to them that represent some abstract relative value.

### Hypergraph

A hypergraph is an extension of the concept of a graph where the edges can encompass more than two vertices, and essentially become sets themselves. Hypergraph theory is often difficult to visualize, and thus is often studied based on the sets that make it up.