Graph (mathematics)
In mathematics, and more specifically in graph theory, a graph is a representation of a set of objects where some pairs of objects are connected by links. The interconnected objects are represented by mathematical abstractions called vertices (also called nodes or points), and the links that connect some pairs of vertices are called edges (also called arcs or lines).^{[1]} Typically, a graph is depicted in diagrammatic form as a set of dots for the vertices, joined by lines or curves for the edges. Graphs are one of the objects of study in discrete mathematics.
The edges may be directed or undirected. For example, if the vertices represent people at a party, and there is an edge between two people if they shake hands, then this is an undirected graph, because if person A shook hands with person B, then person B also shook hands with person A. In contrast, if there is an edge from person A to person B when person A knows of person B, then this graph is directed, because knowledge of someone is not necessarily a symmetric relation (that is, one person knowing another person does not necessarily imply the reverse; for example, many fans may know of a celebrity, but the celebrity is unlikely to know of all their fans). The former type of graph is called an undirected graph and the edges are called undirected edges while the latter type of graph is called a directed graph and the edges are called directed edges.
Graphs are the basic subject studied by graph theory. The word "graph" was first used in this sense by J. J. Sylvester in 1878.^{[2]}^{[3]}
Contents
Definitions
Definitions in graph theory vary. The following are some of the more basic ways of defining graphs and related mathematical structures.
Graph
In the most common sense of the term,^{[4]} a graph is an ordered pair G = (V, E) comprising a set V of vertices, nodes or points together with a set E of edges, arcs or lines, which are 2element subsets of V (i.e., an edge is related with two vertices, and the relation is represented as an unordered pair of the vertices with respect to the particular edge). To avoid ambiguity, this type of graph may be described precisely as undirected and simple.
Other senses of graph stem from different conceptions of the edge set. In one more generalized notion,^{[5]} E is a set together with a relation of incidence that associates with each edge two vertices. In another generalized notion, E is a multiset of unordered pairs of (not necessarily distinct) vertices. Many authors call this type of object a multigraph or pseudograph.
All of these variants and others are described more fully below.
The vertices belonging to an edge are called the ends or end vertices of the edge. A vertex may exist in a graph and not belong to an edge.
V and E are usually taken to be finite, and many of the wellknown results are not true (or are rather different) for infinite graphs because many of the arguments fail in the infinite case. Moreover, V is often assumed to be nonempty, but E is allowed to be the empty set. The order of a graph is V, its number of vertices. The size of a graph is E, its number of edges. The degree or valency of a vertex is the number of edges that connect to it, where an edge that connects to the vertex at both ends (a loop) is counted twice.
For an edge {x, y}, graph theorists usually use the somewhat shorter notation xy.
Adjacency relation
The edges E of an undirected graph G induce a symmetric binary relation ~ on V that is called the adjacency relation of G. Specifically, for each edge {x, y}, the vertices x and y are said to be adjacent to one another, which is denoted x ~ y.
Types of graphs
Distinction in terms of the main definition
As stated above, in different contexts it may be useful to refine the term graph with different degrees of generality. Whenever it is necessary to draw a strict distinction, the following terms are used. Most commonly, in modern texts in graph theory, unless stated otherwise, graph means "undirected simple finite graph" (see the definitions below).
Undirected graph
An undirected graph is a graph in which edges have no orientation. The edge (x, y) is identical to the edge (y, x), i.e., they are not ordered pairs, but sets {x, y} (or 2multisets) of vertices. The maximum number of edges in an undirected graph without a loop is n(n − 1)/2.
Directed graph
A directed graph or digraph is a graph in which edges have orientations. It is written as an ordered pair G = (V, A) (sometimes G = (V, E)) with
 V a set whose elements are called vertices, nodes, or points;
 A a set of ordered pairs of vertices, called arrows, directed edges (sometimes simply edges with the corresponding set named E instead of A), directed arcs, or directed lines.
