Skip to main content
Log in

Efficient reassembling of graphs, part 1: the linear case

  • Published:
Journal of Combinatorial Optimization Aims and scope Submit manuscript

Abstract

The reassembling of a simple connected graph \(G = (V,E)\) is an abstraction of a problem arising in earlier studies of network analysis. Its simplest formulation is in two steps:

  1. (1)

    We cut every edge of G into two halves, thus obtaining a collection of \(n = |\,V\,|\) one-vertex components, such that for every \(v\in V\) the one-vertex component \(\{ v \}\) has \({{degree}}_{}(v)\) half edges attached to it.

  2. (2)

    We splice the two halves of every edge together, not of all the edges at once, but in some ordering \(\Theta \) of the edges that minimizes two measures that depend on the edge-boundary degrees of assembled components.

A component A is a subset of V and its edge-boundary degree is the number of edges in G with one endpoint in A and one endpoint in \(V-A\) (which is the same as the number of half edges attached to A after all edges with both endpoints in A have been spliced together). The maximum edge-boundary degree encountered during the reassembling process is what we call the \(\varvec{\alpha }\) -measure of the reassembling, and the sum of all edge-boundary degrees is its \(\varvec{\beta }\) -measure. The \(\alpha \)-optimization (resp. \(\beta \)-optimization) of the reassembling of G is to determine an order \(\Theta \) for splicing the edges that minimizes its \(\alpha \)-measure (resp. \(\beta \)-measure). There are different forms of reassembling, depending on restrictions and variations on the ordering \(\Theta \) of the edges. We consider only cases satisfying the condition that if an edge between disjoint components A and B is spliced, then all the edges between A and B are spliced at the same time. In this report, we examine the particular case of linear reassembling, which requires that the next edge to be spliced must be adjacent to an already spliced edge. We delay other forms of reassembling to follow-up reports. We prove that \(\alpha \)-optimization of linear reassembling and minimum-cutwidth linear arrangment (\(\mathrm{CutWidth}\)) are polynomially reducible to each other, and that \(\beta \)-optimization of linear reassembling and minimum-cost linear arrangement (\(\mathrm{MinArr}\)) are polynomially reducible to each other. The known NP-hardness of \(\mathrm{CutWidth}\) and \(\mathrm{MinArr}\) imply the NP-hardness of \(\alpha \)-optimization and \(\beta \)-optimization.

This is a preview of subscription content, log in via an institution to check access.

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Fig. 1

Similar content being viewed by others

