Next Article in Journal
An Integer-Fractional Gradient Algorithm for Back Propagation Neural Networks
Next Article in Special Issue
Automated Personalized Loudness Control for Multi-Track Recordings
Previous Article in Journal
Boundary SPH for Robust Particle–Mesh Interaction in Three Dimensions
Previous Article in Special Issue
Efficient Algorithm for Proportional Lumpability and Its Application to Selfish Mining in Public Blockchains
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

The Knapsack Problem with Conflict Pair Constraints on Bipartite Graphs and Extensions

Department of Mathematics, Simon Fraser University, Surrey, BC V5A 1S6, Canada
*
Author to whom correspondence should be addressed.
Algorithms 2024, 17(5), 219; https://doi.org/10.3390/a17050219
Submission received: 24 February 2024 / Revised: 7 May 2024 / Accepted: 9 May 2024 / Published: 18 May 2024
(This article belongs to the Special Issue 2024 and 2025 Selected Papers from Algorithms Editorial Board Members)

Abstract

:
In this paper, we study the knapsack problem with conflict pair constraints. After a thorough literature survey on the topic, our study focuses on the special case of bipartite conflict graphs. For complete bipartite (multipartite) conflict graphs, the problem is shown to be NP-hard but solvable in pseudo-polynomial time, and it admits an FPTAS. Extensions of these results to more general classes of graphs are also presented. Further, a class of integer programming models for the general knapsack problem with conflict pair constraints is presented, which generalizes and unifies the existing formulations. The strength of the LP relaxations of these formulations is analyzed, and we discuss different ways to tighten them. Experimental comparisons of these models are also presented to assess their relative strengths. This analysis disclosed various strong and weak points of different formulations of the problem and their relationships to different types of problem data. This information can be used in designing special purpose algorithms for KPCC involving a learning component.

1. Introduction

Let G = ( V , E ) be an undirected graph, and for each i V = { 1 , 2 , , n } an ordered pair ( c i , a i ) is prescribed such that a i , c i 0 for all i. This non-negativity assumption can be relaxed in some of the results discussed in this paper. We refer to c i as the cost of i and a i as the weight of i. Let b R = { 0 } be a given budget. For any S V , let c ( S ) = i S c i be its cost and a ( S ) = i S a i be its weight. Then, the knapsack problem with conflict pair constraints (KPCC) is to find a stable set S in G satisfying a ( S ) b such that c ( S ) is as large as possible. The KPCC can be formulated as a 0-1 programming problem as follows:
Maximize c x Subject to : a x b x i + x j 1   for all ( i , j ) E x { 0 , 1 } n
where c = ( c 1 , c 2 , , c n ) , a = ( a 1 , a 2 , , a n ) and x T = ( x 1 , x 2 , , x n ) .
The KPCC has been investigated by many researchers, and it is known under different names. Some authors call it the maximum independent set problem with a budget constraint [1,2,3], while some others call it the disjunctively constrained knapsack problem [4,5,6,7,8,9,10]. We use the name knapsack problem with conflict pair constraints since it belongs to the broader class of combinatorial optimization problems with conflict pair constraints [11,12,13,14,15,16,17,18,19,20].
Bandyapadhyay [1] notes that the maximum weight stable set problem (MWSS) has many applications in various fields, including scheduling, wireless networks, computer graphics, map labeling, and molecular biology. The budget restriction has a relevant interpretation in most of these applications, and it provides motivation to study KPCC. Moreover, specific applications of KPCC include job scheduling in computers and selecting a non-interfering set of transmitters [1]. Other applications of KPCC also have been discussed in the literature. Further, KPCC is used in the Dantzig–Wolfe decomposition formulation of the two-dimensional bin packing problem [21].

2. Literature Review

Combinatorial optimization problems with conflict pair constraints have recently received considerable attention from the research community. These include conflict pair versions of the minimum spanning tree problem [11,12,13,14,19,20], shortest path problem [14], minimum cost matching problem [14,17], minimum cost bin packing [22,23], and maximum flow problem [18]. KPCC is yet another member in this class of optimization problems. Conflict pair constraints can easily be absorbed into a quadratic objective function. Thus, these types of problems can be formulated as quadratic combinatorial optimization problems. However, the special structure of the conflict pair constraints makes the problem interesting to study independently.
The multiple choice knapsack problem studied by Chandra et al. [24] and Nauss [25] in 1975 is essentially a KPCC, where the underlying graph is a collection of disjoint cliques. The continuous version of this problem was investigated by Ibaraki et al. [26]. Another special case of KPCC, where c j = 1 for all j, was mentioned by Bar-Noy et al. [27] in the context of resource allocation. The general problem KPCC was introduced by Yamada, Kataoka, and Watanab [10], and they proposed exact and heuristic algorithms to solve the problem. Hifi and Michrafy [6] presented different exact algorithms based on MIP formulations. Bettinelli, Cacchiani, and Malaguti [28] proposed yet another class of the branch and bound algorithm, along with extensive experimental analysis. Moreover, they presented comparisons of MIP formulations using general purpose solvers. Salem et al. [29] investigated the convex hull of feasible solutions of KPCC, i.e., the KPCC polytope. The authors obtained necessary and sufficient conditions for odd cycle inequalities associated with the stable set problem to be facet-defining for the KPCC polytope. Similar conditions were developed for the cover inequalities of the knapsack polytope in connection with the KPCC polytope. They also analyzed different lifting procedures to obtain additional valid inequalities. Exploiting these inequalities, the authors proposed an effective branch and bound algorithm to solve KPCC and reported the results of extensive computational experiments.
Heuristic algorithms for KPCC have been investigated by many researchers, and the results of extensive experimental analysis with these algorithms are available. Hifi and Michrafy [5] developed a reactive-local-search-based algorithm and also generated a class of test instances based on the ideas from [10]. Akeb et al. [4] proposed local-branching-based heuristics and provided an experimental analysis based on instances generated by [5]. Hifi and Otmani [7] proposed a scatter-search-based metaheuristic algorithm along with results of an experimental analysis using test instances from [5]. Recently, Hifi [9] proposed an iterative-rounding-search-based algorithm. Their experimental results using test instances from [5] were promising and were able to obtain the best known solutions for many benchmark instances. Salem et al. [30] developed a probabilistic tabu search algorithm to solve KPCC and reported extensive computational results.
Pferschy and Schauer [31] investigated KPCC for several special cases of the graph G. They showed that KPCC can be solved in pseudo-polynomial time when G is a tree and more generally when G is a graph with bounded treewidth or chordal. Fully polynomial-time approximation schemes (FPTASs) are also derived for these classes of graphs. Further, they proved that KPCC remains strongly NP-hard on perfect graphs. It may be noted that the stable set problem is polynomial-time-solvable on perfect graphs. Bandyapadhyay [1] also considered KPCC on trees, but the algorithm discussed in [31] is faster for this case. Moreover, [1] presents pseudopolynomial algorithms for cycles, forests, k-outerplanar graphs, and interval graphs. In another paper, Pferschy and Schauer [32] investigated approximation algorithms for KPCC under various restrictions on G. They showed that KPCC admits FPTASs on weakly chordal graphs and is solvable by PTAS (not FPTASs) on planar graphs.
Kalra et al. [2] studied another special case of KPCC, where a j = 1 for all j = 1 , 2 , , n and G is a multipartite graph. They proposed a 1 k -approximation algorithm, where k is the number of partite sets, and proved that the performance bound established is tight. If a j = 1 and c j equal to the degree of j, for j = 1 , 2 , , n , KPCC reduces to the maximum independent vertex coverage problem (MIVC). The authors proved approximation hardness results for MIVC and showed that MIVC is NP-hard on bipartite graphs. Further, they established bounds on the integrality for the LP relaxation of a clique-based formulation of MVIP. Bandyapadhyay [1] investigated another special case of KPCC, where c j = 1 for all j. This problem is called the maximum budget independent set problem (MBIS), and the author presented a factor d polynomial time approximation algorithm for the problem on ( d + 1 ) -claw free graphs.
In KPCC, if we restrict the budget constraint to be satisfied as an equality, we obtain an instance of the exact knapsack problem with conflict pair constraints (KPCC-exact). The feasibility version of this problem was investigated by Milanic and Monnot [3,33], where it was shown that the problem is strongly NP-complete on bipartite graphs with maximum vertex degree of three. The authors also presented a pseudo-polynomial algorithm for the problem in cographs, chordal graphs, and interval graphs.
A generalization of KPCC involving more than one knapsack constraint was studied by Gabriel [34], where a Dantzig–Wolfe decomposition scheme was proposed. Atamtürk et al. [35] used conflict graphs in developing algorithms for 0-1integer programs.
The quadratic knapsack problem (QKP) [36] can be stated as
Maximize x t Q x + c x Subject to : a x b x { 0 , 1 } n
where Q = ( q i j ) is an n × n matrix.
Although the QKP appears to be more general than KPCC, we now observe that QKP and KPCC are essentially equivalent, in the sense that one is a special case of the other.
Theorem 1. 
QKP and KPCC are equivalent.
Proof. 
Define the matrix Q = ( q i j ) such that q i j = M , where M is a large positive number if ( i , j ) E and q i j = 0 otherwise. With this choice of Q, the problem KPCC reduces to QKP. Thus, KPCC is a special case of QKP.
Let us now prove the converse. That is, QKP is a special case of KPCC. This is, however, achieved by appropriate modifications in the well-known reduction of a quadratic unconstrained binary optimization problem (QUBO) to the maximum weight stable set problem [37,38] to handle the budget constraint. Thus, KPCC can be viewed as a generalization of QKP. □
For further details on QUBO, refer to [39]. The major contributions of the paper can be summarized as follows.
  • We present new complexity results on KPCC along with a thorough state-of-the-art review of the literature. Also, we show that KPCC and QKP are equivalent.
  • When the conflict graph is a complete bipartite graph, it is shown that KPCC decomposes into two knapsack problems. As a consequence, we have new polynomially solvable (and pseudo-polynomially solvable) special cases of KPCC and have special cases of KPCC that admit FPTASs. These results are extended to more general classes of graphs that accept a blakbox oracle with special properties. On a star (which is a special bipartite graph), the problem is shown to be NP-hard.
  • A new integer programming formulation that unifies and generalizes existing formulations of KPCC on general graphs is given. The strengths of the LP relaxation of this formulation and of special cases are analyzed theoretically.
  • Different methods are proposed to tighten our general integer programming formulation, and these methods are compared using the general purpose solver Gurobi.

