An Integer Linear Programming Model for Partially Ordered Sets

Scienti c Computing Department, Faculty of Computers and Arti cial Intelligence, Benha University, Benha, Egypt Computing Science Department, Faculty of Computers and Arti cial Intelligence, University Sadat City, Sadat City, Egypt Mathematics and Computer Science Department, Faculty of Science Menou a University, Shibin Al Kawm, Egypt Basic Science Department, Faculty of Technology and Education, Beni-Suef University, Beni Suef, Egypt


Introduction
Linear programming is a very rich problem-solving model which is used to represent a large class of optimization problems. Optimization problems are de ned as problems whose solutions represent maximum values (such as maximum pro t) or minimum values (such as minimum cost).
ere are various types of optimization problems such as constraint optimization problems and unconstraint optimization problems. On the other hand, there are many types according to the nature of the variables of the optimization problem, such as linear programming, integer linear programming, and nonlinear programming. ere are various algorithms to solve linear programming problems, the most famous of which are the simplex algorithm and the interior point algorithm. e simplex algorithm is one of the ten best mathematics algorithms of the twentieth century [1]. By a common numerical example, Klee and Minty [2] proved that the simplex algorithm is not a polynomial time algorithm. Fortunately, this algorithm solves real-world problems of polynomial time complexity.
Casting optimization problems into a linear program version is an art. e tools of this art are represented in the complete knowledge of the issue of optimization to be represented by a linear program. e second of these tools is the complete knowledge of the general form of the linear program (objective function-constraints-the right-hand side of the constraints (constants)-non-negative-etc). e third of these tools is the practice of formulating a set of optimization problems into a linear program version. For graph labeling problems, Badr et al. [3][4][5] introduced new integer linear programming models (ILPMs) to nd the upper bounds of the radio number, a radio mean number, and radio mean square number for a given graph, respectively. e proposed ILPMs outperformed other algorithms according to the running time. For the metric dimension of a given graph, Chartrand et al [6] formulated the optimization problem of determining the metric dimension of a given graph (G). For the traveling salesman problem, there are di erent mathematical models [7][8][9] for the traveling salesman problems. e problem of e cient tasks scheduling is ubiquitous in many areas of computer science and engineering. We are often given a collection of tasks to complete, in which some jobs can be done in parallel, and others must be done in a prede ned sequence. In general, we can formulate these problems by constructing a poset of objects (representing tasks) in which some elements are "comparable" (jobs that must be done in predefined sequence), and others are "incomparable" (jobs that can be done in parallel). If our goal is to devise an efficient task scheduling algorithm, we might be interested in finding the largest subset of tasks that can be completed in parallel (the maximum antichain problem). Or we may be interested in the related problem of distributing all the tasks between the fewest number of subgroups (e.g., for parallel processing) such that all jobs in a subgroup must be completed in a predefined sequence (the minimum chain covering problem).
For more details about the history of the decomposition of the partially ordered sets posets, the reader can refer to [10][11][12][13][14][15][16]. On the other hand, for more details about how to formulate a problem as a mathematical model the reader is referred to [17][18][19]. Finally, for more details about the well know optimal PMU placement the reader is referred to [20][21][22].
In this paper, a new integer linear programming model (ILPM) is proposed for posets. Robert Dilworth's Decomposition theorem is formulated by ILPM and proves its correctness using the paradigm of strong duality in linear programming. Finally, ILPM is run on fifteen benchmark partially ordered sets for finding their width. e computational experiments show the validity of the proposed model. e remaining of this paper is organized as follows: basic definitions and notations are introduced in Section 2. In Section 3, Dilworth theorem and its mathematical formulation are proposed. In Section 4, the experimental results analysis of the proposed ILPM on fifteen benchmark posets are provided. In Section 5, conclusions are made.

Preliminaries
Before presenting Dilworth's eorem, we need to have a notion of comparability between elements in a set. To formalize this notion, we define some properties of binary relations to represent a partially ordered set (poset). We then illustrate how subsets of elements in a poset can have chain or antichain properties.  We use binary relations with these specific properties to represent a partial order on a set of elements, in which some pairs of elements are comparable by a i ≺a j In context of a task scheduling problem, this means that job.a i must be completed before.