Notes

  1. These terms (bridge, cluster, and others, later in this report) are overloaded in graph-theoretical problems. We make our own use of these terms, and state it explicitly when our meaning is somewhat at variance with that elsewhere in the literature.

  2. Such networks are typically more complex than the capacitated directed graphs that algorithms for max-flow (and other related quantities) and its generalizations (e.g., multicommodity max-flow) operate on.

  3. A standard definition of a binary tree T makes T a subset of the set of finite binary strings \(\{ 0,1 \}^*\) such that:

    1. 1.

      T is prefix-closed, i.e., if \(t\in T\) and u is a prefix of t, then \(u\in T\).

    2. 2.

      Every node has two children, i.e., \(t\,0\in T\) iff \(t\,1\in T\) for every \(t\in \{ 0,1 \}^*\).

    The root node of T is the empty string \(\varepsilon \), and a leaf node of T is a string \(t\in T\) without children, i.e., both \(t\,0\not \in T\) and \(t\,1\not \in T\).

  4. Our binary reassembling of G can be viewed as the “hierarchical clustering” of G, similar to a method of analysis in data mining, though used for a different purpose. Our binary reassembling mimicks what is called “agglomerative, or bottom-up, hierarchical clustering” in data mining.

  5. We qualify \({\Theta }_i^{Q_3}\) with the superscript “\({Q_3}\)” because it depends on the graph \({Q_3}\). The same ordering of the edges may not be valid for a sequential reassembling of another 8-vertex graph with a set of edges different from that of \({Q_3}\). This is not the case for the binary tree \({\mathcal{B}}\) underlying the binary reassembling \((G,\mathcal{B})\) of a graph \(G = (V,E)\); that is, regardless of the placement of edges in G, the tree \({\mathcal{B}}\) over V is valid for the binary reassembling \((G,\mathcal{B})\) and again for the binary reassembling \((G',\mathcal{B})\) of every graph \(G' = (V,E')\) over the same set V of vertices.

  6. A similar statement applies to the \(\alpha \)-measure: If we allowed \({{degree}}_{G}(w) > {{degree}}_{G}(w')\), then the new arrangement \(\varphi '\) would be such that \(\alpha (G,\varphi ') \leqslant \alpha (G,\varphi )\), but not necessarily \(\alpha (G,\varphi ') < \alpha (G,\varphi )\).

  7. There is no known simple expression for the exponential growth of B(n) as a function of n, though there are various ways of estimating tight lower bounds and tight upper bounds on its asymptotic growth (Odlyzko 1995).

References

  • Arora S, Frieze A, Kaplan H (1996) A new rounding procedure for the assignment problem with applications to dense graph arrangement problems. In: IEEE Proceedings of the 37th Annual Symposium on Foundations of Computer Science, pp 21–30

  • Assaf K (2014) The syntax and semantics of a domain-specific language for flow-network design. Sci Comput Progr 93((part A)):19–38

    Google Scholar 

  • Bestavros A, Kfoury A (2011) A domain-specific language for incremental and modular design of large-scale verifiably-safe flow networks. In: Proceeding of IFIP Working Conference on Domain-Specific Languages (DSL 2011), EPTCS volume 66, pp 24–47

  • Bronner D, Ries B (2006) An introduction to treewidth. Technical Report ROSE-REPORT-2006-004, Ecole Polytechnique Fédérale de Lausanne

  • Burkhard M, Ivan Hal S (1988) Min cut is NP-complete for edge weighted trees. Theor Comput Sci 58(1–3):209–229

    MathSciNet  Google Scholar 

  • Charikar M, Hajiaghayi MT, Karloff H, Rao S (2006) \({\ell }^2_2\) Spreading metrics for vertex ordering problems. In: Proceedings of the 17th Annual ACM-SIAM Symposium on Discrete Algorithms, pp 1018–1027. Society for Industrial and Applied Mathematics

  • Deistel R (2012) Graph theory. Springer, Berlin

    Google Scholar 

  • Garey Michael R, Johnson David S, Larry Stockmeyer (1976) Some simplied NP-complete graph problems. Theor Comput Sci 1:237–267

    Article  Google Scholar 

  • Jordi P (2011) Addenda to the survey of layout problems. Bull EATCS 105:177–201

    MathSciNet  MATH  Google Scholar 

  • Kfoury A (2011) The denotational, operational, and static semantics of a domain-specific language for the design of flow networks. In: Proceedings of SBLP 2011: Brazilian Symposium on Programming Languages

  • Kfoury A, Mirzaei S (2013) A different approach to the design and analysis of network algorithms. Technical Report BUCS-TR-2012-019, CS Dept, Boston University

  • Kfoury A, Mirzaei S (2015) Efficient reassembling of graphs, part 1: the linear case. arXiv:1509.06434

  • Makedon Fillia S, Papadimitriou Christos H, Hal SI (1985) Topological bandwidth. SIAM J Algebraic Discret Methods 6(3):418–444

    Article  MathSciNet  Google Scholar 

  • Odlyzko AM (1995) Asymptotic enumeration methods. In: Graham RL, Grotschel M, Lovast L (eds) Handbook of combinatorics, vol 2, pp 1063–1229. Cambridge, MA, MIT Press

  • Rao S, Richa AW (1998) New approximation techniques for some ordering problems. In: Proceedings of the Ninth Annual ACM-SIAM Symposium on Discrete algorithms, pp 211–218. Philadelphia, PA, Society for Industrial and Applied Mathematics

  • Soule N, Bestavros A, Kfoury A, Lapets A (2011) Safe compositional equation-based modeling of constrained flow networks. In: Proceedings of 4th Int’l Workshop on Equation-Based Object-Oriented Modeling Languages and Tools, Zürich

  • Thilikos DM, Serna MJ, Bodlaender HL (2001) A polynomial time algorithm for the cutwidth of bounded degree graphs with small treewidth. In: Meyer F, Auf der H (eds), Algorithms, ESA 2001. LNCS 2161, pp 380–390. Springer, Berlin

  • Tom L, Satish R (1999) Multicommodity max-flow min-cut theorems and their use in designing approximation algorithms. J ACM (JACM) 46(6):787–832

    Article  MathSciNet  MATH  Google Scholar 

Download references

Acknowledgments

Partially supported by NSF awards CCF-0820138 and CNS-1135722.

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Saber Mirzaei.

Appendices

Appendix 1: sequential graph reassembling

Let \({\mathscr {P}}\) be the set of all the partitions of the set \(V = \{ v_1,\ldots ,v_n \}\) of vertices in the graph \(G = (V,E)\). There are two special partitions in \({\mathscr {P}}\):

$$\begin{aligned} P_0 := \bigl \{ \,\{ v \}\;\bigl |\;v\in V\, \bigr \} \quad \text {and}\quad P_{\infty } := \{ \,V\, \} . \end{aligned}$$

Given two partitions \(X, Y \in {\mathscr {P}}\), we write \(X \sqsubseteq Y\) if X is finer than Y or, equivalently, Y is coarser than X, i.e., for every block \(A\in X\) there is a block \(B\in Y\) such that \(A\subseteq B\). We write \(X\sqsubset \mathcal{Y}\) iff \(X \sqsubseteq Y\) and \(X\ne Y\). The relation “\(\sqsubseteq \)” is a (non-strict) partial order on \({\mathscr {P}}\), with a least element (the finest partition \(P_0\)) and a largest element (the coarsest partition \(P_{\infty }\)). We need the following simple fact.

Lemma 37

In the poset \(({\mathscr {P}},\sqsubseteq )\) of all partitions of n elements, a maximal chain (linearly ordered with \(\sqsubset \)) is a sequence of n partitions, always starting with \(P_0\) and ending with \(P_{\infty }\).

Proof

If \(X_1\sqsubset X_2\sqsubset \cdots \sqsubset X_k\) is a maximal chain of partitions, necessarily with \(X_1 = P_0\) and \(X_k = P_{\infty }\) because the chain is maximal, then \(X_1\) has n blocks, \(X_2\) has \(n-1\) blocks, in general \(X_p\) has \(n-p+1\) blocks, and \(X_k\) has one block. The length k of the chain is therefore exactly n. \(\square \)

Definition 38

(Sequential graph reassembling, i.e., according to an ordering of the edges) Let \(\Theta \) be an ordering of the edges in E. We use \(\Theta \) to select n partitions in \({\mathscr {P}}\) forming a maximal chain (linearly ordered with \(\sqsubset \)), which starts with the finest partition \(P_0\) and ends with the coarsest partition \(P_{\infty } = \{ V \}\), say:

$$\begin{aligned} X_1\ \sqsubset \ X_2\ \sqsubset \ \cdots \ \sqsubset X_n \quad \text {where }\quad X_1 = P_0 \quad \text { and }\quad X_n = P_{\infty }, \end{aligned}$$

as we explain next. To define \(X_{p+1}\) from \(X_p\), we associate each \(X_p\) with a subsequence \(\Theta _p\) of the initial sequence \(\Theta _1 = \Theta \), for every \(p\geqslant 1\). The subsequence \({\Theta }_p\) keeps track of all the edges that have not yet been reconnected. We obtain the next pair \(\bigl (X_{p+1},{\Theta }_{p+1}\bigr )\) from the preceding pair \(\bigl (X_{p},{\Theta }_p\bigr )\) as follows:

  1. (1)

    Take the first edge e in the sequence \({\Theta }_p\), i.e., let \({\Theta }_p = e\,{\Theta }_p'\) for some \({\Theta }_p'\), with \(e = \overline{v\,w}\) for some \(v,w\in V\), and let A and B be the unique blocks in \(X_{p}\) containing v and w, respectively.

  2. (2)

    Merge the two blocks A and B to obtain \(X_{p+1}\), i.e., let:

    $$\begin{aligned} X_{p+1} := \bigl (X_{p} - \{ A,B \}\bigr )\cup \{ A\cup B \}. \end{aligned}$$
  3. (3)

    Delete every edge \(e'\) whose two endpoints are in the new block \(A\cup B\) to obtain \({\Theta }_{p+1}\), i.e., let:

    $$\begin{aligned} {\Theta }_{p+1} := {\Theta }_{p}\;\bigl / \;\bigl \{ \,e'\in E\;\bigl |\;e'= \overline{v'\,w'}\quad \text { and }\quad \{ v',w' \} \subseteq A\cup B\, \bigr \} . \end{aligned}$$

In words, we go from \(\bigl (X_{p},{\Theta }_p\bigr )\) to \(\bigl (X_{p+1},{\Theta }_{p+1}\bigr )\) by merging the two blocks A and B in \(X_{p}\) that are connected by the first edge e in \({\Theta }_p\), and then removing from further consideration all edges whose endpoints are in \(A\cup B\).

We refer to the sequential reassembling of G according to the ordering \({\Theta }\) by writing \((G,{\Theta })\), the result of which is the chain of partitions \(\mathcal{X}= X_1\sqsubset \cdots \sqsubset X_n\), more succintly written also as \(\mathcal{X}= X_1\,\cdots \,X_n\).

Remark 39

In Definition 38, when we merge the two blocks A and B because the edge e has its two endpoints in A and B, not only do we reconnect the two halves of e, but we additionally reconnect every other edge \(e'\) whose two endpoints are also in A and B. Thus, in general, we may reconnect several edges simultaneously – all the edges between A and B in the original graph – rather than one at a time by strictly following the order specified by \({\Theta }\). The same happens with binary graph-reassembling (Definition 4).

Definition 38 describes the process of going from an ordering \({\Theta }\) of edges to a maximal chain \(\mathcal{X}\) of partitions. If \(\mathcal{X}= X_1\,\cdots \,X_n\) is a maximal chain of partitions, we say that \(\mathcal{X}\) is strict if, for every consecutive pair \((X_p,X_{p+1})\) with \(A,B\in X_p\) and \(A\cup B\in X_{p+1}\), where \(1\leqslant p < n\), it is the case that \({\partial }_{G}(A,B)\ne \varnothing \). The result of a sequential reassembling \((G,\Theta )\) is always a strict maximal chain \(\mathcal{X}\) of partitions. We can also carry out the process in reverse, as asserted by the next lemma.

Lemma 40

(From a maximal chain \(\mathcal{X}\) of partitions to an ordering \({\Theta }\) that induces it) Let \(G = (V,E)\) be a graph, and \({\mathscr {P}}\) the set of all partitions of V, as in Definition 38. For every maximal chain of partitions \(\mathcal{X}= X_1\sqsubset \cdots \sqsubset X_n\), with \(X_1,\ldots ,X_n\in {\mathscr {P}}\), if \(\mathcal{X}\) is strict, then there is an ordering (not necessarily unique) \({\Theta }\) of E such that \((G,{\Theta }) = \mathcal{X}\).

Proof

This is a consequence of Definition 38. Details omitted. \(\square \)

We want to relate the two notions: sequential reassembling \((G,{\Theta })\) in Definition 38 and binary reassembling \((G,{\mathcal{B}})\) in Definition 4. The discussion to follow uses the following facts.

Lemma 41

Let \(\mathcal{B}\) be a binary tree over \(V = \{ v_1,\ldots ,v_n \}\), given in the formulation of Definition 1.

  1. 1.

    If \(S = \{ X_1,\ldots ,X_k \} \subseteq \mathcal{B}\) is a maximal collection of \(k\geqslant 2\) pairwise disjoint sets in \(\mathcal{B}\), then S is a partition of V. We call such a maximal collection S a cross-section of the binary tree \(\mathcal{B}\).

  2. 2.

    If \(\mathscr {S}\) is the set of all cross-sections of \(\mathcal{B}\), then \((\mathscr {S},\sqsubseteq )\) is a proper sub-poset of the poset \(({\mathscr {P}},\sqsubseteq )\) in Lemma 37, with the same bottom element \(P_0\) and top element \(P_{\infty }\).

  3. 3.

    In the poset \((\mathscr {S},\sqsubseteq )\), a maximal chain has exactly n entries, always starting with \(P_0\) and ending with \(P_{\infty }\).

Proof

All three parts can be proved by induction on \(n \geqslant 1\), using the same reasoning as in the proofs of Propositions 2 and 3. All details omitted. \(\square \)

In the preceding lemma, it is worth noting that the size of \({\mathscr {P}}\) is fixed as a function of n, the so-called Bell number B(n), which counts the partitions of an n-element set and grows exponentially in n.Footnote 7 By contrast, the size of \(\mathscr {S}\) is much smaller, depends on both n and the shape of the binary tree \(\mathcal{B}\), and can be as small as n (the case when \(\mathcal{B}\) is a linear, i.e., a degenerate binary tree).

Consider a sequential reassembling \((G,\Theta )\) of the graph \(G = (V,E)\), the result of which is a maximal chain of n partitions \(\mathcal{X}= X_1\sqsubset \ \cdots \ \sqsubset X_n\), as in Definition 38, where \(X_1 = P_0\) and \(X_n = P_{\infty }\). Since every successive partition \(X_{p+1}\) in \(\mathcal{X}\) is obtained from the previous \(X_p\) by merging two blocks in \(X_p\), there is a natural way of organizing \(\mathcal{X}\) in the form of a binary tree \(\mathcal{B}\), with n (not all) of the cross-sections of \(\mathcal{B}\) being exactly \(\{ X_1,\ldots ,X_n \}\). Let \(\text {binary}(G,\Theta )\) denote the binary reassembling thus obtained.

Consider next a binary reassembling \((G,\mathcal{B})\) of the graph \(G = (V,E)\). The set \(\mathscr {S}\) of all cross-sections in \(\mathcal{B}\) is uniquely defined. We want to extract from \(\mathscr {S}\) a maximal chain \(\mathcal{X}\) of cross-sections/partitions, ordered by \(\sqsubset \), which, by Lemma 40, will in turn induce an ordering of \(\Theta \) of the edges. The problem here is that there are generally many such maximal chains \(\mathcal{X}\). We need therefore a method to canonically extract a unique maximal chain \(\mathcal{X}\) from \(\mathscr {S}\) and a unique edge-ordering \(\Theta \) from \(\mathcal{X}\). We propose such a method in the next paragraph.

We assume that the binary reassembling \((G,\mathcal{B})\) is strict and that there is a fixed ordering of the vertices, say, \(v_1 \prec v_2 \prec \cdots \prec v_n\). The vertex ordering “\(\prec \)” is extended to edges, and to sets of edges, as follows:

  • If \(e = \overline{v\,w}\) is the edge joining vertices v and w, we assume \(v\prec w\).

  • If \(e = \overline{v\,w}\) and \(e' = \overline{v'\,w'}\), then \(e \prec e'\) iff either \(v\prec v'\) or \(v = v'\) and \(w\prec w'\).

  • If \(A \subseteq E\), then \(\text {canon}(A)\) is the canonical ordering of A w.r.t. “\(\prec \)”, i.e., \(\text {canon}(A) = e_1\,e_2\,\cdots \,e_k\) where \(A = \{ e_1,e_2,\ldots ,e_k \}\) and \(e_1\prec e_2\prec \cdots \prec e_k\).

  • If A and B are non-empty disjoint set of edges, with \(\text {canon}(A) = e_1\,e_2\,\cdots \) and \(\text {canon}(B) = f_1\,f_2\,\cdots \), then \(\text {canon}(A)\prec \text {canon}(B)\) iff \(e_1\prec f_1\).

If \(W\in \mathcal{B}\), then \({\mathcal{B}}_W\) is the subtree of \(\mathcal{B}\) rooted at W (see Proposition 3). We write \((G,{\mathcal{B}}_W)\) for a partial binary reassembling of the graph \(G=(V,E)\), the result being the subgraph of G induced by W together with all the edges in \({\partial }_{G}(W)\) as dangling edges, i.e., edges with only one endpoint in W. We define a canonical ordering of all the edges already in place in the partial reassembling \((G,{\mathcal{B}}_W)\), denoted \(\text {canon}(G,{\mathcal{B}}_W)\), as follows:

$$\begin{aligned} \text {canon}(G,{\mathcal{B}}_W)\;:= \ {\left\{ \begin{array}{ll} \varepsilon \ (\text {the empty string}) &{} \text {if }\quad W \text { is a singleton set},\\ \text {canon}(G,{\mathcal{B}}_{T})\,\text {canon}(G,{\mathcal{B}}_{U}) \,\text {canon}({\partial }_{}(T,U)) &{} \text {if }\quad W = T\uplus U \text { and},\\ &{} \text {canon}(G,{\mathcal{B}}_{T})\prec \text {canon}(G,{\mathcal{B}}_{U}), \\ \text {canon}(G,{\mathcal{B}}_{U})\,\text {canon}(G,{\mathcal{B}}_{T}) \,\text {canon}({\partial }_{}(T,U)) &{} \text {if }\quad W = T\uplus U \text { and},\\ &{} {\text {canon}(G,{\mathcal{B}}_{U})\prec \text {canon}(G,{\mathcal{B}}_{T})}. \end{array}\right. } \end{aligned}$$

Because the binary reassembling \((G,\mathcal{B})\) is strict, \({\partial }_{}(T,U)\ne \varnothing \) in the second and third cases above, which implies \(\text {canon}({\partial }_{}(T,U))\ne \varepsilon \). If \(W = V\), then \((G,{\mathcal{B}}) = (G,{\mathcal{B}}_W)\) and \(\text {canon}(G,{\mathcal{B}}) = \text {canon}(G,{\mathcal{B}}_W)\).

Proposition 42

(Relating sequential reassembling and binary reassembling) Let \(G= (V,E)\) be a simple undirected graph. We have the following facts:

  1. 1.

    For every sequential reassembling \((G,{\Theta })\), there is a binary tree \(\mathcal{B}\) over V such that:

    $$\begin{aligned} \text {binary}(G,{\Theta }) = (G,\mathcal{B}) . \end{aligned}$$
  2. 2.

    For every strict binary reassembling \((G,\mathcal{B})\), there is an ordering \({\Theta }\) of E such that:

    $$\begin{aligned} \text {canon}(G,\mathcal{B}) = (G,\Theta ) . \end{aligned}$$
  3. 3.

    For every strict binary reassembling \((G,\mathcal{B})\), it holds that:

    $$\begin{aligned} \text {binary}(\text {canon}(G,\mathcal{B})) = (G,\mathcal{B}) . \end{aligned}$$

Proof

Parts 1 and 2 follow from the definitions and discussion that precede the proposition. All details omitted. Part 3 can be proved by structural induction on the subtrees \({\mathcal{B}}_W\) of \(\mathcal{B}\), where the induction hypothesis is \(\text {binary}(\text {canon}(G,{\mathcal{B}}_W)) = (G,{\mathcal{B}}_W)\). All details omitted again. \(\square \)

It is possible to refine the notion of “canonical ordering” on the set of edges E, so that the equality \(\text {canon}(\text {binary}(G,{\Theta })) = (G,{\Theta })\) holds which, together with the equality in part 3 of the preceding proposition, will mean that the functions \(\text {binary}()\) and \(\text {canon}()\) are inverses of each other. We omit this refinement as it will go further afield from our main concerns.

Appendix 2: Remaining proofs for Sects. 3 and 4

We supply the details of several long straightforward and/or highly technical proofs which we omitted in Sects. 3 and 4 in order to facilitate the grasp of the different concepts and their mutual dependence.

Proof of Theorem 21

Let \(G = (V,E)\) be an arbitrary simple undirected graph, with \(|\,V\,| = n\). It suffices to show that if \((G,\varphi )\) is an \(\alpha \)-optimal linear arrangement, then the linear reassembling \((G,\mathcal{L})\) induced by \((G,\varphi )\) is also \(\alpha \)-optimal, using Definition 11.

In the notation of Definition 11, the clusters of \(\mathcal{L}\) of size \(\geqslant 2\) are \(\{ X_1,\ldots ,X_{n-1} \}\). For the singleton clusters of \(\mathcal{L}\), we pose \(Y_{i-1} := \{ {\varphi }^{-1}(i) \}\), where \(1\leqslant i\leqslant n\). From Definition 7:

$$\begin{aligned} \alpha (G,\varphi )= & {} \max \,\bigl \{ \,{{degree}}_{}(Y_0), \;\max \,\{ \,{{degree}}_{}(X_j)\;|\;1\leqslant j\leqslant n-1 \} \bigr \} ,\\ \alpha (G,\mathcal{L})= & {} \max \,\bigl \{ \,\max \,\{ \,{{degree}}_{}(Y_i)\;| \;0\leqslant j\leqslant n-1 \}, \;\max \,\{ \,{{degree}}_{}(X_j)\;|\;1\leqslant j\leqslant n-1 \} \bigr \} . \end{aligned}$$

By way of getting a contradiction, assume that \((G,\varphi )\) is \(\alpha \)-optimal but that the induced \((G,\mathcal{L})\) is not \(\alpha \)-optimal. Hence, there is another linear reassembling \((G,\mathcal{L}')\) which is \(\alpha \)-optimal such that \(\alpha (G,\mathcal{L}') < \alpha (G,\mathcal{L})\). Using the same notation for both \((G,\mathcal{L})\) and \((G,\mathcal{L}')\), where every name related to the latter is decorated with a prime, the inequality \(\alpha (G,\mathcal{L}') < \alpha (G,\mathcal{L})\) implies the inequality:

$$\begin{aligned}&\max \,\bigl \{ \,\max \,\{ \,{{degree}}_{}(Y'_i)\;| \;0\leqslant j\leqslant n-1 \}, \;\max \,\{ \,{{degree}}_{}(X'_j)\;|\;1\leqslant j\leqslant n-1 \} \bigr \}\\&\quad < \ \max \,\bigl \{ \,\max \,\{ \,{{degree}}_{}(Y_i)\;| \;0\leqslant j\leqslant n-1 \}, \;\max \,\{ \,{{degree}}_{}(X_j)\;|\;1\leqslant j\leqslant n-1 \} \bigr \} . \end{aligned}$$

But \(\max \{ {{degree}}_{}(Y'_i)\,|\,0\leqslant j\leqslant n-1 \} = \max \{ {{degree}}_{}(Y_i)\,|\,0\leqslant j\leqslant n-1 \}\), which implies two inequalities:

$$\begin{aligned} \max \,\{ \,{{degree}}_{}(Y_i)\;|\;1\leqslant j\leqslant n-1 \} \ <\ \max \,\{ \,{{degree}}_{}(X_j)\;|\;1\leqslant j\leqslant n-1 \} , \end{aligned}$$
(1)
$$\begin{aligned} \max \,\{ \,{{degree}}_{}(X'_j)\;|\;1\leqslant j\leqslant n-1 \} \ <\ \max \,\{ \,{{degree}}_{}(X_j)\;|\;1\leqslant j\leqslant n-1 \} . \end{aligned}$$
(2)

Hence, by inequality (1), we have:

$$\begin{aligned} \alpha (G,\varphi ) = \alpha (G,\mathcal{L}) = \max \,\{ \,{{degree}}_{}(X_j)\;|\;1\leqslant j\leqslant n-1 \} . \end{aligned}$$

Consider now the linear arrangement \((G,\varphi ')\) induced by the linear reassembling \((G,\mathcal{L}')\), using Definition 10. We have:

$$\begin{aligned} \alpha (G,\varphi ') = \max \,\bigl \{ \,{{degree}}_{}(Y'_0), \;\max \,\{ \,{{degree}}_{}(X'_j)\;|\;1\leqslant j\leqslant n-1 \} \bigr \} . \end{aligned}$$

If \({{degree}}_{}(Y'_0) \geqslant \max \{ {{degree}}_{}(X'_j)\,|\,1\leqslant j\leqslant n-1 \}\), then inequality (1) implies \(\alpha (G,\varphi ') < \alpha (G,\varphi )\), else inequality (2) implies again \(\alpha (G,\varphi ') < \alpha (G,\varphi )\). In both cases, the \(\alpha \)-optimality of \((G,\varphi )\) is contradicted. \(\square \)

For the proofs of Lemmas 30 and 31, we take a closer look at how the vertices of \(K_{p+1}\) are positioned in the sequence \(\mathcal{S}\) in  (\(\diamondsuit \)) in Sect. 4. From the fact that p is the sum of all the vertex degrees in G, it follows that p is even and \(p+1\) odd. From the sequence \(\mathcal{S}\), we can extract the subsequence \((\mathcal{S}\;|\;K_{p+1})\) consisting of all the vertices of \(K_{p+1}\) and corresponding cutwidths:

figure d

where \(\{ i_1,\ldots ,i_{p+1} \}\subseteq \{ 1,\ldots ,n+p \}\) and \(\{ x_{i_1},\ldots ,x_{i_{p+1}} \} = \{ u_1,\ldots ,u_p \}\cup \{ w \}\). In the preceding sequence, every vertex has the same degree p in the subgraph \(K_{p+1}\). In the full graph \(G_w\), every vertex from \(K_{p+1}\) has again the same degree p, except for the distinguished vertex w which has degree \(p+d\) where \(d = {{degree}}_{G}(w)\). In particular, we have:

$$\begin{aligned} s_{i_1} = p, \quad s_{i_2} = 2\cdot (p-1), \quad s_{i_3} = 3\cdot (p-2),\ldots ,\; s_{i_{p-1}} = (p-1)\cdot 2, \quad s_{i_{p}} = p . \end{aligned}$$

The mid-point of \((\mathcal{S}\;|\;K_{p+1})\) is \(x_{i_{(p/2)+1}}\). The two adjacent cutwidths of the mid-point \(x_{i_{(p/2)+1}}\) are:

$$\begin{aligned} s_{i_{(p/2)}} = \dfrac{p}{2}\cdot \left( \dfrac{p}{2}+1\right) \quad \text {and}\quad s_{i_{(p/2)+1}} = \left( \dfrac{p}{2}+1\right) \cdot \dfrac{p}{2}, \end{aligned}$$

so that also, as one can readily check:

$$\begin{aligned} s_{i_{(p/2)}} = s_{i_{(p/2)+1}}= \dfrac{p^2+2p}{4}= \max \,\{ s_{i_1}, s_{i_2}, \ldots , s_{i_{p}} \} , \end{aligned}$$

and the sequence of cutwidths \((s_{i_1},\ldots ,s_{i_p})\) is equal to its own reverse \((s_{i_p},\ldots ,s_{i_1})\). Moreover, for every j such that \(1\leqslant j < i_1\) or \(i_{p+1}< j\leqslant n+p\), we have \(s_j = 0\). Also, it is intuitively useful for the argument in the proof of Lemma 30 to keep in mind that:

$$\begin{aligned} (s_{i_1} - s_{j})= & {} p, \qquad \quad \text {for every } \quad 1\leqslant j < i_1,\\ (s_{i_2} - s_{j})= & {} p-2, \quad \text {for every }\quad i_1\leqslant j < i_2,\\ (s_{i_3} - s_{j})= & {} p-4, \quad \text {for every }\quad i_2\leqslant j < i_3,\\&\quad \cdots \quad \cdots \quad \cdots \\ (s_{i_{(p/2)}} - s_{j})= & {} 2, \quad \text {for every }\quad i_{(p/2)-1} \leqslant j < i_{p/2},\\ (s_{i_{(p/2)+1}} - s_{j})= & {} 0, \quad \text {for every }\qquad i_{(p/2)} \leqslant j < i_{(p/2)+1}. \end{aligned}$$

Proof of Lemma 30

In the sequence \(\mathcal{S}\) in  (\(\diamondsuit \)) in Sect. 4, suppose:

  • \(x_i\) is the leftmost vertex in \(U\cup \{ w \}\),

  • \(x_j\) is the leftmost vertex in \(V-\{ w \}\) to the right of \(x_i\),

  • \(x_{\ell }\) is the rightmost vertex in \(U\cup \{ w \}\),

  • \(x_k\) is the rightmost vertex in \(V-\{ w \}\) to the left of \(x_{\ell }\),

where \(1\leqslant i\leqslant j\leqslant k\leqslant \ell \leqslant p+n\). Graphically, \(\mathcal{S}\) can be represented by:

The circled vertices, \(x_j\) and \(x_k\), are in \(V-\{ w \}\). If \(\mathcal{S}\) is scattered, then \(1\leqslant i<j\) and/or \(k<\ell \leqslant n+p\), with the possibility that \(j=k\) in which case there is only one vertex in \(V-\{ w \}\) inserted between all the vertices of \(U\cup \{ w \}\). We define:

$$\begin{aligned} {{\text {scatter}}}(\mathcal{S})\ := \min \,\{ \,j-i,\;\ell -k\, \}\ \geqslant 1 , \end{aligned}$$

when \(\mathcal{S}\) is scattered. If \(\mathcal{S}\) is not scattered, we set \({{\text {scatter}}}(\mathcal{S}) := 0\), so that \(\mathcal{S}\) is scattered iff \({{\text {scatter}}}(\mathcal{S}) \geqslant 1\). Moreover, with p even and \(p+1\) odd, it is always the case that \({{\text {scatter}}}(\mathcal{S}) \leqslant p/2\), so that if \(\mathcal{S}\) is scattered, then:

$$\begin{aligned} 1\ \leqslant \ {{\text {scatter}}}(\mathcal{S})\ \leqslant \ \dfrac{p}{2}. \end{aligned}$$

To complete the proof, it suffices to show that if \(\mathcal{S}\) is scattered, then we can define another sequence \(\mathcal{S}'\) from \(\mathcal{S}\) such that:

$$\begin{aligned} \beta (\mathcal{S}') < \beta (\mathcal{S}) \quad \text {and}\quad {{\text {scatter}}}(\mathcal{S}') < {{\text {scatter}}}(\mathcal{S}). \end{aligned}$$

We obtain \(\mathcal{S}'\) from \(\mathcal{S}\) as follows:

  1. 1.

    if \(j-i\leqslant \ell -k\), remove \(x_j\) from the j-th position and insert it between \(x_{i-1}\) and \(x_{i}\),

  2. 2.

    if \(j-i > \ell -k\), remove \(x_k\) from the k-th position and insert it between \(x_{\ell }\) and \(x_{\ell +1}\).

With no loss of generality, let \(j-i\leqslant \ell -k\). The portion of \(\mathcal{S}\) under consideration is therefore:

and the order of all the vertices in the new \(\mathcal{S}'\) is:

Let \(x_j = v \in V-\{ w \}\) and partition \(d = {{degree}}_{G}(v)\) into \(d = d^L+d^R\), where:

  • \(d^L\) is the number of vertices in \(\{ x_1,\ldots ,x_{j-1} \}\cap V\) which are connected to v,

  • \(d^R\) is the number of vertices in \(\{ x_{j+1},\ldots ,x_{n+p} \}\cap V\) which are connected to v.

There are different cases, depending on:

  • the value of \(j-i\) between 1 and p / 2,

  • the value of \(d^R-d^L\) between \(-d\) and \(+d\),

  • whether the distinguished vertex w is in \(\{ x_i,\ldots ,x_{j-1} \}\) or in \(\{ x_{j+1},\ldots ,x_{\ell } \}\),

  • whether v is connected to w or not.

We consider only one of the cases, which is also a “worst case” to explain, and leave to the reader all the other cases, which are simple variations of this “worst case”. For the “worst case” which we choose to consider, let:

  1. (1)

    \(j = i+p/2\) so that \(j-i = p/2\),

  2. (2)

    \(d^L = 0\) so that \(d^R-d^L = d\),

  3. (3)

    w is in \(\{ x_{j+1},\ldots ,x_{\ell } \}\),

  4. (4)

    there is an edge \(\overline{v\,w}\) connecting v and w.

With assumptions (1) to (4), as well as after:

  • substituting \(i+(p/2)\) for j,

  • replacing the sequence of cutwidths \(s_{i-1},\ s_{i},\ldots ,\ s_{i+(p/2)-1},\ s_{i+(p/2)},\ s_{i+(p/2)+1}\) by their actual values \(0,\ p,\ldots ,\ (p^2 + 2p -8)/4,\ (p^2+2p)/4,\ (p^2+2p)/4\), respectively,

  • and posing \(r := r_{i-1}\),

the portion of \(\mathcal{S}\) under consideration becomes:

The corresponding portion in the new \(\mathcal{S}'\) is:

with all the cutwidths to the left and to the right of the shown portion being identical in \(\mathcal{S}\) and \(\mathcal{S}'\). It is now readily seen that the value of \(\beta (\mathcal{S}')\) is:

$$\begin{aligned} \beta (\mathcal{S}')= \beta (\mathcal{S}) - (p^2+2p)/4 + (p/2)\,d = \beta (\mathcal{S}) - \dfrac{p^2 - 2 (d - 1) p}{4} \end{aligned}$$

Let \(\Delta := \sum \{ \,{{degree}}_{G}(x)\,|\,x\in V \}\). By the construction of the auxiliary graph \(G_w\), we have \(p= \Delta \). The value of \(d= {{degree}}_{G}(v) \leqslant \Delta /2\), the upper bound \(\Delta /2\) being the extreme case when G is a star graph with: v at its center, \(\Delta /2\) leaf vertices among \(\{ x_{j+1},\ldots ,x_{n+p} \}\cap V\), and all other vertices of V being isolated. Hence,

$$\begin{aligned} p^2 - 2\,(d-1)\,p\ \leqslant \ {\Delta }^2 - 2 \left( \dfrac{\Delta }{2} - 1\right) {\Delta } = {\Delta }^2 - {\Delta }^2 + 2\, {\Delta }= 2\, {\Delta } . \end{aligned}$$

Hence, \(\beta (\mathcal{S}') \leqslant \beta (\mathcal{S}) - \Delta /2\), so that \(\beta (\mathcal{S}') < \beta (\mathcal{S})\) which is the desired conclusion. \(\square \)

For precision in the next proof, we introduce the measure of unbalance.

Definition 43

(Unbalance) Consider the sequence \(\mathcal{S}\) in  (\(\diamondsuit \)) in Sect. 4.

  • Let \(a^L\geqslant 0\) be the number of vertices from \(V-\{ w \}\) to the left of w, and \(a^R\geqslant 0\) be the number of vertices from \(V-\{ w \}\) to the right of w.

  • Let \(b^L\geqslant 0\) be the number of vertices from U to the left of w, and \(b^R\geqslant 0\) be the number of vertices from U to the right of w.

The unbalance of \(\mathcal{S}\) is measured by:

$$\begin{aligned} {{\text {unbal}}}(\mathcal{S})\ := \ \min \,\{ \,(n-a^L-1) + (p-b^R),\ (n-a^R-1) + (p-b^L)\, \} . \end{aligned}$$

The quantity \((n-a^L-1) + (p-b^R)\) measures \(\mathcal{S}\)’s unbalance on the left, and similarly \((n-a^R-1) + (p-b^L)\) measures \(\mathcal{S}\)’s unbalance on the right. It is useful to keep in mind that:

$$\begin{aligned} (p-b^R)+(p-b^L) = p\quad \text {and}\quad (n-a^L-1)+(n-a^R-1) = n - 1, \end{aligned}$$

so that, if the quantity \((n-a^L-1) + (p-b^R)\) or the quantity \((n-a^R-1) + (p-b^L)\) is reduced to 0, then the other of these two quantities is increased to \(n-1+p\).

Proof of Lemma 31

By Lemma 30, we can assume that \(\mathcal{S}\) is not scattered. It suffices to show that if \({{\text {unbal}}}(\mathcal{S}) \geqslant 1\), we can define another sequence \(\mathcal{S}'\) from \(\mathcal{S}\) such that \(\beta (\mathcal{S}') < \beta (\mathcal{S})\) and \({{\text {unbal}}}(\mathcal{S}') < {{\text {unbal}}}(\mathcal{S})\). We use the notation in the proof of Lemma 30. The portion of \(\mathcal{S}\) that we examine closely is:

$$\begin{aligned} (r_{i-1},s_{i-1})\quad \underbrace{x_i \quad (r_{i},s_{i})\quad x_{i+1}\quad (r_{i+1},s_{i+1})\quad \cdots \quad (r_{i+p-1},s_{i+p-1})\quad x_{i+p}}_{\text {all in } U\cup \{ w \}}\quad (r_{i+p},s_{i+p})\quad \end{aligned}$$

where:

$$\begin{aligned} V - \{ w \}= & {} \{ x_1,\ldots ,x_{i-1} \}\cup \{ x_{i+p+1},\ldots ,x_{n+p} \}, \quad \text {with }\quad 1\leqslant i\leqslant n, \\ U\cup \{ w \}= & {} \{ x_{i},\ldots ,x_{i+p} \}, \quad \text {with }\quad w = x_{i+k} \qquad \quad \hbox { and }\quad 0\leqslant k\leqslant p. \end{aligned}$$

We partition \(d = {{degree}}_{G}(x_{i+k}) = {{degree}}_{G}(w)\) into \(d = d^L+d^R\), where:

  • \(d^L\geqslant 0\) is the number of vertices in \(\{ x_1,\ldots ,x_{i-1} \}\) which are connected to \(w = x_{i+k}\) in G,

  • \(d^R\geqslant 0\) is the number of vertices in \(\{ x_{i+p+1},\ldots ,x_{n+p} \}\) which are connected to \(w = x_{i+k}\) in G.

And we partition \(e = {{degree}}_{K_{p+1}}(x_{i+k}) = {{degree}}_{K_{p+1}}(w)\) into \(e = e^L+e^R = p\), where:

  • \(e^L = k\) is the number of vertices in \(\{ x_{i},\ldots ,x_{i+k-1} \}\) which are connected to \(w = x_{i+k}\) in \(K_{p+1}\),

  • \(e^R = (p-k)\) is the number of vertices in \(\{ x_{i+k+1},\ldots ,x_{i+p} \}\) which are connected to \(w = x_{i+k}\) in \(K_{p+1}\).

Though not explicitly used below, it is worth noting that \(e^L\) and \(e^R\) here are the same as \(b^L\) and \(b^R\) in Definition 43 because \(K_{p+1}\) is a complete graph (but \(d^L\) and \(d^R\) are not the same as \(a^L\) and \(a^R\)). We consider 5 separate cases, \(\{ (a), (b), (c), (d), (e) \}\):

  1. (a)

    \(k=0\), which implies \(e^L = 0\) and \(e^R = p\).

In case (a), because \({{\text {unbal}}}(\mathcal{S})\ne 0\) by hypothesis, it must be that \(\{ x_{i+p+1},\ldots ,x_{n+p} \}\ne \varnothing \). It suffices to move the vertices in \(\{ x_{i+p+1},\ldots ,x_{n+p} \}\) to the left of \(w=x_{i}\), also preserving their order

$$\begin{aligned} x_1,\ldots ,x_{i-1},\ x_{i+p+1},\ldots , x_{n+p}. \end{aligned}$$

Using a reasoning similar to that in the proof of Lemma 30, we leave it to the reader to show that \({{\text {unbal}}}(\mathcal{S}') = 0\) and \(\beta (\mathcal{S}') < \beta (\mathcal{S})\) for the resulting sequence \(\mathcal{S}'\).

  1. (b)

    \(k=p\), which implies \(e^L = p\) and \(e^R = 0\).

Case (b) is similar to case (a). Because \({{\text {unbal}}}(\mathcal{S})\ne 0\) by hypothesis, it must be that \(\{ x_{1},\ldots ,x_{i-1} \}\ne \varnothing \). In this case, we move the vertices in \(\{ x_{1},\ldots ,x_{i-1} \}\) to the right of \(w=x_{i+p}\). Again, we leave it to the reader to show that \({{\text {unbal}}}(\mathcal{S}') = 0\) and \(\beta (\mathcal{S}') < \beta (\mathcal{S})\) for the resulting sequence \(\mathcal{S}'\).

For the three remaining cases, we can assume that neither \(k=0\) nor \(k=p\), i.e., both \(w \ne x_{i}\) and \(w \ne x_{i+p}\). Two cases of these three are:

  1. (c)

    \(d^L > d^R\), in which case we tranpose \(w = x_{i+k}\) and \(x_{i}\).

  2. (d)

    \(d^L < d^R\), in which case we transpose \(w = x_{i+k}\) and \(x_{i+p}\).

By a reasoning similar to that in the proof of Lemma 30, we leave to the reader the straightforward details showing that \(\beta (\mathcal{S}') < \beta (\mathcal{S})\) in both case (c) and case (d).

  1. (e)

    \(d^L = d^R\), in which case the value of \(\beta (\mathcal{S})\) remains unchanged by tranposing \(w = x_{i+k}\) and \(x_{i}\), or by transposing \(w = x_{i+k}\) and \(x_{i+p}\), and so we need an additional argument.

The additional argument for case (e), is to first transpose \(w = x_{i+k}\) and \(x_{i}\), or alternatively transpose \(w = x_{i+k}\) and \(x_{i+p}\), thus reducing case (e) to case (a), or alternatively reducing case (e) to case (b). \(\square \)

Rights and permissions

Reprints and permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

Cite this article

Kfoury, A., Mirzaei, S. Efficient reassembling of graphs, part 1: the linear case. J Comb Optim 33, 1057–1089 (2017). https://doi.org/10.1007/s10878-016-0024-x

Download citation

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1007/s10878-016-0024-x

Keywords

Navigation