3. KPCC on Bipartite Graphs

Let G = ( V 1 V 2 , E ) be a bipartite graph with the generic bipartition of its vertex set as V 1 V 2 , where V 1 = { 1 , 2 , , m } and V 2 = { m + 1 , m + 2 , , m + n } . Note that KPCC is trivial to solve when G is a complete graph and is the same as the knapsack problem when G is a collection of isolated nodes. When G is a tree, Pferschy and Schauer [31] showed that KPCC is NP-hard but solvable in O ( n b 2 ) time and O ( n b ) space. Further, they showed that the algorithm can be modified to obtain a fully polynomial approximation scheme (FPTASs) for KPCC. Trees, in some sense, can be viewed as an extreme case of sparse connected bipartite graphs. Let us now look at KPCC on the complete bipartite graph K m , n = ( V 1 V 2 , E ) . Although KPCC is trivial on a complete graph, this simplicity does not extend to K m , n .
Theorem 2. 
KPCC is NP-hard even if the conflict graph is a star (i.e., K 1 , n ). Further, on a complete bipartite graph, KPCC can be solved in pseudopolynomial time and it admits FPTASs.
Proof. 
It is not difficult to reduce the knapsack problem to a KPCC on K 1 , n and this establishes the first part of the theorem. To prove the second part, note that for any solution x of a KPCC on K m , n , if x i = 1 for any i V 1 then by the conflict pair constraints, x i = 0 for all i V 2 and vice versa. Thus, KPCC on K m , n reduces to two knapsack problems
KP 1 : Maximize j V 1 c j x j Subject to : j V 1 a j x j b x j { 0 , 1 } for all j V 1
and
KP 2 : Maximize j V 2 c j x j Subject to : j V 2 a j x j b x j { 0 , 1 } for all j V 2
The best solution amongst the solutions of KP1 and KP2 solves KPCC on K m , n . Since the knapsack problem can be solved in pseudopolynomial time and it admits FPTASs, the second part of the theorem follows. □
From the above theorem, if KP1 and KP2 are solvable in polynomial time, then the corresponding KPCC on K m , n is also solvable in polynomial time. If a j = 1 for all j V 1 V 2 , then obviously KP1 and KP2 are solvable in polynomial time; hence, the corresponding KPCC on K m , n is also solvable in polynomial time. This is interesting since KPCC on a general bipartite graph is NP-hard even if a j = 1 for all j [31]. Deineko and Woeginger [40] showed that the cross-ratio-ordered bounded knapsack problem on n variables can be solved in O ( n ) time. This, together with Theorem 2, leads to the following theorem.
Theorem 3. 
If the costs c i and weight a i for i V 1 V 2 satisfy a i + 1 a i c i + 1 c i   f o r   i = 1 , 2 , m 1 and a i + 1 a i c i + 1 c i   f o r   i = m + 1 , m + 2 , m + n 1 , then KPCC on K m , n can be solved in polynomial time.
We can also mix conditions for different solvable cases for KP1 and KP2 to obtain solvable instances of KPCC on K m , n . For example, if a i = α for all i V 1 and a i + 1 a i c i + 1 c i  for  i = m + 1 , m + 2 , m + n 1 , then KPCC on K m , n can also be solved in polynomial time. Later, we present additional conditions for polynomially solvable special cases of the knapsack problem that can be used in different combinations for KP1 and KP2 to produce polynomially solvable cases of KPCC on K m , n .
Let G = ( V 1 V 2 , E ) be an undirected graph such that the subgraphs induced by V 1 and V 2 belong to a family F of graphs with specific properties. We call such graphs F -bipartite (see Figure 1 for an example). If an F -bipartite graph contain all edges ( i , j ) for i V 1 , j V 2 , then it is called a complete F -bipartite graph. Bonamy et al. [41] studied F -bipartite graphs, where the induced subgraph of V 1 is a collection of isolated nodes and the induced subgraph of V 2 is a k-degenerate graph. Depending on the properties imposed on the family F , the F -bipartite structure can have algorithmic advantages in solving some optimization problems. For example, F could contain all classes of graphs on which the KPCC can be solved in pseudo-polynomial time. In this case, F includes graphs that are isolated vertices, trees, complete bipartite graphs, complete graphs, chordal graphs, interval graphs, cographs, and circular arc graphs.
Assume that for a F -bipartite graph, the bipartition V 1 and V 2 along with the structure of the subgraphs induced by V 1 and V 2 are given. Then, the results obtained in the previous sections on the solvability of KPCC can be extended to F -bipartite graphs.
Theorem 4. 
KPCC can be solved in pseudo-polynomial time on a complete F -bipartite graph G = ( V 1 V 2 , E ) if KPCC can be solved in pseudo-polynomial time on graphs in F . Further, KPCC admits FPTASs on G whenever KPCC admits FPTASs on graphs in F .
Proof. 
The proof of the above theorem is similar to that of Theorem 2, except that instead of KP1 and KP2 we will have problems of the type KPCC but with reduced sizes. However, we present the complete proof of the theorem here to facilitate further related discussions. Let G 1 = ( V 1 , E 1 ) be the subgraph of G induced by V 1 and G 2 = ( V 2 , E 2 ) be the subgraph of G induced by V 2 . Since every vertex in V 1 is connected to every vertex in V 2 , for any solution x of the KPCC, if x i = 1 for any i V 1 then x i = 0 for all i V 2 and vice versa. Thus, KPCC reduces to the following reduced KPCCs.
KPCC 1 : Maximize j V 1 c j x j Subject to : j V 1 a j x j b x i + x j 1   for   ( i , j ) E 1 x j { 0 , 1 }   for all   j V 1
and
KPCC 2 : Maximize j V 2 c j x j Subject to : j V 2 a j x j b x i + x j 1   for   ( i , j ) E 2 x j { 0 , 1 }   for all   j V 2
The best solution amongst the solutions of KPCC1 and KPCC2 provides an optimal solution to KPCC. By assuming the properties of F , KPCC1 and KPCC2 can be solved in pseudo-polynomial time. The proof of the second part of the theorem also follows in an analogous way. □
Theorem 4 is a proper generalization of Theorem 2.
The results discussed above extend in a natural way to complete multi-partite graphs. However, to take any computational advantage we need to know the partite sets a priori or need to compute them. Bipartite graphs can be recognized in polynomial time but recognizing p-partite graphs for p > 2 is NP-complete [42]. If there are p partite sets, then we will be solving p knapsack problems.

