Next Article in Journal
Tensor Completion Based on Triple Tubal Nuclear Norm
Previous Article in Journal
Predictive Current Control of Boost Three-Level and T-Type Inverters Cascaded in Wind Power Generation Systems
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Layered Graphs: Applications and Algorithms

by
Bhadrachalam Chitturi
1,2,*,
Srijith Balachander
1,
Sandeep Satheesh
1 and
Krithic Puthiyoppil
1
1
Department of Computer Science and Engineering, Amrita Vishwa Vidyapeetham, Amritapuri 690525, India
2
Department of Computer Science, University of Texas at Dallas, Richardson, TX 75083, USA
*
Author to whom correspondence should be addressed.
Algorithms 2018, 11(7), 93; https://doi.org/10.3390/a11070093
Submission received: 4 June 2018 / Revised: 17 June 2018 / Accepted: 21 June 2018 / Published: 28 June 2018

Abstract

:
The computation of distances between strings has applications in molecular biology, music theory and pattern recognition. One such measure, called short reversal distance, has applications in evolutionary distance computation. It has been shown that this problem can be reduced to the computation of a maximum independent set on the corresponding graph that is constructed from the given input strings. The constructed graphs primarily fall into a class that we call layered graphs. In a layered graph, each layer refers to a subgraph containing, at most, some k vertices. The inter-layer edges are restricted to the vertices in adjacent layers. We study the MIS, MVC, MDS, MCV and MCD problems on layered graphs where MIS computes the maximum independent set; MVC computes the minimum vertex cover; MDS computes the minimum dominating set; MCV computes the minimum connected vertex cover; and MCD computes the minimum connected dominating set. MIS, MVC and MDS run in polynomial time if k = Θ ( log | V | ) . MCV and MCD run in polynomial time if k = O ( ( log | V | ) α ) , where α < 1 . If k = Θ ( ( log | V | ) 1 + ϵ ) , for ϵ > 0 , then MIS, MVC and MDS run in quasi-polynomial time. If k = Θ ( log | V | ) , then MCV and MCD run in quasi-polynomial time.

1. Introduction

A string is a sequence of symbols from an alphabet Σ , in which a symbol can be repeated. An adjacent swap exchanges two consecutive elements in a sequence [1,2]. In a signed string ( π , i π [ i ] ) the following signs are assigned: + for normal orientation and − for reverse orientation. Adjacent swap over positions i , i + 1 are denoted by ( i i + 1 ). For unsigned strings ( π ), where  π = π [ 1 ] , π [ 2 ] , π [ 3 ] , , π [ i ] , π [ i + 1 ] , , π [ n ] , π transforms into π , where π = π [ 1 ] , π [ 2 ] , π [ 3 ] , , π [ i 1 ] , π [ i + 1 ] , π [ i ] , π [ i + 2 ] , , π [ n ] . For signed strings ( π ), where π = π [ 1 ] , π [ 2 ] , π [ 3 ] , , π [ i ] , π [ i + 1 ] , , π [ n ] , π transforms into π , where π = π [ 1 ] , π [ 2 ] , π [ 3 ] , , π [ i 1 ] , π [ i + 1 ] , π [ i ] , π [ i + 2 ] , , π [ n ] . Two strings are compatible under some operation if they can be transformed into each other with the operation. That is, the unsigned string (2, 1, 3, 2) is compatible with (2, 1, 2, 3), whereas it is not compatible with (3, 2, 1, 1). The computation of the minimum number of adjacent swaps required to transform one given string into another compatible string, i.e., the adjacent swap distance, has applications in genetics and music theory [1]. A 1-flip toggles the orientation of a particular π [ i ] ; it is denoted by f 1 ( i ) . It changes the sign of π [ i ] . When it is applied to a signed string ( π ), where  π = π [ 1 ] , π [ 2 ] , π [ 3 ] , , π [ i ] , π [ i + 1 ] , , π [ n ] , π transforms into π , where  π = π [ 1 ] , π [ 2 ] , π [ 3 ] , , π [ i 1 ] , π [ i ] , π [ i + 1 ] , π [ i + 2 ] , , π [ n ] .
A short reversal is either a (1-flip) or an adjacent swap. The short reversal distance is the minimum number of short reversals required to transform a signed string into another compatible string. Two strings are compatible under short reversals if and only if their unsigned versions, i.e., the strings whose signs are disregarded, are compatible [1]. The computation of the short reversal distance between α and β is reduced to the computation of the cardinality of the maximum independent set on a conflict graph constructed from α and β . It has applications in HOX gene clusters in vertebrate evolution [2,3]. In music theory, a composition is represented as a string. The smaller the distance between two patterns (compositions), the more similar they are [4].
The maximum independent set problem on a graph, G = ( V , E ) , seeks to identify a subset of V with maximum cardinality, such that no two vertices in the subset have an edge between them. If  V * V is the maximum independent set (or MIS for short) of G, then u , v V * , ( u , v ) E . In this article, G is undirected, so an edge ( u , v ) is understood to be an undirected edge. Karp proposed a method for proving problems to be NP-complete [5]. The maximum independent set problem on a general graph is known to be NP-complete [6]. Certain classes of graphs have a polynomial time solution for this problem. Such algorithms are known for trees and bipartite graphs [7], chordal graphs [8], cycle graphs [9], comparability graphs [10], claw-free graphs [11], interval graphs and circular arc graphs [12]. The maximum weight independent set problem is defined on a graph where the vertices are mapped to corresponding weights. The maximum weight independent set problem seeks to identify an independent set where the sum of the weights of the vertices is maximized. On trees, the maximum weighted independent set problem can be solved in linear time [13]. Thus, for several classes of graphs, MIS can be efficiently computed.
Hsiao et al. designed an O ( n ) time algorithm to solve the maximum weight independent set problem on an interval graph with n vertices, given its interval representation with a sorted endpoints list [14]. Several articles improved the complexity of the exponential algorithms that compute an MIS on a general graph [15,16]. Lozin and Milanic showed that MIS is polynomially solvable for the class of S 1 , 2 , k -free planar graphs, generalizing several previously known results, where S 1 , 2 , k is the graph consisting of three induced paths of lengths 1, 2 and k with a common initial vertex [17].
The minimum vertex cover problem on G seeks to identify a vertex cover with minimum cardinality, i.e., minimum vertex cover or MVC. If  V * V is the MVC of G, then e = ( u , v ) E , u V * v V * . In this article, G is undirected, so an edge ( u , v ) is understood to be an undirected edge. The minimum dominating set (i.e., MDS) and the minimum connected dominating set (i.e., MCD) problems seek to identify a dominating set i.e., DS and a connected dominating set i.e., CDS, respectively, with minimum cardinalities. The MVC, MDS and MCD problems on general graphs are known to be NP-complete [6]. Garey and Johnson showed that MVC is one of the first NP-complete problems [6]. In connected vertex cover problems (i.e., MCV), given a connected graph (G), a connected vertex cover (i.e., CVC) with minimum cardinality is sought. Garey and Johnson proved that MCV is NP-complete [18]. For trees and bipartite graphs, the minimum vertex cover can be identified in polynomial time [19,20]. Garey and Johnson proved that the MCV problem is NP-hard in planar graphs, with a maximum degree of 4 [6]. Li et al. proved that for 4-regular graphs, the MCV problem is NP-hard [21]. It has been shown that for series-parallel graphs, which are a set of planar graphs, the minimum vertex cover can be computed in linear time [22].
Garey and Johnson showed that the MDS problems on planar graphs with maximum vertex degree 3 and planar graphs that are regular with degree 4 are NP-complete [6]. MCD is NP-complete even for planar graphs that are regular with degree 4 [6]. Bertossi showed that the problem of identifying a MDS is NP-complete for split graphs and bipartite graphs [23]. Cockayne et al. proved that MDS in trees can be computed in linear time [24]. Baker designed various approximation algorithms for planar graphs [25]. Muller and Brandstadt showed that MDS and MCD are NP-complete for chordal bipartite graphs [26]. Ruo-Wei et al. proved that for a given circular arc graph with n sorted arcs, MCD is linear in time and space [27]. Fomin et al. proposed an algorithm with a time complexity faster than 2 n to solve the connected dominating set problem [28].
The term “layered graph” has been used in the literature. The hop-constrained minimum spanning tree problem related to the design of centralized telecommunication networks with quality of service (QoS) constraints is NP-hard [29]. A graph known as a layered graph was constructed from a given input graph, and the authors showed that the hop-constrained minimum spanning tree problem is equivalent to the Steiner tree problem. In software architecture, the system is divided into several layers; this has been viewed as a graph with several layers. In this article, we define a new class of graphs that we call layered graphs and design algorithms for various graph-theoretic problems.

2. Layered Graph

Consider a set of undirected graphs, G 1 , G 2 , , G q , on the corresponding vertex sets ( V 1 , V 2 , , V q ) and the edge sets ( E 1 , E 2 , , E q i.e.,  G i = ( V i , E i ) ). Consider a graph, G, that is formed from i G i with special additional edges called inter-layer edges, denoted as E i j , where  j = i + 1 and  E i j denotes the edges between V i and V j . We call such a graph a layered graph, denoted as L G , where the i-th layer is G i . Note that for any given i, E i j , where  j = i + 1 can be ϕ and l i + 1 E i l = ϕ . Every vertex within a given layer gets a label from ( 1 , 2 , 3 , , k ) . Thus, V i { V i 1 , V i 2 , , V i k } . Note that V i x is the vertex number, x, in layer i. However, in layer i, the vertex number, x, may not exist. Further, if ( V i x , V i + 1 y ) E i i + 1 , then it follows that vertex x is present in layer i and vertex y is present in layer i + 1 .
We defined the following restrictions on a layered graph. Several of the these restrictions can be combined. Please see Figure 1.
  • If i | V i | k , then a k-restricted layered graph, i.e.,  L G k , is obtained. L G k q denotes an L G with q layers. L G k n , q denotes an L G k q with n vertices.
  • If t , ( V i t , V j u ) is an inter-layer edge ( t = u ) j { i 1 , i + 1 } , then a linear layered graph, i.e.,  L L G , is obtained. L L G k denotes an L L G that is k-restricted.
  • If i G i is a connected component, then a single component layered graph, i.e.,  S L G , is obtained.
  • If G is required to be a connected component, then a connected layered graph, i.e.,  C L G , is obtained.