An arrow (x, y) is considered to be directed from x to y; y is called the head and x is called the tail of the arrow; y is said to be a direct successor of x and x is said to be a direct predecessor of y. If a path leads from x to y, then y is said to be a successor of x and reachable from x, and x is said to be a predecessor of y. The arrow (y, x) is called the inverted arrow of (x, y).
A directed graph G is called symmetric if, for every arrow in G, the corresponding inverted arrow also belongs to G. A symmetric loopless directed graph G = (V, A) is equivalent to a simple undirected graph G′ = (V, E), where the pairs of inverse arrows in A correspond onetoone with the edges in E; thus the number of edges in G′ is  E  =  A /2, that is half the number of arrows in G.
An oriented graph is a directed graph in which at most one of (x, y) and (y, x) may be arrows of the graph.
Mixed graph
A mixed graph is a graph in which some edges may be directed and some may be undirected. It is written as an ordered triple G = (V, E, A) with V, E, and A defined as above. Directed and undirected graphs are special cases.
Multigraph
Multiple edges are two or more edges that connect the same two vertices. A loop is an edge (directed or undirected) that connects a vertex to itself; it may be permitted or not, according to the application. In this context, an edge with two different ends is called a link.
A multigraph, as opposed to a simple graph, is an undirected graph in which multiple edges (and sometimes loops) are allowed.
Where graphs are defined so as to disallow both multiple edges and loops, a multigraph is often defined to mean a graph which can have both multiple edges and loops,^{[6]} although many use the term pseudograph for this meaning.^{[7]} Where graphs are defined so as to allow both multiple edges and loops, a multigraph is often defined to mean a graph without loops.^{[8]}
Simple graph
A simple graph, as opposed to a multigraph, is an undirected graph in which both multiple edges and loops are disallowed. In a simple graph the edges form a set (rather than a multiset) and each edge is a unordered pair of distinct vertices. In a simple graph with n vertices, the degree of every vertex is at most n − 1.
Quiver
A quiver or multidigraph is a directed multigraph. A quiver may also have directed loops in it.
Weighted graph
A weighted graph is a graph in which a number (the weight) is assigned to each edge.^{[9]} Such weights might represent for example costs, lengths or capacities, depending on the problem at hand. Some authors call such a graph a network.^{[10]} Weighted correlation networks can be defined by softthresholding the pairwise correlations among variables (e.g. gene measurements). Such graphs arise in many contexts, for example in shortest path problems such as the traveling salesman problem.
Halfedges, loose edges
In certain situations it can be helpful to allow edges with only one end, called halfedges, or no ends, called loose edges; see the articles Signed graphs and Biased graphs.
Important classes of graph
Regular graph
A regular graph is a graph in which each vertex has the same number of neighbours, i.e., every vertex has the same degree. A regular graph with vertices of degree k is called a k‑regular graph or regular graph of degree k.
Complete graph
A complete graph is a graph in which each pair of vertices is joined by an edge. A complete graph contains all possible edges.
Finite graph
A finite graph is a graph in which the vertex set and the edge set are finite sets. Otherwise, it is called an infinite graph.
Most commonly in graph theory it is implied that the graphs discussed are finite. If the graphs are infinite, that is usually specifically stated.
Connected graph
In an undirected graph, an unordered pair of vertices {x, y} is called connected if a path leads from x to y. Otherwise, the unordered pair is called disconnected.
A connected graph is an undirected graph in which every unordered pair of vertices in the graph is connected. Otherwise, it is called a disconnected graph.
In a directed graph, an ordered pair of vertices (x, y) is called strongly connected if a directed path leads from x to y. Otherwise, the ordered pair is called weakly connected if an undirected path leads from x to y after replacing all of its directed edges with undirected edges. Otherwise, the ordered pair is called disconnected.
A strongly connected graph is a directed graph in which every ordered pair of vertices in the graph is strongly connected. Otherwise, it is called a weakly connected graph if every ordered pair of vertices in the graph is weakly connected. Otherwise it is called a disconnected graph.
A kvertexconnected graph or kedgeconnected graph is a graph in which no set of k − 1 vertices (respectively, edges) exists that, when removed, disconnects the graph. A kvertexconnected graph is often called simply a kconnected graph.
Bipartite graph
A bipartite graph is a graph in which the vertex set can be partitioned into two sets, W and X, so that no two vertices in W share a common edge and no two vertices in X share a common edge. Alternatively, it is a graph with a chromatic number of 2.
In a complete bipartite graph, the vertex set is the union of two disjoint sets, W and X, so that every vertex in W is adjacent to every vertex in X but there are no edges within W or X.
Path graph
A linear graph or path graph of order n, the vertices can be listed in order, v_{0}, v_{1}, …, v_{n}, so that the edges are {v_{i−1}, v_{i}} for each i = 1, 2, …, n. If a linear graph occurs as a subgraph of another graph, it is a path in that graph.
Planar graph
A planar graph is a graph whose vertices and edges can be drawn in a plane such that no two of the edges intersect.
Cycle graph
A cycle graph of order n ≥ 3, vertices can be named v_{1}, …, v_{n} so that the edges are {v_{i−1}, v_{i}} for each i = 2, …,n in addition to {v_{n}, v_{1}}. Cycle graphs can be characterized as connected 2regular graphs. If a cycle graph occurs as a subgraph of another graph, it is a cycle or circuit in that graph.
Tree
A tree is a connected graph with no cycles.
A forest is a graph with no cycles, i.e. the disjoint union of one or more trees.
Advanced classes
More advanced kinds of graphs are:
 Petersen graph and its generalizations;
 perfect graphs;
 cographs;
 chordal graphs;
 other graphs with large automorphism groups: vertextransitive, arctransitive, and distancetransitive graphs;
 strongly regular graphs and their generalizations distanceregular graphs.