General Bipartite Graphs

We now consider KPCC on a general bipartite graph G = ( V 1 V 2 , E ) , where V 1 = { 1 , 2 , , m } and V 2 = { m + 1 , m + 2 , , m + n } . Note that we are considering a maximization problem. Consider the maximization version of a combinatorial optimization problem such that the objective function value of its feasible solutions are positive. Let x * be any feasible solution to such a problem and x 0 be a corresponding optimal solution. Then, x * is said to be ϵ -optimal if O B J ( x 0 ) O B J ( x * ) ϵ , where O B J ( x ) is the objective function value of the solution x . When ϵ = 1 , then x * is an optimal solution. Consider KP1 and KP2, as indicated in Theorem 2. Let x 1 ¯ and x 2 ¯ be ϵ -optimal solutions to KP1 and KP2, respectively. Define the solutions x ^ 1 and x ^ 2 , where
x ^ j 1 = x ¯ j 1 if æ V 1 0 otherwise and x ^ j 2 = x ¯ j 2 if æ V 2 0 otherwise
Theorem 5. 
The best solution amongst x ^ 1 and x ^ 2 is a 2 ϵ -optimal solution to KPCC on G = ( V 1 V 2 , E ) .
Proof. 
Let x 0 be an optimal solution to KPCC on G = ( V 1 V 2 , E ) . Define the solutions x * and x * * such that
x j * = x j 0 if æ V 1 0 otherwise and x j * * = x j 0 if æ V 2 0 otherwise
Let x 1 * be the restriction of x * to V 1 and x 2 * * be the restriction of x * * to V 2 . Then, x 1 * and x 2 * * are feasible solutions of KP1 and KP2, respectively. Then, by the ϵ -optimality of x ^ 1 and x ^ 2 to KP1 and KP2, we have
j V 1 c j x ^ j 1 ϵ j V 1 c j x j 1 * = ϵ c x *
and
j V 2 c j x ^ j 2 ϵ j V 2 c j x j 2 * * = ϵ c x * *
Without a loss of generality, assume c x ^ 1 c x ^ 2 . Then,
c x 0 = c x * + c x * * ϵ c x ^ 1 + ϵ c x ^ 2 2 ϵ c x ^ 1 .
An approximation algorithm A for a combinatorial optimization problem (in maximization form) is said to be a δ-fully polynomial time approximation scheme ( δ -FPTASs) if it guarantees a solution x * such that O B J ( X 0 ) δ ( 1 + ϵ ) O B J ( x * ) , where x 0 is an optimal solution and A runs in polynomial time in the input size and 1 ϵ for any ϵ > 0 . Thus, a 1 F P T A S s is precisely an F P T A S s . Since KP1 and KP2 admits FPTASs, from Theorem 5, KPCC admits 2 F P T A S s . This result is interesting because the problem is strongly NP-complete on bipartite graphs with maximum vertex degree of three [3,33]. Further, when KP1 and KP2 are solvable in polynomial time, KPCC on a general bipartite graph can be solved by a polynomial time 2-approximation algorithm. When a j = 1 for all j, Theorem 5 reduces to a corresponding result obtained by Kalra et al. [2], and for the special case, they showed that the performance bound is asymptotically tight. We summarize these observations in the following corollary.
Corollary 1. 
KPCC on a bipartite graph admits 2-FPTASs. Further, when KP1 and KP2 are solvable in polynomial time, then a 2-optimal solution to KPCC on a bipartite graph can be obtained in polynomial time, and in this case the bound 2 is asymptotically tight.
The concept of F -bipartite graphs can be extended to the more general case of F -multipartite graphs. Let G = k = 1 p V k , E be an undirected graph such that the subgraphs induced by V k for any k = 1 , 2 , , p belong to the family F . We call G a F -multipartite graph. If ( i , j ) E for any i V r , j V s for r s , r , s = 1 , 2 , p , then G is called a complete F -multipartite graph. Theorem 4 and the discussions that follow extend in a natural way to complete F -multipartite graphs.

4. Integer Programming Formulations