The problems of computing the adjacent swap distance between unsigned strings, adjacent swap distance between signed strings and short reversal distance were addressed in [1]. If the alphabet is Σ , | Σ | is k, the source string is α and the destination string is β and the length of α (and β ) is n, a pairing diagram can be drawn for α and β , where all elements of α and β are treated as vertices, and perfect matching is performed on all 2 n vertices, where each edge corresponds to ( α [ i ] , β [ j ] ) (here, both α [ i ] , β [ j ] denote the same symbol [1]). The solutions to the above problems are based on optimum pairing (in contrast to any perfect matching), where there is an edge from the i-th occurrence of a symbol x in α to the i-th occurrence of x in β ; the corresponding pairing diagram is the optimum pairing diagram. The solutions for adjacent swap distances are complete. However, the solution suggests that the short reversal distance is partial; it can solve very few sub-cases. Several distance problems on strings have been shown to be NP-complete [30]. However, the complexity of short reversal distance problem is unknown. The short reversal distance was studied in [2]. It was shown that the edges corresponding to two consecutive occurrences of a symbol x in optimum pairing form a special edge-pair if they meet certain criteria. A conflict graph, G, is constructed from an optimum pairing diagram where a vertex denotes a special edge-pair, and an edge exists between a pair of vertices that are in conflict. The computation of the short reversal distance is reduced to the computation of MIS on G. G consists of several subgraphs, i G i , each having, at most, k vertices, where each vertex corresponds to a symbol in Σ . Each G i is a subgraph of the K k clique. The vertices, u G i , v G j ( i j ) , can have a conflict only if they correspond to the same symbol. Further, they share a common edge in the optimum pairing diagram. In this particular scenario, the layered graphs arise naturally. Further, such layered graphs are LLGs. In this framework, the computation of MIS on a LLG is a necessary component in the computation of the corresponding short reversal distance.
Considering a tribal society S consisting of some villages on a bank of a river, a village consists of a few families where each family has its own family-head. The family-heads of a given village know one another, and they also interact with specific family-heads of adjacent villages for trade (of produce) and partnership (collaboration in farming etc.). If one models this society as a social network, where a family-head is denoted by a vertex and an interaction (among family-heads) is denoted by an edge, then one obtains a layered graph. In this social network, identifying the smallest set of influencers is a natural pursuit (whose solution is given by computing MDS). These applications motivate the study of MIS, MDS and other graph theoretic problems on layered graphs. In general, graph theoretic problems, like subgraph isomorphism, and its variations have extensive applications in computational biology, e.g., references [31,32].
This article designs algorithms for L G k where every vertex within a given layer gets a label from { 1 , 2 , 3 , , k } . The results are applicable for any restrictions of L G k , like L L G , S L G , etc. Consider a layered graph, G, whose first a layers and last b layers do not have any edges. The graph is not a C L G ; however, the MCV of G is the same as the MCV of the subgraph where the first a and the last b layers are removed. Further, if every layer has at least one intra-layer edge, then MCV can be computed only on C L G . MCD is well defined only for C L G because it must dominate all vertices.
The complete graph on k vertices, a clique on k vertices, is denoted by K k . Consider a graph, G, formed from several copies of K k , say G 1 , G 2 , , G q , where, in addition to the edges that exist in each of G i , an edge is introduced between every pair, u v : u G i and v G i + 1 . We denote this particular graph, G, that has q layers with K k q . The class of k-restricted layered graphs are in fact subgraphs of K k q . Thus, we call K k q a full L G k q . Likewise, a L L G that is defined on q cliques, where  for any i , i + 1 , for all values of l, an edge is introduced between vertex l of layer i and vertex l of layer i + 1 , is called a full L L G k q . The number of layers in L G k i.e., q is bound by n / k q n .
A subgraph of G induced by vertices u 1 , u 2 , , u i consists of all vertices ( u 1 , u 2 , , u i ) and all the edges restricted to them. We designed algorithms that compute the cardinalities of MVC, MIS and MDS of any subgraph of K k q i.e.,  L G k n , q in polynomial time when k = O ( log n ) and the cardinalities of MCV and MCD in polynomial time when k = O ( ( log n ) α ) , α < 1 . Additionally, these algorithms report the corresponding numbers of MISs, MVCs, MDSs, MCVs and MCDs in L G k n , q .

3. Algorithm

Consider a layered graph with q layers, i.e.,  L G k n , q with layers ( 1 , 2 , 3 , , q ) . We designed a generic dynamic programming algorithm for all of the problems. However, certain restrictions exist corresponding to the problem at hand. The specific details pertaining to each problem are elucidated along with its solution. For example, MCD is meaningful only when the underlying graph is connected, i.e., the input graph is restricted to C L G .
We denoted the vertices chosen in a particular layer with a k-bit variable that we called m a s k . The pth bit of the mask was set to one to include the pth vertex. Otherwise, the bit was set to zero and the vertex was excluded. Let S = i = 1 q V i * be a candidate solution for a problem where V i * denotes the set of nodes that are chosen from layer i. The candidate sub-solution for layer i is denoted c s i . For layers 1 , , i , a combined candidate sub-solution is maintained, denoted c c s i . Likewise, c s i , j and c c s i , j denote the sub-solutions (of layer i and first i layers respectively), where the vertices chosen from layer i are denoted by mask j. Only the cardinality of the best options is stored; such cardinality is called an optimum value. This is stored in the variable s o l i , j , and the corresponding number of solutions that yield the optimum value is stored in c o u n t i , j . In this article, an optimal solution is a solution that corresponds to the optimum value. We say that c s i , j and c c s i 1 , l are compatible if c s i , j c c s i 1 , l c c s i , j . That is, the union of c s i , j and c c s i 1 , l yields a c c s for the first i layers. Note that compatibility is determined by c s i , j and c s i 1 , l c c s i 1 , l , and the vertices chosen by c c s i 1 , l in the earlier layers are irrelevant. This is a key feature.

3.1. Input

The input consists of L G k n , q which is specified in terms of M 1 , , M q and I 1 , , I q 1 , where M i is the 0–1 adjacency matrix for layer i, i.e.,  G i . I i is the 0–1 adjacency matrix for E i , i + 1 . Rows 1 , 2 , , k of I i correspond to vertices V i 1 , V i 2 , , V i k , and columns 1 , 2 , , k of I i are vertices V i + 1 1 , V i + 1 2 , , V i + 1 k . It must be noted that for a linear graph, I i can just be a k dimensional vector and the corresponding computation is less expensive where I i [ a ] = 1 an edge between a V i , a V i + 1 exists. The adjacency matrix M i , for layer i, is a matrix of dimensions k × k , which means it requires O ( k 2 ) space. Similarly, each G i also requires O ( k 2 ) space. Therefore, the total space required for the input graph is O ( n k ) , since each layer requires O ( k 2 ) space, and there are O ( n / k ) layers.
The Boolean valued function compatible (please see Algorithm 1) determines whether the candidate sub-solutions (of the current layer and the subgraph induced by vertices of all previous layers) can be combined; here, the layer number, i, is implicit. For each mask, j, of a given layer, i, the function v a l i d ( i , j ) determines if j is a feasible option for layer i. The helper function, c a r d i n a l i t y ( j ) , returns the number of bits that are set in the binary representation of mask j.
All algorithms consist of the following sequence of computational tasks:
  • Repeat (i) and (ii) for all layers 1 , , q 1 .
  • (i) Feasible: j (if v a l i d ( i , j ) ), then go to step(ii).
  • (ii) Extension: If j and l are compatible, then store the cardinality of c s i , j c c s i 1 , l in s o l i , j and the count of c c s i , j in c o u n t i , j .
  • (iii) Summarize: At layer q : , execute (i) and (ii). Identify the optimum cardinality among j s o l q , j and the corresponding count.
A particular problem has specific characteristics. In the sequel, where a problem is dealt with in detail, the corresponding validity/compatibility and other specifics are elucidated.
Algorithm 1 Compatible Algorithm
  • Input: L G k , j, l, and I.                                       //The function call: c o m p a t i b l e ( j , l ) . l: Mask for layer i.  
  • Output: 0 (incompatible) or 1 (compatible). //j: Mask for layer i + 1 . I denotes matrix for E i i + 1 .  
  •                                                                             // b i t c ( i ) returns true if bit c is set in i, otherwise, it returns false.
  • Case MIS:                            // Input: two valid MISs of two adjacent layers  
  • if i n d e p e n d e n t ( j , l ) then   // i n d e p e n d e n t ( j , l ) : for any a , b : b i t a ( l ) and b i t b ( j ) :  
  •     return 1;                       //if I [ a ] [ b ] = 1 , return 0; otherwise, return 1; O ( k 2 ) algorithm.  
  • else 
  •     return 0;                   //∃ a pair of vertices across the layers joined with an edge.  
  • end if
  • Case MVC:                      // Input: two VCs of two adjacent layers  
  • if c o v e r ( j , l ) then            // c o v e r ( j , l ) : a , b where I [ a ] [ b ] = 1 : b i t a ( l ) b i t b ( j ) = 1  
  •     return 1;                    // then return 1; otherwise, return 0; O ( k 2 ) algorithm.  
  • else 
  •     return 0;  
  • end if
  • Case MCV:                      // Input: two masks of two adjacent layers; need not be MCVs of their respective layers.  
  • if c c o v e r ( j , l ) then       // c c o v e r ( j , l ) : a , b where I [ a ] [ b ] = 1 : b i t a ( l ) b i t b ( j ) = 1  
  •     return 1;                 // and for each component of l, c l : ( d : I [ c ] [ d ] = 1 ) ( b i t d ( j ) = 1 )  
  • else                               // then return 1; otherwise, return 0; O ( k 2 ) algorithm.  
  •     return 0;  
  • end if
  • Case MDS:                      // Input: two masks of two adjacent layers,  
  • if d o m ( j , l ) then             // d o m ( j , l ) : D c s i , l c s i + 1 , j A d j ( c s i , l ) A d j ( c s i + 1 , j )  
  •     return 1;                   // i < q 1 : if V i D , then return 1; otherwise, return 0;  
  • else                                // i = q 1 : if V i V i + 1 D , then return 1; otherwise, return 0;  
  •     return 0;                  // V i or V i V i + 1 is not dominated. O ( k 2 ) algorithm.  
  • end if                           // A d j ( V ) is the set of all vertices neighboring any vertex in V  
  • Case MCD:                 // Input: two masks of two adjacent layers,  
  •                                      // For each component of l, c l : ( d : I [ c ] [ d ] = 1 ) ( b i t d ( j ) = 1 )  
  • if d o m ( j , l ) then        // d o m ( j , l ) : D c s i , l c s i + 1 , j A d j ( c s i , l ) A d j ( c s i + 1 , j )  
  •     return 1;               // i < q 1 : if V i D then return 1; otherwise return 0;  
  • else                            // i = q 1 : if V i V i + 1 D then return 1; otherwise return 0;  
  •     return 0;              // V i or V i V i + 1 is not dominated. O ( k 2 ) algorithm.  
  • end if                        // A d j ( V ) is the set of all vertices neighboring any vertex in V  

