Defi Nation

You might also like

Download as doc, pdf, or txt
Download as doc, pdf, or txt
You are on page 1of 9

Path (graph theory)

In graph theory, a path in a graph is a sequence of vertices such that from each of its vertices there is an edge to the next vertex in the sequence. The first vertex is called the start vertex and the last vertex is called the end vertex. Both of them are called end or terminal vertices of the path. The other vertices in the path are internal vertices. A cycle is a path such that the start vertex and end vertex are the same. Notice however that unlike with paths, any vertex of a cycle can be chosen as the start, so the start is often not specified

Different types of path


The same concepts apply both to undirected graphs and directed graphs, with the edges being directed from each vertex to the following one. Often the terms directed path and directed cycle are used in the directed case. A path with no repeated vertices is called a simple path, and cycle with no repeated vertices aside from the start/end vertex is a simple cycle. In modern graph theory, most often "simple" is implied; i.e., "cycle" means "simple cycle" and "path" means "simple path", but this convention is not always observed, especially in applied graph theory. A path such that no graph edges connect two nonconsecutive path vertices is called an induced path. Some authors (e.g. Bondy and Murty 1976) use the term "walk" for a path in which vertices or edges may be repeated, and reserve the term "path" for what is here called a simple path. A simple cycle that includes every vertex of the graph is known as a Hamiltonian cycle. Two paths are independent (alternatively, internally vertex-disjoint) if they do not have any internal vertex in common. The length of a path is the number of edges that the path uses, counting multiple edges multiple times. The length can be zero for the case of a single vertex. A weighted graph associates a value (weight) with every edge in the graph. The weight of a path in a weighted graph is the sum of the weights of the traversed edges. Sometimes the words cost or length are used instead of weight.

Walks
A walk is an alternating sequence of vertices and edges, beginning and ending with a vertex, in which each vertex is incident to the two edges that precede and follow it in the sequence, and the vertices that precede and follow an edge are the endvertices of that edge. A walk is closed if its first and last vertices are the same, and open if they are different. The length l of a walk is the number of edges that it uses. For an open walk, l = n1, where n is the number of vertices visited (a vertex is counted each time it is visited). For a closed walk, l = n (the start/end vertex is listed twice, but is not counted twice). In the example graph, (1, 2, 5, 1, 2, 3) is an open walk with length 5, and (4, 5, 2, 1, 5, 4) is a closed walk of length 5. A trail is a walk in which all the edges are distinct. A closed trail has been called a tour or circuit, but these are not universal, and the latter is often reserved for a regular subgraph of degree two.

Traditionally, a path referred to what is now usually known as an open walk. Nowadays, when stated without any qualification, a path is usually understood to be simple, meaning that no vertices (and thus no edges) are repeated. (The term chain has also been used to refer to a walk in which all vertices and edges are distinct.) In the example graph, (5, 2, 1) is a path of length 2. The closed equivalent to this type of walk is called a cycle. Like path, this term traditionally referred to any closed walk, but now is usually understood to be simple by definition. In the example graph, (1, 5, 2, 1) is a cycle of length 3. (A cycle, unlike a path, is not allowed to have length 0.) Paths and cycles of n vertices are often denoted by Pn and Cn, respectively. (Some authors use the length instead of the number of vertices, however.) C1 is a loop, C2 is a pair of digons (multiple edges), and C3 is called a triangle. A cycle that has odd length is an odd cycle; otherwise it is an even cycle. One theorem is that a graph is bipartite if and only if it contains no odd cycles. (See complete bipartite graph.) The girth of a graph is the length of a shortest (simple) cycle in the graph; and the circumference, the length of a longest (simple) cycle. The girth and circumference of an acyclic graph are defined to be infinity . A graph is acyclic if it contains no cycles; unicyclic if it contains exactly one cycle; and pancyclic if it contains cycles of every possible length (from 3 to the order of the graph). A path or cycle is Hamiltonian (or spanning) if it uses all vertices exactly once. A graph that contains a Hamiltonian path is traceable; and one that contains a Hamiltonian path for any given pair of (distinct) endvertices is a Hamiltonian connected graph. A graph that contains a Hamiltonian cycle is a Hamiltonian graph. A trail or circuit (or cycle) is Eulerian if it uses all edges precisely once. A graph that contains an Eulerian trail is traversable. A graph that contains an Eulerian circuit is an Eulerian graph. The example graph does not contain an Eulerian trail, but it does contain a Hamiltonian path. Two paths are internally disjoint (some people call it independent) if they do not have any vertex in common, except the first and last ones. A theta graph is the union of three internally disjoint (simple) paths that have the same two distinct endvertices. A theta0 graph has seven vertices which can be arranged as the vertices of a regular hexagon plus an additional vertex in the center. The eight edges are the perimeter of the hexagon plus one diameter. path A route that does not pass any edge more than once. If the path does not pass any node more than once, it is a simple path. loop, cycle A path which ends at the node where it began. Eulerian path A path which passes through every edge (once and only once). If the starting and ending nodes are the same, it is an Euler cycle or an Euler circuit. If the starting and ending nodes are different, it is an Euler trail. Hamiltonian path A path which passes through every node once and only once. If the starting and ending nodes are adjacent, it is a Hamiltonian cycle directed, digraph