Let us now discuss some integer programming formulations of the KPCC. For each vertex i V , let A ( i ) = { j V : ( i , j ) E } and the sets N i ( 1 ) , N i ( 2 ) , , N i ( p i ) be a given partition of A ( i ) , where N i ( k ) for any k = 1 , 2 , p i , N i ( r ) N i ( s ) = whenever r s , and A ( i ) = k = 1 p i N i ( k ) . Then, KPCC can be formulated as the 0-1 programming problem
StarIP : Maximize j V c j x j Subject to : j V a j x j b j N i ( k ) x j | N i ( k ) | 1 x i   for   k = 1 , 2 , p i , i = 1 , 2 , n x j { 0 , 1 }   for all   j V
The above formulation reduces to the standard integer programming formulation of the KPCC when each N i ( k ) is singleton, i.e., p i = | A ( i ) | for all i. When p i = 1 for all i then N i ( 1 ) = A ( i ) , and the above integer program reduces to
MaxStarIP : Maximize j V c j x j Subject to : j V a j x j b j A ( i ) x j | A ( i ) | ( 1 x i )   for   i = 1 , 2 , n x j { 0 , 1 }   for all   j V
Thus, our general integer programming framework StarIP provides a class of integer programming formulations of KPCC that subsumes two well-studied formulations.
Theorem 6. 
Among all of the choices of the partition N i ( 1 ) , N i ( 2 ) , , N i ( p i ) for StarIP, the standard formulation is the strongest and MaxStarIP is the weakest in terms of their LP relaxation values.
Proof. 
Let x * = ( x 1 * , x 2 * , , x n * ) be any feasible solution to the LP relaxation of the standard formulation. Then,
x i * + x j * 1   for all   ( i , j ) E
We successfully show that x * is a feasible solution to the LP relaxation of StarIP for any partition N i ( 1 ) , N i ( 2 ) , , N i ( p i ) . Choose a set N i ( k ) for the vertex i. Now, by adding the edge inequalities from (5) for all ( i , j ) E such that j N i ( k ) , we obtain
j N i ( k ) ( x i * + x j * 1 ) = j N i ( k ) x j * | N i ( k ) | ( 1 x i * ) .
Thus, any feasible solution to the standard integer programming formulation of the KPCC is also a solution to the StarIP. Thus, the LP relaxation of the standard formulation is the strongest among the LP relaxation of any formulation within the class of StarIP. The second part of the theorem can be proved in an analogous way. □
Note that, for the LP relaxation of StarIP (for any choice of the partition of A ( i ) ), x i = 1 2 for all i as a feasible solution, provided that 1 2 j V a j b . One way to strengthen or tighten StarIP is by computing upper bounds on the stability number of the subgraph G ( i , k ) induced by N i ( k ) . For example, if this subgraph is perfect, we can calculate the stability number exactly. If α is the largest cardinality of a matching in this graph, then | N i ( k ) | can be replaced by | N i ( k ) | α . Another way to tighten the formulation StarIP is as follows: let γ ( i , k ) be the objective function value of the LP relaxation of the standard formulation of KPCC restricted to G ( i , k ) , where c i = 1 for all i. Then, | N i ( k ) | can be replaced by γ ( i , k ) . This number can be viewed as a fractional budgeted stability number. We can use other similar upper bounds to strengthen StarIP. For a review of different upper bounds that can be easily calculated, we refer to [43]. By tightening StarIP this way, we can obtain a better formulation for KPCC.
Let A ( i ) = { j V : ( i , j ) E , j < i } and N i ( 1 ) , N i ( 2 ) , , N i ( p i ) be a given partition of A ( i ) . We can replace N i ( k ) by N i ( k ) in StarIP to obtain a valid formulation, say StarIP, of KPCC. Likewise, we can replace A ( i ) by A ( i ) in MaxStarIP to obtain a valid formulation, say MaxStarIP, for KPCC. The formulation MaxStarIP has been studied by Hifi et al. [6]. The coefficient matrices of these modified formulations are sparser. However, tightening the resulting formulations by using upper bounds as discussed above are likely to yield weaker LP relaxations, in general, compared to tightening the corresponding formulation of StarIP and MaxStarIP. Moreover, any possible computational advantage achieved by sparsity over the suspected weaker LP relaxation needs to be analyzed experimentally.
Based on the ideas used in Theorem 2, we now present a single integer programming formulation of KPCC on K m , n .
KPCC m , n : Maximize j V 1 V 2 c j x j Subject to : j V 1 a j x j b j V 2 a j x j b
j V 1 x j m ( 1 x i )   for   i V 2
j V 2 x j n ( 1 x i )   for   i V 1
x j { 0 , 1 }   for all   j V 1 V 2
Note that constraint (6) guarantees that if any x i = 1 for i V 2 then x i = 0 for all i V 1 . Likewise, constraint (7) guarantees that if any x i = 1 for i V 1 then x i = 0 for all i V 2 .

4.1. Experimental Analysis

The formulation MaxStarIP has been studied and used in algorithms to solve KPCC [6]. There are also effective branch-and-bound algorithms to solve KPCC for general graphs [6,28,44]. However, to the best of our knowledge, there is no computational study available that compares the different formulations of KPCC. Note that the complexity of KPCC can vary significantly depending on the structure of the underlying graph and the level of tightness of the budget constraint. Also, tight efficiently computable upper bound estimates on the stability number of a graph can affect the efficacy of our formulations StarIP and MaxStarIP. The following Table 1 provides some easily computable upper bounds on the stability number of the graph G = ( V , E ) .
In the table above, Δ denotes the maximum degree and δ denotes the minimum degree of vertices in the graph G = ( V , E ) .
Recall that the integer programming formulation MaxStarIP belongs to the class StarIP. Therefore, it can be strengthened by replacing | A ( i ) | with an upper bound on the stability number of the subgraph G ( i ) of G induced by A ( i ) . When MaxStarIP is strengthened using the bound UBk obtained from G ( i ) to replace | A ( i ) | , k = 1 , 2 , 3 , 4 , 5 , 6 , we denote the resulting MaxStarIP formulation by MaxStarIPk. Thus, in addition to MaxStarIP, we have the strengthened formulations MaxStarIP1, MaxStarIP2, MaxStarIP3, MaxStarIP4, MaxStarIP5, and MaxStarIP6. The major goals of the experimental analysis were to:
  • Compare the relative performance of the standard KPCC formulation given in the introduction, MaxStarIP, and its variations MaxStarIPk, k = 1 , 2 , 3 , 4 , 5 , 6 using the general purpose solver GUROBI.
  • Study the impact of the tightness of the budget constraints on the formulations that we compare.
  • Study the impact of sparsity of G on the formulations that we compare.
  • Explore the heuristic value of the formulations.
It may be noted that UB1 will be at least as tight as UB2 and that UB4 applies to a connected graph. For these reasons, we will not use UB2 and UB4 in our experiments.
All of the computational experiments were carried out on a PC with the Windows 10 Enterprise 64-bit operating system, Intel(R) Core(TM) i7-3770 CPU @ 3.40 GHz, and 16.0 GB of memory. The calling program was written in Python (Python 3.6.1) and called GUROBI 9.0 using the interface gurobipy. The time limit for GUROBI was set to 3600 s. Most of the test problems were solved to optimality within this time limit, except some large or structured instances.

4.2. Benchmark Instances

