1. Introduction
All graphs under consideration are undirected and simple. A graph
is called bipartite if the vertex set
can be partitioned into two sets:
, called the black vertices, and
, called the white vertices, such that
. So, a bipartite graph will be referred to as
. This property makes bipartite graphs useful in various practical applications, including recommender systems [
1], social networks [
2], and information retrieval [
3]. A bipartite graph
is called complete or biclique if
. A complete bipartite graph with
and
is referred to as
. A
is a tree for which there is only one vertex
of degree three and three other vertices of degree one such that the distance from
to those vertices are, respectively,
, and
. For example,
is
. We can remark that every connected component in a bipartite
-free graph is either a chordless path or a chordless cycle. Fouquet et al. in [
4] presented a decomposition method concerning bipartite graphs, called canonical decomposition, which is based on three operators: series, parallel, and
. They proved that the class of graphs that are totally decomposable with respect to these three operators of decomposition is the class of bipartite
-free graphs, which is called the class of weak-bisplit graphs since it is considered as a bipartite analog of the class of split graphs. The class of weak-bisplit graphs is a natural generalization of the class of bipartite
-free graphs, which is a natural generalization of the class of bipartite
-free graphs, studied by Lozin in [
5]. Giakoumakis et. al. [
6] defined the class of bicographs as a bipartite analog of the class of cographs. It is proved in [
6] that the class of bicographs is exactly the class of bipartite
-free graphs (see
Figure 1) and is the class of totally decomposable graphs with respect to parallel and series decompositions. We prove in this work that the class of bipartite
-free graphs is the class of totally decomposable graphs with respect to parallel and
decompositions. As a result of this fact, the class of bipartite
-free graphs can be recognized in linear time using the recognition algorithm of weak-bisplit graphs presented in [
7] or the recognition algorithm of
-free graphs presented in [
8]. However, since these two algorithms contain several redundant cases when projected to bipartite
-free graphs, we propose a symmetric algorithm of these two algorithms to adapt only the class of bipartite
-free graphs. As a result of this adapted algorithm, we present efficient solutions in this class of graphs for two optimization graph problems: the first is the maximum balanced biclique problem, and the second is the maximum independent set problem.
2. Notation and Terminology
For a graph
, we use
to represent its vertex set and
to represent its edge set. The number
is represented by
and the number
is represented by
. If the two vertex sets
and
in a bipartite graph
are both nonempty, the graph is referred to as bichromatic; otherwise, it is monochromatic. The bi-complement of bipartite graph
is defined as
. The set of neighbors of a vertex
in
is represented by
, and the number
is referred to as the degree of
and is represented by
. A vertex
is considered isolated if
and is considered universal if
when
or
when
. A
is the complement of
. A subset
of vertices of
is called an independent set if there is no edge between any two vertices of
. The sub-graph induced by a subset
of vertices of
is represented by
. A graph
is considered
-free, where
is a set of graphs, if for any subset
; that is, there is no sub-graph of
isomorphic to a graph in
. The decomposition of graphs according to predefined operators is a powerful method for obtaining efficient solutions to a large number of graph problems. The reader can find a survey on graph decomposition methods and their uses in [
9]. In this direction, Fouquet et al. in [
4] presented a decomposition method concerning bipartite graphs, which is based on three operators: decomposing a bipartite graph into connected components, decomposing the bi-complement of a bipartite graph into connected components, and decomposing a bipartite graph into
components. Our recognition algorithm of bipartite
-free graphs depends mainly on this method of decomposition, so to introduce our algorithm, we need to present an overview of this method.
Definition 1 [
4]
. A bipartite graph where is a graph if the vertex set contains an isolated vertex or there is a partition of into two sets: a biclique set and an independent set .
Property 1 [
4]
. A bipartite graph with is a graph if and only if can be partitioned into two sets, and , such that for every black vertex and every white vertex ; and for every white vertex and every black vertex .
We denote the ordered pair to represent the partition of the vertex set of graph and we called it a partition of .
Property 2 [
4]
. In a bipartite graph that does not contain universal or isolated vertices, either is a graph or, for any partition of the black vertices or white vertices into two sets and , there is an induced in with vertices in both and .
Corollary 1 [
4]
. If a graph is not a graph, then for every vertex , is a vertex of some .
Theorem 1 provides a method for decomposing a graph of type .
Theorem 1 [
4]
. A bipartite graph is a graph if and only if there exists a unique partition of , such that the following conditions hold:For every ,.
For every , the sets and form a partition of .
For every the sub-graph is not a graph.
The partition of the vertex set is called the decomposition of the graph , and each set is referred to as a component of .
According to Theorem 1, the arrangement of components in a decomposition is important. Specifically, let be the decomposition of ; if a black vertex , then for every white vertex where , , and for every white vertex where , . Similarly, if a white vertex , then for every black vertex where , , and for every black vertex where , .
The canonical decomposition of a bipartite graph
is a new decomposition method defined in [
4] as follows:
Decompose into its components; if is a graph, this decomposition is called decomposition and is denoted by .
Decompose into the connected components of ; if is not a connected graph, this decomposition is called parallel decomposition and is denoted by .
Decompose into the connected components of ; if is not a connected graph, this decomposition is called series decomposition and is denoted by .
If cannot be decomposed in , parallel, or series decomposition, then is called an indecomposable graph or a prime graph.
It has been proven in [
4] that no matter the order in which the operator of the decomposition is applied (series decomposition, parallel decomposition, or
decomposition), the set of indecomposable graphs obtained is unique. This also creates a unique tree (up to isomorphism) associated with this decomposition known as the canonical decomposition tree. The internal nodes of the tree are labeled by the type of decomposition applied, and the leaves correspond to indecomposable graphs.
Figure 2 shows an illustration of a bipartite graph and its canonical decomposition tree.
The canonical decomposition tree of a bipartite graph resulting in an order from the decomposition, parallel decomposition, and series decomposition procedure has several properties outlined below. The terms vertex node, son, parent, and grandparent are used in their conventional sense. If is an internal node, then is the sub-graph induced by the set of vertex nodes having as their least common grandparent.
- (1)
The tree consists of three types of internal nodes: parallel nodes denoted by , series nodes denoted by , and -nodes.
- (2)
Two consecutive internal nodes cannot have the same label.
- (3)
An internal node labeled or cannot have a son that is a vertex node . Otherwise, would be either an isolated or universal vertex in . By the definition of a graph, would be a graph.
- (4)
The parent of a vertex node is always labeled (a consequence of Property 3).
- (5)
If is a bi-chromatic graph, then for any node , must also be bi-chromatic. Otherwise, if there is a node labeled and is a monochromatic graph, then the parent of , say, , would have isolated or universal vertices so would be a graph, a contradiction with Property 2.
- (6)
The sons of a node are ordered according to the decomposition.
- (7)
Let be a node, and and are, respectively, the first and last sons of . If the parent of , say, , is a -node, then cannot be a white vertex node and cannot be a black vertex node. Otherwise, by Property 1, and are isolated vertices in ; since is a -node, and are also isolated vertices in , so must be a node, a contradiction with Property 2.
- (8)
If the parent of a -node is labeled , and and are, respectively, the first and last sons of , then cannot be a black vertex node and cannot be a white vertex node (similar to Property 7).
3. Recognition Algorithm of Bipartite (P6,C6)-Free Graphs
The following theorem is the key to our recognition algorithm for bipartite -free graphs.
Theorem 2. A bipartite graph is -free if and only if every connected sub-graph of is a graph.
Proof. Suppose that is a bipartite -free graph. Let be a connected sub-graph of which is not a graph. By Corollary 1, contains a , say, . Since is a connected sub-graph of and is -free graph, there is a vertex in that connects and . Suppose without a loss of generality that is a black vertex such that . Since is not a graph, the vertex is not universal, so there is a white vertex such that . Since is connected, there is a path in that connects the vertex w and the path . But now, the set forms a or a , a contradiction.
The inverse is clear since a or a is connected and contains a , so it is not a graph. □
Theorem 2 states that the class of bipartite
-free graphs is the smallest class closed under parallel and
decomposition. So, the canonical decomposition tree of a bipartite
-free graph consists only of
-nodes or
-nodes. Our recognition algorithm builds a decomposition tree with
- or
-labeled internal nodes if the input graph is
-free; otherwise, it produces a failure message. This building was influenced by the cograph recognition method proposed by Corneil et al. in [
10]. Moreover, this algorithm greatly simplifies two recognition algorithms when projected on bipartite
-free graphs. The first is for weak-bisplit graphs presented in [
7], and the second for bipartite
-free graphs presented in [
8], where both these two algorithms need to examine more than twenty cases to confirm that the input graph is
-free or not, while, as we will see, our algorithm needs to examine only two cases that are presented below in Theorems 3 and 4. The algorithm begins with an empty graph and gradually adds vertices, ensuring that the resulting sub-graphs remain
-free. The initial bipartite graph is considered
-free if all vertices can be added successfully in this manner. The principal step of the algorithm takes into consideration the decomposition tree
of a
-free bipartite graph
, a vertex
, and a set of edges denoted by
and produces the decomposition tree
of the resulting graph
if it remains
-free or stops otherwise. The algorithm considers the connections of
to other vertices in
using a marking procedure. We can assume without a loss of generality that
is a white vertex and the graph
is a bichromatic graph.
3.1. Marking Procedure
The marking procedure, presented in Algorithm 1 and used in [
10], takes into consideration the neighbors of the vertex
in the graph
to mark the nodes of
, the decomposition tree of
.
Algorithm 1 Marking |
Input: The canonical decomposition tree of and the white vertex . Output: The marking tree . For every black vertex node of . If is a neighbor of , mark by if is not a neighbor of , mark by . Traverse on a bottom-up traversal, let be an internal node of : If every son of which is distinct from a white vertex node is marked by then mark by . If there is a son of marked by and a son marked by then mark by . If every son of which is distinct from a white vertex node is marked by then mark by . |
At the end of the marking procedure on tree , a node can have three possible states: marked by , marked by , or marked by . If a node is marked by, it means that is total for , that is, is connected to all black vertices in . If it is marked by , it means that is partial for , that is, is connected to some but not all black vertices in . If it is marked by , it means that is independent of , that is, is not connected to any black vertices in . If a node is a vertex node, it can either be marked by or marked by . By Theorem 2, the marking procedure focuses only on -nodes and -nodes, ignoring the -nodes that must be unavailable. For the graph to be considered bipartite and -free, it must meet a necessary condition.
Lemma 1. If two internal nodes in the tree are marked by , and is a -free bipartite graph, then one of these two nodes must be a grandparent of the other.
Proof. Suppose that and are two internal nodes marked by , then and are partial with respect to . Let be the least common grandparent of and . We denote and to be, respectively, the son of containing and the son of containing . Since and are sub-graphs of and , then and are partial with respect to . Assume that is labeled , then and are connected sub-graphs of . Thus, there is an induced path in (resp. in ) such that is adjacent to and not adjacent to (resp. to and not to ). The set forms a , a contradiction.
Assume that is labeled . By Corollary 1, (resp. ) contains a that is partial with respect to . Let (resp. ) be a in (resp. in such that is adjacent to and not adjacent to (resp. to and not to ). Now, the set forms a , a contradiction. □
By Lemma 1, the nodes in that are marked by are arranged in a single path that starts from the lowest node marked by and goes up to the root. The lowest node marked by is referred to as . It is assumed that the conditions of Lemma 1 are met and that is known. The following notations are introduced:
Given two internal nodes and such that is a grandparent of , the unique son of that contains is denoted as .
For an internal node , which is either or one of its grandparents, the set of sons of that are marked by is denoted as , and the set of sons that are marked by is denoted as .
If has a label , considering the ordering of the sons of , the set of sons of marked by and located before is denoted as , and the set of sons marked by and located after is denoted as . The set of sons of marked by and located before is denoted as , and the set of sons marked by and located after is denoted as .
So, a node labeled which is a grandparent of splits its sons into at most three categories: , , and , the son that contains . If is labeled , its sons can be divided into at most five sets: , , , , and . Meanwhile, the sons of are split into two nonempty categories: and .
Definition 2. If is a grandparent of in , then is considered an incompatible -node if it has at least one son marked by (i.e.,
. If is a -node, it is considered incompatible before if it has at least one son marked by located before (i.e., ). If is a -node, it is considered incompatible after if it has at least one son marked by located after (i.e., ).
3.2. Building the Tree
We assume that the necessary condition of Lemma 1 has been verified and that all nodes that are marked by are known and are arranged in a single path that starts from the lowest marked node and goes up to the root of . To build , we examine the label of and the presence of incompatible marked nodes. When is a -node, since it is the lowest node marked by , we can divide its group of sons into a maximum of four consecutive subsets, namely, , , , and , where:
includes the first group of consecutive sons of that are either a group of white vertex nodes or total with respect to .
includes the first group of consecutive sons of that are not part of and are either a group of white vertex nodes or not related to .
includes the first group of consecutive sons of that are not part of nor of and are either a group of white vertex nodes or total with respect to .
represents the remaining sons of .
Note that as a result of this division of the sons of , when its label is , and cannot be monochromatic graphs together.
Lemma 2. Assume that is a -node. If is a bipartite -free graph, then the following conditions hold:
- (1)
has no neighbor in .
- (2)
If
is empty, then
is a monochromatic graph or a complete bipartite graph.
Proof. Suppose that is not empty, otherwise, we are done. Let it show that has no neighbor in . Since is not empty, then and are both nonempty. Let such that is adjacent to . Now, contains two adjacent vertices such that is not adjacent to ; otherwise, . Let and be two black vertices of and , respectively. By construction, there is a white vertex such that is adjacent to and is not adjacent to . But now, the set forms a , a contradiction. □
Now, condition 2 must be satisfied. Suppose that is not empty, then is also not empty.
Claim 1. Every element of is a vertex node.
Proof. Suppose that is an element of that is an internal node. Then is a -node; thus, it contains a , say, . Let , then the set forms a , a contradiction. □
Claim 2. contains a white vertex.
Proof. Suppose that does not contain any white vertex, then contains an element that is an internal node, a contradiction with Claim 1.
Let be two vertices of such that . Suppose that is neither a monochromatic graph nor a complete bipartite graph. Then contains the vertices such that is adjacent to and is independent of . Consequently, forms a , a contradiction. □
Theorem 3. Assume that there is no incompatible grandparent of . is a bipartite - free graph if and only if either:
- (1)
is a -node; or
- (2)
is a -node and Lemma 2 is holding.
Proof. The if part of the Theorem has been proved in Lemma 2. We will describe the building of
for the only if part. The building of
when
is a
-node is described in
Figure 3a. If
consists of a unique son, then this son will be a son of the node labeled
. Suppose that
is a
-node. If
is empty, then we insert
in
as a new son of
. The building of
when
is a monochromatic graph or a complete bipartite graph is also described in
Figure 3b. In this case, if
] is a monochromatic graph, then
. □
Lemma 3. Assume that is a bipartite -free graph. If there is an incompatible grandparent of , then the following conditions hold:
- (1)
is a -incompatible node after .
- (2)
is the unique incompatible grandparent of .
- (3)
The set consists of black vertex nodes located exactly after .
Proof. Suppose that is an incompatible grandparent of of type . Then there exists two adjacent vertices, , in an element of . Since induces a connected graph, it contains an induced , say, , such that is adjacent to and is independent of . But now, forms a , a contradiction.
If is a -incompatible node before α, then contains a black vertex independent of . By Corollary 1, contains a , say, , such that is adjacent to and is independent of . The set forms a , a contradiction. Consequently, is a -incompatible node after . Let us consider to be the highest incompatible grandparent of and let . □
Claim 3. There is no grandparent of containing a white vertex total for .
Proof. Let be a grandparent of and is a white vertex of the total for . Let be an induced of such that is adjacent to and independent of . Then the set forms a , a contradiction.
By this claim, if is a -incompatible node after , then the set consists of black vertex nodes located exactly after . Moreover, for every grandparent of labeled and located between and , is the last son of ; otherwise, contains a white vertex total for , a contradiction; thus, cannot be incompatible. Therefore, is the unique incompatible grandparent of . □
Theorem 4. Assume that is the unique -incompatible grandparent after and that the set consists of black vertex nodes located exactly after . is a bipartite -free graph if and only if one of the following conditions holds:
- (1)
is a -node.
- (2)
is a -node such that is an empty set.
Proof. Suppose that is a -node and let . Suppose that is nonempty. By Lemma 2, is a monochromatic graph or a complete bipartite graph. In the two cases, cannot be a monochromatic graph, otherwise, would be empty. Thus contains two adjacent vertices, . Let be a black vertex of . Since is a connected graph, then there is a white vertex, say, , in the last son of , but now forms a , a contradiction.
For the only if part, we describe the building of
. When
is a
-node, the building of
is illustrated in
Figure 4a. If the set
is a unique son, then this son must be labeled
. In this case, we delete the node
, and the element
will be a son of
. The building of
when condition 2 is satisfied is illustrated in
Figure 4b. If
is a unique son, then this son is either a node labeled
or a black vertex node. In this case, we delete the node
, and the element
will be a son of
. □
3.3. Recognition Algorithm
The recognition algorithm of bipartite
-free graphs is given by Algorithm 2, whereas the procedure of the step Build-tree
is presented in Algorithm 3.
Algorithm 2 Recognition of bipartite -free graph |
Input: a bipartite graph . Output: if is a -free graph then the canonical decomposition tree , otherwise a failure message “ is not -free graph”. Initialization step: Let be the list of all the vertices of sorted in descending order according to their degrees. new-vertex; ; Build-tree . |
Algorithm 3 Procedure Build-tree |
- (1)
Marking - (2)
Find the set is an internal node marked by - (3)
If then ) (If is independent of (resp. total for ) then create a new root of labeled such that is the left (resp. right) son of and the root of is the right (resp. left) son of ) - (4)
Else if then Exit with the message “failure”. - (5)
Else if then (according to Theorem 3) - (6)
Else if one of the two nodes of is not a grandparent of the other then Exit with the message “failure”. Else let and is the grandparent of - (7)
If is a -node then Exit with the message “failure”. - (8)
Else (according to Theorem 4) - (9)
; - (10)
If then Exit else ; ; Build-tree
|
3.4. Complexity
The aim of this section is to demonstrate that recognizing a bipartite -free graph can be accomplished in time complexity. Since the principal step of our algorithm is the step Build-tree , we will demonstrate the linearity of our algorithm by showing that this step requires only operations, where is the degree of the node in .
It is evident that step 1 runs within time, as only a maximum of nodes are marked. Furthermore, we can assume that for every node in the tree , the set of its sons that are marked by , by , or by has been calculated. So, finding the set also requires operations. Suppose that . We can check whether one of the two nodes of is a grandparent of the other as follows: Choose an element of and start to mark the parent of this element, then mark the parent of the parent, and so on until the other element of is marked or until the root of is marked. For the last case, that is, if the root of has been marked, we repeat this process for the other element of . In this manner, we can also determine the node , the lowest node marked by , and the grandparent . This process can be conducted in mark operations.
Next, we must analyze the time complexity of the function . This requires verifying the necessary conditions in Theorem 3 or Theorem 4. Therefore, we need to compute all the required sets for building the tree . If has the label , then the computation of the set and the set is straightforward. Suppose has the label . We can compute the sets , , , and as follows: First, we compute by traversing the set of sons of from left to right. In this manner, will be the first nodes that are either a set of white vertices or nodes marked by ; we continue this traversing until a son of marked by has been found. The remaining sons of marked by must belong to since is independent of according to Lemma 2. To compute , we choose a son of (let us call it ) from the remaining nodes marked by and we traverse the set of sons of starting from in the left and right directions, from the left until a son of marked by has been found and from the right also until a son of marked by has been found or until the last son from the right has been found. We continue this traversing until every son is either a white vertex node or a node marked by . As soon as the set has been computed, the set can be computed immediately. The remaining sons of form the set which must be independent of . This computation requires time complexity.
Finally, we need to determine if the node , whose label is , is incompatible after or not and check whether the set is a set of black vertex nodes located exactly after . These two conditions can be achieved together as follows: Since is known as a grandparent of , the son is identified. Now, we can traverse the sons of starting from the first son located exactly after and determine whether any one of these sons is a white vertex node or not. In addition, we must traverse the sons of starting from the first son located exactly before to determine if the set is empty or not. This traverse also requires time complexity.
We leave it to the reader to verify that the step Build-tree that corresponds to insert in the tree takes a constant time in all cases.
Since testing whether is a bipartite -free graph or not can be performed within time complexity, it is clear that recognition of the bipartite -free graph algorithm runs in time complexity.
4. Optimization Problems
We believe that the canonical decomposition tree for a bipartite -free graph can be used to find efficient solutions for several optimization graph problems because of the simple structure of this tree. In this paper, we limit ourselves to showing that the canonical decomposition tree of a bipartite -free graph can be used to solve, in polynomial time, the maximum balanced biclique problem and, in linear time, the maximum independent set problem. In the concluding section of this paper, we talk about some potential uses for this result and consider it as a subject for further study.
Let be the canonical decomposition tree for a bipartite -free graph . To present our solutions to the above two problems, we need to covert to a binary tree as follows:
Visit the nodes of in a depth-first search.
Let be an internal visited node, and are the sons of . If , then the left son of is , and the right son becomes a new son, , that has the same label as with sons .
4.1. Maximum Balanced Biclique Problem
A sub-graph
of a bipartite graph
is called a balanced biclique if
is a biclique and
. The balanced biclique problem is computing a balanced biclique in
of maximum size. This problem is important in many different fields of study. It has numerous practical uses in very-large-scale integration (VLSI), such as the design of defect-tolerant devices [
11,
12], and programmable logic array folding [
13]. The balanced biclique problem is NP-complete for a general bipartite graph [
14], and there are very few works dedicated to obtaining an exact maximum balanced biclique, aside from the work [
15] where two exact algorithms are proposed to find a maximum balanced biclique for small dense and large sparse bipartite graphs, respectively. The majority of known techniques for determining a maximum balanced biclique are heuristic algorithms (see, for example, [
16,
17]).
We propose in this work an
time complexity algorithm to compute a maximum balanced biclique in a bipartite
-free graph
using its canonical decomposition binary tree
. The idea of our solution is to compute all possible bicliques in
that are maximal with respect to set inclusion, then find among them the one that contains a maximum balanced biclique. A biclique
is maximal with respect to set inclusion if no biclique in
G contains
. The structure of
when
is a bipartite
-free graph and the definition of
operation allow us to achieve this computation by a post-order traversal of
, associating for each internal node
all possible maximal bicliques in
(with respect to set inclusion) through the two sets of maximal bicliques associated with the left son
and the right son
of
. The set of maximal bicliques associated with
denoted by
and the set of maximal bi-cliques associated with
denoted by
. We suppose that for every biclique
,
is a set of black vertices and
is a set of white vertices. In addition, we suppose that the members of
are arranged from left to right according to their appearance in the sub-tree
. Likewise, we suppose that the members of
are arranged from left to right according to their appearance in the sub-tree
. This supposition is performed directly according to the arrangement of sons for every
-node in
. The reader can simply verify the truth of computation used in Algorithm 4 for the set of maximal bicliques
according to the definition of a
-node and the definition of a
-node.
Figure 5 can help us to imagine this computation.
Algorithm 4 Balanced Bi-clique |
.
. -node, then
If or else
|
The number of bicliques computed for each internal node is at most . Since contains an node, the algorithm Balanced Bi-clique has a time complexity of .
4.2. Maximum Independent Set Problem
A subset
of the vertex set
in a graph
is called an independent set if any two vertices in
are not adjacent. The maximum independent set problem is the task of computing an independent set in
of maximum size. This problem is NP-complete for general graphs [
14], but it can be solved in
time complexity for a general bipartite graph [
18]. This time complexity can be improved to
for a bipartite
-free graph using its canonical binary decomposition tree. The idea of our solution results from the structure of
graph
as follows: Let
be a
partition of the vertex set
. By Property 1, every black vertex of
is connected to every white vertex of
, and every white vertex of
is independent of every black vertex of
. So, the maximum independent set in
is either the maximum independent set in
, the maximum independent set in
, or the independent set formed by the union of white vertices of
and black vertices of
. This remark proves the correctness of Algorithm 5. Note that if
is not connected, then the maximum independent set in
is equal to the union of the maximum independent sets in its connected components.
Algorithm 5 Maximum Independent Set |
.
. ), then ) . -node, then
-node
|
Since contains an node, the algorithm’s maximum independent set has a time complexity of .