A graph in which each edge symbolizes an ordered, non-transitive relationship between two nodes. Such edges are rendered with an arrowhead at one end of a line or arc.

Cycle (graph theory)


Cycle in graph theory and computer science has several meanings: A closed walk, with repeated vertices allowed. See path (graph theory). (This usage is common in computer science. In graph theory it is more often called a closed walk.) A closed (simple) path, with no other repeated vertices than the starting and ending vertices. (This usage is common in graph theory.) This may also be called a simple cycle, circuit, circle, or polygon. A closed directed walk, with repeated vertices allowed. (This usage is common in computer science. In graph theory it is more often called a closed directed walk.) A closed directed (simple) path, with no repeated vertices other than the starting and ending vertices. (This usage is common in graph theory.) This may also be called a simple (directed) cycle. The edge set of an undirected closed path without repeated vertices. This may also be called a circuit, circle, or polygon. An element of the binary or integral (or real, complex, etc.) cycle space of a graph. (This is the usage closest to that in the rest of mathematics, in particular algebraic topology.) Such a cycle may be called a binary cycle, integral cycle, etc. An edge set which has even degree at every vertex; also called an even edge set or, when taken together with its vertices, an even subgraph. This is equivalent to a binary cycle, since a binary cycle is the indicator function of an edge set of this type.

Hamiltonian path

A Hamiltonian cycle in a dodecahedron. Like all platonic solids, the dodecahedron is Hamiltonian.

A Hamiltonian path (black) over a graph (blue).

In the mathematical field of graph theory, a Hamiltonian path is a path in an undirected graph which visits each vertex exactly once. A Hamiltonian cycle (or Hamiltonian circuit) is a cycle in an undirected graph which visits each vertex exactly once and also returns to the starting vertex. Determining whether such paths and cycles exist in graphs is the Hamiltonian path problem which is NP-complete. Hamiltonian paths and cycles are named after William Rowan Hamilton who invented the Icosian Game, now also known as Hamilton's puzzle, which involves finding a Hamiltonian cycle in the edge graph of the dodecahedron. Hamilton solved this problem using the Icosian Calculus, an algebraic structure based on roots of unity with many similarities to the quaternions (also invented by Hamilton). Unfortunately, this solution does not generalize to arbitrary graphs.

Definitions
A Hamiltonian path or traceable path is a path that visits each vertex exactly once. A graph that contains a Hamiltonian path is called a traceable graph. A graph is Hamilton-connected if for every pair of vertices there is a Hamiltonian path between the two vertices. A Hamiltonian cycle, Hamiltonian circuit, vertex tour or graph cycle is a cycle that visits each vertex exactly once (except the vertex which is both the start and end, and so is visited twice). A graph that contains a Hamiltonian cycle is called a Hamiltonian graph. Similar notions may be defined for directed graphs, where each edge (arc) of a path or cycle can only be traced in a single direction (i.e., the vertices are connected with arrows and the edges traced "tail-to-head"). A Hamiltonian decomposition is an edge decomposition of a graph into Hamiltonian