Our experiments used benchmark instances selected from Bettinelli et al. [28] and instances generated using the DIMACS clique graph library [48]. The instances of Bettinelli et al. [28] have three data sets: R1, R2, and R10. Each data set consists of eight classes, and each class has many instances. For the data set R1, in the first four classes, the items have a uniformly distributed weight from the range [20, 100], and the knapsack capacity is set to b = 150 . The number n of items is 120, 250, 500, and 1000, respectively. The last four classes have uniformly distributed weights from [250, 500], and the knapsack capacity is set to b = 1000 . The conflict graphs were generated randomly. For the data set R1, classes 1 to 4 have a total of 360 instances and classes 5 to 8 have a total of 360 instances. Thus, the data set R1 has a total of 720 instances. The data set R3 is similar to R1 except that the budget b is set to 3 × 150 = 450 . Likewise, the data set R10 is almost identical to R1 except that the budget b is set to 10 × 150 = 1500 . For details on these instances, we refer to the paper [28].
For our computational experiments, we selected instances from the first four classes of each of the data sets R1, R3, and R10. We categorized these instances further into small, medium, and large. The small instances consist of conflict graphs with 120 to 250 vertices, the medium instances consist of conflict graphs with 500 vertices, and the large instances consist of conflict graphs with 1000 vertices. From each category, we selected 120 instances using a prescribed selection rule. We refer to the aforementioned class of instances as random data instances.
The DIMACS clique graph library consists of unweighted graphs. We generated two sets of KPCC benchmarks out of these instances, called positively correlated problems and negatively correlated problems. For positively correlated problems, the costs and weights have the same ordering, whereas for the negatively correlated problems, the costs and weights have opposite ordering. We used graphs that consist of 171 to 1024 vertices. These instances are further classified into small, medium, and large sizes. The small instances consist of graphs with 171 to 378 vertices, the medium instances consist of graphs with 400 to 500 vertices, and the large instances consist of 700 to 1024 vertices. There are 23 small instances, 24 medium instances, and 13 large instances. The DIMACS graphs were originally generated as clique benchmarks. To obtain stable set instances, we took the complement of these graphs. Let G = ( V , E ) be such a complement graph. For each i V , we generated the cost c i and the weight a i as uniformly distributed random integers in the range [ 1 , | V | ] . To obtain positively correlated data, we first sort the vectors c and a in non-decreasing order and then apply the same random index permutation to both vectors. Negatively correlated instances are constructed in a similar manner but with opposite ordering. The budgets for the correlated instances are set as follows. First, we generate a random subset S of the vertices of G such that the cardinality of S is the known size of the maximum cardinality stable set on G and set b = i S a i . Then, instances are generated by setting the budget equal to the value b scaled by the factors 0.25, 0.50, and 0.75. The instances we used in our experiments are available at https://github.com/jasdeepdhahan/kpcc_instances.git.

4.3. Experimental Results

Let us now discuss the experimental outcomes of our analysis. First, we compared the standard KPCC formulation given in the introduction to MaxStarIP and its variations MaxStarIP1, MaxStarIP3, MaxStarIP5, and MaxStarIP6 using all of the test instances. Table 2 provides some insight into the relative strength of our formulations based on average running times (in seconds). The numbers marked in bold letters correspond to the lowest computational time taken. The experimental results disclose that there is no consistently superior formulation of KPCC among the ones we tested.
The efficacy of various formulations could also be dependent on how tight the budget constraint is and what special structure the underlying graph has. Table 3 presents the experimental results after classifying the budget constraint in the test instances as tight, very tight, and moderately tight. Table 4 presents the experimental results after classifying the random test instances based on tightness of the budget constraints as well as the density of the underlying graph. We sometimes refer to a KPCC instance as sparse or dense. A sparse (dense) KPCC instance has a sparse (dense) underlying graph. The results on the correlated test instances are classified only with respect to budget tightness since the density of the underlying graphs was uniform and generally sparse. These results are presented in Table 5.
After this categorized analysis, the standard formulation appears as the preferred formulation overall, if one is constrained to recommend only one formulation. However, it may be noted that MaxStarIP appears to be more suited for sparse small instances with the tightest and loosest budgets. In addition, MaxStarIP outperforms the standard formulation on sparse medium and large instances with the tightest budgets. For our medium and large instances, as the underlying graph density increased the standard formulation became more robust than MaxStarIP. It is also important to point out that 8 out of 120 medium-sized instances were not solved to optimality within the time limit provided, either by the standard formulation or by the MaxStarIP type formulations. In addition, 30 of the 120 large instances with the loosest budget were not solved to optimality within the time limit specified by either of the aforementioned formulations.
Now, let us compare the standard formulation and MaxStarIP type formulations over the correlated data. We found that the positively correlated instances were easier to solve than the negatively correlated instances. Increasing the budget within limits generally increased the running time of our formulations. Large negatively correlated instances often hit the time limit set for the experiments. The standard formulation generally outperformed MaxStarIP over our negatively correlated data set. We further observed that MaxStarIP is slightly better than the standard formulation for negatively correlated large instances with the loosest budget. For positively correlated data, MaxStarIP is best suited for medium instances and the standard formulation is the strongest for our small and large instances.
It may also be noted that the standard formulation is the most robust in terms of running times, followed by MaxStarIP1, and there is no clear formulation that wins third place. MaxStarIP1 outperformed our other KPCC formulations over denser and larger random instances, while the standard formulation showed superiority on sparser large random instances. Each of the formulations MaxStartIP, MaxStarIP3, MaxStarIP5, and MaxStarIP6 were found to be the preferred formulation for at least one of the random data set classifications in Table 4. Based on this, we conclude that there is no one formulation that is best suited for our positively correlated data set. The standard formulation is best suited for our medium and small negatively correlated data. In addition, MaxStarIP3 outperformed the other formulations over our larger negatively correlated instances with the tightest budgets, and MaxStarIP5 outperformed the other formulations in Table 5 for the remaining large negatively correlated KPCC instances.
The frequency distribution of the fastest running times can provide further insight into the complexity of KPCC that averaging out the running times could not provide. For this analysis, we consider only the test instances that were solved to optimality within the time limit specified. In the event of a tie, any formulations in a tie for the fastest running time were considered to be equally good. From Table 6, we observe that the standard formulation is the preferred formulation followed by MaxStarIP1, and there is no clear winner for third place, based on frequency analysis.

5. Conclusions

In this paper, we studied the KPCC from various points of views. After a thorough literature survey on the topic, we focussed our attention on bipartite conflict graphs. For a complete bipartite (multipartite) graphs, the problem is shown to be NP-hard but solvable in pseudo-polynomial time and admits FPTASs. Extensions of these results to more general classes of graphs are also presented. We then introduced an integer programming model for KPCC with general conflict graphs, which generalizes and unifies existing formulations. The strength of the LP relaxations of these formulations are analyzed and also discussed in different ways to tighten them. An experimental comparison of our models is also presented to assess their relative strengths. This analysis disclosed various strong and weak points of our formulations and their linkages to the structure of the problem data. The analysis shows some preference towards the standard formulation; none of the formulations uniformly dominated others in all categories of the test data. In any case, the insights generated could be used effectively in the design of special purpose algorithms for KPCC involving some learning components. Such approaches proved useful in the case of other combinatorial optimization problems (e.g., [49]). This study can be followed on with future work.

Author Contributions

Conceptualization, A.P.P.; methodology, A.P.P. and J.D.; software, J.D.; validation, J.D.; formal analysis, A.P.P. and J.D.; investigation, A.P.P. and J.D.; resources, A.P.P.; data curation, J.D.; writing – original draft preparation, J.D.; writing—review and editing, A.P.P.; visualization, J.D.; supervision, A.P.P.; project administration, A.P.P.; funding acquisition, A.P.P. All authors have read and agreed to the published version of the manuscript.

Funding

