Next Article in Journal
Identification of Linear Time-Invariant Systems with Dynamic Mode Decomposition
Next Article in Special Issue
Quantum Weighted Fractional Fourier Transform
Previous Article in Journal
An Adaptive Protection Scheme Based on a Modified Heap-Based Optimizer for Distance and Directional Overcurrent Relays Coordination in Distribution Systems
Previous Article in Special Issue
Quantum Algorithms for Some Strings Problems Based on Quantum String Comparator
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

GPS: A New TSP Formulation for Its Generalizations Type QUBO

by
Saul Gonzalez-Bermejo
1,
Guillermo Alonso-Linaje
1 and
Parfait Atchade-Adelomou
2,3,*
1
Facultad de Ciencias, Campus Miguel Delibes, Universidad de Valladolid, C/Plaza de Santa Cruz, 8, 47002 Valladolid, Spain
2
Research Group on Data Science for the Digital Society, La Salle, Universitat Ramon Llull, Carrer de Sant Joan de La Salle, 42, 08022 Barcelona, Spain
3
Lighthouse Disruptive Innovation Group, LLC, 7 Broadway Terrace, Apt. 1, Cambridge, MA 02139, USA
*
Author to whom correspondence should be addressed.
Mathematics 2022, 10(3), 416; https://doi.org/10.3390/math10030416
Submission received: 9 December 2021 / Revised: 22 January 2022 / Accepted: 24 January 2022 / Published: 28 January 2022
(This article belongs to the Special Issue Quantum Computing Algorithms and Computational Complexity)

Abstract

:
We propose a new Quadratic Unconstrained Binary Optimization (QUBO) formulation of the Travelling Salesman Problem (TSP), with which we overcame the best formulation of the Vehicle Routing Problem (VRP) in terms of the minimum number of necessary variables. After, we will present a detailed study of the constraints subject to the new TSP model and benchmark it with MTZ and native formulations. Finally, we will test whether the correctness of the formulation by entering it into a QUBO problem solver. The solver chosen is a D-Wave_2000Q6 quantum computer simulator due to the connection between Quantum Annealing and QUBO formulations.

1. Introduction

The Travelling Salesman Problem, known as TSP [1], is one of the most studied statements belonging to the combinatorial optimisation problems. In this, we are given a set of cities and the distances between them with which we must try to find the best route to travel all the towns, minimizing the total length.
Both the TSP and its more well-known derivative, the Vehicle Routing Problem (VRP), are routing problems with a great impact on most of the issues in our society. For this reason, and because both are NP-Hard [2], the scientific community has continued the search for a better formulation that makes their resolution efficient. However, unfortunately, we cannot use traditional search methods based on differentiability when defining the problem with discrete variables.
One of the models that allows us to write TSP like problems more generically is Quadratic Unconstrained Binary Optimization (QUBO) [3]. QUBO is a framework that enables us to model problems in a quadratic form subject to linear restrictions natively. However, with the help of penalty functions, it is possible to reformulate the tasks of order greater than two and inequality constraints to the QUBO model. Another characteristic that makes QUBO a very important modelling environment is its close connection with the Ising model [4]. The QUBO model constitutes a central problem for adiabatic quantum computing [5], which is solved through a physical process called quantum annealing [6,7].
It is known that the best current QUBO formulation of the TSP requires N 2 binary variables Appendix A.1. However, when we try to generalise this formulation to other set of problems such as VRP, we find that polynomial terms of order greater than two appear in these models. As QUBO modelling requires that the function to minimize must be quadratic, it is necessary to decrease the degree of these terms by introducing auxiliary variables, which greatly increases the number of required variables. This is crucial to achieving good results through the solvers dedicated to it, especially if it is going to be implemented on a quantum computer.
Quantum annealing is the paradigm of using quantum processes to solve combinatorial optimization problems. This paradigm uses entropy as a target to force exploration, given that any function that smoothes the probability in the search space can have the same purpose according to the adiabatic theorem [8,9].
The D-Wave Quantum Processor Unit (QPU) is considered as a heuristic that minimizes the objective QUBO functions using a physically performed version of quantum annealing; this shows how the number of variables in the QUBO model is related to the number of qubits in a quantum computer [10].
The VRP encompasses two different problems: one in which the distance travelled by vehicles subject to capacity restrictions is minimized [11,12,13,14] and another, in which the time taken for cars to complete their routes is minimized. In this article, everything related to the VRP will optimize the time to complete these routes, equivalent to reducing the total of the distances travelled by all vehicles.
As we will explain later in the section dedicated to the VRP, to generalise a QUBO formulation from the TSP to the VRP, the objective function for calculating the distance travelled by the vehicles must be linear so that the formulation discussed above with N 2 variables cannot be used.
The most widely used QUBO model of the TSP that can represent distance linearly uses more than N 3 variables (native TSP formulation). However, there is indeed a formulation that uses N 2 l o g 2 ( N ) variables; this formulation is known as MTZ [15]. But generalising the MTZ formulation for the VRPs that minimises the maximum distances travelled by all the vehicles give us quadratic restrictions and, therefore, a penalty function of the order greater than two.
Our purpose in this work is to present a new QUBO model of the TSP in which the travelled distance calculation is linear, and uses only 3 N 2 variables, considerably improving the existing TSP models (both of N 3 and N 2 l o g 2 ( N ) variables). Furthermore, this new formulation of the TSP we refer to as GPS will be generalized to define an efficient formulation which consider the number of variables of a new VRP formulation. Unfortunately, after reviewing state of the art, we have not found a QUBO formulation of the VRP that minimises the maximum of the distances travelled by all the vehicles, thus we have not been able to make comparisons. When we talk about the number of variables in a model, we will describe it according to its dominant term, so for a model that, for example, requires N 3 + 3 N 2 + 2 N variables, we will say that it is modelling with N 3 variables since it gives us enough information on its scalability.
The document is organised as follows. Section 2 presents our main motivation behind this work. Section 3 shows previous work on the TSP algorithm and its derivatives. Section 4 presents the QUBO framework and its connection to quantum annealing. In Section 5, we recall the native formulation of TSP and the MTZ QUBO model. Section 6 presents our TSP proposal with the improvements in the numbers of variables. A generalisation of our contribution is seen in Section 7 where we propose our VRP into the QUBO model. Section 8 presents the obtained results, and finally, Section 9 concludes the work carried out, and we open ourselves to some lines of the future of the proposed model.

2. Motivation

Our primary motivation is to find a suitable formulation that uses the minimum number of variables; and thus, the minimum number of qubits when implementing said models in quantum computers. This motivation is increased by solving the problem presented in our article [14] in which we desire that the mobile robots minimise the time, which is equivalent to reducing the maximum of the distances travelled by all the vehicles. What implies reducing the number of qubits necessary to implement this model in this era of very few qubits.

3. Related Work