3.2. MIS

Consider the structure of an MIS on L G k n , q . Say, V * = j = 1 q V j * where V j * are the vertices in MIS from layer j. Clearly, V j * must be an independent set. (please see Figure 2). Let G 1 be the subgraph of L G k n , q induced by V 1 = j = 1 i V j , and let G 2 be the subgraph of L G k n , q induced by V 2 = j = i + 1 q V j . Consider the IS of G. If  M 1 = j = 1 i V j * and M 2 = j = i + 1 q V j * , then M 1 and M 2 are ISs. Let the set of edges crossing the cut, C = ( M 1 , M 2 ) , be E C . It follows that M 1 M 2 is an IS of G with cardinality | M 1 | + | M 2 | when there is no edge crossing C. Only the edges in E i i + 1 need to be considered. Thus, the cardinality of an MIS of L G k n , q is equal to m a x ( E C = ϕ | M 1 | + | M 2 | ) .
  • f e a s i b l e ( j ) : The mask j must denote an IS for G i .
  • c o m p a t i b l e ( j , l ) : The union of two ISs must be an IS.
  • Extension: If ( c a r d i n a l i t y ( j ) + s o l i 1 , l > s o l i , j ) s o l i , j c a r d i n a l i t y ( j ) + s o l i 1 , l .
  • Summarize: Let o p t m a x ( j s o l q , j ) ; c o u n t 0 ; j i f ( s o l q , j = o p t ) c o u n t c o u n t + c o u n t q , j ; Return ( o p t , c o u n t q , j ) )

3.3. MVC and MCV

Consider a vertex cover V * = j = 1 q V j * of L G k n , q where V j * denotes the set of vertices in V * from layer j. Clearly, V j * is a VC for layer j (please see Figure 3). V j * depends only on V j 1 * and V j + 1 * . Consider two adjacent layers, p and p + 1 . V p * V p + 1 * must cover all inter-layer edges between layers p and p + 1 . Specifically, V * = j = 1 p + 1 V j * must cover all edges in the corresponding induced subgraph, including E p p + 1 . Similar constraints hold for MCV. Additionally, for MCV, the induced subgraph of V * must be a connected component (please see Figure 4). In the sequel, the time and space complexity analyses for these problems are presented.
Clearly, each layer must choose a mask that is a VC. In the case of MCV, when considering a mask, j, for the current layer, i, the following cases exist:
(a)
The previous layer mask, l, corresponds to one component.
(b)
l has more than one component, i.e., the set of vertices denoting l is partitioned into several connected components.
Case (a): For layer i, mask j is infeasible if either (I) vertices corresponding to j and l have no edges among them or (II) all edges in I i are not covered. Otherwise, j is feasible. If at least one edge exists across j and l:
(i)
If j is a single connected component, then the result is also a single component (consisting of all chosen vertices).
(ii)
If j has more than one connected component and all of them connect to l, then the result is also a single component.
(iii)
If j has more than one connected component and only some of them connect to l, then the result consists of many components. All components from j connected to l become one component and the rest are separate components.
Case (b): Every component from the previous layer corresponding to mask l must connect to some component in the current layer. Otherwise, the pair j and l is infeasible for layer i. For feasible pairs the following possibilities exist:
(i)
Every component in l has an edge with exactly one component in j. Here, the partition is determined by j.
(ii)
A component, C, in l has edges with C 1 , , C a in j. Then, C 1 , , C a can be merged into one component as they are connected through C.
A particular partitioning of the current layer can occur due to various choices of l. For each partition corresponding to j, the sub-solution is stored with minimum cardinality. Thus, for each mask, j, there are, at most, B k (k-th Bell number) solutions stored. When mask x is chosen for the last layer, then the vertices of the mask must be connected to the components of the previous layer and yield a single component.
  • f e a s i b l e ( j ) : Mask j must denote a VC for G i .
  • c o m p a t i b l e ( j , l ) : The union of two VCs must be a VC for edges in G i 1 , G i and I i 1 . i is the current layer. For MCV, all components of l must have edges with vertices in j. If  i = q , then V * must be one component.
  • Extension: If ( c a r d i n a l i t y ( j ) + s o l i 1 , l < s o l i , j ) s o l i , j c a r d i n a l i t y ( j ) + s o l i 1 , l .
  • Summarize: Let o p t m i n ( j s o l q , j ) ; c o u n t 0 ; j i f ( s o l q , j = o p t ) c o u n t c o u n t + c o u n t q , j ; Return ( o p t , c o u n t )

3.4. MDS and MCD

Let an MDS of L G k n , q be V * , such that, V * = j = 1 q V j * , where  V j * represents the vertices in this MDS from layer j. Clearly, V j * may not be a dominating set of layer j because the vertices of V j can be dominated by any subset of V j 1 * V j * V j + 1 * . In Figure 5, e G 2 is dominated by d G 1 . It follows that j = 1 p + 1 V j * must dominate all vertices in j = 1 p V j . Further, V * = j = 1 q 1 V j * V q * must dominate j = 1 q V j . A vertex that is not dominated is undominated.
Consider mask j in layer i, where c s i , j c c s i 1 , l dominates layer i 1 . This particular subset of vertices can leave some vertices in layer i undominated. The number of such choices is 2 k ; each choice is denoted by a k-bit variable that we call a mask—here, a mask of exclusion. Further, when one processes layer i + 1 , this information is critical. We show that the O ( 2 k ) triples stored for each mask of a given layer suffice to compute MDS of L G k . For a chosen mask, j, in layer i, it suffices to store 2 k triples of the form ( u , s , c ) . Here, u is the mask of the vertices that are undominated in layer i, s is the cardinality of the vertices chosen so far and c is the number of choices corresponding to u for a particular j in layer i.
MCD has an additional requirement compared to MDS, i.e.,  V * must form a single component (please see Figure 6). For possible combinations of component layouts of the current and previous layer masks, see MCV. For MCD, it suffices to store O ( B k 2 k ) triples of the form ( l o , u n , r ) , where B k is the k-th Bell number. This corresponds to O ( B k ) component layouts, l o , for a mask, j, and O ( 2 k ) masks u n of the vertices that are not dominated in layer i and  O ( 2 k ) triples r of the form ( m , s , c ) for every unique pair of ( l o , u n ) . Here, m is the mask of the current layer that produces the respective ( l o , u n ) pair, i.e., mask j, while s and c are same as that for MDS, corresponding to mask m and pair ( l o , u n ) . The particular mask in the previous layer that is the cause of a particular triple in the current layer needs not be carried forward. So, for MDS, s o l i , j indicates an array of 2 k triples. As for MCD, it indicates O ( B k 2 k ) triples where O ( 2 k ) triples are associated with each of the O ( B k 2 k ) unique pairs of ( l o , u n ) . Also, when  k = O ( log n ) for MDS and k = O ( log n ) α where α < 1 for MCD, the algorithm runs in polynomial time.
Consider the following analysis for MDS. Let mask j be chosen in layer i; it can potentially be combined with every mask ( O ( 2 k ) masks) of the previous layer. Thus, potentially, ( O ( 2 k ) ) triples need be stored. Further, the total number of triples of the form ( u n , s , c ) is Ω ( n . 2 k ) , because u n can potentially assume any 0 , , 2 k 1 ; s is O ( n ) and c can, in fact, be exponential in n k . Here, we make the following critical observations:
  • Let the chosen mask for layer i be j. When all the compatible vertex sets of the previous layer are considered, then let the resultant triples for the choice of j in layer i be set as S.
  • In S, for any two triples with the same mask, we need only to retain the triples with the smallest size. The other triples cannot lead to an optimal solution.
  • If two triples have the same mask and the minimum size, then they can be combined into one triple where the respective counts are added.
  • Thus, only 2 k triples suffice for a chosen mask for layer i which implies 2 2 k triples suffice j c s i , j . The information of only two layers is stored. Thus, the algorithm needs O ( k 2 2 k ) space. This is in addition to the space required by the input graph, which is O ( n k ) . For  k = O ( log n ) , O ( k 2 2 k ) is the dominating term, so the space complexity is O ( k 2 2 k ) .
  • Thus, for a chosen mask for layer i, potentially 2 2 k triples of the previous layer must be processed. That is, for all masks of layer i, a total of 2 3 k triples must be processed.
  • Consider mask j in layer i and mask l in layer i 1 . Recall that there are 2 k triples stored corresponding to mask l in layer i 1 . All the vertices that are covered by the combination of j and l in layer i 1 , say A, and not covered in layer i, say B, can be computed in O ( k 2 ) . This needs to be computed only once. Subsequently, for each of the triples stored corresponding to l in layer i 1 , we need only to check if the undominated vertices are a subset of B in O ( k ) time. Thus, O ( k 2 k ) is the dominating term in the time complexity, yielding O ( k 2 2 k ) for all masks in the previous layer. So, for all masks in the current layer, the time complexity is O ( k 2 3 k ) . Thus, the time complexity of the algorithm is O ( n k k 2 3 k ) = O ( n 2 3 k ) .
