Abstract
Full Text
UDC 519.1
MATHEMATICS
V. A. PEREPELITSA
ON TWO PROBLEMS FROM GRAPH THEORY
(Presented by Academician L. V. Kantorovich, March 24, 1970)
I. The problem of finding a minimal Hamiltonian circuit with weighted arcs
A circuit is called Hamiltonian if it passes through all vertices of a graph, and through each only once ((^1)). Let in a directed graph (G(U)) with (n) vertices and set of arcs (U), each arc (u_{ij} \in U), (i, j = 1, 2, \ldots, n), be assigned a weight (\rho_{ij}), where the (\rho_{ij}) are natural numbers from the interval ([1, r]). For fixed (n) and (r), denote by (\mathfrak A_{n,r}) the set of all such graphs (G(U)) without loops. It is required, in (G(U)), to select a Hamiltonian circuit (K) such that its weight
[
\sum_{u_{ij}\in K} \rho_{ij}
]
is minimal.
If (n) is not large, then the indicated minimal Hamiltonian circuit (K) can be found by means of algorithms for solving the traveling-salesman problem ((^2,\,^3)).* In ((^3)) the algorithm uses memory of (\sim n2^n) cells and expends (\sim n^2 2^n) operations; in ((^2)) these quantities are of order, respectively, (n) and (4^n). In the present paper a sufficiently simple algorithm (\mathcal A_\varphi) is proposed, which, under certain restrictions on (r), “almost always” makes it possible to select in (G(U)) a minimal Hamiltonian circuit. It is also established that “almost all” directed (undirected) graphs contain Hamiltonian circuits (cycles).
We describe the algorithm (\mathcal A_\varphi); by (\varphi) denote an arbitrary increasing function of (n),
[
\frac{\partial}{\partial n}\varphi > 0, \qquad \lim_{n\to\infty}\varphi=\infty.
]
Assume that in (G(U)) the vertices are numbered by the numbers (i=1,2,\ldots,n); (V^+(V^-)) denotes the set of even (odd) vertices in (G(U)); (V_s^\Delta = V^\Delta \setminus V(L_{s-1})), (\Delta \in {+;\,-}), where (V(L_{s-1})) is the set of vertices belonging to the path (L_{s-1} = [i_1,i_2,\ldots,i_s]) of length (s-1); (L_0=i_1). The algorithm (\mathcal A_\varphi) consists of (n-1) steps, numbered by (s=1,2,\ldots,n-1), and is divided into two stages: 1 and 2.
Stage 1 consists of (2\mu) steps, where
[
\mu=\left[\frac{n}{2}\left(1-\frac{1}{\varphi}\right)\right].
]
At the first step (\mathcal A_\varphi) fixes the vertex (i_1=1) and seeks the first, in order, vertex (i_2\in V^-), (i_2\ne i_1), for which (G(U)) contains an arc (u_{i_1 i_2}) such that
[
\rho_{i_1 i_2}=\min_{i\in V_1^-}\rho_{i_1 i};
]
the path (L_1=u_{i_1 i_2}) of length 1 is regarded as constructed. Suppose that at step (s-1) a path (L_{s-1}) of length (s-1) has been selected, which begins at vertex (i_1=1) and ends at vertex (i_s). If (s\le \mu-1) ((\mu\le s\le 2\mu)), then at step (s) the first, in order, arc (u_{i_s i_{s+1}}) is chosen such that
[
i_{s+1}\in V_s^-
\quad\text{and}\quad
\rho_{i_s i_{s+1}}=\min_{i\in V_s^-}\rho_{i_s i}
]
[
\left(
i_{s+1}\in V_s^+
\quad\text{and}\quad
\rho_{i_s i_{s+1}}=\min_{i\in V_s^+}\rho_{i_s i}
\right).
]
After this (u_{i_s i_{s+1}}) is adjoined to (L_{s-1}): the path (L_s) of length (s) is constructed, and one proceeds to the ((s+1))-st step. If for none of the indicated vertices (i_{s+1}) in (G(U)) there exists any arc (u_{i_s i_{s+1}}), then (\mathcal A_\varphi) stops at the (s)-th step. The result of stage 1 is the path (L_{2\mu}), which begins at vertex (i_1) and ends at vertex (i_{2\mu+1}).
* The formulated problem can be solved by the well-known “branch and bound” method ((^4)), for which, however, there are no estimates.
Stage 2 begins with step (s=2\mu+1), at which (\mathcal A_\varphi) looks for a vertex (i_{2\mu+2}\in (V\setminus V(L_{2\mu}))) such that there exists a pair of arcs (u_{i_{2\mu+1}i_{2\mu+2}}, u_{i_{2\mu+2}i_1}) with weight
[
(\rho_{i_{2\mu+1}i_{2\mu+2}}+\rho_{i_{2\mu+2}i_1})
=
\min_{i\in (V\setminus V(L_{2\mu}))}(\rho_{i_{2\mu+1}i}+\rho_{ii_1}).
]
The indicated pair of arcs closes (L_{2\mu}) into a circuit (K_{2\mu+2}) of length (2\mu+2). Suppose that at the ((s-1))-st step of stage 2, (2\mu+2\leq s\leq n-1), an elementary circuit (K_s) consisting of (s) arcs (u_{i_kj_k}), (k=1,2,\ldots,s), has been selected, and let (i_s) be the first vertex in order not belonging to (K_s). Then at the (s)-th step (\mathcal A_\varphi) looks for the first arc (u_{i_kj_k}\in K_s) in order such that the conditions are satisfied: in (G(U)) there exists a pair of arcs (u_{i_ki_s}, u_{i_sj_k}), and the quantity ((\rho_{i_ki_s}+\rho_{i_sj_k}-\rho_{i_kj_k})) is minimal. After this the pair (u_{i_ki_s}, u_{i_sj_k}) is adjoined to the circuit (K_s), and the arc (u_{i_kj_k}) is deleted from (K_s): the elementary circuit (K_{s+1}) is constructed, and one proceeds to the ((s+1))-st step. At the (s)-th step of stage 2, (\mathcal A_\varphi) terminates in two cases: either when for the vertex (i_s) in (G(U)) no pair of arcs (u_{i_ki_s}, u_{i_sj_k}) is found, or when (s=n), since (K_n) is a Hamiltonian circuit.
It is not hard to see that for every graph (G(U)\in \mathfrak A_{n,r}) the algorithm (\mathcal A_\varphi) uses on the order of (n^2) memory cells and on the order of (n^2) operations. All modifications of (\mathcal A_\varphi) considered below ((\mathcal A^{(n)}, \mathcal A_\varphi^*) and (\mathcal A(W))) have the same efficiency.
We shall assume that the quantity (r), generally speaking, is a function of (n): (r=r(n)); moreover, always (r(n)\geq 1). We denote the cardinality of any set (E) by (|E|); (|\mathfrak A_{n,r}|=([r])^{n^2-n}). Let a sequence (\mathfrak A_{n,r}), (n=1,2,\ldots), be given, where (r=r(n)), and let (\mathfrak A_{n,r}^{(\omega)}) denote the set of all graphs (G(U)\in \mathfrak A_{n,r}) possessing some property (\omega_n). We shall say that almost all graphs (G(U)) from (\mathfrak A_{n,r}) possess the property (\omega_n) if
[
\lim_{n\to\infty}\frac{|\mathfrak A_{n,r}^{(\omega)}|}{|\mathfrak A_{n,r}|}=1.
]
Theorem 1. For an arbitrary function (r(n)), (\mathcal A_\varphi) finds a Hamiltonian circuit for almost all graphs (G(U)\in \mathfrak A_{n,r}).
Corollary 1. For any (r=r(n)), almost all graphs from (\mathfrak A_{n,r}) possess Hamiltonian circuits.
Corollary 2. Almost all graphs (G(U)\in \mathfrak A_{n,r}) are strongly connected. Let
[
c_1=1/\sqrt{2},\qquad c_2=\sqrt{2}.
]
Theorem 2. If (r\leq c_1\sqrt{n/\ln n}), then for almost all graphs (G(U)\in \mathfrak A_{n,r}), (\mathcal A_\varphi) finds a minimal Hamiltonian circuit.
Suppose (\mathcal A_\varphi) selects in (G(U)\in \mathfrak A_{n,r}) some Hamiltonian circuit (K_n), whose weight we denote by
[
\sigma_\varphi=\sum_{u_{ij}\in K_n}\rho_{ij}.
]
We denote by (\sigma) the weight of a minimal Hamiltonian circuit contained in (G(U)). If there exists a sequence (\varepsilon_n), (n=1,2,\ldots), (\varepsilon_n\geq 0),
[
\lim_{n\to\infty}\varepsilon_n=0,
]
for which the property (\sigma_\varphi\leq (1+\varepsilon_n)\sigma) holds for almost all graphs (G(U)\in \mathfrak A_{n,r}), then we shall say that (\mathcal A_\varphi) almost always leads to an asymptotically exact solution. We denote by (\mathcal A^{(n)}) such an algorithm (\mathcal A_\varphi) in which
[
\mu=\left[\frac n2-\varphi_n\right],
]
where (\varphi_n) is an increasing function of (n), (\varphi_n\leq \ln\ln n);
[
\frac{\partial}{\partial n}\varphi_n>0,\qquad
\lim_{n\to\infty}\varphi_n=\infty.
]
Theorem 3. If
[
r\leq \frac{n}{\ln n}\,\frac{1}{\varphi_n},
]
then the algorithm (\mathcal A^{(n)}) almost always leads to an asymptotically exact solution.
We shall consider our problem in the following probabilistic formulation. Let, in a directed (n)-vertex graph (G), for each pair of vertices (i, j), (i,j=1,2,\ldots,n), the arc (u_{ij}) appear with probability (1-q), (0 \leq q < 1), independently of the other arcs.
Theorem 4. If (q \leq 1-c_2\sqrt{\ln n/n}), then with probability (P \geq 1-\delta), (\delta \to 0) as (n \to \infty), the algorithm (\mathcal A_\varphi) selects in (G) a Hamiltonian cycle.
Let us agree to denote by (G_n) such a graph (G) in which, if an arc (u_{ij}) is present, then with (conditional) probability (p_\nu) it is assigned weight
[
\rho_{ij}=\nu,\quad \nu=1,2,\ldots,r;\quad \sum_{\nu=1}^{r} p_\nu=1.
]
Generally speaking, the quantities (q) and (p_\nu), (1 \leq \nu \leq r), are functions of (n): (q=q(n)) and (p_\nu=p_\nu(n)). We denote the integral distribution function by
[
F_\nu=\sum_{t=1}^{\nu} p_t;\quad F_0=0.
]
We shall call a graph of the form (G_n) random.
Theorem 5. If (p_1 \geq c_2\sqrt{\ln n/n}), then with probability (P \geq 1-\delta_n), (\lim_{n\to\infty}\delta_n=0), the algorithm (\mathcal A_\varphi) selects in (G_n) a minimum Hamiltonian cycle.
Introduce the following notation: the parameter (\alpha) runs through the values
[
2,3,\ldots,2r;\quad
p_\alpha^*=\sum_{\nu=1}^{\alpha-1} p_\nu p_{\alpha-\nu},\quad \text{if } \alpha \leq r+1,\quad \text{and}
]
[
p_\alpha^=\sum_{t=0}^{2r-\alpha} p_{\alpha-r+t}\,p_{r-t},\quad \text{if } r+2\leq \alpha\leq 2r;\quad
\Phi_\alpha=\sum_{\gamma=2}^{\alpha} p_\gamma^;
]
[
\Phi_1=0;\quad Q=2q(1-q)+q^2;
]
[
f(\varphi;p_1,\ldots,p_r)
=
2\sum_{\nu=1}^{r-1}
\frac{\bigl(1-(1-q)F_\nu\bigr)^{n/2\varphi}}{(1-q)F_\nu}
+
2\sum_{\alpha=2}^{2r-1}
\frac{\bigl(1-(1-Q)\Phi_\alpha\bigr)^\mu}{(1-Q)\Phi_\alpha}
+
\sum_{\alpha=2}^{2r-1}
\bigl(1-(1-Q)\Phi_\alpha\bigr)^{n/2\varphi};
]
(\psi(n)) is an arbitrary function increasing with (n),
[
\frac{\partial}{\partial n}\psi(n)>0,\quad \lim_{n\to\infty}\psi(n)=\infty.
]
Theorem 6. If, under the conditions of Theorem 4,
[
r \leq \frac{n}{\ln \psi(n)}
]
and the probability distribution for the weights (\rho_{ij}) satisfies the inequality
[
f(\varphi;p_1,\ldots,p_r) \leq n/\psi(n),
]
then the algorithm (\mathcal A_\varphi), applied to the graph (G_n), yields, with probability (P \geq 1-\delta_n), (\lim_{n\to\infty}\delta_n=0), an asymptotically exact solution.
The results formulated above are also valid for the case where the weights (\rho_{ij}) take integer values from the interval ([r_1,r_2]), where (r_1) is bounded below by a positive constant, (r=r_2-r_1).
Let (\widetilde{\mathfrak A}{n,r}) denote the set of all undirected (n)-vertex graphs (\widetilde G(\widetilde U)) in which the edges (\widetilde u) and on (\widetilde G_n). In this case all the theorems 1–6 and corollaries 1 and 2 formulated above are valid, with the sole difference that the constants (c_1) and (c_2) are replaced respectively by the constants (\widetilde c_1=1/2) and (\widetilde c_2=2), while the notations (G(U)),}\in \widetilde U) are assigned weights (\rho_{ij}), where (\rho_{ij}) are natural numbers from ([1,r]), and let (\widetilde G_n) denote an undirected random (n)-vertex graph with weighted edges. The algorithm (\mathcal A_\varphi) is suitable for selecting minimum Hamiltonian cycles on (\widetilde G(\widetilde U)\in \widetilde{\mathfrak A}_{n,r
(\mathfrak A_{n,r}), (G_n) and the term “contour” are replaced, respectively, by the notations (\widetilde G(\widetilde U)), (\widetilde{\mathfrak A}_{n,r}), (\widetilde G_n) and the term “cycle.”
Let (\mathcal A_\varphi^) denote the algorithm (\mathcal A_\varphi) that “skips” the ((2\mu+1))-st step, i.e., does not close the path (L_{2\mu}) into the contour (K_{2\mu+2}). Then the algorithm (\mathcal A_\varphi^) will find a minimal (i.e., having minimum weight) Hamiltonian path on directed graphs with weighted arcs and a minimal Hamiltonian chain on undirected graphs with weighted edges. For minimal Hamiltonian paths and chains, statements analogous to Theorems 1–6 hold.
II. The problem of a minimum covering of a graph by edges. A covering of a graph (\widetilde G(\widetilde U)) is a set of edges (W \subset \widetilde U) such that every vertex of (\widetilde G(\widetilde U)) is incident to at least one edge from (W) ((^1)). From the analogue of Corollary 1 for undirected graphs it follows that, for an arbitrary function (r(n)), the proportion of graphs (\widetilde G(\widetilde U) \in \widetilde{\mathfrak A}_{n,r}) possessing coverings tends to 1 as (n) grows.
We shall consider the set (\widetilde{\mathfrak A}{n,1}) of all (n)-vertex undirected graphs without loops whose edges have no weights or, equivalently, (\rho}=1) for every (\widetilde u_{ij}\in\widetilde U). A covering (W) with the smallest number (|W|) of edges is called minimal (for (\widetilde G(\widetilde U)\in\widetilde{\mathfrak A{n,1})) and is denoted by (m(\widetilde G(\widetilde U))). In ((^5)) an algorithm is given for constructing an asymptotically minimal covering, and it is proved that, for almost all (\widetilde G(\widetilde U)\in\widetilde{\mathfrak A}),
[
m(\widetilde G(\widetilde U))\le \frac{n+1}{2}+\log n .
]
This result can be strengthened.
Theorem 7. For almost all (\widetilde G(\widetilde U)\in\widetilde{\mathfrak A}_{n,1}), the number of edges in a minimal covering is equal to ([(n+1)/2]).
Let (\mathcal A(W)) denote the algorithm which first works as (\mathcal A_\varphi), and after a Hamiltonian cycle (contour) has been selected, deletes in it every second (in order) edge (arc).
Theorem 8. For almost all (\widetilde G(\widetilde U)\in\widetilde{\mathfrak A}_{n,1}), the algorithm (\mathcal A(W)) finds a minimal covering.
Let (\mathfrak N) denote the set of all nonisomorphic (n)-vertex undirected graphs without loops (the edges are unweighted). In ((^5)), Theorem 4 asserts that, for almost all nonisomorphic graphs (G\in\mathfrak N), the quantity (m(G)\sim n/2). This result can be strengthened.
Theorem 9. For almost all graphs from (\mathfrak N), the number of edges in a minimal covering is equal to ([(n+1)/2]).
Theorem 10. Almost all graphs from (\mathfrak N) possess Hamiltonian cycles.
Statements analogous to Theorems 7 and 8 also hold for directed graphs. In ((^4)), p. 42, the so-called weighted covering problem is formulated. The solution of this problem consists in minimizing the sum of the weights of the edges (arcs) entering into the covering, and it can be obtained with the aid of the algorithm (\mathcal A(W)). If the weighted covering problem is considered as applied to graphs with weighted edges (arcs), then statements analogous to Theorems 2–6 are valid for the algorithm.
In conclusion the author expresses gratitude to N. I. Glebov and V. K. Leont’ev for valuable advice and attention to the work.
Institute of Mathematics
Siberian Branch of the Academy of Sciences of the USSR
Novosibirsk
Received
19 III 1970
CITED LITERATURE
- C. Berge, Graph Theory and Its Applications, Moscow, 1962.
- V. K. Korobkov, R. E. Krichevsky, in: Mathematical Models and Methods of Optimal Planning, Novosibirsk, 1966, p. 10.
- M. Held, R. M. Karp, Cybernetics Collection, 9, 202 (1961).
- A. A. Korbut, Yu. Yu. Finkelstein, Discrete Programming, “Nauka,” Moscow, 1969.
- R. G. Nigmatullin, Problems of Cybernetics, 21, 241 (1969).