In the mid-1920s, the following referenced articles [16,17], were the first articles to provide a solution to the minimal spanning tree (MST) problem. Based on these works, the mathematical researcher, Joseph B. Kruskal Jr, applied these solutions to the TSP [18], giving life to some of the first solutions to this problem that will arise during the next decades.
Towards the end of the sixties, the following article [19] offered a compilation and synthesis of the research on the travelling salesman problem. The authors began by defining the problem and presenting several relevant theorems. They also classified and detailed the solution techniques and computational results. Before that, in the mid-1960s, the TSP started to emerge in many different contexts. The following article [20] highlights some applications that began to occur in everyday life, such as vehicle routing or job shop scheduling problems. Other applications such as planning, logistics and the manufacture of electronic circuits became of particular interest.
By making a few small modifications to the original TSP, we could apply it in many fields such as SWP [21] and DNA sequencing [22,23] among others. In this last application, the concept of ‘city’ would come to be fragments of DNA and the idea of ‘distance’, a measure of similarity between the pieces of DNA. In many applications, additional restrictions such as resource limits or time windows make the problem considerably difficult.
Computationally, the TSP [24] is an NP-Hard problem within combinatorial optimization. As an NP-Hard problem, it is computationally complex, and heuristics are continually being developed to get as close as possible to the optimal solution. However, considering the computational complexity nature of these problems, the new approach that quantum computing takes is very promising.
Many works are related to the standard/native TSP or some related variant in a quantum environment within this new approach. For example, the referenced work [25], the authors introduced a different quantum annealing scheme based on a path-integral Monte Carlo process to address the symmetric version of the Travelling Salesman Problem (sTSP). In these other articles [26,27], the authors did a comparative study using the D-Wave platform to evaluate and compare the efficiency of quantum annealing with classical methods for solving standard TSP.
In this reference [28], several comparisons of heuristic techniques were made for some TSP Libraries (TSPLIB) [29] problems, both symmetric and asymmetric, and their results have been compared to other methods such as Self Organizing Maps and Simulated Annealing [30]. In both cases, the local search technique was applied to the results found with Wang’s Recurrent Neural Network with “Winner Takes All” that improved the Self Organizing Maps [31]. Other techniques such as the co-adaptive neural network approach to the Euclidean Travelling Salesman Problem [32] equally important.
One of the generalizations of the TSP, known as the VRP, was studied on the D-Wave platform [33,34]. In tasks where routing and planning capacity (time) was required, the TSP with time windows (TSPTW) was generalized [35,36], and has high inherent complexity which presents enormous resolution difficulties. In the following references [21,37,38,39], the authors modelled combinatorial optimisation problems in which social workers visit their patients at their respective homes and attend to them at a specific time, called Social Workers’ Problem (SWP). SWP is a significant problem because additional time constraints allow more realistic scenarios to be modelled than native TSP. The optimal or near-optimal solution for such issues is important in minimising distance and time and environmental problems such as reducing fuel consumption.
The generalization of the TSP that we will use in our work will be the VRP. However, there are other TSP derivatives, such as the Job Shop Scheduling Problem (JSSP) [40] that are not included in the study of this work.
During state of the art of these formulations carried out, we have found several articles [33,34,41] that solve the TSP and VRP (focusing on minimising distance and not time) for annealing computers [7,30,42]. However, the number of variables is still intractable for the current size of quantum computers. For this reason, we propose a new TSP formulation with a representation of the linear distance that uses only 3 N 2 variables, which we will use to outperform the current best VRP modelling in terms of the number of required variables. For example, a possible formulation of the VRP uses N 3 variables where N is the number of cities, thus with only 10 towns, we would go to 1000 necessary variables. In quantum computing, each of these variables can be represented with a qubit, and that is why computers possessing 1000 qubits would be needed to carry out these tasks. However, the gate-based computers that mark this era of quantum computing [43] have around 100 qubits making this task intractable today. The number of qubits is higher for computers based on quantum annealing, reaching 2000 qubits like the D-Wave computer. However, the correspondence between variables and qubits will not be one-to-one due to the architecture of these computers, so that we will have a smaller number of useful qubits. The following reference [44] deals with the topology and graph problem mapping on the D-Wave 2000Q QPU computer in detail.

4. QUBO Model in Quantum Computing

Quantum computing as a new computational paradigm can help solve a set of complex problems (routing, scheduling, banking problems, etc.) or solve tasks that respond to the law of quantum mechanics. However, before solving a problem, we first need to express it in a mathematical formulation that is largely compatible with the underlying physical hardware. This methodology is also useful for quantum computation. One of the frameworks that allows us to define said mathematical formulation to be solved in a quantum computer is the QUBO.
Adiabatic computation was born from the use of the adiabatic theorem [8,9] to perform the calculations using the tunnel effect to go from the global minimum of a simple Hamiltonian (A Hamiltonian system is a dynamic system governed by Hamilton equations. In physics, these active systems describe the evolution of a physical system, such as an electron in an electromagnetic field.) [45,46] to the global minimum of the problem of interest.
One of the market leaders for this type of computing is D-Wave, which roughly solves the quadratic unconstrained binary optimisation problem (QUBO). The QUBO formulation (1) is suitable for running a D-Wave architecture [47]; however, QUBO can be mapped to the Ising [6] model and thus be used in computers based on quantum gates, for example, IBMQ, Rigetti, Xanadu (strawberryfields), etc.
The problems that D-Wave quantum computers are prepared to solve are those that consist of finding the minimum of a function of the following form:
i = 1 n b i x i + i = 1 n j = 1 n q i , j x i x j ,
where the variables x i { 0 , 1 } and the coefficients b i , q i , j R .
We are then, given a problem, we need to model it with the above structure where the variables that form the solution will only take the values 0 or 1. Let us observe that, by taking the variables x i the values 0 or 1, it is true that x i 2 = x i . Therefore, we can group the linear terms with the quadratic terms and express the above equation in matrix format:
x t Q x ,
with x { 0 , 1 } n and Q M n × n which is compactly representing the QUBO formulation. QUBO can be mapped into the Ising model with the change variable: z = 1 2 x . Thus, we pass a binary variable ( 0 , 1 ) to a spin variable ( 1 , 1 ) . Therefore, given a formulation of a problem to the QUBO, we can implement it and solve it in computers based on quantum gates, only applying the change of variable mentioned.

5. TSP Formulation

As discussed in the introduction, before presenting our GPS model in section four, we will analyze the native TSP model and the MTZ that we aim to improve in terms of the number of variables.

5.1. Native Formulation

In this section, we will recall the formulation of the native TSP [41]. This modelling, which has been defined in [48], despite appearing in a very natural way which facilitates its understanding, requires N 3 variables to be implemented.
The variables that appear in this model are the variables x i , j , t such that i , j { 0 , , N + 1 } and t { 0 , , N } . Let us consider that the variables x i , i , t do not exist in this model. The interpretation of the variables x i , j , t is simple, since x i , j , t = 1 if at instant t we traverse the edge that connects the cities i and j, and x i , j , t = 0 for all other cases.
We can define the objective function of the native (Native in the sense of general, the most used) TSP [41] as:
u = 0 N + 1 v = 0 N + 1 t = 0 N x u , v , t d u , v .
where d u , v represents the distance between nodes u and v. This objective function is subject to a series of restrictions:
  • Constraint 1. The salesman must leave each city once.
    For each u { 0 , , N } : v = 1 N + 1 t = 0 N x u , v , t = 1 .
  • Constraint 2. Each city must be reached once.
    For each v { 1 , , N + 1 } : u = 0 N t = 0 N x u , v , t = 1 .
  • Constraint 3. If the salesman leaves a city, he cannot return to it later. This constraint ensures that no unconnected cycles are formed as a solution. There are two ways of posing this constraint.
    -
    Imposing that once he leaves a city he cannot return to it.
    For each u { 1 , , N + 1 } :
    v = 0 N + 1 t = 0 N w = 0 N + 1 j = t + 1 N x u , v , t x w , u , j = 0 .
    -
    Imposing that once he arrives in a city, he must leave it.
    For each t { 0 , , N 1 } , u , v { 0 , , N } :
    x u , v , t ( 1 w = 1 N + 1 x v , w , t + 1 ) = 0 .
This formulation requires N 3 variables. Next, we will analyse another model used to define the TSP which is less commonly used in quantum annealing articles.

5.2. MTZ Formulation

Recalling the idea of this formulation is to consider the variables x i , j = 1 if the edge that connects the cities i and j appears in the solution path, where x i , j = 0 for all other cases. Once we have these variables, we can establish order on the route by employing a set of variables that will represent the moment the salesman arrives at that city (the variable u i expressed in binary format, will take the integer value t if the city i is reached in the tth position.). This model requires N 2 l o g 2 ( N ) , greatly improving the number of variables in the general formulation. However, when implemented using annealing it presents surprisingly inaccurate results. This is because the annealing algorithm gets stuck trying to minimise the part of the objective function generated by the sub-tour’s constraint [15], since the representation of integers in their binary format has the disadvantage that close numbers such as 2 n 1 and 2 n differ by a large number of qubits, so from the annealing they are perceived as very different solutions.
Once the two most common QUBO models of the TSP have been presented, let us analyze the formulation with which we improve the number of variables of the previous two.

6. GPS Formulation