Similar constraints hold for MCD. We carry forward the existing connected components, and eventually, when the final layer is processed, all the components must be connected. The MCD algorithm is explained in detail in Theorem 4 along with time and space complexity analyses. The current layer in the following functions is i.
  • f e a s i b l e ( j ) : Any j is valid.
  • c o m p a t i b l e ( j , l ) : Tthe union must dominate all vertices of V i 1 . For MCD, all components of l must have edges with vertices in j. If  i = q , then V * must be one component and it must dominate V q also.
  • Extension: Performed as per the observations listed above.
  • Summarize: Let o p t m i n ( j d s i z e q , j , d ) ; c o u n t 0 ; j d if ( s i z e q , j , d = o p t ) then c o u n t c o u n t + c c o u n t q , j , d ; return ( o p t , c o u n t ) .

3.5. Compatible Algorithm

Given candidate sub-solutions for consecutive layers one must determine if their union is a feasible sub-solution. The following algorithm determines the same for the problems addressed in this article.

3.6. Generic Optimum Algorithm

The algorithms (please see Algorithm 2) for the MIS, MVC and MDS problems on L G k n , q are similar, while those for MCV and MCD must additionally ensure connectedness criterion. We give a generic dynamic programming based algorithm for both sets of problems. Some specific instances are shown in Appendix A.
Initialization: i s o l 0 i = s o l 1 i = 0 ; i c o u n t 0 i = c o u n t 1 i = 0 ; s o l i j : The optimum value (of IS, VC, MCD, etc.) up to layer i, where the chosen vertices of layer i are given by the binary value of j. c o u n t i j : The number of ways that the j-th mask in layer i yields the corresponding optimum value.
Algorithm 2 Generic Optimum Algorithm
  • Input: L G k n , q  
  • Output: The cardinality and corresponding count for the respective problem.  
  • for ( i = 0 , . . . , 2 k 1 ) do  
  •     if v a l i d ( 1 , i ) then //for layer 1  
  •          c o u n t 0 i = 1 ; s o l 0 i = c a r d i n a l i t y ( i ) ; // For all valid masks, set their count  
  •     end if 
  • end for 
  • for ( i = 2 , . . . , q ) do //For layers 2 through maximum  
  •     for ( j = 0 , . . . , 2 k 1 ) do //For all masks of the current layer  
  •          Compose larger sub-solutions by considering all compatible masks of the  
  •            previous layer and any accompanying information.  
  •     end for//Masks of previous layer  
  • end for//For all layers,
  • The current layer being processed is the final layer.  
  • b e s t 0 ; s u m 0 ;  
  • for ( i = 0 , . . . , 2 k 1 ) do  
  •     Identify b e s t , the cardinality of an optimal solution.  
  • end for 
  • for ( i = 0 , . . . , 2 k 1 ) do  
  •     Compute s u m , the count of the optimal solutions.  
  • end for 
  • r e t u r n ( b e s t , s u m )

4. Correctness and Complexity

The Algorithm Generic Optimum when adapted to a specific problem, say MVC, is referred to as Algorithm MVC. The correctness is shown for MIS, MVC and MCD problems. The time complexities for MIS, MVC, and MDS are respectively O ( n k 2 2 k ) , O ( n k 2 2 k ) and O ( n 2 3 k ) , where k = O ( log n ) . When k = log n these time complexities yield O ( n 3 k ) , O ( n 3 k ) and O ( n 4 ) respectively. The space complexities are O ( n k ) , O ( n k ) and O ( k 2 2 k ) respectively. When k = log n these space complexities yield O ( n k ) , O ( n k ) and O ( k n 2 ) respectively. For MCV and MCD problems, the time complexity is O ( n 1 + ϵ ) for any ϵ > 0 , where the number of vertices in a layer is k = O ( ( log n ) α ) for α < 1 . The space complexity is O ( n k ) for MCD and MCV. The time and space complexities of MVC and MCD are analyzed. The proofs of correctness for the remaining problems are similar. The time complexity for MDS was presented earlier.
Theorem 1.
The MIS Algorithm correctly computes the MIS on L G k n , q .
Proof. 
Let G = ( V , E ) be a graph and let V be partitioned into V 1 , V 2 . Further, let I 1 , I 2 be the ISs of the graphs induced by V 1 , V 2 , respectively, and let I = I 1 I 2 . If we consider the cut, C = ( I 1 , I 2 ) , on I, where E C is the set of edges crossing the cut, then it follows that I is an IS of G if E C = ϕ . Further, the cardinality of an MIS of G is m a x ( E C = ϕ | I 1 | + | I 2 | ) . It is possible that either | I 1 | = 0 or | I 2 | = 0 .
Let G be L G k n , q . Let G 1 be the subgraph of L G k n , q induced by V 1 = j = 1 i V j , and let G 2 be the subgraph of L G k n , q , induced by V 2 = j = i + 1 q V j . Consider the IS of G. Let I 1 and I 2 be the independent sets of G 1 and G 2 , respectively. Let the set of edges crossing the cut, C = ( I 1 , I 2 ) , be E C . It follows that I = I 1 I 2 is an IS of G with cardinality | I 1 | + | I 2 | when there is no edge crossing C. Only the edges in E i i + 1 need to be considered. Thus, the cardinality of an MIS of L G k n , q is equal to m a x ( E C = ϕ | I 1 | + | I 2 | ) . When the last layer is processed, the cardinalities of the ISs of subgraphs induced by both V and V V q are known. Further, these ISs have maximum cardinalities with respect to the vertices chosen in layers q 1 and q, respectively. The theorem follows. Likewise, c o u n t i j gives the number of ways that an independent set of maximum cardinality can be formed when the vertices chosen in layer i are given by j. Thus, the c o u n t q j corresponding to the maximum value of s o l q j yields the total number of MISs. ☐
Theorem 2.
The MVC Algorithm correctly computes the MVC on L G k n , q .
Proof. 
Consider the structure of MVC on L G k n , q . Let G 1 be the subgraph of L G k n , q induced by V 1 = j = 1 i V j , and let G 2 be the subgraph of L G k n , q induced by V 2 = j = i + 1 q V j . Consider a VC of G. Let  M 1 and M 2 be the vertex covers of G 1 and G 2 , respectively. Let the set of edges crossing the cut, C = ( M 1 , M 2 ) , be E C . It follows that the cardinality of a VC of G is | M 1 | + | M 2 | when every edge crossing C is covered by either M 1 or M 2 . Note that the only edges from E i i + 1 = E C can go across the cut. Thus, the cardinality of the MVC of L G k n , q is equal to m i n ( | M 1 | + | M 2 | ) for any such cut. When the last layer is processed, this property is ensured. The theorem follows. Similarly, c o u n t i j gives the number of ways that a vertex cover of minimum cardinality can be formed when the vertices chosen in the layer i are given by j. Thus, c o u n t q j corresponding to the minimum value of s o l q j yields the total number of MVCs. ☐
Theorem 3.
The MVC Algorithm on L G k n , q runs in polynomial time in n when k = O ( log n ) . The space required is O ( n k ) .
Proof. 
We presume that I i , the 0–1 adjacency matrix for the subgraph induced by V i V i + 1 where the edges are restricted to E i i + 1 is given. Likewise, we assume that the 0–1 adjacency matrix, M i , for each of G i is given. Recall that L G k n , q was formed from G 1 , G 2 , , G q . For a linear graph, I i is just a k -dimensional vector where, if bit j is set, then there is an edge between V i j and V i + 1 j .
  • The initialization step requires O ( 2 k ) time.
  • Given a mask for layer i, it can be determined whether VC is valid in O ( k 2 ) time with M i . That is, for any two M i [ a ] [ b ] that are set, the mask should have either a bit a or a bit b set.
  • Given I i and two masks, m a s k 1 and m a s k 2 , for layers i and i + 1 , respectively, it can be directly determined whether the union of the two masks is a VC of the subgraph induced by i i + 1 V j , of  L G k n , q , in  O ( k 2 ) time.
  • In order to determine the MVC up to layer i, whose mask is j, j must be checked for compatibility with all masks of the previous layer. Thus, O ( k 2 2 k ) time is required. For all masks of the current layer, O ( k 2 2 2 k ) , time is required. For all layers, the time required is maximized when each layer has k vertices yielding O ( n k k 2 2 2 k ) = O ( n k 2 2 k ) time.