This work was supported by an NSERC discovery grant awarded to Abraham P. Punnen.

Data Availability Statement

Our data is available to the public from “https://github.com/jasdeepdhahan/kpcc_instances.git”.

Conflicts of Interest

The authors declare no conflict of interest.

References

  1. Bandyapadhyay, S. A variant of the maximum weight independent set problem. arXiv 2014, arXiv:1409.0173. [Google Scholar]
  2. Kalra, T.; Mathew, R.; Pal, S.P.; Pandey, V. Maximum weighted independent with a budget. In Proceedings of the Algorithms and Discrete Applied Mathematics: Third International Conference, CALDAM 2017, Sancoale, Goa, India, 16–18 February 2017; Gaur, D., Narayanaswamy, N., Eds.; Proceedings 3. Springer: Cham, Switzerland, 2017; Volume 10156, pp. 254–266. [Google Scholar]
  3. Milanic, M.; Monnot, J. The exact weighted independent set problem in perfect graphs and related classes. Electron. Notes Discret. Math. 2009, 35, 317–322. [Google Scholar] [CrossRef]
  4. Akeb, H.; Hifi, M.; Mounir, M. Local branching-based algorithms for the disjunctively constrained knapsack problem. Comput. Ind. Eng. 2011, 60, 811–820. [Google Scholar] [CrossRef]
  5. Hifi, M.; Michrafy, M. A reactive local search algorithm for the disjunctively constrained knapsack problem. J. Oper. Res. Soc. 2006, 57, 718–726. [Google Scholar] [CrossRef]
  6. Hifi, M.; Michrafy, M. Reduction strategies and exact algorithms for the disjunctively constrained knapsack problem. Comput. Oper. Res. 2007, 34, 2657–2673. [Google Scholar] [CrossRef]
  7. Hifi, M.; Otmani, N. An algorithm for the disjunctively constrained knapsack problem. Int. J. Oper. Res. 2012, 13, 22–43. [Google Scholar] [CrossRef]
  8. Hifi, M.; Saleh, S.; Wu, L.; Chen, J. A hybrid guided neighborhood search for the disjunctively constrained knapsack problem. Cogent Eng. 2015, 2, 1068969. [Google Scholar] [CrossRef]
  9. Hifi, M. An iterative rounding search-based algorithm for the disjunctively constrained knapsack problem. Eng. Optim. 2014, 46, 1109–1122. [Google Scholar] [CrossRef]
  10. Yamada, T.; Kataoka, S.; Watanabe, K. Heuristic and exact algorithms for the disjunctively constrained knapsack problem. Inf. Process Soc. Jpn. J. 2002, 43, 2864–2870. [Google Scholar]
  11. Carrabs, F.; Cerrone, C.; Pentangelo, R. A multiethnic genetic approach for the minimum conflict weighted spanning tree problem. Networks 2019, 74, 134–147. [Google Scholar] [CrossRef]
  12. Carrabs, F.; Cerulli, R.; Pentangelo, R.; Raiconi, A. Minimum spanning tree with conflicting edge pairs: A branch-and-cut approach. Ann. Oper. Res. 2021, 298, 65–78. [Google Scholar] [CrossRef]
  13. Darmann, A.; Pferschy, U.; Schauer, J. Determining a minimum spanning tree with disjunctive constraints. In Lecture Notes in Computer Science; including subseries Lecture Notes in Artificial Intelligence and Lecture Notes in Bioinformatics; Springer: Berlin/Heidelberg, Germany, 2009; pp. 414–423. [Google Scholar]
  14. Darmann, A.; Pferschy, U.; Schauer, J.; Woeginger, G.J. Paths, trees and matchings under disjunctive constraints. Discret. Appl. Math. 2011, 159, 1726–1735. [Google Scholar] [CrossRef]
  15. Elhedhli, S.; Li, L.; Gzara, M.; Naoum-Sawaya, J. A branch-and-price algorithm for the bin packing problem with conflicts. INFORMS J. Comput. 2011, 23, 404–415. [Google Scholar] [CrossRef]
  16. Gendreau, M.; Laport, G.; Semet, F. Heuristics and lower bounds for the bin packing problem with conflicts. Comput. Oper. Res. 2004, 31, 347–358. [Google Scholar] [CrossRef]
  17. Oncan, T.; Zhang, R.; Punnen, A.P. The minimum cost perfect matching problem with conflict pair constraints. Comput. Oper. Res. 2013, 40, 920–930. [Google Scholar] [CrossRef]
  18. Pferschy, U.; Schauer, J. The maximum flow problem with disjunctive constraints. J. Comb. Optim. 2013, 26, 109–119. [Google Scholar] [CrossRef]
  19. Zhang, R.; Kabadi, S.N.; Punnen, A.P. The minimum spanning tree problem with conflict constraints and its variations. Discret. Optim. 2011, 8, 191–206. [Google Scholar] [CrossRef]
  20. Samer, P.; Urrutia, S. A branch and cut algorithm for minimum spanning trees under conflict constraints. Optim. Lett. 2014, 9, 41–55. [Google Scholar] [CrossRef]
  21. Pisinger, D.; Sigurd, M. Using decomposition techniques and constraint programming for solving the two-dimensional bin-packing problem. INFORMS J. Comput. 2007, 19, 36–51. [Google Scholar] [CrossRef]
  22. Sadykov, R.; Vanderbeck, F. Bin packing with conflicts: A generic branch-and-price algorithm. INFORMS J. Comput. 2013, 25, 244–255. [Google Scholar] [CrossRef]
  23. Fernandes-Muritiba, A.E.; Iori, M.; Malaguti, E.; Toth, P. Algorithms for the bin packing problem with conflicts. INFORMS J. Comput. 2010, 22, 401–415. [Google Scholar] [CrossRef]
  24. Chandra, A.K.; Hirschberg, D.S.; Wong, C.K. Approximate algorithms for the knapsack problem and its generalizations. In IBM Research Report; RC56l6; IBM T. J. Watson Research Center: New York, NY, USA, 1975. [Google Scholar]
  25. Nauss, R.M. The 0-1 Knapsack Problem with Multiple Choice Constraints; University of Missouri-St. Louis: St. Louis, MO, USA, 1975; (Revised in 1976). [Google Scholar]
  26. Ibaraki, T.; Hasegawa, T.; Teranaka, K.; Iwase, J. The multiple choice knapsack problem. J. Oper. Res. Soc. Jpn. 1978, 21, 59–93. [Google Scholar]
  27. Bar-Noy, A.; Bar-Yehuda, R.; Freund, A.; Naor, J.; Schieber, B. A unified approach to approximating resource allocation and scheduling. J. ACM 2001, 48, 1069–1090. [Google Scholar] [CrossRef]
  28. Bettinelli, A.; Cacchiani, V.; Malaguti, E. A branch-and-bound algorithm for the knapsack problem with conflict graph. INFORMS J. Comput. 2017, 29, 457–473. [Google Scholar] [CrossRef]
  29. Salem, M.B.; Taktak, R.; Mahjoub, A.R.; Ben-Abdallah, H. Optimization algorithms for the disjunctively constrained knapsack problem. Soft Comput. 2018, 22, 2025–2043. [Google Scholar] [CrossRef]
  30. Salem, M.B.; Hanafi, S.; Taktak, R.; Ben-Abdallah, H. Probabilistic Tabu search with multiple neighborhoods for the Disjunctively Constrained Knapsack Problem. RAIRO-Oper. Res. 2017, 51, 627–637. [Google Scholar] [CrossRef]
  31. Pferschy, U.; Schauer, J. The knapsack problem with conflict graphs. J. Graph Algorithms Appl. 2009, 13, 233–249. [Google Scholar] [CrossRef]
  32. Pferschy, U.; Schauer, J. Approximation of knapsack problems with conflict and forcing graphs. J. Comb. Optim. 2017, 33, 1300–1323. [Google Scholar] [CrossRef]
  33. Milanic, M.; Monnot, J. The complexity of the exact weighted independent set problem. In Combinatorial Optimization-Theoretical Computer Science: Interfaces and Perspectives; Wiley-ISTE: New York, NY, USA, 2008; pp. 393–432. [Google Scholar]
  34. Gabrel, V. Dantzig-Wolfe Decomposition for Linearly Constrained Stable Set Problem; hal-00116732; France 2006. Available online: https://hal.science/hal-00116732/ (accessed on 23 February 2024).
  35. Atamtürk, A.; Nemhauser, G.L.; Savelsbergh, M.W.P. Conflict graphs in solving integer programming problems. Eur. J. Oper. Res. 2000, 121, 40–55. [Google Scholar] [CrossRef]
  36. Gallo, G.; Hammer, P.; Simeone, B. Quadratic knapsack problems. In Combinatorial Optimization; Mathematical Programming Studies; Padberg, M., Ed.; Springer: Berlin, Germany, 1980; Volume 12, pp. 132–149. [Google Scholar]
  37. Hammer, P.L.; Hansen, P.; Simone, B. Roof duality, complementations, and persistency in quadratic 0–1 optimization. Math. Program. 1984, 28, 121–155. [Google Scholar] [CrossRef]
  38. Punnen, A.P. (Ed.) Introduction to QUBO. In The Quadratic Unconstrained Binary Optimization Problem: Theory, Algorithms, and Applications; Springer: Cham, Switzerland, 2022. [Google Scholar]
  39. Punnen, A.P. (Ed.) The Quadratic Unconstrained Binary Optimization Problem: Theory, Algorithms, and Applications; Springer: Cham, Switzerland, 2022. [Google Scholar]
  40. Deineko, V.G.; Woeginger, G.J. A well-solvable special case of the bounded knapsack problem. Oper. Res. Lett. 2011, 39, 118–120. [Google Scholar] [CrossRef]
  41. Bonamy, M.; Dabrowski, K.K.; Feghali, C.; Johnson, M.; Paulusma, D. Recognizing Graphs Close to Bipartite Graphs. In 42nd International Symposium on Mathematical Foundations of Computer Science (MFCS 2017); Leibniz International Proceedings in Informatics; Larsen, K.G., Bodlaender, H.L., Raskin, J.-F., Eds.; Schloss Dagstuhl-Leibniz-Zentrum für Informatik GmbH: Wadern, Germany, 2017; pp. 70:1–70:14. [Google Scholar]
  42. 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]
  43. Willis, W. Bounds for the Independence Number of a Graph. Master’s Thesis, College of Humanities and Sciences, Virginia Commonwealth University, Richmond, VA, USA, 2011. [Google Scholar]
  44. Li, J.; Lan, Y.; Chen, F.; Han, X.; Blazewicz, J. A Fast Algorithm for Knapsack Problem with Conflict Graph. Asia-Pac. J. Oper. Res. 2021, 38, 2150010. [Google Scholar] [CrossRef]
  45. Hansen, P. Degrés et nombre de stabilité d’un graphe. Cah. Centre Études Rech. Opér. 1975, 17, 213–220. [Google Scholar]
  46. Borg, P. A sharp upper bound for the independence number. arXiv 2010, arXiv:1007.5426. [Google Scholar]
  47. West, D. Introduction to Graph Theory, 2nd ed.; Prentice Hall Inc.: Upper Saddle River, NJ, USA, 2001. [Google Scholar]
  48. Rossi, R.; Ahmed, N. The Network Data Repository with Interactive Graph Analytics and Visualization. Proc. AAAI 2015, 29, 4292–4293. [Google Scholar] [CrossRef]
  49. Karapetyan, D.; Punnen, A.P.; Parkes, A.J. Markov chain methods for the bipartite Boolean quadratic programming problem. Eur. J. Oper. Res. 2017, 260, 494–506. [Google Scholar] [CrossRef]