Types of graphs

Directed graph

A directed graph.

A directed graph or digraph G is an ordered pair G: = (V,A) with V is a set, whose elements are called vertices or nodes, A is a set of ordered pairs of vertices, called directed edges, arcs, or arrows.

An arc e = (x,y) is considered to be directed from x to y; y is called the head and x is called the tail of the arc; 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 x is said to be a predecessor of y. The arc (y,x) is called the arc (x,y) inverted. A directed graph G is called symmetric if, for every arc that belongs to G, the corresponding inverted arc also belongs to G. A symmetric loopless directed graph is equivalent to an undirected graph with the pairs of inverted arcs replaced with edges; thus the number of edges is equal to the number of arcs halved. A variation on this definition is the oriented graph, which is a graph (or multigraph; see below) with an orientation or direction assigned to each of its edges. A distinction between a directed graph and an oriented simple graph is that if x and y are vertices, a directed graph allows both (x,y) and (y,x) as edges, while only one is permitted in an oriented graph. A more fundamental difference is that, in a directed graph (or multigraph), the directions are fixed, but in an oriented graph (or multigraph), only the underlying graph is fixed, while the orientation may vary. A directed acyclic graph, occasionally called a dag or DAG, is a directed graph with no directed cycles. In the theory of Lie groups, a quiver Q is a directed graph serving as the domain of, and thus characterizing the shape of, a representation V defined as a functor, specifically an object of the functor category FinVctKF(Q) where F(Q) is the free category on Q consisting of paths in Q and FinVctK is the category of finite dimensional vector spaces over a field K. Representations of a quiver label its vertices with vector spaces and its edges (and hence paths) compatibly with linear transformations between them, and transform via natural transformations.

Simple graph

A simple graph with three vertices and three edges. Each vertex has degree two, so this is also a regular graph.

A simple graph is an undirected graph that has no self-loops and no more than one edge between any two different vertices. In a simple graph the edges of the graph form a set (rather than a multiset) and each edge is a pair of distinct vertices. In a simple graph with p vertices every vertex has a degree that is less than p.

Incidence matrix
In mathematics, an incidence matrix is a matrix that shows the relationship between two classes of objects. If the first class is X and the second is Y, the matrix has one row for each element of X and one column for each element of Y. The entry in row x and column y is 1 if x and y are related (called incident in this context) and 0 if they are not. There are variations; see below.

Graph theory
Undirected and directed graphs
An undirected graph G has two kinds of incidence matrix: unoriented and oriented. The incidence matrix (or unoriented incidence matrix) of G is a p q matrix (bij), where p and q are the numbers of vertices and edges respectively, such that bij = 1 if the vertex vi and edge xj are incident and 0 otherwise. The incidence matrix of a directed graph D is a p q matrix [bij] where p and q are the number of vertices and edges respectively, such that bij = 1 if the edge xj leaves vertex vi, 1 if it enters vertex vi and 0 otherwise. (Note that many authors use the opposite sign convention.) An oriented incidence matrix of an undirected graph G is the incidence matrix, in the sense of directed graphs, of any orientation of G. That is, in the column of edge e, there is a +1 in the row corresponding to one vertex of e and a -1 in the row corresponding to the other vertex of e, and all other rows have 0. All oriented incidence matrices of G differ only by negating some set of columns. In many uses, this is an insignificant difference, so one can speak of the oriented incidence matrix, even though that is technically incorrect. The oriented or unoriented incidence matrix of a graph G is related to the adjacency matrix of its line graph L(G) by the following theorem: A(L(G)) = B(G)TB(G) 2Iq where A(L(G)) is the adjacency matrix of the line graph of G, B(G) is the incidence matrix, and Iq is the identity matrix of dimension q. The Kirchhoff matrix is obtained from the oriented incidence matrix M(G) by the formula M(G)M(G)T. The integral cycle space of a graph is equal to the null space of its oriented incidence matrix, viewed as a matrix over the integers or real or complex numbers. The binary cycle space is the null space of its oriented or unoriented incidence matrix, viewed as a matrix over the two-element field.

Signed and bidirected graphs


The incidence matrix of a signed graph is a generalization of the oriented incidence matrix. It is the incidence matrix of any bidirected graph that orients the given signed graph. The column of a positive edge has a +1 in the row corresponding to one endpoint and a -1 in the row corresponding to the other endpoint, just like an edge in an ordinary (unsigned) graph. The column of a negative edge has either a +1 or a -1 in both rows. The line graph and Kirchhoff matrix properties generalize to signed graphs.

Multigraphs
The definitions of incidence matrix apply to graphs with loops and multiple edges. The column of an oriented incidence matrix that corresponds to a loop is all zero, unless the graph is signed and the loop is negative; then the column is all zero except for 2 in the row of its incident vertex.

Hypergraphs
Because the edges of ordinary graphs can only have two vertices (one at each end), the row of an incidence matrix for graphs can only have two non-zero entries. By contrast, a hypergraph can have multiple vertices assigned to one edge; thus, the general case describes a hypergraph.

Incidence structures
The incidence matrix of an incidence structure C is a p q matrix [bij], where p and q are the number of points and lines respectively, such that bij = 1 if the point pi and line Lj are incident and 0 otherwise. In this case the incidence matrix is also a biadjacency matrix of the Levi graph of the structure. As there is a hypergraph for every Levi graph, and vice-versa, the incidence matrix of an incidence structure describes a hypergraph.

Finite geometries
An important example is a finite geometry. For instance, in a finite plane, X is the set of points and Y is the set of lines. In a finite geometry of higher dimension, X could be the set of points and Y could be the set of subspaces of dimension one less than the dimension of Y; or X could be the set of all subspaces of one dimension d and Y the set of all subspaces of another dimension e.

Block designs
Another example is a block design. Here X is a finite set of "points" and Y is a class of subsets of X, called "blocks", subject to rules that depend on the type of design. The incidence matrix is an important tool in the theory of block designs. For instance, it is used to prove the fundamental theorem of symmetric 2-designs, that the number of blocks equals the number of points.

Planar graph

Example graphs Planar Nonplanar

In graph theory, a planar graph is a graph which can be embedded in the plane, i.e., it can be drawn on the plane in such a way that its edges may intersect only at their endpoints. A nonplanar graph is the one which cannot be drawn in the plane without edge intersections.

K5

A planar graph already drawn in the plane without edge intersections is called a plane K3,3 graph or planar embedding of the graph. A plane graph can be defined as a planar graph The complete graph K4 is planar with a mapping from every node to a point in 2D space, and from every edge to a plane curve, such that the extreme points of each curve are the points mapped from its end nodes, and all curves are disjoint except on their extreme points. It is easily seen that a graph that can be drawn on the plane can be drawn on the sphere as well, and vice versa. The equivalence class of topologically equivalent drawings on the sphere is called a planar map. Although a plane graph has an external or unbounded face, none of the faces of a planar map have a particular status. A generalization of planar graphs are graphs which can be drawn on a surface of a given genus. In this terminology, planar graphs have graph genus 0, since the plane (and the sphere) are surfaces of genus 0. See "graph embedding" for other related topics.

Bipartite graph

Example of bipartite graph

In the mathematical field of graph theory, a bipartite graph is a graph whose vertices can be divided into two disjoint sets U and V such that every edge connects a vertex in U to one in V; that is, U and V are independent sets. Equivalently, a bipartite graph is a graph that does not contain any odd-length cycle. The two sets U and V may be thought of as the colors of a coloring of the graph with two colors: if we color all nodes in U blue, and all nodes in V green, each edge has endpoints of differing colors, as is required in the graph coloring problem. In contrast, such a coloring is impossible in

the case of a nonbipartite graph, such as a triangle): after one node is colored blue and another green, the third vertex of the triangle is connected to vertices of both colors, preventing it from being assigned either color. One often writes G = (U, V, E) to denote a bipartite graph whose partition has the parts U and V. If |U| =|V|, that is, if the two subsets have equal cardinality, then G is called a balanced bipartite graph.

http://encyclopedia.thefreedictionary.com/Bipartite+graph

You might also like