Properties of graphs
Two edges of a graph are called adjacent if they share a common vertex. Two arrows of a directed graph are called consecutive if the head of the first one is the tail of the second one. Similarly, two vertices are called adjacent if they share a common edge (consecutive if the first one is the tail and the second one is the head of an arrow), in which case the common edge is said to join the two vertices. An edge and a vertex on that edge are called incident.
The graph with only one vertex and no edges is called the trivial graph. A graph with only vertices and no edges is known as an edgeless graph. The graph with no vertices and no edges is sometimes called the null graph or empty graph, but the terminology is not consistent and not all mathematicians allow this object.
Normally, the vertices of a graph, by their nature as elements of a set, are distinguishable. This kind of graph may be called vertexlabeled. However, for many questions it is better to treat vertices as indistinguishable. (Of course, the vertices may be still distinguishable by the properties of the graph itself, e.g., by the numbers of incident edges.) The same remarks apply to edges, so graphs with labeled edges are called edgelabeled. Graphs with labels attached to edges or vertices are more generally designated as labeled. Consequently, graphs in which vertices are indistinguishable and edges are indistinguishable are called unlabeled. (Note that in the literature, the term labeled may apply to other kinds of labeling, besides that which serves only to distinguish different vertices or edges.)
The category of all graphs is the slice category Set ↓ D where D: Set → Set is the functor taking a set s to s × s.
Examples
 The diagram at right is a graphic representation of the following graph:

 V = {1, 2, 3, 4, 5, 6};
 E = {{1, 2}, {1, 5}, {2, 3}, {2, 5}, {3, 4}, {4, 5}, {4, 6}}.
 In category theory, a small category can be represented by a directed multigraph in which the objects of the category are represented as vertices and the morphisms as directed edges. Then, the functors between categories induce some, but not necessarily all, of the digraph morphisms of the graph.
 In computer science, directed graphs are used to represent knowledge (e.g., conceptual graph), finite state machines, and many other discrete structures.
 A binary relation R on a set X defines a directed graph. An element x of X is a direct predecessor of an element y of X if and only if xRy.
 A directed graph can model information networks such as Twitter, with one user following another.^{[11]}
Graph operations
There are several operations that produce new graphs from initial ones, which might be classified into the following categories:
 unary operations, which create a new graph from an initial one, such as:
 binary operations, which create a new graph from two initial ones, such as:
Generalizations
In a hypergraph, an edge can join more than two vertices.
An undirected graph can be seen as a simplicial complex consisting of 1simplices (the edges) and 0simplices (the vertices). As such, complexes are generalizations of graphs since they allow for higherdimensional simplices.
Every graph gives rise to a matroid.
In model theory, a graph is just a structure. But in that case, there is no limitation on the number of edges: it can be any cardinal number, see continuous graph.
In computational biology, power graph analysis introduces power graphs as an alternative representation of undirected graphs.
In geographic information systems, geometric networks are closely modeled after graphs, and borrow many concepts from graph theory to perform spatial analysis on road networks or utility grids.
See also
 Conceptual graph
 Dual graph
 Glossary of graph theory
 Graph (data structure)
 Graph database
 Graph drawing
 Graph theory
 Hypergraph
 List of graph theory topics
 List of publications in graph theory
 Network theory
Notes
 ↑ Trudeau, Richard J. (1993). Introduction to Graph Theory (Corrected, enlarged republication. ed.). New York: Dover Pub. p. 19. ISBN 9780486678702. Retrieved 8 August 2012.