Now we are starting to present our work. To develop this model, we take the variables x i , j , r with i , j { 0 , , N + 1 } and r { 0 , 1 , 2 } . In all the modelling, the variables x i , j , r such that i = j are not considered. We work with directional edges, that is, if in the model the edge ( i , j ) appears, we understand that first we must go through node i and immediately after that we go to j. Let us analyse what each variable represents:
  • x i , j , 0 = 1 means that the edge ( i , j ) does not appear in the path and the node i is reached earlier than the j.
  • x i , j , 1 = 1 means that the edge ( i , j ) appears in the path, so the node i is reached earlier than the j.
  • x i , j , 2 = 1 means that the edge ( i , j ) does not appear in the path, and the node j is reached earlier than the i.
Let us, therefore, see some examples (Figure 1) in which these variables do not take the value zero:
In this particular case, x 4 , 5 , 0 = 0 and x 4 , 5 , 2 = 0 since the edge ( 4 , 5 ) does appear in the solution. On the other hand x 4 , 5 , 1 will also be 0 because although edge ( 4 , 5 ) does appear in the graph, node 5 will be visited before node 4.
Let us, therefore, see examples in which these variables do not take the value zero:
  • x 5 , 1 , 1 = 1 : in this case it will take the value 1 since edge (5, 1) appears in the solution and node 5 is visited first.
  • x 4 , 1 , 2 = 1 : because in the solution we don’t have the connection (4, 1), we have the connection (1, 4) and the node 4 is visited later node 1.
  • x 5 , 3 , 2 = 1 : since the edge ( 3 , 5 ) does not appear and node 3 is visited first.
From the definition of our variables, we can define the distance travelled through the following objective function as:
i = 0 N + 1 j = 0 N + 1 d i , j x i , j , 1 .
The constraints that must be met are:
  • Constraint 1: For each i , j one and only one of the 3 cases of r must be given, so
    For all i , j : r = 0 2 x i , j , r = 1 .
  • Constraint 2: Each node must be exited once.
    For each i { 0 , , N } : j = 0 N + 1 x i , j , 1 = 1 .
  • Constraint 3: Each node must be reached once.
    For each j { 1 , , N + 1 } : i = 0 N x i , j , 1 = 1 .
  • Constraint 4: If node i is reached before j, then node j is reached after i, so, for all i , j { 0 , , N + 1 } such that i j :
    x i , j , 2 = 1 x j , i , 2 .
    It would also have to be specified for r = 0 and r = 1 , however this restriction is sufficient since by (9) it is implicit.
  • Constraint 5: If node i is reached before node j and node j is reached before node k, then node i must be reached before k. This condition will prevent the route from returning to a node from which it had already exited, thus preventing cycles from forming. We then arrive at the penalty function Equation (13).
    i = 1 N j = 1 N k = 1 N ( x j , i , 2 x k , j , 2 x j , i , 2 x k , i , 2 x k , j , 2 x k , i , 2 + x k , i , 2 ) .
With only the cases in which i j , i k and j k will be taken in the summation and in the annex (Appendix B) we will provide the approach followed to arrive at it.
The following is deduced from the Equation (13). We have x i , j , 2 = 0 if i is reached before j and x i , j , 2 = 1 in the case where j is reached before i. Thus, with the previous equation we penalise these following cases in which x i , j , 2 = 0 , x j , k , 2 = 0 and x i , k , 2 = 1 and x i , j , 2 = 1 , x j , k , 2 = 1 and x i , k , 2 = 0 which lead to cases in which it would be forming cycles (for these two situations the value of the parentheses is 1 and for the rest 0). In (27) we have a similar situation for our VRP formulation, where we offer more details. For this condition, we must have directly constructed a penalty function that avoids erroneous cases without first posing linear conditions through which to generate its corresponding penalty function.
Formulated in this way we have managed to reduce the number of variables required from N 2 log 2 N to 3 N 2 , achieving very noticeable reductions when working with large problems. Once we have this formulation, let us see how we can generalise it to the new VRP formulation.

7. New VRP Formulation

This section develops our VRP into the QUBO model using the GPS formulation.
As discussed in the introduction, this model is optimal concerning the number of binary variables used. However, this generalisation does not appear as naturally as expected because it requires a delicate step to get the constraints of the Equation (27). To do this, we will detail each step and explain each of the constraints step by step.

Original Formulation 5 N 2 Q

For this new VRP, we will consider that N is the number of cities and Q is the number of available vehicles. We first present the variables that will form the problem. We then take the following set of variables.
x i , j , r , q with i , j { 0 , , N + 1 } , r { 0 , 1 , 2 , 3 , 4 } and q { 1 , , Q }
In all the modelling, the variables x i , j , r such that i = j are not considered. The variables i, j refer to the cities must travel to, and the variable q refers to the vehicle. The nodes 0 and N + 1 correspond to the starting and ending points. Note that they may be the same node but we will separate them for convenience in the formulation. The values d i , j with i , j { 0 , , N + 1 } correspond to the distance between node i and j. Let us dive into the interpretation of each variable:
  • x i , j , 0 , q = 1 means that the vehicle q travels to the cities i and j, does not travel across the edge ( i , j ) and arrives at the city i before the j.
  • x i , j , 1 , q = 1 means that the vehicle q travels to the cities i and j travels across the edge ( i , j ) (that is, once it passes through the city i the next city it reaches is the j) and therefore the city i is reached earlier than the city j.
  • x i , j , 2 , q = 1 means that the vehicle q travels through the cities i and j and arrives at the city j earlier than at the city i.
  • x i , j , 3 , q = 1 means that the vehicle q does not go through the cities i and j, and the city i is reached earlier than the city j. Note that x i , j , 3 , q can take the value 1 whether the vehicle q passes through one of both cities or neither of them.
  • x i , j , 4 , q = 1 means that the vehicle q does not travel to the cities i and j, and the city j is reached earlier than the city i.
Even if no vehicle passes through the objects i and j, the formulation must establish an order between them. However, this restriction does not make the modelling meaningless, since we can assume that if the vehicles are ordered in the order of { 1 , , Q } , then i will be reached before j if the vehicle that passes through node i has a lower number than the one that passes through node j. Once the interpretation of each variable is explained, let us analyse the constraints that must be met.
  • Constraint 1: For each i , j , q , one and only one of the possibilities must be met for r, so:
    For all i , j , q : r = 0 4 x i , j , r , q = 1 ,
  • Constraint 2: Each vehicle has to fulfill that it leaves the starting position. For this situation, we are going to impose that:
    For all q : j = 1 N + 1 x 0 , j , 1 , q = 1 ,
    No vehicle can return to the starting position from a city, so:
    For all q : i = 0 N + 1 x i , 0 , 1 , q = 0 ,
  • Constraint 3: Every vehicle must finish in the final position. For this, it must be fulfilled that:
    For all q : i = 0 N x i , N + 1 , 1 , q = 1 ,
    No vehicle can leave the final position. We then have that:
    For all q : j = 0 N + 1 x N + 1 , j , 1 , q = 0 .
    Vehicles that do not travel on any road will meet all constraints when taking the following condition:
    x 0 , N + 1 , 1 , q = 1 .
  • Constraint 4: The vehicle must leave once and only once from each city, then:
    For each i { 1 , , N } : q = 1 Q j = 1 N + 1 x i , j , 1 , q = 1 .
  • Constraint 5: The vehicle must arrive once and only once to each city, then:
    For each j { 1 , , N } : q = 1 Q i = 0 N x i , j , 1 , q = 1 .
  • Constraint 6: The city i is reached before the city j does not depend on each vehicle. Therefore, for all the vehicles that either arrive at city i earlier than j, or arrive at city j earlier than i. Introducing the auxiliary variables a i , j , we have the following constraint. For all i , j { 1 , , N } :
    q = 1 Q x i , j , 0 , q + x i , j , 1 , q + x i , j , 3 , q = a i , j Q .
    It will then be true that for each i , j or a i , j = 1 , which means that the city i is reached earlier than the city j and therefore for each q we will have x i , j , r , q = 1 for any value of the r in which i is reached before j, or a i , j = 0 , and we will have x i , j , r , q = 0 for all the vehicles and for values r where i is reached before j.
  • Constraint 7: If the vehicle q arrives in the city j, then the vehicle q must leave the city j. For this we impose the constraint that for i { 0 , , N } , j { 1 , , N } and q { 1 , , Q } :
    x i , j , 1 , q ( 1 k = 1 N + 1 x j , k , 1 , q ) = 0 .