The time complexity is clearly exponential in k; however, if k = O ( 1 ) , the time complexity is O ( n ) . The time complexity remains polynomial when k = O ( log n ) ; specifically, O ( n 3 log n ) when k = log n . The additional space required is O ( k 2 k ) because for two layers, 4.2 k masks and count variables are stored, each of size k. The space required is O ( n k ) to store the graph and an additional space of O ( k 2 k ) that is needed by the algorithm. When k = O ( log n ) , the space complexity is O ( n k ) . ☐
Lemma 1.
Let 0 α < 1.0 , where α R + . If  x = ( log n ) α , then x ! = O ( n ϵ ) for any ϵ > 0 .
Proof. 
Let f ( n ) = ( log n ) α , α < 1 . Let h ( n ) = n ϵ , ϵ > 0 .
Thus, f ( n ) ! = ( log n ) α ! . Taking log on both sides we obtain:
log ( f ( n ) ! ) = log 1 + log 2 + + log ( ( log n ) α ) = x = 1 ( log n ) α log x 1 ( log n ) α log x d x = [ x log x x ] 1 ( log n ) α = α ( log n ) α log log n ( log n ) α + 1
Disregarding smaller order terms we obtain the expression: ( log n ) α ( α log log n ) α log log n = log ( ( log n ) α ) . Note that log n = O ( n μ ) for any μ > 0 . Thus, ( log n ) α ( α log log n ) < ( ( log n ) α ) ) ( 1 + μ ) for any μ > 0 . Given that α < 1 one can always choose μ such that α + α μ < 1 . Thus, the expression is O ( log n ) = O ( n ϵ ) for any ϵ > 0 .
Thus, ( log n ) α ! = O ( n ϵ ) . ☐
Lemma 2.
( log n ) ! is quasi-polynomial and ( log n ) ! = n O ( log log n ) .
Proof. 
From Stirling’s Approximation, we have log ( ( log n ) ! ) θ ( log n log log n )
( log n ) ! e θ ( log n log log n )
Thus, for some constants μ and δ , ( n δ log log n ) ( ( log n ) ! ) ( n μ log log n )
Thus, ( f ( n ) ! ) is quasi-polynomial. ☐
Lemma 3.
If k = Θ ( ( log n ) 1 + ϵ ) , for any ϵ > 0 then, the MIS Algorithm, MVC Algorithm and MDS Algorithm run in quasi-polynomial time.
Proof. 
The time complexities of all these algorithms can be written as O ( f ( n ) g ( k ) 2 c k ) , where f ( n ) = Θ ( n ) , g ( k ) = O ( k ) and c = O ( 1 ) . Thus, when k = Θ ( ( log n ) 1 + ϵ ) for ϵ > 0 , the complexities for all the algorithms will be quasi-polynomial. ☐
Theorem 4.
The MCD Algorithm correctly computes the cardinality of a connected minimum dominating set for L G k with a time complexity of O ( n 1 + ϵ ) for any ϵ > 0 when k = O ( log n ) α and α < 1 . The space complexity of the algorithm is O ( n k ) .
Proof. 
First, we show that the algorithm correctly computes the cardinality of a connected minimum dominating set. Consider the structure of CDS on a connected graph, G. Let V be arbitrarily partitioned into V 1 , V 2 , where both | V 1 | > 0 and | V 2 | > 0 . Let G 1 be the subgraph of G induced by V 1 , and let G 2 be the subgraph of G induced by V 2 . Let M 1 V 1 and M 2 V 2 be DSs of G 1 and G 2 . Let C be the cut ( M 1 , M 2 ) and let E C be the edges that cross this cut. Clearly, M = M 1 M 2 is DS for G. Further, M is a CDS for G if | E C | > 0 , and M forms a connected component in G. For a given partition V 1 , V 2 of V, M is a MCD if it minimizes | M 1 | + | M 2 | , where M forms a connected component in G.
Let G be a L G k n , q ; in particular, let G be a C L G k n , q . Let V 1 = j = 1 q 1 V j and V 2 = V q . Let G 1 be the subgraph of G induced by V 1 , and let G 2 be the subgraph of G induced by V 2 . Let M 1 V 1 and M 2 V 2 be DSs of G 1 and G 2 , respectively. Let C be the cut ( M 1 , M 2 ) , and let E C be the edges that cross this cut. Note that E C = E q 1 q . When the algorithm processes layer q, it chooses M = M 1 M 2 , such that | M 1 | + | M 2 | is minimized where M forms a connected component in G. Thus, the theorem follows. Similarly, c o u n t i j gives the number of ways a CDS of minimum cardinality can be formed when the vertices chosen in layer i are given by j. Thus, j Σ c o u n t q j corresponding to the minimum value of j s o l q j yields the total number of MDSs.
The time complexity of the algorithm is analyzed below. We presumed that similar prerequisites as in Theorem 3 were provided. The steps are presented below.
  • A global structure, s o l , consisting of s o l 0 and s o l 1 , corresponding to the previous and current layers, is maintained for the whole algorithm. The final solution for the problem can be determined just by using information from s o l 0 and s o l 1 . This structure is maintained for the whole algorithm and not for every layer.
  • s o l 0 and s o l 1 consist of a maximum of B k 2 k triples of the form ( l o , u n , r ) . This corresponds to a maximum of B k component layouts ( l o ), 2 k masks, u n undominated vertices of the current layer and a maximum of 2 k triples, r, of the form ( m , s , c ) , for every unique pair ( l o , u n ) . Here, m is the mask of the current layer that produced the respective (component layout, undominated vertices) pair; s is the minimum cardinality of the sub-solution corresponding to mask m and pair ( l o , u n ) ; and c is the count of s corresponding to mask m and pair ( l o , u n ) .
  • Throughout the algorithm, s o l 0 and s o l 1 are maintained by clearing s o l 0 when the current layer is processed and the information of s o l 1 is used as s o l 0 for the next layer.
  • s o l 0 is initialized with the triple ( l o , u n , r ) , corresponding to 2 k masks of the first layer. The initialization takes O ( k 2 2 k ) .
  • A candidate sub-solution for layers 1 , , i induces connected components in layer i that are defined in terms of vertices of layer i. We call this the component layout.
  • The number of component layouts is upper bounded by B k , the number of ways of partitioning k vertices of a layer. Here, k = f ( n ) , f ( n ) = O ( log n ) α , α < 1 . B k = O ( f ( n ) ! ) . From Lemma 1, we know that f ( n ) ! = O ( n ϵ ) , for any ϵ > 0 .
  • A mask j of the current layer can be combined with a component layout for mask l of the previous layer to form a new component layout for the current layer. With the same mask, l, j can form a new mask corresponding to the undominated vertices of the current layer.
  • Every such unique pair of ( l o , u n ), where  l o is component layout and u n is mask of undominated vertices, is maintained, and a list of triples r, consisting of triples of the form ( m , s , c ) , is associated with it. Here, m is the current layer mask, s is the minimum cardinality of the sub-solution corresponding to m, and c is the count of s. The number of such tuples, ( l o , u n , r ) , is upper bounded by B k 2 2 k , where  B k 2 k is the possible number of unique pairs of ( l o , u n ) , and 2 k is the possible number of triples that can exist for each pair.
  • Starting from the i-th layer, i > 1 , every 2 k masks of the current layer and the triple values from the previous layer are used to generate the triples for the current layer.
  • For a unique pair ( l o , u n ) in the previous layer, if mask j dominates the undominated vertices of mask u n , and forms a connected component with the layout, l o , then we consider that a sub-solution using mask j is feasible. Here, a mask, j, and a component layout, l o , are considered to form a connected component if every component in l o has at least one edge with a node in mask j. Each such check takes O ( k 2 ) time. So, the total time to determine if a sub-solution with mask j is feasible is O ( k 2 ) .
  • If a mask, j, can feasibly give a sub-solution, then it is combined with the component layout, l o , of the previous layer to form a new component layout for the current layer corresponding to mask j. This is performed using a DFS which takes O ( k 2 ) for the given input matrix.
  • Mask j is then combined with mask l of the previous layer, corresponding to the pair ( l o , u n ) that is under consideration, to form a mask for the current layer vertices that are not dominated by j or l. This takes O ( k 2 ) time.
  • Using the mask, j, of the current layer and minimum cardinality, s, for the pair ( l o , u n ) of the previous layer, the new cardinality for the sub-solution is computed.
  • The count of the new cardinality will be same as that of c of the ( l o , u n ) pair for the previous layer.
  • This new pair of the component layout and undominated mask computed for mask j of the current layer are checked with the existing pairs of the current layer to determine if it is unique or not. We maintain the structure of the triples such that an entry can be accessed in O ( 1 ) time, indexed by the pair ( l o , u n ) and the corresponding mask m for the previous and the current layer.
  • If it is unique, the triple value, consisting of the newly computed ( l o , u n ) pair and its corresponding triple, consisting of the mask j, respective cardinality and the count, are added as a new triple for the current layer.
  • Consider that the current mask j produces the new pair ( l o , u n ) with values s = s x and c = c x . If the new pair is not unique, then there are three cases. Consider the existing entry of the ( l o , u n ) pair and the corresponding j to have values s = s y and c = c y .
    (a)
    If s y = s x , then c y c y + c x ;
    (b)
    If s y > s x , then s y s x ; c y c x ;
    (c)
    If s y < s x , then no update is required.
  • The above procedure is performed until the last layer, where the final solution is computed from the current layer information corresponding to the last layer. Of all the B k 2 k pairs for the current layer, a solution is considered to be feasible if the mask for the undominated vertices for any of the B k component layouts is 0, as this would mean all the vertices are dominated. The  cardinality of MCD is the minimum value among all the feasible solutions. The count is then computed by considering each feasible entry with the minimum cardinality computed above and adding its corresponding count.
  • Thus, the solution and the corresponding count of optimal solutions for MCD problem are computed.
