Minimizing Cost Travel in Multimodal Transport Using Advanced Relation Transitive Closure

The optimization computation is an essential transversal branch of operations research which is primordial in many technical fields: transport, finance, networks, energy, learning, etc. In fact, it aims to minimize the resource consumption and maximize the generated profits. This work provides a new method for cost optimization which can be applied either on path optimization for graphs or on binary constraint reduction for Constraint Satisfaction Problem (CSP). It is about the computing of the “transitive closure of a given binary relation with respect to a property.” Thus, this paper introduces the mathematical background for the transitiveclosureofbinaryrelations.Then,itgivesthealgorithmsforcomputingtheclosureofabinaryrelationaccordingtoanother one.Theelaboratedalgorithmsareshowntobepolynomial.Sincethistechniqueisofgreatinterest,weshowitsapplicationsin someimportantindustrialfields.


Introduction
The optimization computation is an essential branch of operations research which aims to minimize the resource consumption and maximize the generated profits. It is primordial in many technical and industrial fields: system design, supply chain management, transport, energy, finance, networks, etc. This type of computation has enjoyed a great growth in the last century, and it presents the goal of many works in operations research and graph theory. This paper introduces a new method for cost optimization, applied either on path optimization for graphs or on binary constraint reduction for Constraint Satisfaction Problem (CSP). It is a problem-solving technique that is applied to improve decision-making and efficiency. This method aims to fill the gap in the binary constraints optimization, in particular where these constraints are of different structures. In addition, it has a low algorithmic complexity that is shown to be polynomial. Moreover, it can be widely used in many operations research application fields, namely, management, decision-making, network optimization, scheduling, etc.
Before citing the related works and making the comparison with what is done in the literature, we start by describing the problem. First, we begin by defining the binary constraints on which the elaborated method is based. A binary constraint is a relation between two variables. Concretely, a relation can be, for example, an association of employees' names and their salaries, or a pairing of calendar years with automobile production figures. In the case when we have relationships between just two elements, the relation is called a binary relation and it is represented by set of ordered pairs (x, y) where x and y are objects of sets A and B, respectively, and x bears a relation to y.
Many binary relations display identifiable properties. For example, the relation "less than or equal to" has the property that if an object bears a relation to a second which further bears the same relation to a third then the first bears this relation to the third ( x < y and y < z and then x < z). Such relations are said to be transitive.
Transitivity is an important property used in several domains. However, it is not satisfied by many relations. In fact, the transitive closure computation has been identified as an important and frequent problem in many computer science applications, we mention among others path optimization, redundant synchronization removal [1], reachability analysis of transition graphs in communication networks [2], 2 Advances in Operations Research construction of parsing automata in compilers [3], evaluation of recursive database queries, and iteration space slicing and code generation [4,5].
In this paper, we investigate a new extension of the transitive closure concept: "the transitive closure according to a given property." That is, for a given property P, and a relation R, we are interested in computing the smallest transitive relation containing R such that the property P holds. To begin, we enumerate the main contributions of this paper: (i) The introduction of the concept of transitive closure according to a given property. (ii) The proposition of a new algorithm to compute this transitive closure.
(iii) The profit of our new concept in many research operations applications, especially those requiring the constraints reduction or path optimization.
Related Works. Many efficient algorithms of transitive closure have been developed in the field of algorithmic graph theory: we mention Roy Warshal algorithm [6] and Warren algorithms [7] based on a matrix representation of the graph. We cite also the Schmitz algorithm [8] which takes benefit of Tarjan's algorithm. Other interesting works in the same line are those of Ioannadis [9]. However, all these previous works consider only the computation of the transitive closure. To the best of our knowledge, the concept of transitive closure according to a given property has not been introduced before and there is no elaborated technique to solve this problem.
In the case of many relations, Wlodzimierz, Verdoolaege, Cohen, and Beletska [10,11] worked on transitive closure of the union of affine relations on integer tuples. The general form of a parameterized affine integer tuple relation is } where x, y, and i are integer tuples, A i is an integer matrix, and b is a tuple of integers and symbolic value. They presented iterative algorithms to calculate the exact, the underapproximation, and the overapproximation transitive closure of such relations, within Presburger arithmetics. However, they consider only the union of integer tuple relations that are commutative and have the same dimensions.
To show the insufficiency of their study, let us discuss an example of a closure case that is not included in their work. For this purpose, we begin by giving some definitions.
for a 1 , a 2 , . . . , a t in N}. V 0 is constant vector and v 0 , v 1 , . . . , v t are called generators of the linear set S (called also periods).
A subset of N for ∈ N is semilinear if it is a finite union of linear sets.
Example. In N 2 the set A = {(x, y) | x ≥ 4} is a linear set, namely, the constant vector is (4, 0), and the generators are (1, 0) and (0, 1). Let X = (x 1 , . . . , x k ) be a vector of distinct variables and V(X) = (v(x 1 ), . . . , v(x k )) be the vector which associates with each variable in the vector X its valuation.