Let us now impose the conditions that make vehicles run on a tour.
  • Constraint 8: It must be fulfilled that either the vehicle pass through the city i before the j or arrive before to the city j rather than the city i. Therefore, it must be verified that, for i { 0 , , N } , j { 1 , , N } and q { 1 , , Q } :
    x i , j , 0 , q + x i , j , 1 , q + x i , j , 3 , q = 1 ( x j , i , 0 , q + x j , i , 1 , q + x j , i , 3 , q ) .
  • Constraint 9: If city i is reached before j and city j is reached before city k, then city i must be reached before city k. This condition will prevent the vehicle from returning to a city it has already passed through and therefore prevents a cycle from forming. To introduce this constraint, we will directly calculate a penalty function worth 0 in the correct cases and 1 in those that are not. To facilitate the understanding of the penalty function, we are going to take, for i , j , k , q , the following variables:
    a i , j = x i , j , 0 , 1 + x i , j , 1 , 1 + x i , j , 3 , 1 a j , k = x j , k , 0 , 1 + x j , k , 1 , 1 + x j , k , 3 , 1 a i , k = x i , k , 0 , 1 + x i , k , 1 , 1 + x i , k , 3 , 1 .
    Remember that it is not necessary to introduce these conditions because the constraint (22) establishes the correct values of the variables a i , j . Therefore, a i , j = 1 means that the city i is reached before the city j and the same with j and k. Also, it is very important to remember that due to the same constraint (22), we can take any of the vehicles as a reference. In this case, we have taken the first vehicle as a reference.
    In this way, fixed i , j , k , we have the 3 variables a i , j , a j , k , a i , k . Remember that a i , j , a j , k , a i , k only take the values 0 or 1. Also, let us note that the cases that lead to values of the variables for which cycles can be formed and that we must discard are ( a i , j , a j , k , a i , k ) = ( 0 , 0 , 1 ) and ( a i , j , a j , k , a i , k ) = ( 1 , 1 , 0 ) .
    In the case ( 0 , 0 , 1 ) we would have that the city j is reached after the i, the k after the j, and yet the city k is reached rather than i, which is absurd. The case ( 1 , 1 , 0 ) cannot be given either, since it reaches i before j and j before k, so it cannot be that we also reach k before i. We therefore must construct a penalty function so that for f ( a i , j , a j , k , a i , k ) it holds that f ( 0 , 0 , 1 ) > 0 , f ( 1 , 1 , 0 ) > 0 y f ( a i , j , a j , k , a i , k ) = 0 for all other cases. A function that satisfies these conditions is from the Equation (26).
    f ( a i , j , a j , k , a i , k ) : = a i , j a j , k a i , j a i , k a j , k a i , k + a i , k 2 .
    then, adding to the cost function the Equation (27)
    λ i = 1 N j = 1 N k = 1 N ( a i , j a j , k a i , j a i , k a j , k a i , k + a i , k 2 ) ,
    we will have that the best solutions will be those that comply with this constraint.
  • Constraint 10: The objective we seek is to minimise vehicle travel time. What we could do is see how long each vehicle takes to complete the route and try to minimise as much of the time as possible. However, this function soon becomes complex so we have decided to develop a different idea that simplifies the process and smoothes the objective function. If we impose the condition that all vehicles travel less distance than the distance travelled by vehicle number 1, we will have that minimising the maximum of the distances will be equivalent to minimising the distance travelled by the first vehicle. We then have the following condition. For each q { 2 , , Q } :
    i = 0 N + 1 j = 0 N + 1 d i , j x i , j , 1 , q i = 0 N + 1 j = 0 N + 1 d i , j x i , j , 1 , 1 .
    We transform this inequality into equality by taking once again D m a x : = i = 0 n max j { d i , j } and the variables b h , q (the variables b h , q are like the sub tour’s one in the MTZ slack variables and they are in their binary expression) in:
    i = 0 N + 1 j = 0 N + 1 d i , j x i , j , 1 , q + h = 0 h m a x 2 h b h , q i = 0 N + 1 j = 0 N + 1 d i , j x i , j , 1 , 1 = 0 .
    Under these conditions the function to be minimized corresponds to:
    i = 0 N + 1 j = 0 N + 1 d i , j x i , j , 1 , 1 .
    This condition has the disadvantage that we are eliminating solutions where it is another vehicle that travels the longest distance. Let us explore how to avoid this problem and get more flexibility in the model to make it easier for the Quantum Annealing to find the optimum one. We can establish an auxiliary variable D and we set that the distance travelled by each vehicle must be less than this variable, that is to say:
    i = 0 N + 1 j = 0 N + 1 d i , j x i , j , 1 , q D , for all q { 1 , , Q } .
    The variable D is an integer, so we must treat it in some way in order to include it in the model. As we explained in the introduction of the section dedicated to the formulation of the MTZ model Section 5.2, it is convenient to try to avoid the binary representation of integer variables. To do so, we can express D as a combination of the distances between edges by taking D = i = 0 N + 1 j = 0 N + 1 x i , j b i , j . Thus after imposing the constraint (31) we have that the function to minimize is D.
Thanks to this modelling of the new VRP we have been able to reduce the number of variables required to the order of 5 N 2 Q . However, we have managed to reduce it even further to 3 N 2 Q , which is detailed in Appendix A.2. However, we have preferred to present this other model due to its easy understanding.

8. Results

To test the correct VRP model developed in QUBO, which minimises the maximum distance that all the vehicles travel, we will present some comparisons of the results obtained through the simulator of the different models that have been discussed in this paper.
The code has been implemented on the Ocean library [49] from D-Wave in python. The reader can find the code at [50].
Figure 2 offers a sample of our GPS formulation’s results when using the D-Wave solver in different scenarios. We highlight some important cases that help us see the good functioning of the algorithm.
Figure 3 offers a sample of our VRP formulation’s results based on the GPS when using the D-Wave solver in different scenarios. We highlight some important cases that help us see the good functioning of the algorithm. It is important to note that our algorithm minimizes the maximum distance travelled by all the vehicles (this is equivalent to reducing the time spanned by all cars). It is worth mentioning that the number of the qubits needed in the case N = 8 and Q = 3 is 1778. Where N is the number of cities and Q, the vehicles. In the discussion section, we will analyze this point and its impact on the topology of the QPU architecture and in this case of the D-Wave.
Let us observe in Table 1, Table 2, Table 3, Table 4 and Table 5 the comparison of the number of qubits, time during which the D-Wave Quantum Annealing simulator has been executed, and the length of the path found. The sign “-” represents that the algorithm did not find a possible way during the elapsed time (in minutes). In this examples, the cities which form the TSP to solve are the vertex of the regular polygon with these number of vertex.
These results have been obtained using a simulator because we would require access to a quantum computer for a time similar to that needed to perform the simulations (in some cases more than an hour). However, it is the benefits of modelling with few qubits (such as GPS modelling) that will be much more notable when these problems are implemented on real quantum computers. Other studies that did not require many hours of the quantum computer were carried out on the D-Wave_2000Q_6. In the discussion section, we detail some interesting cases.

Discussion