Definition 3.
A partially-ordered set, or poset, is a set of elements P, along with a binary relation ≺, having the property that ≺ is transitive and antisymmetric for all elements in P.
Note that, two elements a i and a j can also be incomparable, that is, when we have both a i ⊀ a j and a j ⊀ a i . In this case, tasks a i and a j may be completed in parallel.
We also define maximal and minimal elements in a poset: An element a i is maximal in a subset S ⊆ P if it is not smaller than, any other element in S, i.e. a i ⊀ a j for all a j ∈∈S . Similarly, an element a i is minimal S if it is not greater than any other element i.e. a j ⊀ a i for all a i ∈∈S. For example, in a task scheduling problem, if a subset of jobs forms an antichain. en, all these jobs may be completed in parallel. If a subset of jobs forms a chain, then these jobs must be completed in the sequence determined by a 1 ≺a 2 ≺ . . . . . . ≺a k . Furthermore, it is useful to describe a covering of a poset P by chains to be a collection of chains C 1 , . . . . . . , C k such that every element of Ƥ is contained in the union of these chains, that is, ⋃ C i � P. is is related to distributing all tasks on parallel processors C 1 , C 2 . . . . . . so that jobs assigned to any processor C i are to be completed in a predefined sequence.

Dilworth's Theorem
With these definitions in hand, we can now formulate Dilworth's theorem [10] on the size of maximum antichains and minimum chain coverings in a poset.
Theorem 1 (Dilworth's eorem). e size of the largest antichain in any poset P is equal to the size of the minimum coverage of P by chains.
We can construct a proof of Dilworth's theorem using the pigeonhole principle and Duality in linear programming.

If we let:
A � max {|A|:A is antichain of Ƥ} (size of largest antichain in P), and B � min k: ∪ C 1 , . . . . . . , C k � P (minimum number of chains needed to cover P), then one way to prove Dilworth's theorem is to show A ≤ B and B ≤ A.
To prove A ≤ B, we use the pigeonhole principle.

Lemma 1.
e size of any chain in a poset P is equal to at most the minimum number of chains needed to cover P, i.e. A ≤ B.
Proof. As above-mentioned, let B be the minimum number of chains C 1 , . . . . . . , C B needed to cover P. Assume, for the sake of contradiction, that an antichain A � a 1 , a 2 , . . . a n in Ƥ has size n > B. en, by the pigeonhole principle, at least two distinct elements a i , a j must be members of the same chain so that, by Definition 5, we have a i a j or a j a i . However, by Definition 4, this means a i and a j are not in the same chain, a contradiction. us, no antichain in P can have size greater than B, whereby it follows the maximum size antichain in P is also no larger B. □ 3.1. Casting as a Linear Program. To prove B ≤ A A is more difficult. We can begin by trying to cast the objective of finding the maximum size antichain of a poset as a linear program.
ϵP. Each chain C k ⊂ Ρ will have an associated constrain inequality over the elements a i ∈ C k that comprise it. Consider the following linear program in canonical form: (1)

Dual Form.
In addition, we can convert (1) to its dual form, where variables represent chains on P, and each element a i ∈ Ρ has an associated constrain inequality over the collection of chains that contain it (note the symmetry). Assign non-negative weights. y → � (y 1 , . . . , y k ), respectively, to each chains C 1 , . . . C k ⊆ P. e dual of (1) (henceforth denoted (2)) is We begin by showing that if the primal (1) and (2) have integer solutions, then the objective z in (1) gives the size of the maximum antichain in P, and the objective w in (2) gives the size of the minimum coverage of P by chains.

Proposition 1. If x i εZ for all weights in x
→ , then solving primal (1) gives the maximum antichain in P.
Proof. In the case that all x i are non-negative integers, we wish to show that the objective of (1), z � n i�1 x i , is equal to |A max |, where A max is any maximum antichain in P.
Observe that constrains in (1), i: a i ∈C k x i ≤ 1 for all chains C k ⊆ P impose the following requirement on the variable x i if we assume they are all non-negative integers: □ Claim 1. For all chains C k ⊆P, at most one of the weights associated with elements in C k is equal to 1. All other weights must be 0.
Proof of Claim 1. For the sake of contradiction, assume that more than one element in chain C has a positive weight. We would then have i: a i εC x i > 1 since all x i are non-negative integers, thereby violating constrains of the linear program.
It follows that x i ∈ 0, 1 { } for all i. Now consider each x i as an indicator variable for whether element a i appears in an antichain A max , i.e. let x i � 1 if a i εA max and x i � 0 otherwise.
Since at most one indicator variable in any chain is positive, the solution to (1) satisfies the requirement that no two elements chosen for the maximum antichain come from the same chain.
Furthermore, under the indicator variable interpretation, the objective of maximizing z � x i corresponds to choosing the maximum number of elements to include in an antichain of P, so we have Maxz � |A max |, as desired. is proves Proposition 1 that an integer solution to (1) gives the size of the maximum antichain in P. Now, we prove the analogous proposition for the dual form.
□ Proposition 2. If y j εZ for all weights in y → then solving dual (2) gives the size of the minimum covering of P by chains.
Proof. e reasoning is analogous to that of Proposition 1. e constrains, in (2), j: a i ∈C j y j ≥ 1 for all elementsa i ∈ P, impose the following requirement on variables y j if we assume they are all non-negative integers: □ Claim 2. For all a i ∈ P, at least one of weights associated with the set of chains containing a i is positive.
Proof of Claim 2. It follows immediately from the constrains. If, for some element a i , none of the weights associated with chains that contain a i are positive, then j: a i ∈C j y j � 0≯1, thereby violating the constrain of the linear program.
Furthermore, since the linear program seeks to minimize y j with all y j as integers, we must have that y j � 1 whenever y j is chosen positive. us, with y j ε 0, 1 { } for all j, we can again consider each y j as an indicator variable for whether chain C j in a minimum covering of P.
Note again that for each element a i ∈ P, at least one indicator variable is associated with a chain containing a i equal 1, so the solution to (2) satisfies the requirement that all elements aεP appear in the minimum chain covering.
Furthermore, under the indicator variable interpretation, the objective of minimizing w � y j corresponds to choosing the minimum number of chains to include in a covering of P, so we have Min w � min c: C 1 , . . . , C c covers P , as desired.
is proves Proposition 2 that an integer solution to (2) gives the minimum covering of P by chains. Now, we need to show that both the primal and dual linear programs indeed have integer solutions.

Lemma 2. For any distribution of chains in a poset, (1) has an optimal solution where all variables take on integer values.
Proof. Proof is by the Well-ordering Principle and contradiction of an optimal solution to (1) with the fewest number of noninteger variables (x i weights). Let N be the set of elements in P corresponding to these noninteger weights. Some of these elements will be maximal in N, and others will be minimal (recall definitions in Section 2). We first need to verify that. □ Claim 3. No elements in N can be both minimal and maximal.
Proof of Claim 3. Suppose, for the sake of contradiction, that an element a m εN is both minimal and maximal. en, a m is incomparable to all other elements in N (recall definitions in Section 2). It follows that is associated weight x m is subject only to a single constrain that x m ≤ 1 in (1), whereby x m would be assigned a value of 1 to maximize the objective.
is contradicts the assumption that x m εN is a not an integer, thus proving the claim.
Since no elements in N are both minimal and maximal, it follows that each chain C ∈ N has exactly one maximal element, and a different minimal element.
Suppose we add a small value ∈ > 0 to each maximal element in N, and subtract e from each minimal in N. Since all elements in N are nonintegers we ensure that the resulting assignment of variables is feasible by choosing ∈ > 0 small enough so that 0 ≤ x i ≤ 1 is still satisfied by all x i , as required by the constraints of (1).
If we keep repeating this procedure, then at least one variable corresponding to a maximal/minimal element in N will reach a boundary value of 0 or 1. is contradicts the assumption that N has the fewest number of noninteger variables in a feasible solution. us, all variable assignments in an optimal solution to (1) must be integers, so Lemma 2 holds for primal (1). Next, we need to show that dual (2) also has integer solutions.

Lemma 3. For any distribution of chains in a poset, (2) has an optimal solution where all variables take on integer values.
Proof. First, we apply the result of strong duality in linear programming (see [19] for details). Which says that the primal and dual forms of a linear program have the same optimal value. We prove using induction that if k ϵ Z is the optimal value to LP2 on a poset P, then P has a covering by k chains where all variables y → in (2) take on integer values.
Inductive hypothesis: for any poset P having an integer optimal (2) objective value of k, the optimal solutions to the LPs associated with strict subsets of P are integers.
Base case. Consider a post P 1 in which all elements form a single, with optimal objective value Min w � k � 1. From the constraints of (2), this optimal solution will have a single variable y 1 (corresponding to the chain containing all elements in P 1 ) take on the value of 1, and the other y's take on the value of 0. It follows that optimal solutions to each LP associated with subsets of P 1 will also have integer weights. us, the inductive hypothesis holds for k � 1. Now, suppose that an optimal solution for (2) on poset P has a variable assignment y i � a that is not an integer (note that the optimal value for this LP must be an integer Min w � k ∈ Z). We can remove from P all elements in the chain C i associated with variable y i to obtain a new poset P/C � P ′ ⊂ P.
Let w ′ be the objective function value of LP2 ′ for this a new poset P ′ . We observe that Min w ′ is at most k − a because all elements comprising the chain with weight y i � a were removed so that w ′ ≤ w − a � k − a. Since P ′ ⊂ P is a strict subset of P, k − a is an integer by the inductive hypothesis, so Min w ′ � k − 1. Furthermore, the inductive hypothesis tells us that P ′ has a covering by k − 1 chains where all weights assignments to the chains are integers. It follows that we get a covering of P � P ′ ⋃ C i by k chains if we simply assign weight of y i � 1 to C i , achieving the desired objective the desired value of Min w � Min w ′ + y i � (k + 1) + 1 � k. is completes the inductive argument and proof of Lemma 3.
Taking Lemma 2 and 3 in conjunction with Proposition 1 and 2 gives the desired result that, for all partially-ordered sets P: Solving (1) gives the size of the largest antichain in P Solving (2) gives the size of the smallest covering of P by chains Again, by applying the result of strong duality [19] in linear programming, we conclude that primal (1) and dual (2) have the same optimal value. erefore, (1) s solution for the size of the largest antichain in a poset and (2) solution for the size of the minimum chain covering of a poset are equal, proving eorem 1 (Dilworth's eorem).  Proof. First, we show that any antichain in P satisfies the constraints. An antichain cannot contain any two elements that are comparable (Definition 4). Note that, any two comparable elements in P are connected by an edge in G.
us, we may choose at most one vertex from each edge (a i , a j ) ∈ E(G), meaning that at most one of x i , x j equals 1, from which it follows that x i + x j ≤ 1 for all edges (a i , a j ) ∈ E(G).
Conversely, we show that any assignment of indicator variables satisfying the constraints produces a valid antichain.

Journal of Mathematics
If x i + x j ≤ 1 for all edges (a i , a j ) ∈ E(G), then most one indicator variable x i , x j is positive because x i ∈ 0, 1 { }. Hence, at most one vertex (element in P) on each edge is chosen to be in the antichain. Since all pairwise comparable elements in P are connected by edges in our construction of E(G), it follows that no two elements chosen in the antichain will be comparable, satisfying Definition 4. is proves Proposition 3.6. For any poset P with element set a 1 , . . . , a n , we can construct an n × n comparable incidence matrix A, having entry A(i, j) � 1 if elements a i , a j ∈ Pare comparable and A(i, j) � 0 otherwise. Now, associated with each element a i ∈ P an indicator variable x i ∈ 0, 1 { } that corresponds to using or not using that element in an antichain of P. Now, we can formulate the problem of the decomposed poset P as follows: where A * ∈ R m×n is the m × n matrix which is generated from the matrix A (based on Proposition 3) such that m is the number of ones in the matrix A, x ∈ R n and b ∈ R m (all elements in vector b equal to 1).

Example 1.
We show how to formulate the problem of decomposed partially ordered set (as shown in Figure 1) as an integer linear programming model. e n × n comparable incidence matrix A that is corresponding to the post P.
e m × n matrix A * ∈ R m×n is generated from matrix A: Each row in the matrix A * ∈ R m×n represents an inequality based on Proposition 3.7.
Finally, the complete integer linear programming model is as the following: Subject to: We can use an available software package such as (MAT-LAB, Python, and LINGO) for solving the above mathematical model which returns the solution is equal to three.

Computational Experiments
In this section, we evaluate the proposed ILPM by fifteen benchmark posets. ese posets are characterized by some characteristics such as (various widths w(P), various sizes From Table 1 and Figure 3, it is obvious that the results of the proposed mathematical model (ILPM) coincide with the standard results for all fifteen benchmark posets.   It is also evident from Table 1 and Figure 4 that the execution time of ILPM increases as the width of the poset increases.
at is, the running time of ILPM is directly proportional to the width of the post. Fortunately, the behavior of the simplex algorithm used to solve ILPM is a polynomial time to solve real-world applications, regardless of being exponential time as proven in [2]. For this reason, we have done our best to create a poset in the form of the examples provided by Klee and Minty in 1972 in which they proved that the simplex algorithm is exponential time, but we have failed to do.
Because the examples presented by Klee and Minty depend on (right-hand side constants, the coefficients of the constraint matrix, and the coefficients of the objective function), rarely, do these problems exist as real-world problems. We conclude from this that the presented model will be implemented in a polynomial time. It is well-known that the complexity of the simplex algorithm is O(n 2 ) for real-world applications in the average case where n is the number of elements of a poset.

Conclusion
A new integer linear programming model (ILPM) has been proposed for posets. Robert Dilworth's Decomposition theorem is formulated by ILPM and proved its correctness using the paradigm of strong duality in linear programming. Finally, ILPM is run on fifteen benchmark partially ordered sets for finding their width. e computational experiments showed the validity of the proposed model. On the other hand, CPU Time has been calculated for fifteen benchmark partially ordered sets. From computational experiments, it was concluded that the CPU time increases as the width increases. In future work, the proposed ILPM will be evaluated by using special posets such as interval posets, lattice, crown posets, and k-tower poset. ILPM will be applied on the jump-critical ordered sets [23].

Data Availability
e data used to support the findings of this study are available from the corresponding author upon request.

Conflicts of Interest
e authors declare that they have no conflicts of interest.