Definition 2.
A set ⊆ N is said to be denoted by Φ(X) where Φ is Presburger formula with variables in x 1 , . . . , x k } if S = {V(X) | V ⊨ Φ}. S is called a Presburger set. Theorem 3. Guinsburg and Spanier proved in [12] that the family of Presbureger sets of N is identical with the family of semilinear sets of N .
From this theorem, we can deduce that the works above are insufficient since the nonsemilinear sets are not studied. To explain this, we give a concrete example where a set B is defined as B = {i i | i ∈ N}. This latter is not a Presburger set since it is not semilinear.
Within Presburger logic, we consider a relation R over N defined as Let A be the partition of singletons on R * (R * designate the transitive closure of R). We define the following mapping: for each x in B we associate ( 1/ , 1/ + 1) in N 2 ∩ 2 . Take the following property on elements of B: ( ) = ∃ , = 2 .
Assuming this data, up to now, there is no elaborated method which computes the transitive closure of R according to a property P in this case.
Other close techniques are hypergraph theory and linear programming. The hypergraphs do not express more than one relation. In fact, they present a simple generalization of the graphs in which an edge can join any number of vertices. This means that each hypergraph includes just one relation even if it is not binary.
Moreover, linear programming (LP) aims to optimize a linear objective function subject to linear inequality constraints. In our case there is no objective function to optimize. In addition, computation complexity using LP is higher than the complexity of our method.
The rest of this paper is organized as follows: In Section 2, we present the basic definitions, concepts, and notations used in this paper. In Section 3, we show the properties of our closure and we elaborate the computation algorithm. In Section 4, we apply our method in multimodal transport by adapting the algorithm to minimize the cost travel. Finally, we conclude and draw perspectives in Section 5.

Background and Basic Definitions
In the following, R denotes the set of real numbers and ∧ (reps. ∨ ) logical conjunction (resp. disjunction).
Definition 4. Let A and B be two sets. A binary relation R from A (called domain of R) to B (called codomain of R) is defined by a subset G of A * B. If (x, y) ∈ G, we say that x is related to y and we write x R y.
When A = B, we say that R is a binary relation over A or defined on A. Some important properties of a binary relation R over A are as follows: (i) Reflexivity: ∀ ∈ , .