For the whole algorithm, we maintained a global structure, as mentioned above. It consisted of a maximum of O ( B k 2 k ) entries corresponding to unique pairs of ( l o , u n ) and another 2 k triples for each such pair. We maintainewa this information for only the previous and the current layers. So, the space used by the data structure is O ( B k 2 2 k ) . This can be shown to be equal to O ( n ϵ ) , for any ϵ > 0 , based on the proof for Lemma 1. This space requirement is in addition to the space required by the input graph which is O ( n k ) . For  k = O ( ( log n ) α ) , O ( n k ) is the dominating term compared to O ( n ϵ ) . So, the space complexity is O ( n k ) . The following is the proof for time complexity of the algorithm.
First, an expression for the runtime of the algorithm is derived. The initialization using the first layer takes O ( k 2 2 k ) time. For each layer after the first, the  2 k masks of the current layer are combined with the B k 2 k pairs of the previous layer. For each pair, a current layer mask is combined with a maximum of 2 k masks of the previous layer that generated this pair. Checking the feasibility of a mask of the current layer takes O ( k 2 ) . Computing the new component layout and the new undominated mask takes O ( k 2 ) each. The undominated mask is calculated for 2 k masks of the previous layer for each mask of the current layer. Accessing and updating an entry takes O ( 1 ) time, as mentioned above. This is done for O ( n / k ) layers. So, the time complexity expression can be written as
T = O ( n k 2 k B k 2 k ( k 2 + 2 k k 2 ) ) = O ( n k k ! 2 2 k ( 2 k k 2 ) ) ( B k = O ( k ! ) ) = O ( n k 2 3 k k ! ) .
If k = O ( 1 ) , the time complexity becomes T = O ( n ) . If we assume the worst case number of nodes in each layer, i.e.,  k = f ( n ) , then the corresponding time complexity is T = O ( n 1 + ϵ ) . as shown below.
Let f ( n ) = ( log n ) α α < 1
Let h ( n ) = n γ γ > 0
From Lemma 1 we have
x ! = O ( n γ ) for some γ > 0 , where x = ( log n ) α f ( n ) ! = O ( n γ ) = O ( h ( n ) )
The running time of the algorithm is given by
T = O ( n k 2 3 k f ( n ) ! ) c n k 2 3 k h ( n ) c n 1 + γ ( log n ) α 2 3 ( log n ) α ( h ( n ) = n γ )
Consider F ( n ) = ( log n ) α 2 3 ( log n ) α
Let g 1 ( n ) = n δ and g 2 ( n ) = n μ δ > 0 , μ > 0
We know that the logarithmic functions grow slower than the polynomial functions.
( log n ) α c g 1 ( n ) ( log n ) α = O ( n δ )
Now, we claim that 2 3 ( l o g n ) α c g 2 ( n ) for some α < 1 , a positive real number c and n > n 0 , where  n 0 is some positive intege.
Taking the log of both sides, we get
log ( 2 3 ( l o g n ) α ) log ( c g 2 ( n ) ) 3 ( log n ) α log c + log g 2 ( n ) 3 ( log n ) α μ log n ( g 2 ( n ) = n μ )
Since α < 1 , ( log n ) α < log n
3 ( log n ) α = O ( μ log n ) 2 3 ( l o g n ) α c n μ
Hence, we have proved our claim.
2 3 ( l o g n ) α = O ( n μ )
From above, we have
F ( n ) = ( log n ) α 2 3 ( log n ) α F ( n ) c n δ n μ F ( n ) c n δ + μ F ( n ) = O ( n δ + μ ) δ > 0 , μ > 0
From (1), we get
T c n 1 + γ n δ + μ c n 1 + γ + δ + μ
We can write it as
T c n 1 + ϵ ϵ = γ + δ + μ
By arbitrarily taking small values for μ , δ and γ , ϵ can be any value, such that ϵ > 0 .
T = O ( n 1 + ϵ ) ϵ > 0
Hence, the theorem is proved. ☐
Theorem 5.
The MCV Algorithm correctly computes a connected VC of minimum cardinality for L G k with a time complexity of O ( n 1 + ϵ ) for any ϵ > 0 when k = O ( log n ) α and α < 1 . The space complexity is O ( n k ) .
Proof. 
The MCV Algorithm is similar to the MCD Algorithm. A mask, j, of layer i must be a valid VC for layer i. The check takes an additional O ( k 2 ) , though the total time complexity can be proved to be same as that of MCD. So, the proofs of correctness and time complexity follow from the proofs for the same of the MCD Algorithm. Hence, the time complexity is O ( n 1 + ϵ ) for any ϵ > 0 when the number of vertices in each layer is k, where  k = O ( ( log n ) α ) and α < 1 . Similarly, the space complexity can be shown to be O ( n k ) . ☐
Lemma 2 proves that ( log n ) ! is quasi-polynomial. Thus, if k = Θ ( log n ) then MCV and MCD are computed in quasi-polynomial time. Proving this is quite straightforward. By substituting ( log n ) ! for k ! into Equation (1) in Theorem 4, we get a product of a quasi-polynomial factor and a polynomial factor. Thus, the time complexity is quasi-polynomial.

Minor Enhancements

The current layer requires information only from the previous layer. So, only the variables of the current layer, i, and the previous layer, i 1 , are maintained. In the pseudocode shown for all algorithms, for simplicity, the variables of the current layer are stored at index 1 and the variables of the previous layer are stored at index 0 of the data structure s o l . When the current layer, i, is completely processed, the variables from index 1 overwrite the corresponding variables in index 0. This can be avoided by alternating the index of current layer between indices 0 and 1, thereby reducing the execution time by a factor of O ( 1 ) .
The optimum cardinalities for each of the problems are generated using minimal additional space. For example, the MVC Algorithm employs only O ( k 2 k ) space in addition to the space required by the graph. If, for each mask in each layer, we store the best compatible mask from the previous layer, then we can generate a solution. There are O ( n / k ) layers, each having O ( 2 k ) k-bit masks. This requires O ( n 2 k ) space instead of O ( k 2 k ) space. However, if we want to generate all solutions, then for each mask of a given layer, we need to store all compatible masks of its previous layer that yield the optimum value requiring O ( n 2 2 k ) space.

5. Conclusions

A novel graph class called layered graphs was defined. It includes a subset of bipartite graphs and a subset of trees with n vertices. A layered graph can have exponential number of cycles. The typical restrictions like bipartiteness, planarity and acyclicity on graph classes that admit polynomial time solutions for hard problems are not applicable for this class. The known NP-complete problems were shown to be in class P for these graphs when the layer size is O ( log | V | ) for MIS, MVC and MDS, and  O ( ( log | V | ) α ) , where  α < 1 , for MCV and MCD. The count of the corresponding optimal solutions is also computed. We note that the identification of a maximum clique in a layered graph is direct as the inter-layer edges are limited to adjacent layers. Thus, one can independently solve q 1 instances of the maximum clique problem on graphs induced by V i V i + 1 (of size 2 k , each in O ( 2 2 k k 2 ) time) to obtain a maximum clique of L G k n , q .
A few applications of layered graphs in computational molecular biology and social networks were addressed in this article. One can explore other problems that can be modeled by layered graphs. The design of larger graph classes (that include layered graphs as a sub-class) that admit polynomial time solutions for the problems studied in this article is an open problem. For example, in a layered graph, the inter-layer edges are restricted to the vertices of adjacent layers. If this restriction is dropped for O ( 1 ) edges originating from each layer, then one obtains a more general graph class. Such graphs can potentially model more scenarios than layered graphs.

Author Contributions

B.C. conceived the design of graphs and the solution, performed analysis and wrote the first draft. S.B., S.S. and K.P. helped to test the algorithms. K.P. worked on the implementation and analysis of the algorithms. S.S. worked on extending the implementations and analysis. S.B. tested the implementations. B.C. and S.B. worked on the proofs of the algorithms and wrote the later versions of the paper.

Funding

This research received no external funding.

Acknowledgments

Authors thank Amma for her guidance. Sriram K helped with the literature survey.

Conflicts of Interest

The authors declare no conflict of interest.

Appendix A

The generic algorithm was presented earlier. Here, we present detailed algorithms for MIS and MVC. A relatively high-level description of the MCD algorithm follows.

Appendix A.1. MIS Algorithm

Algorithm A1 MIS Algorithm
  • Input: L G k n , q  
  • Output: The cardinality of MIS and the count of the maximum independent sets.  
  • Initialization: i s o l 0 i = s o l 1 i = 0 ;  
  • i c o u n t 0 i = c o u n t 1 i = 0 ;  
  • // s o l i j : The maximum value of an independent set up to layer i where the chosen  
  • //vertices of the layer i are given by the binary value of j.  
  • // c o u n t i j : the number of ways the jth mask in layer i yields the corresponding maximum value.  
  • // v a l i d ( i , j ) is a Boolean function that returns true if the vertex assignment corresponding to  
  • //the binary value of j in layer i forms an IS. Otherwise it returns false.  
  • //∧ is the bitwise AND operator.  
  • // c a r d i n a l i t y ( j ) is the number of bits that are set in the binary representation of j.  
  • // For each s o l i j , one k-bit variable that remembers the mask of the layer i 1 that  
  • // yielded s o l i j will help in constructing MISs. The union of such masks (1/layer) is an MIS.    
  • for ( i = 0 , . . . , 2 k 1 ) do  
  •     if v a l i d ( 1 , i ) then // for layer 1  
  •          c o u n t 0 i = 1 ; s o l 0 i = c a r d i n a l i t y ( i ) ; // No. of valid ISs of layer 1  
  •     end if 
  • end for 
  • for ( p = 2 , . . . . q ) do //For layers 2 through maximum  
  •     for ( j = 0 , . . . . 2 k 1 ) do //For all masks of current layer  
  •         if v a l i d ( p , j ) then //j is valid  
  •             s i z e 0  
  •            for ( l = 0 , . . . , 2 k 1 ) do //Masks of previous layer  
  •                if ( ( c o u n t 0 l > 0 ) ( c o m p a t i b l e ( j , l ) ) ) then // s o l 0 l = 0 Invalid IS  
  •                    if ( c a r d i n a l i t y ( j ) + s o l 0 l s i z e ) then // Better IS for the current mask  
  •                        if ( c a r d i n a l i t y ( j ) + s o l 0 l > s i z e ) then  
  •                            s i z e = c a r d i n a l i t y ( j ) + s o l 0 l ; c o u n t 0 l = c o u n t 0 l + 1  
  •                        end if 
  •                         c o u n t 0 l c o u n t 0 l + 1  
  •                    end if 
  •                end if 
  •            end for//Masks of previous layer  
  •            for ( l = 0 , . . . , 2 k 1 ) do //Masks of previous layer  
  •                if ( s i z e = c a r d i n a l i t y ( j ) + s o l 0 l ) then //Instance of max  
  •                     c o u n t 1 j c o u n t 1 j + c o u n t 0 l ; // Count corr. to max wrt mask=j  
  •                end if 
  •            end for//Masks of previous layer  
  •             s o l 1 j s i z e  
  •         end if// j is valid  
  •     end for//For all masks of current layer  
  •      x c o u n t 0 x c o u n t 1 x ; s o l 0 x s o l 1 x ; c o u n t 1 x s o l 1 x 0 ;  
  • end for//For layers 2 through maximum  
  • b e s t 0 ; s u m 0 ;  
  • for ( i = 0 , . . . , 2 k 1 ) do  
  •     if s o l 0 i > b e s t then //Get the max value of i s o l p i  
  •          b e s t = s o l 0 i ;  
  •     end if 
  • end for 
  • for ( i = 0 , . . . , 2 k 1 ) do  
  •     if s o l 0 i = b e s t then //Corr. to the best value of M I S ( L G k n , q )  
  •          s u m s u m + c o u n t 1 i ; //Get the count of MISs  
  •     end if 
  • end for 
  • r e t u r n ( b e s t , s u m ) //MIS cardinality and the count of such MISs

