COMPUTER-READABLE RECORDING MEDIUM STORING PROGRAM, DATA PROCESSING APPARATUS, AND DATA PROCESSING METHOD

Information

  • Patent Application
  • 20240394559
  • Publication Number
    20240394559
  • Date Filed
    April 30, 2024
    9 months ago
  • Date Published
    November 28, 2024
    2 months ago
  • CPC
    • G06N5/01
  • International Classifications
    • G06N5/01
Abstract
An apparatus performs processing including: specifying, for each constraint term in an evaluation function of a combinatorial optimization problem, a first auxiliary variable representing an input amount subjected to a constraint of each constraint term; generating a second auxiliary variable obtained by quantizing the first auxiliary variable; for a first constraint term, with which the second auxiliary variable changes in association with a change in a first state variable of the evaluation function, calculating a difference of a contribution amount of the first constraint term, to a first change amount in the evaluation function associated with the change in the first state variable; and based on the difference, calculating the first change amount or updating a local field to be used to specify a second change amount in the evaluation function associated with the change in each state variable.
Description
CROSS-REFERENCE TO RELATED APPLICATION

This application is based upon and claims the benefit of priority of the prior Japanese Patent Application No. 2023-84203, filed on May 22, 2023, the entire contents of which are incorporated herein by reference.


FIELD

The embodiments discussed herein are related to a non-transitory computer-readable recording medium storing a program, a data processing apparatus, and a data processing method.


BACKGROUND

Some combinatorial optimization problems have a constraint condition supposed to be satisfied by a solution, and an approach for performing a search in consideration of the constraint condition has been proposed. Examples of the constraint condition include an inequality constraint, an equality constraint, an absolute value constraint, and the like. An evaluation function reflecting a constraint condition can be represented by following Formula (1).









[

Mathematical


Formula


1

]










H

(
x
)

=


E

(
x
)

+


P
tot

(
x
)






(
1
)







The first term on the right side of Formula (1) is a cost term, and the second term on the right side is a total value of a plurality of constraint terms. The total value of the plurality of constraint terms can be represented by following Formula (2).









[

Mathematical


Formula


2

]











P
tot

(
x
)

=




k
=
1

m




λ
k




P
k

(
x
)







(
2
)







In Formula (2), Pk(x) denotes a penalty function of a constraint term relating to a constraint having k as the identification number. Pk(x) is represented by a nonlinear function. The summed number of constraint terms is represented by m. In addition, λk denotes a predetermined coefficient (hereinafter referred to as a constraint coefficient) for the constraint having k as the identification number. Hereinafter, λkPk(x) will be referred to as a constraint term.


In a case where the constraint condition is an inequality constraint, Pk(x) in Formula (2) can be represented by following Formula (3).









[

Mathematical


Formula


3

]











P
k

(
x
)

=

max

(

0
,


P
in

(
k
)


(
x
)


)





(
3
)







In a case where the constraint condition is an equality constraint, Pk(x) in Formula (2) can be represented by following Formula (4).









[

Mathematical


Formula


4

]











P
k

(
x
)

=



"\[LeftBracketingBar]"



P
in

(
k
)


(
x
)



"\[RightBracketingBar]"






(
4
)







In Pk(x) as indicated in Formulas (3) and (4), Pin(k)(x) denotes an input amount (also referred to as a resource amount or a used resource amount) subjected to the constraint having k as the identification number. The input amount is represented by following Formula (5).









[

Mathematical


Formula


5

]











P
in

(
k
)


(
x
)

=





i
=
1

n




C
ki



x
i



+

b

(
k
)







(
5
)







A coefficient (weight value) indicating a weight for xi in the constraint having k as the identification number is denoted by Cki. A coefficient representing an upper limit or the like of the input amount in the constraint having k as the identification number is denoted by b(k).


Meanwhile, the cost term is represented by, for example, a function of a quadratic form as in following Formula (6).









[

Mathematical


Formula


6

]










E

(
x
)

=



-

1
2







i
=
1

n





j
=
1

n



W
ij



x
i



x
j





-




i
=
1

n



b
i



x
i








(
6
)







The first term on the right side is for integrating products of values (0 or 1) of two state variables and a weight value (representing strength of correlation between the two state variables) for all combinations of n state variables with neither omission nor duplication. A state variable having i as the identification number is denoted by xi, a state variable having j as the identification number is denoted by xj, and a weight value indicating magnitude of correlation between the state variables having i and j as the identification numbers is denoted by Wij. The second term on the right side is for summing up products of a bias coefficient and a state variable for each identification number. A bias coefficient for i as the identification number is indicated by bi.


In addition, a change amount (ΔEi) of the cost term associated with the change in the value of xi is represented by following Formula (7).









[

Mathematical


Formula


7

]










Δ


E
i


=



-
Δ




x
i

(




j



W
ij



x
j



+

b
i


)


=


-
Δ



x
i



h
i







(
7
)







In Formula (7), when xi changes to 0 from 1, Δxi has −1, and when xi changes to 1 from 0, Δxi has 1. Note that hi is called a local field, and ΔEi is obtained by multiplying hi by a sign (+1 or −1) according to Δxi. For this reason, hi can also be said to be a variable used to specify the change amount of the value of the evaluation function. By holding and appropriately updating such hi, ΔEi may be calculated without performing a product-sum operation.


In a search for a solution to a combinatorial optimization problem, a Markov-Chain Monte Carlo (MCMC) method is used. As a kind of the MCMC method, there is a simulated annealing method and a replica exchange method. In such a search by the MCMC method, when the change amount (ΔHi) of the value of the evaluation function associated with the change in the value of xi is smaller than a threshold value (sometimes called a noise value) obtained based on a random number and the value of a temperature parameter, a process of inverting the value of xi is repeated. In this manner, a search for a state (a combination of the values of the state variables) in which the value of the evaluation function locally becomes the minimum is performed. The state in which the minimum value of local minimum values of the evaluation function is reached is regarded as an optimal solution.


When the evaluation function including a constraint term is used, ΔHi denotes the total value of ΔEi and the change amount of Ptot(x) associated with the change in the value of xi.


Examples of the related art include: Japanese Laid-open Patent Publication No. 2020-204928, U.S. Patent Application Publication No. 2008/0065573, and International Publication Pamphlet No. WO 2020/196862.


SUMMARY

According to an aspect of the embodiments, there is provided a non-transitory computer-readable recording medium storing a program for causing a computer to execute processing including: acquiring, from a storage unit, evaluation function information on an evaluation function of a combinatorial optimization problem that includes a cost term and a plurality of constraint terms; specifying, for each of the plurality of constraint terms, values of a first auxiliary variable that represents an input amount subjected to a constraint that relates to each of the plurality of constraint terms, based on the evaluation function information; generating values of a second auxiliary variable obtained by quantizing the first auxiliary variable, based on the values of the first auxiliary variable; for a first constraint term, among the plurality of constraint terms, with which the values of the second auxiliary variable change in association with a change in values of a first state variable among a plurality of state variables of the evaluation function, calculating a first difference value of a contribution amount of the first constraint term associated with the change in the values of the first state variable, to a first change amount in values of the evaluation function associated with the change in the values of the first state variable; and calculating the first change amount by using the first difference value, or updating a local field to be used to specify a second change amount in the values of the evaluation function associated with the change in each of the plurality of state variables, by using the first difference value.


The object and advantages of the invention will be realized and attained by means of the elements and combinations particularly pointed out in the claims.


It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory and are not restrictive of the invention.





BRIEF DESCRIPTION OF DRAWINGS


FIG. 1 is a diagram illustrating an exemplary data processing device according to a first embodiment;



FIGS. 2A and 2B are diagrams illustrating an example of a relationship between Pk and yk and a relationship between gi(k) and yk in a case where a constraint condition is an equality constraint;



FIG. 3 is a diagram illustrating a hardware example of the data processing device;



FIG. 4 is a block diagram illustrating exemplary functions of the data processing device;



FIG. 5 is a flowchart illustrating an example of a processing procedure of a data processing device according to a second embodiment;



FIG. 6 is a diagram illustrating a search unit of a comparative example;



FIG. 7 is a flowchart illustrating a processing procedure of a data processing device including the search unit of the comparative example;



FIG. 8 is a diagram illustrating a hardware example of the search unit;



FIG. 9 is a diagram illustrating an example of an h-update circuit and a yk update circuit;



FIG. 10 is a diagram illustrating an example of a g-calculation circuit that is an example of a g/Δg calculation circuit;



FIG. 11 is a diagram illustrating an example of a Δg calculation circuit that is an example of the g/Δg calculation circuit;



FIG. 12 is a timing chart illustrating an example of operation timings of the data processing device;



FIGS. 13A and 13B are diagrams illustrating an example of a relationship between Pk and yk and a relationship between gi(k) and yk in a case where the constraint condition is an inequality constraint and Cki has a ternary value;



FIGS. 14A and 14B are diagrams illustrating an example of a relationship between Pk and yk and a relationship between gi(k) and yk in a case where the constraint condition is an equality constraint and Cki has a ternary value; and



FIG. 15 is a diagram illustrating a Δg calculation circuit according to a modification.





DESCRIPTION OF EMBODIMENTS

The constraint term is represented using, for example, a nonlinear penalty function as indicated in Formula (3) or Formula (4). Therefore, it is difficult to calculate the change amount of the constraint term, using the local field (hi) as in the cost term. For this reason, every time the change amount of the constraint term associated with the change in the value of xi is computed, the input amount as indicated by, for example, Formula (5) will have to be computed with respect to each constraint term, also using the values of the state variables other than xi. Consequently, the amount of computation is expanded in some cases.


In one aspect, an object of the embodiments is to reduce the amount of computation of a combinatorial optimization problem having a constraint condition.


Hereinafter, modes for carrying out the embodiments will be described with reference to the drawings.


A data processing device according to each embodiment illustrated below is designed to search for a solution to a combinatorial optimization problem having a constraint condition. As an example of the combinatorial optimization problem having a constraint condition, there is a knapsack problem.


First Embodiment


FIG. 1 is a diagram illustrating an exemplary data processing device according to a first embodiment.


A data processing device 10 according to the first embodiment includes a storage unit 11 and a processing unit 12.


The storage unit 11 may include a volatile semiconductor memory such as a random access memory (RAM) or may include a nonvolatile storage such as a hard disk drive (HDD) or a flash memory. In addition, the storage unit 11 may include both of a volatile semiconductor memory and a nonvolatile storage.


The storage unit 11 stores evaluation function information 11a on an evaluation function of a combinatorial optimization problem including a cost term and a plurality of constraint terms. The evaluation function information 11a includes information on E(x) and Ptot(x) as indicated in Formula (1). In a case where E(x) is represented as Formula (6), the information on E(x) includes Wij and bi. The information on Ptot(x) includes, for example, λk and m in Formula (2) and Cki and b(k) in Formula (5).


Note that the storage unit 11 may further store a computational condition for the combinatorial optimization problem. For example, in a case where a search is performed by the replica exchange method, the computational condition includes the number of replicas, the values of a temperature parameter to be set in each replica, and the like.


The processing unit 12 can be implemented by an electronic circuit such as an application specific integrated circuit (ASIC) or a field programmable gate array (FPGA), for example. However, the processing unit 12 can also be implemented by a processor such as a central processing unit (CPU), a graphics processing unit (GPU), or a digital signal processor (DSP), for example. The processor executes, for example, a program stored in a memory such as a RAM (which may be the storage unit 11). A set of processors may be referred to as a multiprocessor or simply a “processor”. In addition, the processing unit 12 may include a processor and an electronic circuit such as an ASIC or an FPGA.



FIG. 1 illustrates an exemplary procedure of a process performed by the processing unit 12.


Step S1: The processing unit 12 acquires the evaluation function information 11a from the storage unit 11.


Step S2: The processing unit 12 specifies, for each of the plurality of constraint terms, the values (initial values) of a first auxiliary variable representing the input amount subjected to a constraint relating to each of the plurality of constraint terms, based on the evaluation function information 11a. The input amount subjected to the constraint having k as the identification number is represented by above-described Formula (5). Hereinafter, the input amount is represented by the first auxiliary variable (yk). That is, yk is represented by following Formula (8).









[

Mathematical


Formula


8

]










y
k

=



P
in

(
k
)


(
x
)

=





i
=
1

n




C
ki



x
i



+

b
k







(
8
)







Note that bk in Formula (8) and b(k) in Formula (5) are the same. The value of yk is computed from Cki, bk, and the number (n) of state variables included in the evaluation function information 11a and the initial values of x1 to xn. The initial values of x1 to xn may be stored in the storage unit 11, or may be input from the outside of the data processing device 10, for example, by a user working on an input device. The initial values of x1 to xn may be, for example, all zero or all one. In addition, the initial values of x1 to xn may be random numbers.



FIG. 1 illustrates an example of a relationship between a penalty function (Pk) of an inequality constraint and yk. The horizontal axis represents the value of yk, and the vertical axis represents the magnitude of Pk.


Pk is represented by a function as indicated by Formula (3). Therefore, when yk representing the input amount is 0 or less, Pk=0 is met, and when yk is greater than 0, Pk=yk is met.


Step S3: The processing unit 12 generates a value of a second auxiliary variable (zk) obtained by quantizing yk, based on the value of yk. For example, a ternary value indicating whether yk is positive, negative, or zero is denoted by zk. That is, zk can be represented by following Formula (9).









[

Mathematical


Formula


9

]










z
k

=

{



0




if



y
k


<
0





1




if



y
k


=
0





2




if



y
k


>
0









(
9
)







Note that zk is not limited to a ternary value of 0, 1, and 2 and may be a ternary value of 11, 00, and 01. The reason for using such a ternary zk will be described later.


Step S4: The processing unit 12 calculates a contribution amount of each of the plurality of constraint terms to a change amount (ΔHi) of the value of the evaluation function associated with the change in the value of xi, based on the value of yk. The contribution amount can also be said to be a value representing the magnitude of contribution to the local field (hi) used to specify ΔHi. ΔHi can be represented by following Formula (10).









[

Mathematical


Formula


10

]










Δ


H
i


=


-

h
i



Δ


x
i







(
10
)








ΔHi is obtained by multiplying hi by a sign (+1 or −1) according to Δxi. Following Formula (11) can represent hi.









[

Mathematical


Formula


11

]










h
i

=





j
=
1

n




W
ij



x
j



+

b
i

+




k
=
1

m



g
i

(
k
)








(
11
)







The contribution amount of the constraint term relating to the constraint with the identification number=k to ΔHi(or hi) is denoted by gi(k). In a case where the constraint condition is an inequality constraint, gi(k) can be represented by following Formula (12).









[

Mathematical


Formula


12

]










g
i

(
k
)


=


-


λ
k

[


max

(

0
,


y
k





x
i




x
i

+

Δ


x
i







)

-

max

(

0
,

y
k


)


]


/
Δ


x
i






(
12
)







By multiplying the slope of the graph of Pk−yk as illustrated in FIG. 1 by −λk, gi(k) is obtained. In a case where yk has 0, in consideration of the fact that the slope of the graph of Pk−yk differs depending on the direction in which xi changes, gi(k) can be represented as following Formula (13).









[

Mathematical


Formula


13

]










g
i

(
k
)


=

{



0




if



y
k


<
0







-

λ
k





C
ki

(

1
-

x
i


)






if



y
k


=
0







-

λ
k




C
ki






if



y
k


>
0









(
13
)







A weight value indicating a weight for xi in the constraint having k as the identification number is denoted by Cki. Hereinafter, Cki will be assumed to be a value representing whether or not xi affects Pk. In a case where xi affects Pk, Cki=1 is met, and in a case where xi does not affect Pk, Cki=0 is met.



FIG. 1 illustrates a diagram illustrating an example of a relationship between gi(k) and yk in a case where the constraint condition is an inequality constraint. The horizontal axis represents the value of yk, and the vertical axis represents the value of gi(k). When yk=0 is met, according to Formula (13), gi(k)=0 is met in a case of xi=1, and gi(k)=−λkCki is met in a case of xi=0.


The above-mentioned reason for using the ternary zk is that gi(k) can be distinguished into three types of values, depending on whether yk is positive, negative, or zero as described above.


Note that, in a case where Δgi(k) to be described later is calculated from Δzk, the processing unit 12 does not have to compute gi(k) itself.


The processes in steps S1 to S4 described above are an initialization process, and thereafter the following search process is performed. Note that the values of yk and zk and gi(k) calculated in the processes in steps S2 to S4 are held in a holding unit (such as a register) (not illustrated) of the processing unit 12. The value of hi represented by Formula (11) may also be held in the holding unit. In addition, the storage unit 11 may store the values of yk, zk, gi(k), or hi.


Step S5: The processing unit 12 selects a transition candidate xi from among x1 to xn. The processing unit 12 may randomly select xi from x1 to xn, or may select one xi in accordance with a predetermined rule. In addition, in the process in step S5, the processing unit 12 may perform, for example, the following processes in steps S6 to S8 in parallel for x1 to xn without selecting xi.


Step S6: The processing unit 12 determines whether or not the value of zk relating to any one constraint term of m constraint terms changes in association with a change in the value of xi among x1 to xn. The value of yk in a case where the value of xi has changed is obtained by adding CkiΔxi to the original value of yk. Then, depending on whether yk in a case where the value of xi has changed is positive, negative, or zero, the value of zk in a case where the value of xi has changed is obtained by Formula (9).


The processing unit 12 performs the process in step S7 when determining that the value of zk changes and performs the process in step S8 when determining that the value of zk does not change.


Step S7: The processing unit 12 calculates a difference value (Δgi(k)) of gi(k) associated with the change in the value of xi. As can be seen from Formulas (9) and (13), the value of gi(k) changes when the value of zk changes, and in other cases, the value does not change. The processing unit 12 may calculate a difference value between the held current gi(k) and gi(k) calculated based on the value of xi after the change, in accordance with Formula (13). Alternatively, the processing unit 12 may calculate Δgi(k) according to a difference value (Δzk) of zk in accordance with following Formula (14).









[

Mathematical


Formula


14

]










Δ


g
i

(
k
)



=

{





-

λ
k





C
ki

(

1
-

x
i


)


Δ


z
k






if



z
k

:

0


1







-

λ
k




C
ki



x
i


Δ


z
k






if



z
k

:

1


2









(
14
)







Two types of values of Δgi(k) in a case where zk has changed between 0 and 1 and a case where zk has changed between 1 and 2 are obtained. In a case where Δg (k) is calculated in accordance with Formula (14), the processing unit 12 does not have to compute gi(k) itself in the process in step S4.


Step S8: The processing unit 12 determines whether or not to permit the change in the value of xi (transition acceptability). The transition acceptability is confirmed based on an added value (ΔHi) of the change amount (ΔEi) of the cost term associated with the change in the value of xi and the change amount (ΔPk) of Pk calculated based on Δgi(k). ΔEi can be computed in accordance with Formula (7). ΔPk can be calculated by multiplying Δgi(k) by −Δxi. Note that, in a case where hi represented by Formula (11) is held, the processing unit 12 may calculate ΔHi by multiplying hi by −Δxi.


Then, for example, in a case where ΔHi is smaller than a threshold value obtained based on a random number and the value of the temperature parameter, the processing unit 12 permits the change in the value of the transition candidate state variable. For example, log (rand)×T is used as the threshold value. A random number value is denoted by rand, and a value of the temperature parameter is denoted by T.


In a case where the processes in steps S6 to S8 are performed for x1 to xn in parallel, ΔHi(i=1 to n) corresponding to changes in x1 to xn is calculated. Then, a change in the value of any of x1 to xn is permitted based on ΔHi.


Step S9: The processing unit 12 updates the value of xi when determining to permit the change in the value of xi. In addition, the processing unit 12 updates the values of yk and zk according to the change in the value of xi. In a case where the value of gi(k) or hi is held, the processing unit 12 updates these values, using Δgi(k). The processing unit 12 may update the value of the evaluation function.


After the process in step S9, the processing unit 12 repeats the processes from step S5.


In a case where the simulated annealing method is performed, the processing unit 12 decreases the value of the above-mentioned temperature parameter in accordance with a predetermined temperature parameter switching schedule while the processes in steps S5 to S9 are repeated. Then, the processing unit 12 outputs, for example, the values of x1 to xn when a predetermined search end condition is satisfied, as a search result for a solution to the combinatorial optimization problem (for example, displays the values on a display device (not illustrated)). Note that the processing unit 12 may update, for example, the value of the evaluation function every time the transition is accepted and hold the minimum value until then and the values of x1 to xn when that minimum value was obtained. In that case, the processing unit 12 may output the values of x1 to xn corresponding to the minimum value stored when the search end condition is satisfied, as a search result.


In a case where the processing unit 12 performs the replica exchange method, the processing unit 12 performs the processes in steps S5 to S9 illustrated in FIG. 1 for each of a plurality of replicas set with different values of the temperature parameter from each other. Then, the processing unit 12 performs replica exchange each time the processes in steps S5 to S9 are repeated a predetermined number of times. For example, the processing unit 12 randomly selects two of the plurality of replicas. Then, the processing unit 12 exchanges the values of the temperature parameter or the values of x1 to xn between the two selected replicas with a predetermined exchange probability based on a difference in the values of the evaluation function or a difference in the values of the temperature parameter between the replicas. For example, the processing unit 12 updates the value of the evaluation function every time the transition is accepted in each replica and holds the minimum value until then and the values of x1 to xn when that minimum value was obtained. Then, for example, when a predetermined search end condition is satisfied, the processing unit 12 outputs, as a search result, the values of x1 to xn corresponding to a smallest minimum value in all the replicas among the minimum values stored in each replica.


As described above, the processing unit 12 of the data processing device 10 according to the first embodiment acquires, from the storage unit 11, the evaluation function information 11a on the evaluation function of the combinatorial optimization problem including the cost term and the plurality of constraint terms. Then, the processing unit 12 specifies, for each of the plurality of constraint terms, the values of the first auxiliary variable (yk) representing the input amount subjected to a constraint relating to each of the plurality of constraint terms, based on the evaluation function information 11a. In addition, the processing unit 12 generates a value of the second auxiliary variable (zk) obtained by quantizing yk, based on the value of yk. Then, for the constraint term among the plurality of constraint terms, with which the value of zk changes in association with the change in the value of xi among x1 to xn, the processing unit 12 calculates the difference value (Δgi(k)) of the contribution amount of the constraint term associated with the change in the value of xi to the change amount of the value of the evaluation function associated with the change in the value of xi. The processing unit 12 calculates ΔHi, using Δgi(k), or updates hi (i=1 to n), using Δgi(k).


This ensures that, only for the constraint term with which the value of zk changes in association with the change in the value of xi, the change amount of the constraint term is calculated or Δgi(k) used to update hi is calculated. Therefore, the processing unit 12 no longer has to calculate ΔHi in association with a change in the value of xi or perform computation using the values of all the state variables for all the constraint terms every time hi (i=1 to n) is updated. Accordingly, the amount of computation may be reduced.


For example, a case where the number of state variables is n=100, the summed number of constraint terms is m=10, and each constraint term is related to one state variable (a case where other than one of 100 instances of Cki for each constraint term has 0) will be examined. In this case, the amount of computation may be reduced to 1/(10×100) as compared with a case of performing computation using the values of all the state variables for all the constraint terms.


In addition, since the amount of computation may be reduced, an increase in the amount of hardware materials to perform computation may be suppressed.


In addition, since the ternary zk or Δzk is used to calculate Δgi(k), accumulation of errors may be suppressed as compared with a case of computing the change amount of the constraint term using the input amount that is a real variable as indicated by Formula (5).


Such a data processing device 10 may be expected to be useful as a technique for suppressing the amount of computation and the amount of hardware materials and obtaining an accurate solution when solving various problems in modern society that can be transformed into a combinatorial optimization problem having a constraint condition.


Note that, in the above example, description has been given by assuming that the constraint condition is an inequality constraint, but the constraint condition is not limited to this. The constraint condition may be an equality constraint.



FIGS. 2A and 2B are diagrams illustrating an example of a relationship between Pk and yk and a relationship between gi(k) and yk in a case where the constraint condition is an equality constraint.


In FIG. 2A illustrating a relationship between Pk and yk, the horizontal axis represents the value of yk, and the vertical axis represents the value of Pk. In a case where the constraint condition is an equality constraint, Pk is represented by a function as indicated by Formula (4). Therefore, Pk=|yk| is met.


In a case where the constraint condition is an equality constraint, gi(k) and Δgi(k) can be represented as following Formulas (15) and (16).









[

Mathematical


Formula


15

]










g
i

(
k
)


=

{





λ
k
-



C
ki






if



z
k


=
0








-

λ
k
-




C
ki



x
i


-


λ
k
+




C
ki

(

1
-

x
i


)







if



z
k


=
1







-

λ
k
+




C
ki






if



z
k


=
2









(
15
)












[

Mathematical


Formula


16

]










Δ


g
i

(
k
)



=

{





-

(


λ
k
-

+

λ
k
+


)





C
ki

(

1
-

x
i


)


Δ


z
k






if



z
k

:

0


1







-

(


λ
k
-

+

λ
k
+


)




C
ki



x
i


Δ


z
k






if



z
k

:

1


2









(
16
)







A constraint coefficient in a case of yk=Pin(k)<0, that is, in a case of zk=0 is denoted by λk. A constraint coefficient in a case of yk=Pin(k)>0, that is, in a case of zk=2 is denoted by λk+.


In FIG. 2B illustrating a relationship between gi(k) and yk, the horizontal axis represents the value of yk, and the vertical axis represents the value of gi(k).


When yk=0 is met, according to Formula (15), gi(k)=+λk Cki is met in a case of xi=1, and gi(k)=−λk+Cki is met in a case of xi=0.


In a case where the constraint condition is an equality constraint, by using such gi(k) and Δgi(k), an effect similar to the effect in a case where the constraint condition is an inequality constraint may be obtained.


Second Embodiment

Next, a data processing device according to a second embodiment will be described.



FIG. 3 is a diagram illustrating a hardware example of the data processing device.


A data processing device 20 is, for example, a computer and includes a CPU 21, a RAM 22, an HDD 23, a GPU 24, an input interface 25, a medium reader 26, and a communication interface 27. The above units are coupled to a bus.


The CPU 21 is a processor including an arithmetic circuit that executes program instructions. The CPU 21 loads at least a part of a program and data stored in the HDD 23 into the RAM 22 to execute the program. Note that the CPU 21 may include, for example, a plurality of processor cores in order to execute processes for a plurality of replicas in parallel. In addition, the data processing device 20 may include a plurality of processors. Note that a set of the plurality of processors (multiprocessor) may be called a “processor”.


The RAM 22 is a volatile semiconductor memory that temporarily stores a program executed by the CPU 21 and data used by the CPU 21 for arithmetic operations. Note that the data processing device 20 may include a memory of a type other than the RAM 22 or may include a plurality of memories.


The HDD 23 is a nonvolatile storage device that stores software programs such as an operating system (OS), middleware, and application software, and data. The programs include, for example, a program for causing the data processing device 20 to perform a process of searching for a solution to a combinatorial optimization problem as described above. Note that the data processing device 20 may include another type of storage device such as a flash memory or a solid state drive (SSD) or may include a plurality of nonvolatile storage devices.


The GPU 24 outputs an image (for example, an image representing a computation result for the combinatorial optimization problem, or the like) to a display 24a coupled to the data processing device 20 in accordance with an instruction from the CPU 21. As the display 24a, a cathode ray tube (CRT) display, a liquid crystal display (LCD), a plasma display panel (PDP), an organic electro-luminescence (OEL) display, or the like can be used.


The input interface 25 acquires an input signal from an input device 25a coupled to the data processing device 20 and outputs the acquired input signal to the CPU 21. As the input device 25a, a pointing device such as a mouse, a touch panel, a touch pad, or a trackball, a keyboard, a remote controller, a button switch, or the like can be used. In addition, a plurality of types of input devices may be coupled to the data processing device 20.


The medium reader 26 is a reading device that reads a program or data recorded on a recording medium 26a. As the recording medium 26a, for example, a magnetic disk, an optical disc, a magneto-optical disk (MO), a semiconductor memory, or the like can be used. Examples of the magnetic disk include a flexible disk (FD) and an HDD. Examples of the optical disc include a compact disc (CD) and a digital versatile disc (DVD).


The medium reader 26 copies, for example, a program or data read from the recording medium 26a to another recording medium such as the RAM 22 or the HDD 23. The read program is executed by, for example, the CPU 21. Note that the recording medium 26a may be a portable recording medium and is sometimes used for distribution of a program or data. In addition, the recording medium 26a and the HDD 23 will be sometimes referred to as computer-readable recording media.


The communication interface 27 is an interface that is coupled to a network 27a and communicates with another information processing device via the network 27a. The communication interface 27 may be a wired communication interface coupled by a cable to a communication device such as a switch or may be a wireless communication interface coupled by a wireless link to a base station.


Next, functions of the data processing device 20 will be described.



FIG. 4 is a block diagram illustrating exemplary functions of the data processing device.


The data processing device 20 includes an input unit 31, a storage unit 32, an initialization processing unit 33, a search unit 34, and an output unit 35. The storage unit 32 is equipped using, for example, the RAM 22 or the HDD 23. The input unit 31, the initialization processing unit 33, the search unit 34, and the output unit 35 are equipped using, for example, the CPU 21 and a program.


The storage unit 32 is a functional block as an example of the storage unit 11 illustrated in FIG. 1, and other functional blocks are functional blocks as an example of the processing unit 12 illustrated in FIG. 1.


The input unit 31 acquires evaluation function information on an evaluation function of a combinatorial optimization problem including a cost term and a plurality of constraint terms. The evaluation function information includes information on E(x) and Ptot(x) as indicated in Formula (1). In a case where E(x) is represented as Formula (6), the information on E(x) includes Wij and bi. The information on Ptot(x) includes, for example, λk and m in Formula (2) and Cki and b(k) in Formula (5).


The input unit 31 further acquires a computational condition for the combinatorial optimization problem. For example, in a case where a search is performed by the replica exchange method, the computational condition includes the number of replicas, the values of the temperature parameter to be set in each replica, and the like.


In addition, the input unit 31 may acquire the initial values of x1 to xn input by a user working on the input device 25a. The initial values of x1 to xn may be, for example, all zero or all one. In addition, the initial values of x1 to xn may be random numbers.


The storage unit 32 stores the evaluation function information and the like acquired by the input unit 31.


The initialization processing unit 33 acquires the evaluation function information and the initial values of x1 to xn stored in the storage unit 32 and performs an initialization process for the search unit 34, based on these acquired evaluation function information and initial values. The initialization process includes, for example, the following processes.


The initialization processing unit 33 calculates an initial value of yk represented by above-described Formula (8) for each of the plurality of constraint terms, based on the evaluation function information and the initial values of x1 to xn. In addition, the initialization processing unit 33 calculates an initial value of zk represented by above-described Formula (9), based on the initial value of yk. The initialization processing unit 33 may calculate the initial value of yk, based on the evaluation function information, and may also calculate an initial value of gi(k) in accordance with Formula (13).


The search unit 34 includes a transition candidate selection unit 34a, a ΔE calculation unit 34b, a Δg calculation unit 34c, a ΔH calculation unit 34d, a transition acceptability determination unit 34e, a state update unit 34f, and an H-update unit 34g.


The transition candidate selection unit 34a selects a transition candidate xi from among x1 to xn. The transition candidate selection unit 34a may randomly select xi from x1 to xn, or may select one xi in accordance with a predetermined rule. In addition, the transition candidate selection unit 34a outputs Δxi=1−2xi that is a difference value between the value of the selected xi and the value of xi when the value of xi is changed.


The ΔE calculation unit 34b receives Δxi and calculates ΔEi, based on Formula (7).


The Δg calculation unit 34c receives Δxi and finds a value of yk in a case where the value of xi has changed. The value of yk in a case where the value of xi has changed is obtained by adding CkiΔxi to the original value of yk. Then, the Δg calculation unit 34c finds the value of zk in accordance with Formula (9) depending on whether the value of yk in a case where the value of xi has changed is positive, negative, or zero. The Δg calculation unit 34c calculates Δgi(k) in a case where the value of zk has changed from the original value of zk.


The Δg calculation unit 34c may calculate a difference value between the held current gi(k) and gi(k) calculated based on the value of xi after the change, in accordance with Formula (13). Alternatively, the Δg calculation unit 34c may calculate Δgi(k) in accordance with above-described Formula (14) according to the difference value (Δzk) of zk. The Δg calculation unit 34c outputs ΔPk calculated by multiplying Δgi(k) by −Δxi.


The ΔH calculation unit 34d adds ΔEi and ΔPk to calculate the change amount (ΔHi) of the evaluation function associated with the change in the value of xi.


The transition acceptability determination unit 34e determines whether or not to permit the change in the value of xi. For example, in a case where ΔHi is smaller than a threshold value obtained based on a random number and the value of the temperature parameter, the transition acceptability determination unit 34e permits the change in the value of the transition candidate state variable.


The state update unit 34f updates the value of xi when it is determined to permit the change in the value of xi. Note that, in a case where the change in the value of xi is permitted, the values of yk and zk are also updated to values calculated as described above. When holding the value of gi(k) or hi, the processing unit 12 also updates these values according to the change in the value of xi.


In a case where the change in the value of xi is permitted, the H-update unit 34g updates H by adding ΔHi to the original value (H) of the evaluation function.


The output unit 35 outputs a search result (for example, the values of x1 to xn corresponding to the minimum value of the evaluation function obtained until then) when a search end condition is satisfied. For example, the output unit 35 may output the search result to the display 24a to display the output search result on the display 24a, transmit the search result to another information processing device via the network 27a, or store the search result in an external storage device.



FIG. 5 is a flowchart illustrating an example of a processing procedure of the data processing device according to the second embodiment.


Step S10: The input unit 31 acquires the evaluation function information on an evaluation function of a combinatorial optimization problem including a cost term and a plurality of constraint terms.


Step S11: The initialization processing unit 33 performs the initialization process as described above, based on the evaluation function information and the initial values of x1 to xn stored in the storage unit 32.


Step S12: The transition candidate selection unit 34a selects a transition candidate xi from among x1 to xn.


Step S13: The ΔE calculation unit 34b calculates ΔEi, based on Formula (7).


Step S14: The Δg calculation unit 34c finds a value of yk in a case where the value of xi has changed and finds a value of zk in accordance with Formula (9). Then, the Δg calculation unit 34c determines whether or not the value of zk has changed from the original value of zk. When determining that the value of zk has changed from the original value of zk, the Δg calculation unit 34c performs the process in step S15. When determining that the value of zk has not changed from the original value of zk, the Δg calculation unit 34c performs the process in step S16.


Step S15: The Δg calculation unit 34c calculates a difference value between the held current gi(k) and gi(k) calculated based on the value of xi after the change, in accordance with Formula (13). Alternatively, the Δg calculation unit 34c calculates Δgi(k) in accordance with above-described Formula (14) according to the difference value (Δzk) of zk.


Step S16: The ΔH calculation unit 34d calculates ΔHi by adding ΔEi and ΔPk calculated by multiplying Δgi(k) by −Δxi.


Step S17: The transition acceptability determination unit 34e determines whether or not to permit the change in the value of xi. In a case where the transition acceptability determination unit 34e determines to permit the change in the value of xi, the process in step S18 is performed. In a case where the transition acceptability determination unit 34e determines not to permit the change in the value of xi, the process in step S19 is performed.


Step S18: The above-described update process is performed by the state update unit 34f and the H-update unit 34g.


Step S19: A determination unit (not illustrated) of the search unit 34 determines whether or not a search end condition is satisfied. For example, in a case where the process in step S12 has been repeated a predetermined number of times, or in a case where a value of the evaluation function smaller than a predetermined value has been obtained, it is determined that the search end condition is satisfied. In a case where it is determined that the search end condition is satisfied, the process in step S20 is performed. In a case where it is determined that the search end condition is not satisfied, the processes from step S12 are repeated.


In a case where the simulated annealing method is applied, while the processes in steps S12 to S19 are repeated, the value of the temperature parameter for generating a threshold value to be used by the transition acceptability determination unit 34e is decreased in accordance with a predetermined temperature parameter switching schedule.


In a case where the replica exchange method is applied, the processes in steps S12 to S19 are performed for each of the plurality of replicas set with different values of the temperature parameter from each other. Then, replica exchange is performed each time the processes in steps S12 to S19 are repeated a predetermined number of times. For example, two of the plurality of replicas are randomly selected, and the values of the temperature parameter or the values of x1 to xn are exchanged between the two selected replicas with a predetermined exchange probability based on a difference in the values of the evaluation function or a difference in the values of the temperature parameter between the replicas.


Step S20: The output unit 35 outputs a search result. This ends the process by the data processing device 20.


Note that the above order of processes is an example, and the order of processes may be appropriately altered.


COMPARATIVE EXAMPLE


FIG. 6 is a diagram illustrating a search unit of a comparative example. In FIG. 6, the same elements as the elements of the search unit 34 of the data processing device 20 illustrated in FIG. 4 are given the same reference signs.


In a search unit 40 of the comparative example, a transition candidate selection unit 41 selects a transition candidate xi from among x1 to xn, similarly to the transition candidate selection unit 34a. The transition candidate selection unit 41 outputs the values (x′) of x1 to xn when the value of the selected xi is changed and additionally, outputs Δxi that is a difference value when the value of xi is changed.


Unlike the search unit 34, the search unit 40 of the comparative example includes a Ptot calculation unit 42, a Ptot0 update unit 43, and a ΔP calculation unit 44.


The Ptot calculation unit 42 calculates the total value of the m constraint terms represented by Formula (2), using the values (x′) of x1 to xn when the value of the selected xi is changed.


The Ptot0 update unit 43 updates and outputs Ptot0 that is the total value of the m constraint terms before the value of xi changes. The value of Ptot0 is updated to the value of Ptot output by the Ptot calculation unit 42 when a transition acceptability determination unit 34e permits the change in the value of xi.


The ΔP calculation unit 44 calculates and outputs ΔPtot that is a difference between Ptot and Ptot0.


In the search unit 40 of the comparative example, a ΔH calculation unit 45 calculates and outputs ΔHi by adding ΔEi and ΔPtot.



FIG. 7 is a flowchart illustrating a processing procedure of a data processing device including the search unit of the comparative example.


The processes in steps S30 to S33 are the same as the processes in steps S10 to S13 illustrated in FIG. 5.


Step S34: The Ptot calculation unit 42 calculates the total value (Ptot) of the m constraint terms represented by Formula (2), using the values (x′) of x1 to xn when the value of the selected xi is changed.


Step S35: The ΔP calculation unit 44 calculates ΔPtot that is a difference between Ptot and Ptot0.


Step S36: the ΔH calculation unit 45 calculates ΔHi by adding ΔEi and ΔPtot.


The process in step S37 is the same as the process in step S17 illustrated in FIG. 5.


Step S38: An update process for Ptot0 by the Ptot0 update unit 43, as well as the update process by a state update unit 34f and an H-update unit 34g, are performed.


The subsequent processes in steps S39 and S40 are the same as the processes in steps S19 and S20 illustrated in FIG. 5.


In such a search unit 40 of the comparative example, in a case where the transition candidate xi is selected, since Ptot is calculated also using the values of the state variables other than xi, for example, the input amount as indicated by Formula (5) will be computed for all the constraint terms.


On the other hand, in the data processing device 20 of the second embodiment, the search unit 34 computes Δgi(k) to be used to calculate the change amount of the constraint term only for the constraint term with which the value of zk changes in association with the change in the value of xi. Therefore, the processing unit 12 no longer has to perform computation using the values of all the state variables for all the constraint terms every time ΔHi is calculated in association with the change in the value of xi. Accordingly, the amount of computation may be reduced. In addition, since the amount of computation may be reduced, an increase in the amount of hardware materials to perform computation may be suppressed.


In addition, since the ternary zk or Δzk is used to compute Δgi(k), accumulation of errors may be suppressed as compared with a case of computing the change amount of the constraint term using the input amount that is a real variable as indicated by Formula (5).


(Example of Equipping Search Unit 34 by Hardware)

The search unit 34 can also be equipped by, for example, hardware as follows. Note that the search unit 34 illustrated below holds hi as indicated by Formula (11) and uses the held hi to calculate ΔHi.



FIG. 8 is a diagram illustrating a hardware example of the search unit.


The search unit 34 includes a state variable update circuit 51, an h-update circuit 52, a yk update circuit 53, a ΔH calculation circuit 54, a selection circuit 55, and a controller 56. Note that FIG. 8 illustrates an example of storing the evaluation function information in the storage unit 32. The storage unit 32 stores n×n instances of Wij to be used to update hi. Furthermore, the storage unit 32 stores m×n coupling coefficients (Cik) from zk to xi and n×m coupling coefficients (Ckj) from xj to yk.


The state variable update circuit 51 holds the values of x1 to xn. In addition, the state variable update circuit 51 changes the value of the state variable with the identification number output by the selection circuit 55 under the control of the controller 56.


The h-update circuit 52 holds the value of hi (i=1 to n) indicated by Formula (11). In addition, the h-update circuit 52 updates the value of hi under the control of the controller 56.


The yk update circuit 53 holds the value of yk indicated by Formula (8). In addition, the yk update circuit 53 updates the value of yk under the control of the controller 56.


More specific examples of the h-update circuit 52 and the yk update circuit 53 will be described later (refer to FIG. 9).


The ΔH calculation circuit 54 calculates ΔHi(i=1 to n) by multiplying hi by −Δxi.


The selection circuit 55 selects one state variable that permits the change in the value from among x1 to xn, based on ΔHi associated with the change in the value of each of x1 to xn and a threshold value supplied from the controller 56.


For example, the selection circuit 55 computes max (0, ΔHi) for each of ΔH1 to ΔHn. A function that maintains any of ΔHi to ΔHn having 0 or more as it is and transforms any of ΔH1 to ΔHn being negative into 0 is denoted by max (0, ΔHi). The selection circuit 55 adds a threshold value (which may have n different values or may have the same value) to each of n instances of max (0, ΔHi). The selection circuit 55 outputs the identification number of the state variable, among x1 to xn, that gives the minimum addition result when the value has changed.


However, the selection circuit 55 is not limited to one that performs the selection operation as described above. The selection circuit 55 may permit the change in the value of xi in a case where ΔHi is smaller than a threshold value. In a case where the change in the values of a plurality of instances of xi is permitted, the selection circuit 55 may select one state variable randomly or in accordance with a predetermined rule and output the identification number of the selected state variable.


The controller 56 controls an operation timing of each circuit of the search unit 34 by sending a control signal or a clock signal. In addition, the controller 56 generates a threshold value and supplies the generated threshold value to the selection circuit 55. For example, log (rand)×T is used as the threshold value.



FIG. 9 is a diagram illustrating an example of the h-update circuit and the yk update circuit.


The h-update circuit 52 includes a g/Δg calculation circuit 52a, a difference addition circuit 52b, and an h-holding circuit 52c.


The yk update circuit 53 includes a difference addition circuit 53a and a yk holding circuit 53b.


The g/Δg calculation circuit 52a calculates gi(k) or Δgi(k). An example of the g/Δg calculation circuit 52a will be described later (refer to FIG. 10).


In a case where the change in the value of xj is permitted, the difference addition circuit 52b receives the control signal from the controller 56 and updates hi by adding WijΔxj to the original hi. In a case where Δgi(k) occurs when the change in the value of xj is permitted, the difference addition circuit 52b further adds Δg (k) to hi to update hi.


The h-holding circuit 52c holds n instances of hi. In addition, the h-holding circuit 52c outputs hi in synchronization with the clock signal.


In a case where the change in the value of xj is permitted, the difference addition circuit 53a receives the control signal from the controller 56 and updates yk by adding CkjΔxj to the original yk.


The yk holding circuit 53b holds m instances of yk. In addition, the yk holding circuit 53b outputs yk in synchronization with the clock signal.



FIG. 10 is a diagram illustrating an example of a g-calculation circuit that is an example of the g/Δg calculation circuit.


The g-calculation circuit 52a1 includes a multiplier 60, a selection circuit 61, and a multiplier 62.


The multiplier 60 outputs a product of 1 and 1−xi.


The selection circuit 61 receives yk and outputs 0 if yk<0 is met, outputs 1−xi if yk=0 is met, and outputs 1 if yk >0 is met.


The multiplier 62 outputs a product of the output of the selection circuit 61 and −λkCki, as gi(k) indicated by Formula (13).



FIG. 11 is a diagram illustrating an example of a Δg calculation circuit that is an example of the g/Δg calculation circuit.


The Δg calculation circuit 52a2 includes a zk generation circuit 65 and a Δg generation circuit 66.


The zk generation circuit 65 receives yk and outputs zk=0 if yk<0 is met, outputs zk=1 if yk=0 is met, and outputs zk=2 if yk >0 is met.


The Δg generation circuit 66 holds zk. In a case where the value of zk generated by the zk generation circuit 65 and the held value of zk have changed between 0 and 1, the Δg generation circuit 66 selects 1-xi and outputs −λkCki(1−xi)Δzk, as Δgi(k). In a case where the value of zk generated by the zk generation circuit 65 and the held value of zk have changed between 1 and 2, the Δg generation circuit 66 selects xi and outputs −ΔkCkixiΔzk, as Δgi(k).



FIG. 12 is a timing chart illustrating an example of operation timings of the data processing device. FIG. 12 illustrates an example of operation timings in a case where the search unit 34 having the hardware configuration illustrated in FIG. 8 is used. FIG. 12 illustrates a processing example in a case where 15 replicas are used. The search unit 34 performs processes in order from the replica with the replica number=0 while shifting the timing by a pipeline process.


From a timing t1, a process in which the ΔH calculation circuit 54 calculates ΔHi(i=1 to n) from hi is performed.


From a timing t2, a process in which the selection circuit 55 selects the state variable (xj) that permits the change in the value, from among x1 to xn, is performed.


From a timing t3, a process in which the state variable update circuit 51 changes the value (inverts 0 to 1 or 1 to 0) of xj selected by the selection circuit 55 is performed.


From a timing t4, a process in which the h-update circuit 52 and the yk update circuit 53 update hi and yk is performed.


From a timing t5, a process in which the h-update circuit 52 calculates zk from yk is performed.


From a timing t6, a process in which the h-update circuit 52 calculates Δgi(k) from zk and xi is performed.


From a timing t7, a process in which the h-update circuit 52 further updates hi, using Δgi(k), is performed.


Thereafter, similar processes are repeated.


Each of the above processes can be started at the time point when the previous process for the replica with the replica number=0 has ended even if the immediately preceding process is not completed for all 15 replicas.


By such a hardware process, Δgi(k) to be used to update hi is calculated only for the constraint term with which the value of zk changes in association with the change in the value of xj. Therefore, the processing unit 12 no longer has to perform computation using the values of all the state variables for all the constraint terms every time hi (i=1 to n) is updated. Accordingly, the amount of computation may be reduced.


Note that the hardware process as described above can also be performed by the CPU 21 executing a program.


(Modifications)

In the above description, Cki used to calculate yk in Formula (8) is assumed to have 1 when xi affects the constraint with the identification number=k and have 0 when xi does not affect the constraint with the identification number=k.


However, Cki may be a ternary value of −1, 0, or 1. In the following, it is assumed that Cki=1 is met in a case where xi gives a positive contribution to the constraint with the identification number=k, Cki=−1 is met in a case where xi gives a negative contribution to the constraint with the identification number=k, and Cki=0 is met in a case where xi does not affect the constraint with the identification number=k.



FIGS. 13A and 13B are diagrams illustrating an example of a relationship between Pk and yk and a relationship between gi(k) and yk in a case where the constraint condition is an inequality constraint and Cki has a ternary value.


In FIG. 13A illustrating a relationship between Pk and yk, the horizontal axis represents the value of yk, and the vertical axis represents the value of Pk. In a case where the constraint condition is an inequality constraint, Pk is represented by a function as indicated by Formula (3). Therefore, when yk representing the input amount is 0 or less, Pk=0 is met, and when yk is greater than 0, Pk=yk is met.


In FIG. 13B illustrating a relationship between gi(k) and yk, the horizontal axis represents the value of yk, and the vertical axis represents the value of gi(k).


As in FIG. 13B, in a case of CkiΔxi>0, gi(k)=−λkCki is met when yk=0. In a case of CkiΔxi<0, gi(k)=0 is met when yk=0.



FIGS. 14A and 14B are diagrams illustrating an example of a relationship between Pk and yk and a relationship between gi(k) and yk in a case where the constraint condition is an equality constraint and Cki has a ternary value.


In FIG. 14A illustrating a relationship between Pk and yk, the horizontal axis represents the value of yk, and the vertical axis represents the value of Pk. In a case where the constraint condition is an equality constraint, Pk is represented by a function as indicated by Formula (4). Therefore, Pk=|yk| is met.


In FIG. 14B illustrating a relationship between gi(k) and yk, the horizontal axis represents the value of yk, and the vertical axis represents the value of gi(k).


As in FIG. 14B, in a case of CkiΔxi>0, gi(k)=−Δk+Cki is met when yk=0. In a case of CkiΔxi<0, gi(k)=+λk Cki is met when yk=0.


When the ternary Cki as described above is used, since the change in yk due to Δxi is CkiΔxi, zk generated from yk can be represented by following Formula (17).









[

Mathematical


Formula


17

]










z
k

=


(


z
k
+

,

z
k
-


)

=

{




(

0
,
0

)





if



y
k


<
0






(

1
,
0

)





if



y
k


=
0






(

1
,
1

)





if



y
k


>
0










(
17
)







Assuming that zk corresponding to Δxi is zi(k), zi(k) can be represented by following Formula (18).









[

Mathematical


Formula


18

]










z
i

(
k
)


=

{




z
k
+





if



C
ki


Δ


x
i


>
0






z
k
-





if



C
ki


Δ


x
i


<
0









(
18
)







By using such zi(k), Δgi(k) can be represented by following Formula (19).









[

Mathematical


Formula


19

]










Δ


g
i

(
k
)



=


-

λ
k




C
ki


Δ


z
i

(
k
)







(
19
)








FIG. 15 is a diagram illustrating a Δg calculation circuit according to a modification.


The Δg calculation circuit 52a3 includes a zk generation circuit 70, a Δzi(k) generation circuit 71, and a multiplier 72.


The zk generation circuit 70 receives yk and, assuming zk=(zk+, zk), outputs (0, 0) if yk<0 is met, outputs (1, 0) if yk=0 is met, outputs (1, 1) if yk >0 is met.


The Δzi(k) generation circuit 71 receives CkiΔxi. Then, if CkiΔxi>0 is met, the Δzi(k) generation circuit 71 outputs a difference value between zk+ and the original zi(k), as Δzi(k). If CkiΔxi<0 is met, the Δzi(k) generation circuit 71 outputs a difference value between zk and the original zi(k), as Δzi(k).


The multiplier 72 outputs a product of Δzi(k) and −ΔkCki, as Δgi(k).


In a case where the ternary Cki as described above is used, such a Δg calculation circuit 52a3 can be used instead of the Δg calculation circuit 52a2 illustrated in FIG. 11.


Note that, as described above, the processing contents of the data processing devices 10 and 20 of the above respective embodiments can be implemented by causing the data processing devices 10 and 20 to execute a program.


The program can be recorded beforehand on a computer-readable recording medium (for example, the recording medium 26a). As the recording medium, for example, a magnetic disk, an optical disc, a magneto-optical disk, a semiconductor memory, or the like can be used. Examples of the magnetic disk include an FD and an HDD. Examples of the optical disc include a CD, a CD-recordable (R)/rewritable (RW), a DVD, and a DVD-R/RW. The program is sometimes recorded on a portable recording medium and distributed. In that case, the program may be copied from the portable recording medium to another recording medium (for example, the HDD 23) and then executed.


While one form of the program, the data processing device, and the data processing method according to the embodiments has been described based on the embodiments, these embodiments are merely examples and are not limited to the above description.


For example, in the above description, the state variable is assumed to have a value of 0 or 1, but a variable having a value of −1 or +1 can also be used as the state variable by appropriately transforming the formulas.


All examples and conditional language provided herein are intended for the pedagogical purposes of aiding the reader in understanding the invention and the concepts contributed by the inventor to further the art, and are not to be construed as limitations to such specifically recited examples and conditions, nor does the organization of such examples in the specification relate to a showing of the superiority and inferiority of the invention. Although one or more embodiments of the present invention have been described in detail, it should be understood that the various changes, substitutions, and alterations could be made hereto without departing from the spirit and scope of the invention.

Claims
  • 1. A non-transitory computer-readable recording medium storing a program for causing a computer to execute processing comprising: acquiring, from a storage unit, evaluation function information on an evaluation function of a combinatorial optimization problem that includes a cost term and a plurality of constraint terms;specifying, for each of the plurality of constraint terms, values of a first auxiliary variable that represents an input amount subjected to a constraint that relates to each of the plurality of constraint terms, based on the evaluation function information;generating values of a second auxiliary variable obtained by quantizing the first auxiliary variable, based on the values of the first auxiliary variable;for a first constraint term, among the plurality of constraint terms, with which the values of the second auxiliary variable change in association with a change in values of a first state variable among a plurality of state variables of the evaluation function, calculating a first difference value of a contribution amount of the first constraint term associated with the change in the values of the first state variable, to a first change amount in values of the evaluation function associated with the change in the values of the first state variable; andcalculating the first change amount by using the first difference value, or updating a local field to be used to specify a second change amount in the values of the evaluation function associated with the change in each of the plurality of state variables, by using the first difference value.
  • 2. The non-transitory computer-readable recording medium according to claim 1, the processing further comprising: calculating the first change amount by adding a third change amount of the cost term associated with the change in the values of the first state variable and a fourth change amount of the first constraint term obtained from the first difference value;determining whether or not to permit the change in the values of the first state variable, based on a comparison result between the first change amount and a threshold value; andupdating the values of the first state variable when it is determined to permit the change in the values of the first state variable.
  • 3. The non-transitory computer-readable recording medium according to claim 1, the processing further comprising: holding the local field; andupdating the local field by adding the first difference value to the local field for each of the plurality of state variables when the change in the values of the first state variable is permitted.
  • 4. The non-transitory computer-readable recording medium according to claim 1, wherein the second auxiliary variable is a ternary value that indicates whether the values of the first auxiliary variable are positive, negative, or zero.
  • 5. The non-transitory computer-readable recording medium according to claim 1, the processing further comprising: calculating a second difference value of the values of the second auxiliary variable associated with the change in the values of the first state variable; andcalculating the first difference value, based on the second difference value, the values of the first state variable, and a weight value between the first state variable and the first constraint term.
  • 6. A data processing apparatus comprising: a storage unit configured to store evaluation function information on an evaluation function of a combinatorial optimization problem that includes a cost term and a plurality of constraint terms;a processing unit configured to perform processing including:specifying, for each of the plurality of constraint terms, values of a first auxiliary variable that represents an input amount subjected to a constraint that relates to each of the plurality of constraint terms, based on the evaluation function information;generating values of a second auxiliary variable obtained by quantizing the first auxiliary variable, based on the values of the first auxiliary variable;for a first constraint term, among the plurality of constraint terms, with which the values of the second auxiliary variable change in association with a change in values of a first state variable among a plurality of state variables of the evaluation function, calculating a first difference value of a contribution amount of the first constraint term associated with the change in the values of the first state variable, to a first change amount in values of the evaluation function associated with the change in the values of the first state variable; andcalculating the first change amount by using the first difference value, or updating a local field to be used to specify a second change amount in the values of the evaluation function associated with the change in each of the plurality of state variables, by using the first difference value.
  • 7. A data processing method implemented by a computer, the data processing method comprising: acquiring, from a storage unit, evaluation function information on an evaluation function of a combinatorial optimization problem that includes a cost term and a plurality of constraint terms;specifying, for each of the plurality of constraint terms, values of a first auxiliary variable that represents an input amount subjected to a constraint that relates to each of the plurality of constraint terms, based on the evaluation function information;generating values of a second auxiliary variable obtained by quantizing the first auxiliary variable, based on the values of the first auxiliary variable;for a first constraint term, among the plurality of constraint terms, with which the values of the second auxiliary variable change in association with a change in values of a first state variable among a plurality of state variables of the evaluation function, calculating a first difference value of a contribution amount of the first constraint term associated with the change in the values of the first state variable, to a first change amount in values of the evaluation function associated with the change in the values of the first state variable; andcalculating the first change amount by using the first difference value, or updating a local field to be used to specify a second change amount in the values of the evaluation function associated with the change in each of the plurality of state variables, by using the first difference value.
Priority Claims (1)
Number Date Country Kind
2023-084203 May 2023 JP national