3
A relation that is reflexive, symmetric, and transitive is called an equivalence relation. When R is an equivalence relation over A, the equivalence class of an element ∈ is the subset of all elements in A that bear this relation to x. Note that the equivalence classes are disjoint. The quotient set of A by R is the set of the equivalence classes. C r will denote the cardinal of this quotient set.
Definition 5. The transitive closure of a relation R on a set A is the smallest transitive relation R * over A containing R.
Directly from this definition, we can deduce the following properties: contains also R * In this paper, we will investigate the problem of computing the smallest transitive relation containing R such that a given property P holds. This problem may be viewed as an extension of the usual transitive closure problem: we are not looking only for the smallest transitive relation but a relation which satisfies also a given property. Formally, one has the following.
Definition 6. Let A and B be two sets, R be a relation over A, be a mapping from B to 2 , and P be a logical formula on elements of B. The transitive closure of R with respect to P is the smallest transitive relation defined on A, noted R , containing R, such that, ∀ ∈ , ( ) ⇒ ( ) ∈ . P expresses desired properties using a given logic. maps each element of B to an element of A 2 . In this case, R p is the smallest transitive relation containing R such that if an element of B satisfies the property P then its image must be in R p .
Computing in general case can be hard and depends on the decidability of the used logic. So, in this paper we will consider only the following case: , where S is a given relation over B.
In this case, Definition 6 becomes as follows.
Definition 7. Let R (resp. S) be a relation over a set A (resp. A 2 ). The transitive closure of R according to S is the smallest transitive relation over A, noted R s , and containing R such that, ∀( , , , ) ∈ 4 , ( , ) ( , ) ∧ ⇒ .
Example 8. To illustrate this concept, let us consider the following system of inequalities: The system has two types of inequalities: (i) Variable inequalities of the form − ≤ with ( , , ) ∈ R 3 .
The set of solutions of this system, when it is not empty, is included in the intersection of the half-planes defined by individual inequalities of type 1. It is therefore a convex set. Now, we have to check if this convex set is not empty and in this case compute its canonical form (the representation in which all inequalities are maximally tight). This problem may be expressed as transitive closure of a relation R according to a relation S as follows: Firstly, we close transitively R. This gives us 3 − 4 ≤ 6 instead of 8. As we have this implication ( 3 , 4 ) ( 1 , 2 ) ∧ 3 4 ⇒ 1 2 then 1 − 2 ≤ 6. Therefore, computing R will give us the canonical form of the previous system.
Since the closure is done in an iterative way, we will introduce the following additional notations: for a relation R (reps. S) over A (resp. A 2 ).
Since ⊂ * , it is easy to show that for all ∈ N we have ⊂ +1 and = ⋃ ∞ =0 .
Example 9. This example shows the utility of this closure in a state machine with variables. Let G be a graph and A = (v 1 , . . . , v n ) be the set of its edges. We assume that B = N 2 , the property on elements of B is ( , ) : + = 0 3, and we suppose that the mapping ( , ) associates for each (x, y) in B an element (v x , v y ). We affirm that for each two elements in B that satisfy property P, their images by the mapping are linked by the relation R. Figure 1 shows the closure steps, in the first stage we have the graph presenting the relation R, and then, in the second step, we close transitively this graph. In the third step, we close the obtained graph according to the desired property. These last two steps are repeated iteratively until the graph is stationary.

Properties of the Transitive Closure of a Relation according to Another One
Let R (resp. S) be a relation over A (resp. A 2 ). In this section, we will dress the fundamental properties of R s .

Case of Equivalence Relation.
The following theorem states the maximal number of iterations to achieve the transitive closure of a relation according to another equivalence relation.

Recall that is the cardinal of the quotient set of S. Intuitively, when S is an equivalence relation, this fundamental theorem gives a way to compute , by computing .
Proof. In each step of the closure, we have at least a couple that has just been connected by S and which will connect all the pairs that belong to its class. To prove that ≤ it suffices to show that ∀ > we have = . First, we have = (⋃ =1 ) ∪ (⋃ = +1 ).
Since ⋃ =1 = , then we will have = ∪ (⋃ = +1 ) = = . However, when each class contains two couples, the maximal bound is a bit different; it is [ 2 /2] (we denote by [x] the entire part of x).
In addition, the relations of type (z, t) S (x, x), for ( , , ) ∈ 3 (resp. (x, x) S (z, t)), are not useful since they no longer advance the process of the closure (i.e., they do not link any two elements by R). Thus, the classes of type [(x, x), (z, t)] should be eliminated; their minimum number that one can have is equal to n/2. Therefore, to have the final closure we can never exceed ( 2 − )/2 iterations.
If > [( 2 +1)/2] then there are classes that contain only one pair. Each class of them reduces the number of iterations by one, since if the couple is linked in a step we will have no influence in the next steps. Hence, we deduce that if Based on all the above, the following results are deducted: When S is an equivalent relation, we have the maximal number of iterations as follows: Hence one has the desired result.

General Case of the Relation S.
The following theorem determines the maximal number of iterations to achieve the transitive closure of a relation according to any other relation.

Theorem 11. Let C be the cardinal of * . The transitive closure of R according to S is
Proof. In each iteration , we should have at least one couple (x, y) in A 2 such that −1 (the transitive closure should at least bring this relation in the previous iteration) and which is in relation S with at least another couple (z, t): (x, y) S (z, t).
The relations of type (z, t) S (x, x) (resp. (x, x) S (z, t)) do not advance the process of closure. Then, the couples of type (x,x) should be deleted, and their minimum number that we can have is n. Hence the result is If we take into consideration the links closed in the first step (by R * ), noted C, we will ensure that if C > n, then x 1 x 2

Advances in Operations Research
x 3 x 6 x 4 x 5 x 7 x 8 x 9 Railway Road Transfer edges