Appendix A.2. MVC Algorithm

Algorithm A2 MVC Algorithm
  • Input: L G k n , q  
  • Output: The cardinality and the count for the resp. problem.  
  • // s o l i j : The minimum value of a vertex cover up to layer i where the chosen  
  • //vertices of the layer i are given by the binary value of j.  
  • // v a l i d ( i , j ) is a Boolean function that returns true if the vertex assignment corresponding to  
  • //the binary value of j in layer i forms a VC. Otherwise it returns false.
  • // c o u n t i j : the number of ways the jth mask in layer i yields the corresponding minimum value.  
  • // c a r d i n a l i t y ( j ) is the number of bits that are set in the binary representation of j.  
  • for ( i = 0 , . . . , 2 k 1 ) do  
  •     if v a l i d ( 1 , i ) then //for layer 1  
  •          c o u n t 0 i = 1 ; s o l 0 i = 1 ; // No. of valid VCs of layer 1  
  •     end if 
  • end for 
  • for ( p = 2 , . . . . q ) do //For layers 2 through maximum  
  •     for ( j = 0 , . . . . 2 k 1 ) do //For all masks of current layer  
  •         if v a l i d ( p , j ) then //j is valid  
  •             s i z e ( i + 1 ) * k  
  •            for ( l = 0 , . . . , 2 k 1 ) do //Masks of previous layer  
  •                if ( ( c o u n t 0 l > 0 ) ( c o m p a t i b l e ( j , l ) ) ) then // s o l 0 l = 0 Invalid VC  
  •                    if ( c a r d i n a l i t y ( j ) + s o l 0 l s i z e ) then // Better VC for the current mask  
  •                         s i z e = c a r d i n a l i t y ( j ) + s o l 0 l ;  
  •                        if ( c a r d i n a l i t y ( j ) + s o l 0 l = s i z e then c o u n t 1 j c o u n t 1 j + c o u n t 0 l ;  
  •                        else c o u n t 1 j c o u n t 0 l ; s o l 1 j s i z e )  
  •                        end if 
  •                    end if 
  •                end if 
  •                 s o l 1 j s i z e  
  •            end for//Masks of previous layer  
  •            for ( l = 0 , . . . , 2 k 1 ) do //Masks of previous layer  
  •                if ( s i z e = c a r d i n a l i t y ( j ) + s o l 0 l ; ) then //Instance of max  
  •                     c o u n t 1 j c o u n t 1 j + c o u n t 0 l ; // Count corr. to max wrt mask=j  
  •                end if 
  •            end for//Masks of previous layer
  •         end if// j is valid  
  •     end for//For all masks of current layer  
  •      x c o u n t 0 x c o u n t 1 x ; s o l 0 x s o l 1 x ; c o u n t 1 x s o l 1 x 0 ;
  • end for//For layers 2 through maximum  
  • b e s t inf ; s u m 0 ;  
  • for ( i = 0 , . . . , 2 k 1 ) do  
  •     if s o l 1 i < b e s t then //Get the max value of i s o l p i  
  •          b e s t = s o l 1 i ;  
  •     end if 
  • end for 
  • for ( i = 0 , . . . , 2 k 1 ) do  
  •     if s o l 1 i = b e s t then //Corr. to the best value of M V C ( L G k n , q )  
  •          s u m s u m + c o u n t 1 i ; //Get the count of MVCs  
  •     end if 
  • end for 
  • r e t u r n ( b e s t , s u m ) //MVC cardinality and the count of such MVCs

Appendix A.3. MCD Algorithm

Algorithm A3 MCD Algorithm
  • // A brief outline of the MCD Algorithm  
  • // The algorithm maintains a global structure, s o l , which consists of s o l 0 and s o l 1 , corresponding to the previous and current layers. s o l 1 consists of B k 2 k triples of the form ( l o , u n , r ) . This corresponds to a maximum of B k (k-th Bell number) component layouts, 2 k masks of undominated vertices of the current layer and a maximum 2 k triples, r, of the form ( m , s , c ) for every unique pair ( l o , u n ) . l o is a component layout, u n is the mask of undominated vertices of the current layer; r is triples of the form ( m , s , c ) where m is the mask of the current layer that produces the respective (component layout, undominated vertices) pair; s is the minimum cardinality of the sub-solution corresponding to mask m and pair ( l o , u n ) ; c is the count of s corresponding to mask m and pair ( l o , u n ) . All unique pairs of (component layout, undominated vertices) need not yield a (sub)solution. s o l 0 consists of the same information as for the previous layer.  
  • // Mask j refers to the mask of the vertices of current layer that can yield a sub-solution (with minimum value of s for some pair ( l o , u n ) ). The component layout refers to the list of the connected components of the current layer vertices (which can form a component employing some vertices from the previous layers). It is determined by the respective mask and the corr. sub-solution from the previous layer whose combination yields the minimum value of s for some pair ( l o , u n ) .
  • // If the current layer mask, j, produces ( l o , u n ) pair with values s = s x and c = c x , then we have two cases: (i) There is no entry corr. ( l o , u n ) and j. Here, we just add ( l o , u n ) and j with corr. s and c. (ii) There is an entry corr. ( l o , u n ) and j with s = s y and c = c y then,
  •   (a) if s y = s x then c y c y + c x ;
  •   (b) if s y > s x then s y s x ; c y c x ;
  •   (c) if s y < s x then no update is required.    
  • for ( i = 0 , . . . , 2 k 1 ) do //for layer 1  
  •     Initialize s o l 0 i ( l o , u n , r ) ; r ( m , c a r d i n a l i t y ( i ) , 1 )  
  • end for 
  • for ( p = 2 , ..., q) do    //for layers 2 through q  
  •     for ( j = 0 , ..., 2 k 1 ) do    //j: current layer mask  
  •         for ( v = 0 , ..., no. of ( l o , u n ) pairs) do    // Of s o l 0  
  •            If j dominates the nodes of u n of s o l 0 v then continue.  
  •            If every component of l o of s o l 0 v has an edge to any node in j then continue.  
  •            Compute the new component layout using mask j and layout l o .  
  •            for ( x = 0 , ..., size of r corr. ( l , u ) ) do // No. of triples in r  
  •                Compute the new mask of the undominated vertices using masks j  
  •                of current layer and m corresponding to x-th triple of s o l 0 v .  
  •                Compute the minimum cardinality of the sub-solution corresponding to  
  •                mask j for the current layer using s of the x-th triple of s o l 0 v .  
  •                The count of the newly computed sub-solution will be equal to c  
  •                of the x-th triple corresponding to mask m.  
  •                      If component layout l o and the undominated mask u n that are computed corr. j  
  •                      do not exist in s o l 1 , then insert the tuple ( l o , u n , r ) , into s o l 1  
  •                      where r has a single triple whose mask is j.  
  •                      If the ( l o , u n ) pair was already generated by j and a previous mask of the  
  •                      previous layer, then if needed, update the minimum cardinality  
  •                      and the corresponding count.  
  •                      Otherwise, insert the new triple ( m , s , c ) for the corresponding ( l , u ) pair in s o l 1 .  
  •            end for 
  •         end for 
  •     end for 
  • end for 
  • b e s t inf , s u m 0  
  • Consider the values of s o l 1 in layer q.  
  • Here, the component layout can be ignored as an entry would mean that it forms a connected component.  
  • For a solution to be considered, the undominated mask must be 0.  
  • for ( i = 0 , ..., no. of ( l o , u n ) pairs) do    // for s o l 1  
  •     Identify b e s t , the cardinality of the optimal solution.  
  • end for 
  • for ( i = 0 , ..., no. of ( l o , u n ) pairs) do    // size of s o l 1  
  •     Compute s u m , the count of such optimal solutions.  
  • end for 
  • r e t u r n ( b e s t , s u m )