Once the different models had been implemented, we achieved the following results. Through the results of the Figure 4, Figure 5, Figure 6 and Figure 7 and Table 1, Table 2, Table 3, Table 4 and Table 5, the good performance of our formulation compared to the general TSP [41] can be observed. An almost identical operation is seen with the generic TSP, except that we are improving at least the number of qubits for the same cases in our proposal. Although the time difference is not significant again, the difference between path lengths is. Let us remember that the advantage of the formulation in which we have worked is based on improving the number of qubits used. We then have that the larger the problems we are working on, the better this difference will be appreciated in the number of variables.
The MTZ model does not offer positive results. This is since Annealing presents many difficulties to find minimum expressions in which the representation of integers appears in their binary format. This is because although the numbers 2 k 1 and 2 k are close, they are not close in their binary form since they differ in k variables, so the annealing tends to present bad results. Apart from that adjusting, the Lagrange coefficient of this type of constraint is also a complicated task.
Native TSP and GPS modelling show better results. While it is true that general modelling gives slightly better results, it requires the use of a higher number of qubits. This may be since the function to be optimised for this model has a smaller number of local minima where the Annealing can get stuck or there can be a bad of the Lagrange coefficients.
The problem on which the simulations are carried out consists in finding the optimal path when the points are placed on the vertices of the regular polygons that have the same number of vertices as nodes in our problem.
One of the behaviours and results that we believe is important to mention is the following. We realized that it is even more important to consider the number of edges that our model generates. The vertex/connections in a quantum computer are limited and define our quantum computer’s typology and quality for error mitigation. Thus, a model that produces many edges (direct links) may request more from a computer than another which generates fewer. The Figure 8 offers us a comparative study between our GPS model and the native TSP. This figure shows the exponential behaviour and the number of interconnections that each model offers. Our model improves the number of qubits and gives us a great result reducing the number of connections a lot. The native TSP behaves as 0.8 ( N + 2 ) 5 while the GPS as 2 ( N + 2 ) 3 .
One aspect of GPS worth commenting on here is to generalize it also to be used for the Cutting-plane method. We must change the current constraint (13) since this methodology only works with linear constraints. The way to do this is as follows. For each i , j , k :
  • x j , i , 2 + x k , j , 2 2 x k , i , 2 + w i , j , k 1
  • x j , i , 2 + x k , j , 2 2 x k , i , 2 w i , j , k 2 .
In these equations, the variables w i , j , k p are auxiliaries. The purpose of these variables is to satisfy the said constrains. These two restrictions are satisfied by all cases of ( x j , i , 2 , x k , j , 2 , x k , i , 2 ) except for ( 0 , 0 , 1 ) (because it doesn’t satisfy the second constraint) and ( 1 , 1 , 0 ) (because it doesn’t satisfy the first constraint).

9. Conclusions and Further Work

The importance of finding a good formulation in the QUBO model that minimises the number of variables to be used is crucial for the computing era we are in, as we have commented throughout this work. It is true that, although the technology of annealing-based quantum computers allows us to have much more qubits than gate-based computers, it remains a limitation and, therefore, a challenge to try to solve. Hence highlighting the importance of our research.
With this work, we offer a new formulation for the TSP called GPS and apply it to find an optimal formulation for the VRP that minimises the time the vehicles make their journey. We have also seen that the results of the D-Wave simulator solver are consistent with the expected solution. However, we consider it unnecessary to test it in gate-based quantum computers, given their limitations today in the number of qubits. Still, we emphasise that our current formulation is valid for such computers. The improvement in our models represents a fairly significant order of magnitude because we went from N 3 variables to 3 N 2 . The Figure 9 and Figure 10 summarises the major contribution of this article.
Our GPS formulation and the VRP proposal can help in optimisation problems when we want to reduce the number of variables and therefore reduce the number of qubits quite a bit. In addition, it is interesting in situations, such as the one raised in the future line of the article [14], by modelling some biological activities on selected sets of organic compounds as can be seen in [51], or resource optimization problems such as gasoline and aircraft travel. Another interesting application could be to compare GPS with the approach offered by this reference [52] using deep reinforcement learning to address combinatorial optimisation problems with feasibility constraints. This leads us to project on how to make this comparison in quantum computing using the proposal made in this reference [53].
The results obtained from our VRP formulation and all the experiments carried out maintain the number of variables Q N 2 and allow us to offer the community new formulations that minimise the time it takes for vehicles to travel.
Future work will apply the ideas developed in the QUBO model of these problems to similar ones. In particular, we will look for other variants of the TSP to use the modelling of this that we have carried out.

Author Contributions

Conceptualization, P.A.-A.; Methodology, P.A.-A. and S.G.-B. and G.A.-L.; Software, S.G.-B. and P.A.-A. and G.A.-L.; Validation, P.A.-A. and S.G.-B. and G.A.-L.; Formal Analysis, S.G.-B. and P.A.-A. and G.A.-L.; Investigation, S.G.-B. and P.A.-A.; Resources, P.A.-A.; Data Curation, P.A.-A.; Writing—Original Draft Preparation, S.G.-B. and P.A.-A.; Writing—Review and Editing, P.A.-A. and G.A.-L. and S.G.-B.; Visualization, P.A.-A. and G.A.-L. and S.G.-B.; Supervision, P.A.-A.; Project Administration, P.A.-A. All authors have read and agreed to the published version of the manuscript.

Funding

This research received no external funding.

Institutional Review Board Statement

This article does not contain any studies with human or animal subjects.

Informed Consent Statement

Informed consent was obtained from all individual participants included in the study.

Data Availability Statement

Data sharing not applicable. No new dataset were created or analyzed in this study. Data sharing is not applicable to this article.

Conflicts of Interest

The authors declare no conflict of interest.

Appendix A

Appendix A.1. TSP Formulation N2

There is a TSP model that requires N 2 variables, where these are the following:
x i , t such as i { 0 , , N + 1 } and t { 0 , , N + 1 } .
Under this formulation x i , t = 1 denotes that the city i is reached at position t. The distance calculation function with this formulation is as follows
i = 0 N + 1 j = 0 N + 1 t = 0 N d i , j x i , t x j , t + 1 ,
where d i , j represents the distance between the node i and the node j. This expression has the problem that the distance formulation has terms of degree two and when trying to generalize this idea to other types of problems such as the VRP it will become a 4 degree constraint making use of a large number of auxiliary variables to convert it to QUBO type format.

Appendix A.2. Improved Model 3N2 Q

In the previous modelling, we can improve the number of variables used from 5 N 2 Q to 3 N 2 Q since certain variables are redundant. Let us see how we can do this. Let us take the set of variables
x i , j , r , q with i < j { 0 , , N + 1 } , r { 0 , 1 , 2 } and q { 1 , , Q }
In all of the modelling, the variables x i , j , r such that i = j are not considered. Let us analyse the interpretation of each variable. For each edge ( i , j ) , different cases depend on whether a vehicle passes through both cities, which city is visited before the other and whether the edge is travelled or not.
  • x i , j , 0 , q = 1 means that the city i is reached earlier than the j and the edge ( i , j ) is not travelled.
  • x i , j , 1 , q = 1 means that the vehicle q travels the cities i and j, it reaches the city i before the j and it travels the edge ( i , j ) .
  • x i , j , 2 , q = 1 means that the city j is reached earlier than the i and the edge ( j , i ) is not travelled.
This new simplification keeps constraints (16), (18), (20), (21), (23) and (28) defined in the same way as the first proposal of the VRP formulation, so we will only focus on the changes of the remaining constraints:
  • Constraint 1: For each i , j , q , one and only one of the possibilities must be met for r, so:
    For all i , j , q : r = 0 2 x i , j , r , q = 1 ,
  • Constraint 6: That the city i is reached before the city j does not depend on each vehicle. Therefore, for all the vehicles that either arrive at city i earlier than j, or arrive at city j earlier than i. Introducing the auxiliary variables a i , j , we have the following constraint. For all i , j { 1 , , N } :
    q = 1 Q x i , j , 0 , q + x i , j , 1 , q = a i , j Q .
  • Constraint 8: It must be fulfilled that either the vehicle pass through the city i before the j or arrive before to the city j than the i. Therefore, it must be verified that, for i { 0 , , N } , j { 1 , , N } and q { 1 , , Q } :
    x i , j , 0 , q + x i , j , 1 , q = 1 ( x j , i , 0 , q + x j , i , 1 , q ) .
  • Constraint 9: If the city i is reached before j and the city j is reached before the city k, then the city i must be reached before the city k. This condition will prevent the vehicle from returning to a city it has already passed through and therefore prevents a cycle from forming.
    λ i = 1 N j = 1 N k = 1 N ( a i , j a j , k a i , j a i , k a j , k a i , k + a i , k 2 ) ,

Appendix B. Restriction Penalty

Let us analyze the system that must be solved to build the penalty function from the Equation (13). Our penalty function P ( a i , j , a j , k , a i , k ) must satisfy that P ( 0 , 0 , 1 ) = 1 , P ( 1 , 1 , 0 ) = 1 and P ( a i , j , a j , k , a i , k ) = 0 for the rest of the cases. Let us call the variables a i , j = x , a j , k = y , a i , k = z to simplify the notation. Then, we arrive at the quadratic function P, as is demonstrated in the following:
P ( x , y , z ) = c 1 x 2 + c 2 x y + c 3 x z + c 4 y 2 + c 5 y z + c 6 z 2 .
Imposing the previous restrictions, we have the following system of equations.
-
P ( 0 , 0 , 1 ) = 1 So that c 6 = 1 .
-
P ( 0 , 1 , 0 ) = 0 So that c 4 = 0 .
-
P ( 0 , 1 , 1 ) = 0 So that c 5 + c 6 = 1 c 5 = 1 .
-
P ( 1 , 0 , 0 ) = 0 So that c 1 = 0 .
-
P ( 1 , 0 , 1 ) = 0 So that c 1 + c 3 + c 6 = 0 c 3 = 1
-
P ( 1 , 1 , 0 ) = 1 So that c 2 = 1 .
So far, we have a system of six equations with six certain compatible unknowns. First, however, an additional restriction must be verified. Let us verify if it is met.
-
P ( 1 , 1 , 1 ) = 0 . i = 1 6 c i = 1 1 1 + 1 = 0 . So that indeed all the requirements are met.
We then have that the following function which is a penalty function for the constraint (13).
P ( a i , j , a j , k , a i , k ) = a i , j a j , k a i , j a i , k a j , k a i , k + a i , k 2

References

  1. Gavish, B.; Graves, S.C. The Travelling Salesman Problem and Related Problems; Operations Research Center, Massachusetts Institute of Technology: Boston, MA, USA, 1978. [Google Scholar]
  2. Hochba, D.S. Approximation algorithms for NP-hard problems. ACM Sigact News 1997, 28, 40–52. [Google Scholar] [CrossRef]
  3. Lewis, M.; Glover, F. Quadratic unconstrained binary optimization problem preprocessing: Theory and empirical analysis. Networks 2017, 70, 79–97. [Google Scholar] [CrossRef]
  4. Cipra, B. An introduction to the Ising model. Am. Math. Mon. 1987, 94, 937–959. [Google Scholar] [CrossRef]
  5. McGeoch, C.; Cong, W. Experimental evaluation of an adiabiatic quantum system for combinatorial optimization. In Proceedings of the ACM International Conference on Computing Frontiers, Ischia, Italy, 14–16 May 2013; Volume 13. [Google Scholar]
  6. McGeoch, C. Adiabatic quantum computation and quantum annealing: Theory and practice. Synth. Lect. Quantum Comput. 2014, 5, 1–93. [Google Scholar] [CrossRef]
  7. Brooke, J.; Rosenbaum, D.; Aeppli, G. Quantum annealing of a disordered magnet. Science 1999, 284, 779–781. [Google Scholar] [CrossRef] [PubMed] [Green Version]
  8. Born, M.; Fock, V. Beweis des Adiabatensatzes. Z. Phys. 1928, 51, 165–180. [Google Scholar] [CrossRef]
  9. Farhi, E.; Gutmann, S.; Sipser, M. Quantum computation by adiabatic evolution. arXiv 2000, arXiv:quant-ph/0001106. [Google Scholar]
  10. Bian, Z.; Macready, F.; William, G.; Geordie, R. The Ising Model: Teaching an old Problem New Tricks; D-Wave Systems Inc.: Burnaby, BC, Canada, 2010; Volume 2. [Google Scholar]
  11. Toth, P.; Vigo, D. The Vehicle Routing Problem; SIAM: Philadelphia, PA, USA, 2002. [Google Scholar]
  12. Toth, P.; Vigo, D. Models, relaxations and exact approaches for the capacitated vehicle routing problem. Discret. Appl. Math. 2002, 123, 487–512. [Google Scholar] [CrossRef] [Green Version]
  13. Ralphs, T.; Kopman, L.; Pulleyblank, W.; Trotter, L. On the capacitated vehicle routing problem. Math. Program. 2003, 94, 343–359. [Google Scholar] [CrossRef]
  14. Atchade-Adelomou, P.; Alonso-Linaje, G.; Albo-Canals, J.; Casado-Fauli, D. qRobot: A Quantum Computing Approach in Mobile Robot Order Picking and Batching Problem Solver Optimization. Algorithms 2021, 14, 194. [Google Scholar] [CrossRef]
  15. Miller, C.; Tucker, A.; Zemlin, R. Integer programming formulation of traveling salesman problems. Oper. Res. Lett. 1960, 10, 27–36. [Google Scholar] [CrossRef]
  16. Boruvka, O. On a minimal problem. Práce Moravské Pridovedecké Spolecnosti 1926, 3, 37–58. [Google Scholar]
  17. Boruvka, O. Prıspevek k rešenı otázky ekonomické stavby elektrovodnıch sıtı (contribution to the solution of a problem of economical construction of electrical networks). Elektronickỳ Obzor 1926, 15, 153–154. [Google Scholar]
  18. Kruskal, J. On the shortest spanning subtree of a graph and the traveling salesman problem. Proc. Am. Math. Soc. 1956, 7, 48–50. [Google Scholar] [CrossRef]
  19. Bellmore, M.; Nemhauser, G. The Traveling Salesman Problem: A Survey. Oper. Res. 1968, 16, 538–558. [Google Scholar] [CrossRef]
  20. Lenstra, J.; Rinnooy Kan, H. Some Simple Applications of the Travelling Salesman Problem. J. Oper. Res. Soc. 1975, 26, 717–733. [Google Scholar] [CrossRef]
  21. Adelomou, P.; Ribé, E.; Cardona, X. Formulation of the social workers’ problem in quadratic unconstrained binary optimization form and solve it on a quantum computer. J. Comput. Commun. 2020, 11, 44–68. [Google Scholar] [CrossRef]
  22. Lee, J.Y.; Shi, S.-Y.; Park, T.H.; Zhang, B.-T. Solving traveling salesman problems with DNA molecules encoding numerical values. Biosystems 2004, 78, 39–47. [Google Scholar] [CrossRef] [Green Version]
  23. Ball, P. DNA Computer Helps Travelling Salesman; Springer Science and Business Media LLC: New York, NY, USA, 2000. [Google Scholar]
  24. Pataki, G. Teaching integer programming formulations using the traveling salesman problem. SIAM Rev. 2003, 45, 116–123. [Google Scholar] [CrossRef] [Green Version]
  25. Martoňák, R.; Santoro, G.; Tosatti, E. Quantum annealing of the traveling-salesman problem. Phys. Rev. E 2004, 70, 057701. [Google Scholar] [CrossRef] [Green Version]
  26. Warren, R. Adapting the traveling salesman problem to an adiabatic quantum computer. Quantum Inf. Process. 2013, 4, 1781–1785. [Google Scholar] [CrossRef]
  27. Warren, R. Small traveling salesman problems. J. Adv. Appl. Math. 2017, 2. [Google Scholar] [CrossRef]
  28. Greco, F. Traveling Salesman Problem; BoD–Books on Demand: Norderstedt, Germany, 2008; ISBN 978-953-51-5750-2. [Google Scholar]
  29. Reinelt, G. TSPLIB—A traveling salesman problem library. ORSA J. Comput. 1991, 4, 376–384. [Google Scholar] [CrossRef]
  30. Crosson, E.; Harrow, A. Simulated quantum annealing can be exponentially faster than classical simulated annealing. In Proceedings of the 2016 IEEE 57th Annual Symposium on Foundations of Computer Science (FOCS), New Brunswick, NJ, USA, 9–11 October 2016; pp. 714–723. [Google Scholar]
  31. Leung, K.; Jin, H.-D.; Xu, Z.-B. An expanding self-organizing neural network for the traveling salesman problem. Neurocomputing 2004, 62, 267–292. [Google Scholar] [CrossRef] [Green Version]
  32. Cochrane, E.; Beasley, J. The co-adaptive neural network approach to the Euclidean travelling salesman problem. Neural Netw. 2003, 10, 1499–1525. [Google Scholar] [CrossRef]
  33. Feld, S.; Gabor, T.; Seidel, C.; Neukart, F.; Galter, I.; Mauerer, W.; Linnhoff-Popien, C. A hybrid solution method for the capacitated vehicle routing problem using a quantum annealer. Front. ICT 2019, 6, 13. [Google Scholar] [CrossRef]
  34. Irie, H.; Wongpaisarnsin, G.; Terabe, M.; Miki, A.; Taguchi, S. Quantum annealing of vehicle routing problem with time, state and capacity. In International Workshop on Quantum Technology and Optimization Problems; Springer: Cham, Switzerland, 2019; pp. 145–156. [Google Scholar]
  35. Focacci, F.; Lodi, A.; Milano, M. A hybrid exact algorithm for the TSPTW. INFORMS J. Comput. 2002, 4, 403–417. [Google Scholar] [CrossRef] [Green Version]
  36. Edelkamp, S.; Gath, M.; Cazenave, T.; Teytaud, F. Algorithm and knowledge engineering for the TSPTW problem. In Proceedings of the 2013 IEEE Symposium on Computational Intelligence in Scheduling (CISched), Singapore, 16–19 April 2013; pp. 44–51. [Google Scholar]
  37. Atchade-Adelomou, P.; Golobardes-Ribé, E.; Vilasís-Cardona, X. Using the Variational-Quantum-Eigensolver (VQE) to Create an Intelligent Social Workers Schedule Problem Solver. In Hybrid Artificial Intelligent Systems, Proceedings of the 5th International Conference, HAIS 2020, Gijón, Spain, 11–13 November 2020; Lecture Notes in Computer Science; Springer: Cham, Switzerland, 2020; pp. 245–260. [Google Scholar]
  38. Atchade-Adelomou, P.; Golobardes-Ribe, E.; Vilasis-Cardona, X. Using the Parameterized Quantum Circuit combined with Variational-Quantum-Eigensolver (VQE) to create an Intelligent social workers’ schedule problem solver. arXiv 2020, arXiv:2010.05863. [Google Scholar]
  39. Atchade-Adelomou, P.; Casado-Fauli, D.; Golobardes-Ribe, E.; Vilasis-Cardona, X. quantum Case-Based Reasoning (qCBR). arXiv 2021, arXiv:2104.00409. [Google Scholar]
  40. Applegate, D.; Cook, W. A computational study of the job-shop scheduling problem. ORSA J. Comput. 1991, 3, 149–156. [Google Scholar] [CrossRef]
  41. Papalitsas, C.; Andronikos, T.; Giannakis, K.; Theocharopoulou, G.; Fanarioti, S. A QUBO model for the traveling salesman problem with time windows. Algorithms 2019, 12, 224. [Google Scholar] [CrossRef] [Green Version]
  42. Boixo, S.; Rønnow, F.; Isakov, S.; Wang, Z.; Wecker, D.; Lidar, D.; Martinis, J.; Troyer, M. Evidence for quantum annealing with more than one hundred qubits. Nat. Phys. 2014, 3, 218–224. [Google Scholar] [CrossRef] [Green Version]
  43. Preskill, J. Quantum Computing in the NISQ era and beyond. Quantum 2018, 2, 79. [Google Scholar] [CrossRef]
  44. D-Wave Systems Inc. Technical Description of the D-Wave Quantum Processing Unit; D-Wave Systems Inc.: Burnaby, BC, Canada, 2020. [Google Scholar]
  45. De Vogelaere, R. Methods of Integration Which Preserve the Contact Transformation Property of the Hamilton Equations; Technical Report; Department of Mathematics, University of Notre Dame: Notre Dame, IN, USA, 1956. [Google Scholar]
  46. Marston, C.; Balint-Kurti, G. The Fourier grid Hamiltonian method for bound state eigenvalues and eigenfunctions. J. Chem. Phys. 1989, 6, 3571–3576. [Google Scholar] [CrossRef] [Green Version]
  47. Shin, S.; Graeme, S.; Smolin, J.; Vazirani, U. How “quantum” is the D-Wave machine? arXiv 2014, arXiv:1401.7087. [Google Scholar]
  48. Lucas, A. Ising formulations of many NP problems. Front. Phys. 2014, 2, 5. [Google Scholar] [CrossRef] [Green Version]
  49. Teplukhin, A.; Kendrick, B.; Tretiak, S.; Dub, P. Electronic structure with direct diagonalization on a D-wave quantum annealer. Sci. Rep. 2020, 10, 20753. [Google Scholar] [CrossRef]
  50. Alonso-Linaje, G.; Atchade-Adelomou, P.; Gonzalez-Bermejo, S. Improvement in the Formulation of the TSP for Its Generalizations Type QUBO. 2021. Available online: https://github.com/pifparfait/GPS (accessed on 1 December 2021).
  51. Jäntschi, L.; Katona, G.; Diudea, M. Modeling Molecular Properties by Cluj Indices. Match 2000, 41, 151–188. [Google Scholar]
  52. Zhang, R.; Prokhorchuk, A.; Dauwels, J. Deep Reinforcement Learning for Traveling Salesman Problem with Time Windows and Rejections. In Proceedings of the 2020 International Joint Conference on Neural Networks (IJCNN), Glasgow, UK, 19–24 July 2020. [Google Scholar] [CrossRef]
  53. Atchade-Adelomou, P.; Alonso-Linaje, G. Quantum Enhanced Filter: QFilter. arXiv 2021, arXiv:2104.03418. [Google Scholar]
Figure 1. Example of a TSP solution with six different cities. It begins at node 0, and the arrows indicate the order in which the towns will be visited.
Figure 1. Example of a TSP solution with six different cities. It begins at node 0, and the arrows indicate the order in which the towns will be visited.
Mathematics 10 00416 g001
Figure 2. In these graphs, we can observe the algorithm’s results in different scenarios of the GPS formulation. We can follow the correct scalability of the algorithm. We provide the code [50] to check its proper functioning and to allow others to simulate lower values or values higher than N = 16.
Figure 2. In these graphs, we can observe the algorithm’s results in different scenarios of the GPS formulation. We can follow the correct scalability of the algorithm. We provide the code [50] to check its proper functioning and to allow others to simulate lower values or values higher than N = 16.
Mathematics 10 00416 g002
Figure 3. In these graphs, we can observe the algorithm’s results in different scenarios of the VRP formulation. We can follow the correct scalability of the algorithm. We provide the code [50] to verify the proper functioning of the formulation. Vehicle number 1 is red, and the next is light-steel-blue. While the depot is the 0 node in pale-green colour, and the rest are represented in light-steel-blue. In this case, we have variables cities from 4 to 12 and using up to 2 vehicles. It is important to highlight that this VRP minimises the time travelled by the cars. The number of qubits used is 2418 to test the last case.
Figure 3. In these graphs, we can observe the algorithm’s results in different scenarios of the VRP formulation. We can follow the correct scalability of the algorithm. We provide the code [50] to verify the proper functioning of the formulation. Vehicle number 1 is red, and the next is light-steel-blue. While the depot is the 0 node in pale-green colour, and the rest are represented in light-steel-blue. In this case, we have variables cities from 4 to 12 and using up to 2 vehicles. It is important to highlight that this VRP minimises the time travelled by the cars. The number of qubits used is 2418 to test the last case.
Mathematics 10 00416 g003
Figure 4. Path length comparison for N = 9. In this graph, we see how the length of the solution paths for the case of 9 Cities is very similar so that both models give good results.
Figure 4. Path length comparison for N = 9. In this graph, we see how the length of the solution paths for the case of 9 Cities is very similar so that both models give good results.
Mathematics 10 00416 g004
Figure 5. Time comparison for N = 9. This graph shows the time taken to carry out the executions in the case of 9 cities. Although it seems that there is a lot of difference, it only represents 10% of the total time, which, as we have seen in other experiences, is not significant.
Figure 5. Time comparison for N = 9. This graph shows the time taken to carry out the executions in the case of 9 cities. Although it seems that there is a lot of difference, it only represents 10% of the total time, which, as we have seen in other experiences, is not significant.
Mathematics 10 00416 g005
Figure 6. Path length comparison for N = 11. For the example of 11 cities, we can observe that the outcomes are quite similar. Although the time difference is not significant again, the difference between path lengths is. Let us remember that the advantage of the modelling we have worked is based on improving the number of qubits used. We then have that the larger the problems we are working on, the better that difference will be appreciated in the number of variables.
Figure 6. Path length comparison for N = 11. For the example of 11 cities, we can observe that the outcomes are quite similar. Although the time difference is not significant again, the difference between path lengths is. Let us remember that the advantage of the modelling we have worked is based on improving the number of qubits used. We then have that the larger the problems we are working on, the better that difference will be appreciated in the number of variables.
Mathematics 10 00416 g006
Figure 7. Time comparison for N = 11. For the example of 11 cities, we can observe that the outcomes are quite similar because although there is a mean difference of about 20 s between the results of both simulations, the experience with this problem and other similar ones is that this very small difference does not affect the results on the length of the solution path.
Figure 7. Time comparison for N = 11. For the example of 11 cities, we can observe that the outcomes are quite similar because although there is a mean difference of about 20 s between the results of both simulations, the experience with this problem and other similar ones is that this very small difference does not affect the results on the length of the solution path.
Mathematics 10 00416 g007
Figure 8. In this figure we can appreciate the exponential behaviour and the number of interconnections that each model offers. Our model (GPS) improves the number of qubits and gives us a great result reducing the number of connections a lot. The Native_TSP behaves as 0.8 ( N + 2 ) 5 while the GPS as 2 ( N + 2 ) 3 .
Figure 8. In this figure we can appreciate the exponential behaviour and the number of interconnections that each model offers. Our model (GPS) improves the number of qubits and gives us a great result reducing the number of connections a lot. The Native_TSP behaves as 0.8 ( N + 2 ) 5 while the GPS as 2 ( N + 2 ) 3 .
Mathematics 10 00416 g008
Figure 9. Comparison of the different models based on the number of qubits. This graph shows the behaviour and evolution of the numbers of qubits for each model. We see the best performance of our GPS model compared to the other models.
Figure 9. Comparison of the different models based on the number of qubits. This graph shows the behaviour and evolution of the numbers of qubits for each model. We see the best performance of our GPS model compared to the other models.
Mathematics 10 00416 g009
Figure 10. Benchmark between MTZ and GPS model based on the number of qubits. We can appreciate that for 30 cities, GPS model needs 2700 qubits while the MTZ 4458.
Figure 10. Benchmark between MTZ and GPS model based on the number of qubits. We can appreciate that for 30 cities, GPS model needs 2700 qubits while the MTZ 4458.
Mathematics 10 00416 g010
Table 1. A regular polygon layout has been taken where the cities occupy the positions of the nodes [50] for the elaboration of all tables. In this scenario of 4 cities, we set comparison with the 3 models, MTZ, native TSP and GPS. The comparison is based on the number of times to find the solution, the distance travelled, and the number of qubits. We can appreciate the good performance of our GPS model, and above all the savings it offers us in the number of qubits.
Table 1. A regular polygon layout has been taken where the cities occupy the positions of the nodes [50] for the elaboration of all tables. In this scenario of 4 cities, we set comparison with the 3 models, MTZ, native TSP and GPS. The comparison is based on the number of times to find the solution, the distance travelled, and the number of qubits. We can appreciate the good performance of our GPS model, and above all the savings it offers us in the number of qubits.
GPSNative TSPMTZ
Number of qubits75100140
Elapsed Time (min)0.3320.080.569
Path Length (m)5.655.655.65
Table 2. A regular polygon layout has been taken where the cities occupy the positions of the nodes [50] for the elaboration of all tables. In this scenario of 6 cities, we set comparison with the 3 models, MTZ, native TSP and GPS. The comparison is based on the number of times to find the solution, the distance travelled, and the number of qubits. We can appreciate the good performance of our GPS model, and above all the savings it offers us in the number of qubits.
Table 2. A regular polygon layout has been taken where the cities occupy the positions of the nodes [50] for the elaboration of all tables. In this scenario of 6 cities, we set comparison with the 3 models, MTZ, native TSP and GPS. The comparison is based on the number of times to find the solution, the distance travelled, and the number of qubits. We can appreciate the good performance of our GPS model, and above all the savings it offers us in the number of qubits.
GPSNative TSPMTZ
Number of qubits147294266
Elapsed Time (min)0.3370.391.338
Path Length (m)6.006.008.46
Table 3. A regular polygon layout has been taken where the cities occupy the positions of the nodes [50] for the elaboration of all tables. In this scenario of 8 cities, we set comparison with the 3 models, MTZ, native TSP and GPS. The comparison is based on the number of times to find the solution, the distance travelled, and the number of qubits. We can appreciate the good performance of our GPS model, and above all the savings it offers us in the number of qubits.
Table 3. A regular polygon layout has been taken where the cities occupy the positions of the nodes [50] for the elaboration of all tables. In this scenario of 8 cities, we set comparison with the 3 models, MTZ, native TSP and GPS. The comparison is based on the number of times to find the solution, the distance travelled, and the number of qubits. We can appreciate the good performance of our GPS model, and above all the savings it offers us in the number of qubits.
GPSNative TSPMTZ
Number of qubits243648522
Elapsed Time (min)1.2091.1772.676
Path Length (m)6.1229.5811.46
Table 4. A regular polygon layout has been taken where the cities occupy the positions of the nodes [50] for the elaboration of all tables. In this scenario of 10 cities, we set comparison with the 3 models, MTZ, native TSP and GPS. The comparison is based on the number of times to find the solution, the distance travelled, and the number of qubits. We can appreciate the good performance of our GPS model, and above all the savings it offers us in the number of qubits.
Table 4. A regular polygon layout has been taken where the cities occupy the positions of the nodes [50] for the elaboration of all tables. In this scenario of 10 cities, we set comparison with the 3 models, MTZ, native TSP and GPS. The comparison is based on the number of times to find the solution, the distance travelled, and the number of qubits. We can appreciate the good performance of our GPS model, and above all the savings it offers us in the number of qubits.
GPSNative TSPMTZ
Number of qubits3631210770
Elapsed Time (min)3.3163.0874.175
Path Length (m)12.5110.978-
Table 5. A regular polygon layout has been taken where the cities occupy the positions of the nodes [50] for the elaboration of all tables. In this scenario of 12 cities, we set comparison with the 3 models, MTZ, native TSP and GPS. The comparison is based on the number of times to find the solution, the distance travelled, and the number of qubits.
Table 5. A regular polygon layout has been taken where the cities occupy the positions of the nodes [50] for the elaboration of all tables. In this scenario of 12 cities, we set comparison with the 3 models, MTZ, native TSP and GPS. The comparison is based on the number of times to find the solution, the distance travelled, and the number of qubits.
GPSNative TSPMTZ
Number of qubits50720281066
Elapsed Time (min)7.9929.67710.578
Path Length (m)14.28612.28-
Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Share and Cite

MDPI and ACS Style

Gonzalez-Bermejo, S.; Alonso-Linaje, G.; Atchade-Adelomou, P. GPS: A New TSP Formulation for Its Generalizations Type QUBO. Mathematics 2022, 10, 416. https://doi.org/10.3390/math10030416

AMA Style

Gonzalez-Bermejo S, Alonso-Linaje G, Atchade-Adelomou P. GPS: A New TSP Formulation for Its Generalizations Type QUBO. Mathematics. 2022; 10(3):416. https://doi.org/10.3390/math10030416

Chicago/Turabian Style

Gonzalez-Bermejo, Saul, Guillermo Alonso-Linaje, and Parfait Atchade-Adelomou. 2022. "GPS: A New TSP Formulation for Its Generalizations Type QUBO" Mathematics 10, no. 3: 416. https://doi.org/10.3390/math10030416

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