Algorithm Skeleton of Transitive Closure (R s ) Computation.
We have shown the maximal number of iterations we need to have the closure of a relation according to another one. We can give the closure computation algorithm as shown in Algorithm 1.

Application on Minimizing Cost Travel in Multimodal Transport
Multimodal transport is a logistic problem in which a set of goods have to be transported to different places with the combination of at least two modes of transport, without a change of container for the goods. Thus, it consists of using in the same path or trip several modes of transport (truck, car, train, plane . . .). This technique has emerged to deal with problems such as pollution and energy consumption and especially for reason to reduce congestion. Several issues arise from this idea; we can cite planning of multimodal transportation tasks [13,14] and modeling the multimodal transportation networks. A lot of algorithms have been elaborated to find the viable shortest path under objectives such as travel time and number of modal transfers [15,16]. The most important among them remains the calculation of multimodal shortest path. ( , ) constituted by two modes. The first mode is the roads (m 1 ) and the second one presents the railways (m 2 ). Each mode has its set of nodes ⊂ (its cardinal noted n i ) and its edges ⊂ . The graph contains also a set of transfer edges E t that allows the mode change. These edges are mostly directed; therefore we note the set of their heads H and the set of their tails T.
During the transportation, we are facing constraints on mode changing, such as minimizing the number of transfers, viability, time of conveyance waiting, etc.
For some reasons such as congestion, we can change the mode only if we will reduce the transport cost. For example, we can choose the path 1 4 instead of 2 6 path only if the following condition is fulfilled: ( 1 4 ) ≤ ( 2 6 ). In general, we have ( ) ≤ ( ), for ( , ) ∈ 2 and ( , ) ∈ 2 .
Given these data and flowing in both modes, the problem is to find the lowest cost between any two points of the graph.  The constraints on mode changes are expressed by another binary relation, noted S.

The Applied
Algorithm. Firstly, we accomplish the transitive closure of R. Afterwards, we scan the matrix updated of R * looking for the coordinates which has noninfinite cost. Then, for every coordinate ̸ = ∞ we point out to the line corresponding to ( , ) in M in order to select the coordinates having the cost equal to 1. Assume, for instance, that (( , ), ( , )) = 1; this allows us to value the correspondent couples, ( , ) with min( ( , ), ( , )). This operation will be repeated until the matrix is stationary, which corresponds to iterations as showed in Theorem 10. Then, the algorithm complexity is Θ( 3 ) where n is the number of system variables. It is the same as the previous example with some modifications. After finishing the transitive closure of R, we scan the matrix updated of R * looking for the coordinates which have noninfinite cost. Then, for every coordinate ̸ = ∞, we change the coordinates having the noninfinite costs in the line corresponding to ( , ) in M S . Take as an example (( , ), ( , )) ̸ = ∞; this allows us to value the correspondent couples, ( , ) with min( ( , ), ( , ) + (( , ), ( , ))). This operation will be repeated until the matrix is stationary. The algorithm is then like Algorithm 2.

Case of More Than Two Modes.
The previous algorithm provides the shortest path only if the following proposition is considered: between two crossings of the same mode we pass through an odd number of modes. This implies that the start point and the arrival point belong to the same mode. Consequently, to hold the same computation, the use order of modes in the general case should be as follows: , , , , , , , , , , , . . . , .
In this way, we will have the lowest cost between each two points using the previous algorithm.

Conclusion
This paper fits in the frame of the application of operations research in urban planning and transportation. It brought a new optimization method that consists in the concept of the "transitive closure of a given relation with respect to a property." In the literature there is no work that addresses this issue; therefore we have cited the close works done on the transitive closure with many relations. Afterwards, we situated our technique vis-à-vis hypergraph theory and linear programming.
The contributions of this paper are both theoretical and practical. We elaborated methods to compute the transitive closure of a relation according to a property and in particular the case where the property is another relation. After proving the completeness of the closure and the number of necessary iterations to achieve the solution, we design the applied algorithms. What is more interesting is the low algorithmic complexity that is shown to be polynomial. It is in the order Advances in Operations Research 7 of Θ( 3 ) where is the number of the constraint system variables, which presents also the number of nodes in the multimodal graph. These algorithms are also useful in many real world problems such as optimal solutions, Constraint Satisfaction Problem, graph optimization, search engines, and system verification.

Data Availability
The data used to support the findings of this study are included within the article.