Figure 1. A complete F -bipartite graph with V 1 = { v 1 , v 2 , v 3 , v 4 } and V 2 = { u 1 , u 2 , u 3 } . The subgraph induced by V 1 is a cycle and a pendant vertex, and the subgraph induced by V 2 is tree (path).
Figure 1. A complete F -bipartite graph with V 1 = { v 1 , v 2 , v 3 , v 4 } and V 2 = { u 1 , u 2 , u 3 } . The subgraph induced by V 1 is a cycle and a pendant vertex, and the subgraph induced by V 2 is tree (path).
Algorithms 17 00219 g001
Table 1. Easily computable stability number bounds.
Table 1. Easily computable stability number bounds.
BoundName
UB1 γ ( G ) fractional budgeted stability number
UB2 α f ( G ) fractional stability number [43]
UB3 1 2 + 1 4 + | V | 2 | V | 2 | E | Hansen [45]
UB4 ( Δ 1 ) n + 1 Δ Borg [46]
UB5 | V | | E | Δ Kwok [47]
UB6 | V | δ Minimum degree [43]
Table 2. Average running times (in seconds).
Table 2. Average running times (in seconds).
Data SetStandardMaxStarIPMaxStarIP1MaxStarIP3MaxStarIP5MaxStarIP6
Random Small3.95254.17544.37139.26908.99709.2855
Random Medium547.0358546.1085532.7913542.4379562.4661540.5295
Random Large1165.93801232.16701116.03101267.20901235.80301284.1800
Positive Small0.47560.48330.46830.48740.48830.4606
Positive Medium117.7284108.5378112.0652105.2428105.8007109.7333
Positive Large499.7824506.0453417.1473418.3175446.0069407.9784
Negative Smal1.36421.94951.70181.97591.73121.6509
Negative Medium427.9115499.4719443.6538431.8717432.7311422.1719
Negative Large1866.93801937.19701780.26401723.57001698.06201742.0950
Table 3. Average running times (in seconds) by budget.
Table 3. Average running times (in seconds) by budget.
Data SetBudgetStandardMaxStarIPMaxStarIP1MaxStarIP3MaxStarIP5MaxStarIP6
Random Smallvery tight0.170250.21800.153514.4852514.4627514.4683
Random Smalltight0.81651.43900.980750.932250.958751.0078
Random Smallmoderate tight10.87110.8692511.9797512.389511.5697512.3805
Random Mediumvery tight1.21451.787251.6021.892751.7691.87975
Random Mediumtight24.915547.0927521.02151.62363.19637.62275
Random Mediummoderate tight1614.977251589.44551575.7511573.7981622.433251582.0860
Random Largevery tight5.570510.091512.5957510.3802510.9597511.4418
Random Largetight491.50875593.444484.346806.51925796.03675837.51325
Random Largemoderate tight3000.73553092.96552851.15152984.7292900.4113003.5857
Positive Smallvery tight0.22320.19910.21730.21550.20450.2245
Positive Smalltight0.41230.37860.45320.49360.49550.4745
Positive Smallmoderate tight0.79140.87230.73450.75320.76500.6827
Positive Mediumvery tight5.45614.78433.53573.67653.68573.7887
Positive Mediumtight47.927833.684835.314832.380429.469132.3991
Postive Mediummoderate tight299.8013287.1443297.34522279.6713284.2474293.0122
Positive Largevery tight29.494135.501241.2082445.1747147.008841.72882
Positive Largemoderate tight1093.126471082.2853918.3300919.5976959.8629908.9182
Positive Largetight376.7265400.34941291.9035290.1800331.1488273.2882
Negative Smallvery tight0.39730.48140.524100.50640.47450.4614
Negative Smalltight0.91731.22361.174091.28591.139111.3295
Negative Smallmoderate tight2.77824.14363.40734.13543.58003.1618
Negative Mediumvery tight6.506710.51797.88839.25759.20718.8704
Negative Mediumtight266.1083292.6083276.6429274.4096299.2258270.0600
Negative Mediummoderate tight1011.119581195.28961046.43001011.9479989.7604987.5854
Negative Largevery tight721.0029857.0400667.3035649.35523666.8012658.71412
Negative Largetight2095.27762210.11882010.59121965.068821879.29351955.7835
Negative Largemoderate tight2784.53332744.43182662.89762556.28592548.09122611.7882
Table 4. Average running times (in seconds) by budget and density.
Table 4. Average running times (in seconds) by budget and density.
Data SetBudgetDensityStandardMaxStarIPMaxStarIP1MaxStarIP3MaxStarIP5MaxStarIP6
Random Smallvery tight0.10–0.300.06570.045000.042140.756440.7540.7564
Random Smalltight0.10–0.300.19570.28930.23640.26210.29860.2707
Random Smallmoderate tight0.10–0.3012.557112.342120.222917.13517.5218.2271
Random Smallvery tight0.40–0.600.15570.17000.14860.16140.1550.1586
Random Smalltight0.40–0.600.79141.61790.89861.04430.99071.0564
Random Smallmoderate tight0.40–0.6015.615715.750711.586412.202111.882112.4986
Random Smallvery tight0.70–0.900.30920.47580.28920.54670.48670.4933
Random Smalltight0.70–0.901.57002.57171.9451.58331.69171.8108
Random Smallmoderate tight0.70–0.903.04093.16092.55275.53822.93645.3027
Random Mediumvery tight0.10–0.300.33070.24930.27790.24710.23860.2421
Random Mediumtight0.10–0.301.26571.85711.60142.31791.72071.7429
Random Mediummoderate tight0.10–0.301807.68361792.21931933.20791802.38361830.63641778.0714
Random Mediumvery tight0.40–0.600.910.84620.88690.82150.86540.8023
Random Mediumtight0.40–0.6016.823829.150818.853121.973123.021521.1769
Random Mediummoderate tight0.40–0.602456.78772391.19462309.30232380.98772421.01852427.7085
Random Mediumvery tight0.70–0.902.47084.38463.74314.73624.32084.7208
Random Mediumtight0.70–0.9058.4762113.7544.1023134.3708169.574692.7085
Random Mediummoderate tight0.70–0.90565.6369569.3246457.2462520.4392599.6292525.4023
Random Largevery tight0.10–0.301.30211.21861.29571.18791.18571.1764
Random Largetight0.10–0.307.327912.94008.50513.23218.89869.1857
Random Largemoderate tight0.10–0.302475.03862547.71792487.00642504.45292519.532556.8364
Random Largevery tight0.40–0.604.30624.60625.64384.41314.56924.4046
Random Largetight0.40–0.60211.7485328.7346303.8569476.9715466.3538451.49
Random Largemoderate tight0.40–0.603600.25463601.32623600.05773600.05853600.05463600.0592
Random Largevery tight0.70–0.9011.431525.132331.716926.246927.876229.5338
Random Largetight0.70–0.901292.69461483.31151177.27921990.37621973.40692115.5815
Random Largemoderate tight0.70–0.902967.35153171.79462494.40152886.622610.94692888.2269
Table 5. Average running times (in seconds) by budget and density.
Table 5. Average running times (in seconds) by budget and density.
Data SetBudgetDensityStandardMaxStarIPMaxStarIP1MaxStarIP3MaxStarIP5MaxStarIP6
Positive Smallvery tightSparse0.22320.19910.21730.21550.20450.2245
Positive SmalltightSparse0.41230.37860.45320.49360.49550.4745
Positive Smallmoderate tightSparse0.79140.87230.73450.75320.76500.6827
Positive Mediumvery tightSparse5.45614.78433.53573.67653.68573.7887
Positive MediumtightSparse47.927833.684835.314832.380429.469132.3991
Positive Mediummoderate tightSparse299.8013287.1443297.34522279.6713284.2474293.0122
Positive Largevery tightSparse29.494135.501241.2082445.1747147.008841.72882
Positive Largemoderate tightSparse1093.126471082.2853918.3300919.5976959.8629908.9182
Positive LargetightSparse376.7265400.34941291.9035290.1800331.1488273.2882
Negative Smallvery tightSparse0.39730.48140.524100.50640.47450.4614
Negative SmalltightSparse0.91731.22361.174091.28591.139111.3295
Negative Smallmoderate tightSparse2.77824.14363.40734.13543.58003.1618
Negative Mediumvery tightSparse6.506710.51797.88839.25759.20718.8704
Negative MediumtightSparse266.1083292.6083276.6429274.4096299.2258270.0600
Negative Mediummoderate tightSparse1011.119581195.28961046.43001011.9479989.7604987.5854
Negative Largevery tightSparse721.0029857.0400667.3035649.35523666.8012658.71412
Negative LargetightSparse2095.27762210.11882010.59121965.068821879.29351955.7835
Negative Largemoderate tightSparse2784.53332744.43182662.89762556.28592548.09122611.7882
Table 6. Frequency distribution of fastest running times.
Table 6. Frequency distribution of fastest running times.
Data SetStandardMaxStarIPMaxStarIP1MaxStarIP3MaxStarIP5MaxStarIP6
Random Small621238172514
Random Medium41142991717
Random Large4162161511
Positive Small2229234
Positive Medium1615981212
Positive Large20556211
Negative Small35510389
Negative Medium234166910
Negative Large1513483
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Punnen, A.P.; Dhahan, J. The Knapsack Problem with Conflict Pair Constraints on Bipartite Graphs and Extensions. Algorithms 2024, 17, 219. https://doi.org/10.3390/a17050219

AMA Style

Punnen AP, Dhahan J. The Knapsack Problem with Conflict Pair Constraints on Bipartite Graphs and Extensions. Algorithms. 2024; 17(5):219. https://doi.org/10.3390/a17050219

Chicago/Turabian Style

Punnen, Abraham P., and Jasdeep Dhahan. 2024. "The Knapsack Problem with Conflict Pair Constraints on Bipartite Graphs and Extensions" Algorithms 17, no. 5: 219. https://doi.org/10.3390/a17050219

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