A graph is an object consisting of two sets called its vertex set and its edge set.
<templatestyles src="Module:Citation/CS1/styles.css"></templatestyles>  ↑ See:
 J. J. Sylvester (February 7, 1878) "Chemistry and algebra," Nature, 17 : 284. From page 284: "Every invariant and covariant thus becomes expressible by a graph precisely identical with a Kekuléan diagram or chemicograph."
 J. J. Sylvester (1878) "On an application of the new atomic theory to the graphical representation of the invariants and covariants of binary quantics, — with three appendices," American Journal of Mathematics, Pure and Applied, 1 (1) : 6490. The term "graph" first appears in this paper on page 65.
 ↑ Gross, Jonathan L.; Yellen, Jay (2004). Handbook of graph theory. CRC Press. p. 35. ISBN 9781584880905.<templatestyles src="Module:Citation/CS1/styles.css"></templatestyles>
 ↑ See, for instance, Iyanaga and Kawada, 69 J, p. 234 or Biggs, p. 4.
 ↑ See, for instance, Graham et al., p. 5.
 ↑ For example, see. Bollobás, p. 7 and Diestel, p. 25.
 ↑ Gross (1998), p. 3, Gross (2003), p. 205, Harary, p.10, and Zwillinger, p. 220.
 ↑ For example, see Balakrishnan, p. 1, Gross (2003), p. 4, and Zwillinger, p. 220.
 ↑ Fletcher, Peter; Hoyle, Hughes; Patty, C. Wayne (1991). Foundations of Discrete Mathematics (International student ed.). Boston: PWSKENT Pub. Co. p. 463. ISBN 0534923739.
A weighted graph is a graph in which a number w(e), called its weight, is assigned to each edge e.
<templatestyles src="Module:Citation/CS1/styles.css"></templatestyles>  ↑ Strang, Gilbert (2005), Linear Algebra and Its Applications (4th ed.), Brooks Cole, ISBN 0030105676<templatestyles src="Module:Citation/CS1/styles.css"></templatestyles>
 ↑ Pankaj Gupta, Ashish Goel, Jimmy Lin, Aneesh Sharma, Dong Wang, and Reza Bosagh Zadeh WTF: The whotofollow system at Twitter, Proceedings of the 22nd international conference on World Wide Web
References
 Balakrishnan, V. K. (19970201). Graph Theory (1st ed.). McGrawHill. ISBN 0070054894.<templatestyles src="Module:Citation/CS1/styles.css"></templatestyles>
 Berge, Claude (1958). Théorie des graphes et ses applications (in French). Dunod, Paris: Collection Universitaire de Mathématiques, II. pp. viii+277. <templatestyles src="Module:Citation/CS1/styles.css"></templatestyles> Translation: . Dover, New York: Wiley. 2001 [1962].<templatestyles src="Module:Citation/CS1/styles.css"></templatestyles>
 Biggs, Norman (1993). Algebraic Graph Theory (2nd ed.). Cambridge University Press. ISBN 0521458978.<templatestyles src="Module:Citation/CS1/styles.css"></templatestyles>
 Bollobás, Béla (20020812). Modern Graph Theory (1st ed.). Springer. ISBN 0387984887.<templatestyles src="Module:Citation/CS1/styles.css"></templatestyles>
 BangJensen, J.; Gutin, G. (2000). Digraphs: Theory, Algorithms and Applications. Springer.<templatestyles src="Module:Citation/CS1/styles.css"></templatestyles>
 Diestel, Reinhard (2005). Graph Theory (3rd ed.). Berlin, New York: SpringerVerlag. ISBN 9783540261834.<templatestyles src="Module:Citation/CS1/styles.css"></templatestyles>.
 Graham, R.L., Grötschel, M., and Lovász, L, ed. (1995). Handbook of Combinatorics. MIT Press. ISBN 026207169X. <templatestyles src="Module:Citation/CS1/styles.css"></templatestyles>
 Gross, Jonathan L.; Yellen, Jay (19981230). Graph Theory and Its Applications. CRC Press. ISBN 0849339820.<templatestyles src="Module:Citation/CS1/styles.css"></templatestyles>
 Gross, Jonathan L., & Yellen, Jay, ed. (20031229). Handbook of Graph Theory. CRC. ISBN 1584880902. <templatestyles src="Module:Citation/CS1/styles.css"></templatestyles>
 Harary, Frank (January 1995). Graph Theory. Addison Wesley Publishing Company. ISBN 0201410338.<templatestyles src="Module:Citation/CS1/styles.css"></templatestyles>
 Iyanaga, Shôkichi; Kawada, Yukiyosi (1977). Encyclopedic Dictionary of Mathematics. MIT Press. ISBN 0262090163.<templatestyles src="Module:Citation/CS1/styles.css"></templatestyles>
 Zwillinger, Daniel (20021127). CRC Standard Mathematical Tables and Formulae (31st ed.). Chapman & Hall/CRC. ISBN 1584882913.<templatestyles src="Module:Citation/CS1/styles.css"></templatestyles>
Further reading
 Trudeau, Richard J. (1993). Introduction to Graph Theory (Corrected, enlarged republication. ed.). New York: Dover Publications. ISBN 9780486678702. Retrieved 8 August 2012.<templatestyles src="Module:Citation/CS1/styles.css"></templatestyles>
External links
Library resources about Graph(mathematics) 