A method for solving large-scale combinatorial optimization problems using small memory devices

By dividing large-scale combinatorial optimization problems into smaller problems and repeatedly calling small-memory devices for solving them, the problems of low efficiency and high cost in existing technologies are solved, achieving efficient and low-cost combinatorial optimization solutions.

CN117648185BActive Publication Date: 2026-06-26SHAOXING RES INST OF ZHEJIANG UNIV

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
SHAOXING RES INST OF ZHEJIANG UNIV
Filing Date
2023-11-30
Publication Date
2026-06-26

AI Technical Summary

Technical Problem

Existing technologies struggle to solve large-scale combinatorial optimization problems efficiently and cost-effectively in a short time, especially due to hardware limitations and excessive device memory requirements, which lead to difficulties in convergence, long processing times, and low accuracy.

Method used

The large-scale combinatorial optimization problem is divided into multiple smaller problems, and the same device is repeatedly called to solve the problem using a small memory device until the results are consistent. The method of division and repeated solution can achieve high speed and high accuracy.

Benefits of technology

It achieves high-speed, high-precision, and low-cost solutions to large-scale combinatorial optimization problems, reducing memory requirements and improving solution efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117648185B_ABST
    Figure CN117648185B_ABST
Patent Text Reader

Abstract

The application discloses a method for solving large-scale combinatorial optimization problems by using a small memory device, which comprises the following steps: S1, performing mathematical modeling on the combinatorial optimization problem and constructing a target matrix for solving; S2, dividing the target matrix for solving into a plurality of small matrices as small-scale target problem models; S3, setting the number of repeated solving times of the same target problem; and S4, repeatedly solving the small-scale target problem models by cyclically calling the same small memory device. The method for solving large-scale combinatorial optimization problems by using a small memory device disclosed by the application solves the large-scale combinatorial optimization problems by dividing the large-scale combinatorial optimization problems into a plurality of small-scale problems for approximate solving and repeatedly solving by cyclically calling the same small memory device until the results are consistent, so that a high-speed, high-precision and low-cost solving method for the large-scale combinatorial optimization problems is realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of combinatorial optimization problem solving technology, specifically relating to a method for solving large-scale combinatorial optimization problems using small memory devices. Background Technology

[0002] Classical computers typically struggle to solve combinatorial optimization problems efficiently in a short time. While quantum algorithms can solve these problems quickly, they face numerous hardware limitations. For instance, quantum annealing devices based on cryogenic superconducting systems still struggle to maintain large-scale quantum coherence. Although quantum heuristic algorithms based on traditional circuits can handle large-scale combinatorial optimization problems, they suffer from high hardware costs and excessive memory requirements. Furthermore, combinatorial optimization problems at massive scales exhibit convergence difficulties, long processing times, and low accuracy.

[0003] Therefore, further improvements will be made to address the aforementioned issues. Summary of the Invention

[0004] The main objective of this invention is to provide a method for solving large-scale combinatorial optimization problems using small memory devices. This method achieves a high-speed, high-precision, and low-cost solution for large-scale combinatorial optimization problems by dividing the large-scale combinatorial optimization problem into multiple smaller problems for approximate solution and repeatedly calling the same small memory device until the results are consistent.

[0005] To achieve the above objectives, this invention provides a method for solving large-scale combinatorial optimization problems using small memory devices, comprising the following steps:

[0006] Step S1: Perform mathematical modeling of the combinatorial optimization problem and construct the objective matrix for solving;

[0007] Step S2: Divide the target matrix used for solving into multiple smaller matrices as a small-scale target problem model;

[0008] Step S3: Set the number of times to solve the same objective problem repeatedly;

[0009] Step S4: Repeatedly call the same small memory device to solve the small-scale target problem model repeatedly;

[0010] Step S5: Check the solution results of step S4. If the solution results are completely consistent, the results are stored. If there are inconsistent qubits in the solution results, fix the qubits with consistent results and input the qubits with inconsistent results into the small memory device to continue solving until the results are completely consistent.

[0011] Step S6: Assemble the solutions of each small-scale objective problem model stored in step S5 into the solution of the original objective problem model;

[0012] Step S7: Check whether the solution of the original target problem model assembled in step S6 has met expectations. If it has met expectations, output the result; if it has not met expectations, use the existing result as the initial value to continue solving in step S2.

[0013] As a further preferred technical solution to the above technical solution, the target (problem) matrix constructed in step S1 includes:

[0014] The form of the Ising model:

[0015]

[0016] Among them, H ising is the Hamiltonian of the Ising model, which is the objective function to be minimized; s is an n-dimensional vector with n qubits, each element taking the value +1 or -1; J is an n×n matrix used to describe the interaction between the qubits; h is an n-dimensional vector used to describe the external magnetic field.

[0017] Alternatively, the Quadratic Unconstrained Binary Optimization (QUBO) form of the Ising model can be used:

[0018]

[0019] Where w is an n-dimensional vector with n qubits, each element taking the value +1 or 0; J is an n×n matrix used to describe the interaction between the qubits, and the Ising model and the QUBO model can be converted to each other;

[0020] Alternatively, regularization can be added to the Ising or QUBO models.

[0021] As a further preferred technical solution to the above technical solution, in step S2:

[0022] The original problem model is divided into multiple smaller-scale objective problem models (which can divide most of the qubits in the original problem model into smaller-scale objective problem models). b The value is fixed, only for the remaining qubits w a (to find the value);

[0023] Take random values ​​as the initial values ​​for a small-scale objective problem model, or take all elements as the same value as the initial values.

[0024] As a further preferred technical solution to the above technical solution, in step S4, the same small memory device is called repeatedly to process the w of each small-scale target problem model. a Solve k times.

[0025] As a further preferred technical solution to the above technical solution, in step S5, based on the k solutions of the small-scale target problem model calculated in step S4, it is checked whether the qubits among the k solutions are completely consistent. If they are completely consistent, the solution at this time is recorded; if there are qubits with inconsistent results, then w a The qubits with consistent results among the k solutions are fixed, and the qubits with inconsistent results are solved k times as a smaller problem, until the k results are completely consistent.

[0026] As a further preferred technical solution to the above technical solution, in step S5, the solution is recorded when the number of qubits with consistent results among the k solutions reaches the expected value, or if the number of identical results exceeds half of k, the result is taken as the solution for that qubit at this time.

[0027] As a further preferred technical solution to the above technical solution, in step S6, the solutions of each small-scale target problem model recorded in step S5 are assembled in sequence to restore the solution of the original target problem model.

[0028] As a further preferred technical solution to the above technical solution, in step S7, it is determined whether the solution of the original target problem model has reached the expected benchmark, whether it is the objective function value of the Ising model or the QUBO model, or the target value expected to be optimized in the actual problem, or whether the calculation stops and the solution is output after a certain number of times or time has been reached in the solution process.

[0029] To achieve the above objectives, the present invention also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the steps of the method for solving large-scale combinatorial optimization problems using a small memory device.

[0030] To achieve the above objectives, the present invention also provides a non-transitory computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements the steps of the method for solving large-scale combinatorial optimization problems using small memory devices.

[0031] The beneficial effects of this invention are as follows:

[0032] This invention achieves high-speed, high-precision, and low-cost solutions to large-scale combinatorial optimization problems by dividing them into multiple smaller problems for approximate solutions and repeatedly calling the same small memory device until the results are consistent. Attached Figure Description

[0033] Figure 1 This is a flowchart of a method for solving large-scale combinatorial optimization problems using small memory devices, according to the present invention.

[0034] Figure 2 This is a flowchart illustrating the second embodiment of a method for solving large-scale combinatorial optimization problems using small memory devices according to the present invention on the maximum partition graph problem G22.

[0035] Figure 3 This is a flowchart illustrating the third embodiment of a method for solving large-scale combinatorial optimization problems using small memory devices according to the present invention on the maximum partitioning graph problem G22.

[0036] Figure 4 These are the results of the second and third embodiments of the method for solving large-scale combinatorial optimization problems using small memory devices according to the present invention on the maximum partition graph problem G22. Detailed Implementation

[0037] The following description is intended to disclose the present invention and enable those skilled in the art to implement it. The preferred embodiments described below are merely examples, and other obvious variations will occur to those skilled in the art. The basic principles of the invention defined in the following description can be applied to other embodiments, modifications, improvements, equivalents, and other technical solutions that do not depart from the spirit and scope of the invention.

[0038] In the preferred embodiments of the present invention, those skilled in the art should note that the electronic devices and storage media involved in the present invention can be considered as prior art.

[0039] First embodiment (preferred embodiment).

[0040] like Figure 1 As shown, this invention discloses a method for solving large-scale combinatorial optimization problems using small memory devices, comprising the following steps:

[0041] Step S1: Perform mathematical modeling of the combinatorial optimization problem and construct the objective matrix for solving;

[0042] Step S2: Divide the target matrix used for solving into multiple smaller matrices as a small-scale target problem model;

[0043] Step S3: Set the number of times to solve the same objective problem repeatedly;

[0044] Step S4: Repeatedly call the same small memory device to solve the small-scale target problem model repeatedly;

[0045] Step S5: Check the solution results of step S4. If the solution results are completely consistent, the results are stored. If there are inconsistent qubits in the solution results, fix the qubits with consistent results and input the qubits with inconsistent results into the small memory device to continue solving until the results are completely consistent.

[0046] Step S6: Assemble the solutions of each small-scale objective problem model stored in step S5 into the solution of the original objective problem model;

[0047] Step S7: Check whether the solution of the original target problem model assembled in step S6 has met expectations. If it has met expectations, output the result; if it has not met expectations, use the existing result as the initial value to continue solving in step S2.

[0048] Specifically, the target (problem) matrix constructed in step S1 includes:

[0049] The form of the Ising model:

[0050]

[0051] Among them, H ising is the Hamiltonian of the Ising model, which is the objective function to be minimized; s is an n-dimensional vector with n qubits, each element taking the value +1 or -1; J is an n×n matrix used to describe the interaction between the qubits; h is an n-dimensional vector used to describe the external magnetic field.

[0052] Alternatively, the Quadratic Unconstrained Binary Optimization (QUBO) form of the Ising model can be used:

[0053]

[0054] Where w is an n-dimensional vector with n qubits, each element taking the value +1 or 0; J is an n×n matrix used to describe the interaction between the qubits, and the Ising model and the QUBO model can be converted to each other;

[0055] Alternatively, regularization can be added to the Ising or QUBO models.

[0056] More specifically, in step S2:

[0057] The original problem model is divided into multiple smaller-scale objective problem models (which can divide most of the qubits in the original problem model into smaller-scale objective problem models). b The value is fixed, only for the remaining qubits w a (to find the value);

[0058] Take random values ​​as the initial values ​​for a small-scale objective problem model, or take all elements as the same value as the initial values.

[0059] Furthermore, in step S4, the same small memory device is called repeatedly for each small-scale target problem model's w. a Solve k times.

[0060] Furthermore, in step S5, based on the k solutions to the small-scale objective problem model calculated in step S4 above, it is checked whether the qubits among the k solutions are completely consistent. If they are completely consistent, the solution at this time is recorded; if there are qubits with inconsistent results, then w a The qubits with consistent results among the k solutions are fixed, and the qubits with inconsistent results are solved k times as a smaller problem, until the k results are completely consistent.

[0061] Preferably, in step S5, the solution is recorded when the number of qubits with consistent results among the k solutions reaches the expected value, or if the number of identical results exceeds half of k, the result is taken as the solution for that qubit.

[0062] Preferably, in step S6, the solutions of each small-scale target problem model recorded in step S5 are assembled in sequence to restore the solution of the original target problem model.

[0063] Preferably, in step S7, it is determined whether the solution of the original target problem model has reached the expected benchmark, whether it is the objective function value of the Ising model or the QUBO model, or the target value expected to be optimized in the actual problem, or whether the calculation stops and the solution is output after a certain number of times or time has been reached in the solution process.

[0064] Preferably, the small memory device used for solving the problem can be a computing device such as a CPU or GPU, or a traditional circuit device such as an FPGA or an optical chip.

[0065] The present invention also discloses an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the steps of the method for solving large-scale combinatorial optimization problems using a small memory device.

[0066] The present invention also discloses a non-transitory computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements the steps of the method for solving large-scale combinatorial optimization problems using small memory devices.

[0067] Second embodiment.

[0068] This embodiment further specifies the application to the maximum partitioning graph problem G22, based on the first embodiment. Specifically, the implementation is as follows:

[0069] like Figure 2 As shown, this embodiment provides a method for efficiently solving large-scale combinatorial optimization problems using small memory devices, specifically including the following:

[0070] 1. Read the connection data of 2000 vertices in the maximum partitioning graph problem G22 and construct the objective matrix Q for the QUBO problem. The matrix Q is 2000×2000. The specific construction method is as follows: first set all elements of Q to 0, and when the edge between vertex i and vertex j is incremented by 1, adjust the corresponding elements of Q as follows:

[0071] Q i,i +=-1

[0072] Q j,j +=-1

[0073] Q i,j +=2

[0074] 2. Take random values ​​as the initial value for 2000 qubits, and divide the 2000×2000 QUBO problem constructed in step 1 above into 40 smaller problems of size 50×50. During the division, the original 2000 qubits w are divided into 50 qubits w to be solved. a With the remaining 1950 qubits w b Construct a small-scale QUBO problem of 50×50 as follows:

[0075]

[0076] Furthermore, in practical applications, a 50×50 diagonal block can be selected from the original matrix Q of size 2000×2000 as a small-scale QUBO problem to solve.

[0077] 3. Call the Simulated Annealing algorithm on the CPU to solve each of the 50×50 small-scale QUBO problems constructed in step 2 above 3 times.

[0078] Furthermore, in practical applications, heuristic algorithms such as genetic algorithms and particle swarm optimization can also be chosen to solve the problem.

[0079] Furthermore, in practical applications, devices such as FPGAs or optical chips can also be selected as solvers.

[0080] 4. Compare the three solutions obtained in step 3 above to check if the three results of the 50 qubits are completely consistent. If they are completely consistent, record the results of the 50 qubits at this point and continue to solve the other parts of the original problem; if there are qubits with inconsistent results in the three tests, for example, 20 qubits with inconsistent results in the three tests, fix the remaining 30 qubits with consistent results, and use the same method as in step 2 above to construct a smaller-scale QUBO problem of 20×20, and continue to solve until the three results of all qubits are completely consistent.

[0081] Furthermore, in practical applications, one can choose to continue solving until the number of qubits with inconsistent results in three trials is less than a certain value.

[0082] Furthermore, in practical applications, the final result can be determined by majority vote of the three solutions. For example, if the three solutions of a certain qubit are (1,1,0), then 1 is taken as the final result.

[0083] 5. After all 40 small-scale problems of size 50×50 have been solved, the recorded results of the 40 50-qubit problems are integrated into a 2000-qubit result, which is the solution to the original QUBO problem of size 2000×2000. The number of global loops at this time is recorded. Each time 40 small-scale problems of size 50×50 are completed and integrated into a new 2000-qubit result, it is considered one global loop.

[0084] 6. If the global loop count reaches the preset value, pause the process and record the number of partitions at this time; if the preset global loop count is not reached, use the latest recorded result of 2000 qubits as the initial value and input it into step 2 above to continue the solution.

[0085] 7. Figure 4 Example 1 shows the effect of this embodiment. The horizontal axis represents the CPU calculation time, and the vertical axis represents the maximum number of segments. In this embodiment, the number of global loops is 1, 2, 3, 5, and 10. Figure 4 The SA in the middle is the result of directly solving a 2000×2000 QUBO problem using the CPU to call the simulated annealing algorithm; Figure 4 The multi in the middle refers to the result of using the CPU to call the simulated annealing algorithm to solve the 2000×2000 QUBO problem three times, fixing the qubits with consistent results in the three times, and continuing to solve the qubits with inconsistent results in the three times; Figure 4`partial` represents the result of dividing the 2000×2000 QUBO problem into 40 smaller 50×50 problems and solving them using the CPU-based simulated annealing algorithm, with global loop counts of 1, 2, 3, 5, 10, 20, and 40. Figure 4 It can be seen that this embodiment achieves better results in the same computation time, and the memory requirement of the solver is much lower than that of the original problem, realizing a high-efficiency, high-precision, and low-cost solution to large-scale combinatorial optimization problems.

[0086] Third embodiment.

[0087] This embodiment further specifies the application to the maximum partitioning graph problem G22, based on the first embodiment. Specifically, the implementation is as follows:

[0088] like Figure 3 As shown, this embodiment provides a method for efficiently solving large-scale combinatorial optimization problems using small memory devices, specifically including the following:

[0089] 1. Read the connection data of 2000 vertices in the maximum partitioning graph problem G22 and construct the objective matrix Q for the QUBO problem. The matrix Q is 2000×2000. The specific construction method is as follows: first set all elements of Q to 0, and when the edge between vertex i and vertex j is incremented by 1, adjust the corresponding elements of Q as follows:

[0090] Q i,i +=-1

[0091] Q j,j +=-1

[0092] Q i,j +=2

[0093] 2. Take random values ​​as the initial value for 2000 qubits, and divide the 2000×2000 QUBO problem constructed in step 1 above into 40 smaller problems of size 50×50. During the division, the original 2000 qubits w are divided into 50 qubits w to be solved. a With the remaining 1950 qubits w b Construct a small-scale QUBO problem of 50×50 as follows:

[0094]

[0095] Furthermore, in practical applications, a 50×50 diagonal block can be selected from the original matrix Q of size 2000×2000 as a small-scale QUBO problem to solve.

[0096] 3. Call the Simulated Annealing algorithm on the CPU to solve each of the 50×50 small-scale QUBO problems constructed in step 2 above 3 times and record the results of the 3 times.

[0097] Furthermore, in practical applications, heuristic algorithms such as genetic algorithms and particle swarm optimization can also be chosen to solve the problem.

[0098] Furthermore, in practical applications, devices such as FPGAs or optical chips can also be selected as solvers.

[0099] 4. After all 40 small-scale problems of size 50×50 have been solved, the three solutions of the 40 small-scale problems of size 50×50 are integrated into three solutions of 2000 qubits.

[0100] 5. Compare the three results of the 2000 qubits obtained in step 4 above to see if they are completely consistent. If they are completely consistent, record the results of the 2000 qubits at this time; if there are qubits with inconsistent results in the three tests among the 2000 qubits, for example, 500 qubits with inconsistent results in the three tests, fix the remaining 1500 qubits with consistent results, and construct a 500×500 QUBO problem using the same method as in step 2 above. Then, divide the 500×500 QUBO problem into 10 smaller 50×50 problems. Input each 50×50 smaller QUBO problem in step 3 above, solve it three times, and record the results of the three tests. Repeat this process until the three results of all qubits are completely consistent.

[0101] Furthermore, in practical applications, one can choose to continue solving until the number of qubits with inconsistent results in three trials is less than a certain value.

[0102] Furthermore, in practical applications, the final result can be determined by majority vote of the three solutions. For example, if the three solutions of a certain qubit are (1,1,0), then 1 is taken as the final result.

[0103] 6. After completing step 5 above, record the number of global loops at this point. Each global loop is considered to be completed for every 2000 qubits of final result. If the number of global loops reaches the preset value, pause the process and record the number of partitions at this point. If the preset number of global loops has not been reached, use the latest recorded result of 2000 qubits as the initial value and input it into step 2 above to continue the solution.

[0104] 7. Figure 4Example 2 in the middle shows the effect of this embodiment. The horizontal axis is the CPU calculation time, and the vertical axis is the maximum number of divisions. In this embodiment, the number of global loops is 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, and 12. Figure 4 The SA in the middle is the result of directly solving a 2000×2000 QUBO problem using the CPU to call the simulated annealing algorithm; Figure 4 The multi in the middle refers to the result of using the CPU to call the simulated annealing algorithm to solve the 2000×2000 QUBO problem three times, fixing the qubits with consistent results in the three times, and continuing to solve the qubits with inconsistent results in the three times; Figure 4 `partial` represents the result of dividing the 2000×2000 QUBO problem into 40 smaller 50×50 problems and solving them using the CPU-based simulated annealing algorithm, with global loop counts of 1, 2, 3, 5, 10, 20, and 40. Figure 4 It can be seen that this embodiment achieves better results in the same computation time, and the memory requirement of the solver is much lower than that of the original problem, realizing a high-efficiency, high-precision, and low-cost solution to large-scale combinatorial optimization problems.

[0105] It is worth mentioning that the technical features of electronic devices and storage media involved in this patent application should be regarded as prior art. The specific structure, working principle, and possible control methods and spatial arrangement of these technical features can be adopted using conventional choices in the field, and should not be regarded as the inventive point of this patent. This patent will not be further elaborated in detail.

[0106] For those skilled in the art, modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this invention should be included within the protection scope of this invention.

Claims

1. A method for solving large-scale combinatorial optimization problems using small memory devices, characterized in that, Includes the following steps: Step S1: Perform mathematical modeling of the combinatorial optimization problem and construct the objective matrix for solving; Step S2: Divide the target matrix used for solving into multiple smaller matrices as a small-scale target problem model; Step S3: Set the number of times to solve the same objective problem repeatedly; Step S4: Repeatedly call the same small memory device to solve the small-scale target problem model repeatedly; Step S5: Check the solution results of step S4. If the solution results are completely consistent, the results are stored. If there are inconsistent qubits in the solution results, fix the qubits with consistent results and input the qubits with inconsistent results into the small memory device to continue solving until the results are completely consistent. Step S6: Assemble the solutions of each small-scale objective problem model stored in step S5 into the solution of the original objective problem model; Step S7: Check whether the solution of the original target problem model assembled in step S6 has met expectations. If it has met expectations, output the result; if it has not met expectations, use the existing result as the initial value and input it into step S2 to continue solving. In step S2: The original problem model is divided into multiple smaller-scale objective problem models; Take random values ​​as the initial values ​​for a small-scale objective problem model, or take all elements as the same value as the initial value; In step S4, the same small memory device is called repeatedly for each small-scale target problem model. Solve Second-rate; In step S5, based on the small-scale objective problem model calculated in step S4 above... One solution, check If the qubits of each solution are completely identical, record the solution at that time; otherwise, record the solution. of The qubits with consistent results in each solution are fixed, while the qubits with inconsistent results are used to solve a smaller-scale problem. Next, until The results were completely consistent; The solution recorded in step S5 at this point is... The solution is recorded when the number of identical qubits among the solutions reaches the expected value; otherwise, if the number of identical qubits exceeds the expected value... The result of half of the results is taken as the solution for that qubit at this time.

2. The method for solving large-scale combinatorial optimization problems using small memory devices according to claim 1, characterized in that, The target matrix constructed in step S1 includes: The form of the Ising model: ; in, The Hamiltonian of the Ising model is required, which is the objective function to be minimized. For having 1 qubit A dimensional vector, where each element takes the value +1 or -1; for A matrix is ​​used to describe the interactions between the qubits; for A dimensional vector used to describe the external magnetic field; Alternatively, the ising model can take the form of a quadratic unconstrained binary optimization model: ; in, For having 1 qubit A dimensional vector, where each element takes the value +1 or 0; for The matrix is ​​used to describe the interaction between each qubit, and the Ising model and the QUBO model can be converted to each other; Alternatively, regularization can be added to the Ising or QUBO models.

3. The method for solving large-scale combinatorial optimization problems using small memory devices according to claim 1, characterized in that, In step S6, the solutions of each small-scale target problem model recorded in step S5 are assembled in sequence to restore the solution of the original target problem model.

4. The method for solving large-scale combinatorial optimization problems using small memory devices according to claim 2, characterized in that, In step S7, it is determined whether the solution of the original target problem model has reached the expected benchmark, whether it is the objective function value of the Ising model or the QUBO model, or the target value expected to be optimized in the actual problem, or whether the calculation stops and the solution is output after a certain number of iterations or time has been reached in the solution process.