References

  1. Chitturi, B.; Sudborough, H.; Voit, W.; Feng, X. Adjacent Swaps on Strings. In Proceedings of the Computing and Combinatorics (COCOON 2008), Dalian, China, 27–29 June 2008; Springer: Berlin/Heidelberg, Germany, 2018; Volume 5092. [Google Scholar]
  2. Chitturi, B.; Mohandas, M.; Sudborough, H.; Voit, W. Adjacent Swaps on Strings. Algorithms Mol. Biol. 2018. submitted. [Google Scholar]
  3. Alberts, B.; Johnson, A.; Lewis, J.; Raff, M.; Roberts, K.; Walter, P. Molecular Biology of the Cell; Garland Science: New York, NY, USA, 2002. [Google Scholar]
  4. Feng, X.; Chitturi, B.; Sudborough, H. Sorting circular permutations by bounded transpositions. In Advances in Computational Biology; Springer: New York, NY, USA, 2010; pp. 725–736. [Google Scholar]
  5. Karp, R.M. Reducibility among combinatorial problems. In Complexity of Computer Computations; Springer: Boston, MA, USA, 1972; pp. 85–103. [Google Scholar]
  6. Garey, M.R.; Johnson, D.S. Computers and Intractability: A Guide to the Theory of NP-Completeness; W. H. Freeman & Co.: New York, NY, USA, 1979. [Google Scholar]
  7. Harary, F. Graph Theory; Addison-Wesley Pub. Co.: Boston, MA, USA, 1969. [Google Scholar]
  8. Gavril, F. Algorithms for minimum coloring, maximum clique, minimum covering by cliques, and maximum vertex cover of a chordal graph. SIAM J. Comput. 1972, 1, 180–187. [Google Scholar] [CrossRef]
  9. Gavril, F. Algorithms for a maximum clique and a maximum independent set of a circle graph. Networks 1973, 3, 261–273. [Google Scholar] [CrossRef]
  10. Golumbic, M.C. The complexity of comparability graph recognition and coloring. Computing 1977, 18, 199–208. [Google Scholar] [CrossRef]
  11. Minty, G.J. On maximal independent sets of vertices in claw-free graphs. J. Comb. Theory Ser. B 1980, 28, 284–304. [Google Scholar] [CrossRef]
  12. Gupta, U.I.; Lee, D.T.; Leung, J.T. Efficient algorithms for interval graphs and circular arc graphs. Networks 1982, 12, 459–467. [Google Scholar] [CrossRef]
  13. Chen, G.H.; Kuo, M.T.; Sheu, J.P. An optimal time algorithm for finding a maximum weight independent set in a tree. BIT Numer. Math. 1988, 28, 353–356. [Google Scholar] [CrossRef]
  14. Hsiao, J.Y.; Tang, C.Y.; Chang, R.S. An efficient algorithm for finding a maximum weight 2-independent set on interval graphs. Inf. Process. Lett. 1992, 43, 229–235. [Google Scholar] [CrossRef]
  15. Tarjan, R.E.; Trojanowski, A.E. Finding a maximum independent set. SIAM J. Comput. 1977, 6, 537–546. [Google Scholar] [CrossRef]
  16. Robson, J.M. Algorithms for maximum independent sets. J. Algorithms 1986, 7, 425–440. [Google Scholar] [CrossRef]
  17. Lozin, V.V.; Milanic, M. On the Maximum Independent Set Problem in Subclasses of Planar Graphs. J. Graph Algorithms Appl. 2010, 14, 269–286. [Google Scholar] [CrossRef] [Green Version]
  18. Garey, M.R.; Johnson, D.S. The rectilinear Steiner tree problem is NP-complete. SIAM J. Appl. Math. 1977, 32, 826–834. [Google Scholar] [CrossRef]
  19. Bondy, J.A.; Murty, U.S.R. Graph Theory with Application; Macmillan: London, UK, 1976. [Google Scholar]
  20. Konig, D. Graphen und matrizen. Mat. Fiz. Lapok 1931, 38, 116–119. (In German) [Google Scholar]
  21. Li, Y.; Yang, Z.; Wang, W. Complexity and algorithms for the connected vertex cover problem in 4-regular graphs. Appl. Math. Comput. 2017, 301, 107–114. [Google Scholar] [CrossRef]
  22. Takamizawa, K.; Nishizeki, T.; Saito, N. Linear-time computability of combinatorial problems on series-parallel graphs. J. ACM 1982, 29, 623–641. [Google Scholar] [CrossRef]
  23. Bertossi, A.A. Dominating sets for split and bipartite graphs. Inf. Process. Lett. 1984, 19, 37–40. [Google Scholar] [CrossRef]
  24. Cockayne, E.; Goodman, S.; Hedetniemi, S. A linear algorithm for the domination number of a tree. Inf. Process. Lett. 1975, 4, 41–44. [Google Scholar] [CrossRef]
  25. Baker, B.S. Approximation algorithms for NP-complete problems on planar graphs. J. ACM 1994, 41, 153–180. [Google Scholar] [CrossRef]
  26. Müller, H.; Brandstädt, A. The NP-completeness of Steiner tree and dominating set for chordal bipartite graphs. Theor. Comput. Sci. 1987, 53, 257–265. [Google Scholar] [CrossRef]
  27. Hung, R.W.; Chang, M.S.; Ming-Hsiung, C. A linear algorithm for the connected domination problem on circular-arc graphs. In Proceedings of the 19th Workshop on Combinatorial Mathematics and Computation Theory, Kaohsiung, Taiwan, 29–30 March 2002. [Google Scholar]
  28. Fomin, F.V.; Grandoni, F.; Kratsch, D. Solving connected dominating set faster than 2n. Algorithmica 2008, 52, 153–166. [Google Scholar] [CrossRef]
  29. Gouveia, L.; Simonetti, L.; Uchoa, E. Modeling hop-constrained and diameter-constrained minimum spanning tree problems as Steiner tree problems over layered graphs. Math. Program. 2011, 128, 123–148. [Google Scholar] [CrossRef]
  30. Chitturi, B. A note on complexity of genetic mutations. Discrete Mathematics. Discret. Math. Algorithms Appl. 2011, 3, 269–286. [Google Scholar] [CrossRef]
  31. Chitturi, B.; Bein, D.; Grishin, N. Complete enumeration of compact structural motifs in proteins. In Proceedings of the International Symposium on Biocomputing, Kerala, India, 15–17 February 2010; pp. 19–27. [Google Scholar]
  32. Chitturi, B.; Shi, S.; Kinch, L.N.; Grishin, N. Compact Structure Patterns in Proteins. J. Mol. Biol. 2016, 428, 4392–4412. [Google Scholar] [CrossRef] [PubMed]
Figure 1. (a) L G 6 24 , 4 . (b) L L G 6 23 , 4 . (c) S L G 6 24 , 4 . (d) S L L G 6 24 , 4 . Layer 1 is the topmost and layer 4 is the bottommost. Vertices have labels from { 1 , 2 , 3 , 4 , 5 , 6 } within a given layer. Intra-layer edge is a thick line whereas inter-layer edge is thinner. (ad) are C L G s as well. (a,b) are not a S L G s ((a): layer 4 has two components {1,3,5} and {2,4,6}. (b): layer 4 has three components {1,6}, {2,5} and {4}; vertex 3 does not exist, only a placeholder is shown).
Figure 1. (a) L G 6 24 , 4 . (b) L L G 6 23 , 4 . (c) S L G 6 24 , 4 . (d) S L L G 6 24 , 4 . Layer 1 is the topmost and layer 4 is the bottommost. Vertices have labels from { 1 , 2 , 3 , 4 , 5 , 6 } within a given layer. Intra-layer edge is a thick line whereas inter-layer edge is thinner. (ad) are C L G s as well. (a,b) are not a S L G s ((a): layer 4 has two components {1,3,5} and {2,4,6}. (b): layer 4 has three components {1,6}, {2,5} and {4}; vertex 3 does not exist, only a placeholder is shown).
Algorithms 11 00093 g001
Figure 2. MIS: Graph G consists of two layers, G 1 and G 2 . The same graph is employed for the illustration of other problems. The vertices of a maximum independent set are { b , e , f , h } from G 1 and { a , d , h } from G 2 . The cardinality of any MIS of G is 7. The vertices of MIS are shown in larger bold font.
Figure 2. MIS: Graph G consists of two layers, G 1 and G 2 . The same graph is employed for the illustration of other problems. The vertices of a maximum independent set are { b , e , f , h } from G 1 and { a , d , h } from G 2 . The cardinality of any MIS of G is 7. The vertices of MIS are shown in larger bold font.
Algorithms 11 00093 g002
Figure 3. MVC: The vertices of a minimum vertex cover are { a , b , d , f , h } from G 1 and { a , c , d , e , h , i } from G 2 . The cardinality of any MVC of G is 11. The vertices of MVC are shown in larger bold font.
Figure 3. MVC: The vertices of a minimum vertex cover are { a , b , d , f , h } from G 1 and { a , c , d , e , h , i } from G 2 . The cardinality of any MVC of G is 11. The vertices of MVC are shown in larger bold font.
Algorithms 11 00093 g003
Figure 4. MCV: The vertices of a minimum connected vertex cover are { b , c , d , e , g , h , i } from G 1 and { b , c , d , e , f , h , i } from G 2 . The cardinality of any MCV of G is 14. The vertices of MCV are shown in larger bold font.
Figure 4. MCV: The vertices of a minimum connected vertex cover are { b , c , d , e , g , h , i } from G 1 and { b , c , d , e , f , h , i } from G 2 . The cardinality of any MCV of G is 14. The vertices of MCV are shown in larger bold font.
Algorithms 11 00093 g004
Figure 5. MDS: The vertices of a minimum dominating set are { a , d , f , h } from G 1 and { c , i } from G 2 . The cardinality of any MDS of G is 6. The vertices of MDS are shown in larger bold font.
Figure 5. MDS: The vertices of a minimum dominating set are { a , d , f , h } from G 1 and { c , i } from G 2 . The cardinality of any MDS of G is 6. The vertices of MDS are shown in larger bold font.
Algorithms 11 00093 g005
Figure 6. MCD: The vertices of a minimum connected dominating set are { c , d , e , g , h } from G 1 and { b , c , d , e , f , i } from G 2 . The cardinality of any MCD of G is 11. The vertices of MCD are shown in larger bold font.
Figure 6. MCD: The vertices of a minimum connected dominating set are { c , d , e , g , h } from G 1 and { b , c , d , e , f , i } from G 2 . The cardinality of any MCD of G is 11. The vertices of MCD are shown in larger bold font.
Algorithms 11 00093 g006

Share and Cite

MDPI and ACS Style

Chitturi, B.; Balachander, S.; Satheesh, S.; Puthiyoppil, K. Layered Graphs: Applications and Algorithms. Algorithms 2018, 11, 93. https://doi.org/10.3390/a11070093

AMA Style

Chitturi B, Balachander S, Satheesh S, Puthiyoppil K. Layered Graphs: Applications and Algorithms. Algorithms. 2018; 11(7):93. https://doi.org/10.3390/a11070093

Chicago/Turabian Style

Chitturi, Bhadrachalam, Srijith Balachander, Sandeep Satheesh, and Krithic Puthiyoppil. 2018. "Layered Graphs: Applications and Algorithms" Algorithms 11, no. 7: 93. https://doi.org/10.3390/a11070093

APA Style

Chitturi, B., Balachander, S., Satheesh, S., & Puthiyoppil, K. (2018). Layered Graphs: Applications and Algorithms. Algorithms, 11(7), 93. https://doi.org/10.3390/a11070093

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop