An Algorithm for Finding a Long Path in a Graph
暂无分享,去创建一个
An algorithm is described which constructs a long path containing a selected vertex x in a graph G. In hamiltonian graphs, it often finds a hamilton cycle or path. The algorithm uses crossovers of order kM, where M is a fixed constant, to build a longer and longer path. The method is based on theoretical methods often used to prove graphs hamiltonian. 1. Crossovers Let G be a 2-connected undirected simple graph on n vertices. If u,v 2 V (G), then u ! v means that u is adjacent to v (and so also v ! u). The reader is referred to (4) for other graph-theoretic terminology. In particular, a trail in G is a walk in which vertices may be repeated, but not edges. Since G is simple, paths and trails may be represented as sequences of vertices. This uniquely defines their edge-sets. If (w0,w1,...,wm) represents a trail Q, we use Q to denote both the trail itself (ie, a subgraph of G), its sequence of vertices, as well as its set of edges. The usage should always be clear from the context. Let x be a vertex of G. We want to find a long path P in G containing x. Initially, P = (x), a path of length 0. We then extend the path P as follows. u := x; v := x while 9w ! u such that w 62 P do P := P + uw; u := w; end while 9w ! v such that w 62 P do P := P + vw; v := w; end
[1] Edward F. Schmeichel,et al. A simple proof of a theorem of Jung , 1990, Discret. Math..
[2] J. A. Bondy,et al. Graph Theory with Applications , 1978 .
[3] Alfred V. Aho,et al. The Design and Analysis of Computer Algorithms , 1974 .