Two vertices vi and vj in a graph G = (V,E) are adjacent or neighbours if there exists an edge e E such that e=( vi,vj). A path p in a graph G=(V,E) is a sequence of vertices of V of the form, p = v1, v2………vn, (n 2) in which each vertex vi is adjacent to the next one,vi+1 (for 1 . The path is said to be simple if all the vertices or vertices are distinct, with the exception that v1 may equal vn. A path will be of length n if consists of a sequence of n+1 vertices. In other words, length of a path is the number of edges in it.
A cycle is a path p = v1, v2………vn, such that v1 = v2 (so that p starts and ends at the same vertex and forms a loop). Figure 2 illustrates paths and cycles in a graph. A cycle is a path of length greater than one that begins and ends at the same vertex. In an undirected graph, a simple cycle is a path that travels through three or more distinct vertices and connects them into a loop. Formally speaking, this means that if p is a path of the form, p = v1, v2………vn then p is a simple cycle if and only if (n>=3), v1 = vn, and vi vj for distinct i and j in the range . Put differently, when you travel around the loop in a simple cycle, you must visit at least three different vertices, and you cannot travel through any vertex more than once.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment