CALCULATING DEVICE, CALCULATION PROGRAM, AND CALCULATION METHOD
20230214446 · 2023-07-06
Assignee
Inventors
Cpc classification
International classification
Abstract
According to one embodiment, a calculating device includes a processor configured to perform a matrix transformation processing, and an update processing. The matrix transformation processing includes deriving a second matrix by transforming first row vectors included in a first matrix. The update processing includes an update of first and second variable sets. The update of the second variable set includes obtaining the second variable set after the update by adding a first update function of the updated first variable set to the second variable set. The first update function includes at least one of first or second multiply-add operation. The first multiply-add operation includes a multiply-add operation of the updated first variable set and a component of the second matrix. The second multiply-add operation includes a multiply-add operation of a component of the second matrix and a variable dependent on the updated first variable set.
Claims
1. A calculating device, comprising: a processor configured to perform a matrix transformation processing, and an update processing, the matrix transformation processing including deriving a second matrix by transforming a plurality of first row vectors included in a first matrix, the first matrix being input, the update processing including an update of a first variable set, and an update of a second variable set, the update of the second variable set including obtaining the second variable set after the update by adding a first update function of the updated first variable set to the second variable set before the update, the first update function including at least one of a first multiply-add operation or a second multiply-add operation, the first multiply-add operation including a multiply-add operation of the updated first variable set and a component of the second matrix, the second multiply-add operation including a multiply-add operation of a component of the second matrix and a variable dependent on the updated first variable set.
2. The device according to claim 1, wherein the first row vectors includes a first input vector and a second input vector, the second matrix includes a plurality of second row vectors, the second row vectors includes a first output vector and a second output vector, the first output vector is obtained by using a L1-norm of the first input vector to normalize the first input vector, and the second output vector is obtained by using a L1-norm of the second input vector to normalize the second input vector.
3. The device according to claim 1, wherein the first row vectors includes a first input vector and a second input vector, a third matrix includes a plurality of third row vectors, the third row vectors includes a first intermediate vector and a second intermediate vector, the first intermediate vector is obtained by using a L1-norm of the first input vector to normalize the first input vector, the second intermediate vector is obtained by using a L1-norm of the second input vector to normalize the second input vector, the second row vectors includes a first output vector and a second output vector, an nth element (n being one integer not less than 1 and not more than N, and N being an integer not less than 2) of the first output vector is an interior division value of an nth element of the first input vector and an nth element of the first intermediate vector, and an nth element of the second output vector is an interior division value of an nth element of the second input vector and an nth element of the second intermediate vector.
4. The device according to claim 1, wherein the processor is configured to perform repeating the update processing, the first variable set includes a first variable x.sub.i (the ordinal number i being an integer of 1 to N, and N being one integer not less than 2), the second variable set includes a second variable y.sub.i, the update of the second variable set includes updating the second variable y.sub.i by adding a second function F.sub.i to the second variable y.sub.i before the update, the second function F.sub.i includes the first variable x.sub.i as a variable, the second function F.sub.i includes a parameter a.sub.i, an ordinal number p is one integer not less than 1 and not more than N, an ordinal number q is one integer not less than 1 and not more than N, the ordinal number q is different from the ordinal number p, and a parameter a.sub.p is different from a parameter a.sub.q.
5. The device according to claim 4, wherein the repeating of the update processing includes: a first update; and a second update performed after the first update, and the parameter a.sub.p of the first update is different from the parameter a.sub.p of the second update.
6. The device according to claim 5, wherein the processor performs the update processing K times (K being an integer not less than 2), the parameter a.sub.i of the Kth update processing is greater than the parameter a.sub.i of the first update processing, an absolute value of a difference between the first variable x.sub.p and a first value A.sub.p is greater than an absolute value of a difference between the first variable x.sub.q and a first value A.sub.q, and an increment of the parameter a.sub.p of the second update referenced to the parameter a.sub.p of the first update is less than an increment of the parameter a.sub.q of the second update referenced to the parameter a.sub.q of the first update.
7. The device according to claim 5, wherein the processor performs the update processing K times (K being an integer not less than 2), the parameter a.sub.i of the Kth update processing is less than the parameter a.sub.i of the first update processing, an absolute value of a difference between the first variable x.sub.p and a first value A.sub.p is greater than an absolute value of a difference between the first variable x.sub.q and a first value A.sub.q, and a decrement of the parameter a.sub.p of the second update referenced to the parameter a.sub.p of the first update is less than a decrement of the parameter a.sub.q of the second update referenced to the parameter a.sub.q of the first update.
8. The device according to claim 5, wherein the processor performs the update processing K times (K being an integer not less than 2), the parameter a.sub.i of the Kth update processing is greater than the parameter a.sub.i of the first update processing, an absolute value of a difference between a variable Z.sub.p and a first value A.sub.p is greater than an absolute value of a difference between a variable Z.sub.q and a first value A.sub.q, an increment of the parameter a.sub.p of the second update referenced to the parameter a.sub.p of the first update is less than an increment of the parameter a.sub.q of the second update referenced to the parameter a.sub.q of the first update, the variable Z.sub.p changes dependently on the first variable x.sub.p, and the variable Z.sub.q changes dependently on the first variable x.sub.q.
9. The device according to claim 5, wherein the processor performs the update processing K times (K being an integer not less than 2), the parameter a.sub.i of the Kth update processing is less than the parameter a.sub.i of the first update processing, an absolute value of a difference between a variable Z.sub.p and a first value A.sub.p is greater than an absolute value of a difference between a variable Z.sub.q and a first value A.sub.q, a decrement of the parameter a.sub.p of the second update referenced to the parameter a.sub.p of the first update is less than a decrement of the parameter a.sub.q of the second update referenced to the parameter a.sub.q of the first update, the variable Z.sub.p changes dependently on the first variable x.sub.p, and the variable Z,.sub.q changes dependently on the first variable x.sub.q.
10. The device according to claim 6, wherein the processor controls the first variable x.sub.i in a first range, the first range is not less than a first boundary value and not more than a second boundary value, and the first value A.sub.p and the first value A.sub.q are not less than the first boundary value and not more than the second boundary value.
11. The device according to claim 6, wherein the processor controls the first variable x.sub.i to be not less than a first boundary value and not more than a second boundary value, and the first value A.sub.p, and the first value A.sub.q are substantially median values of the first and second boundary values.
12. The device according to claim 6, wherein the second function F.sub.i includes a first-term function, and the first-term function includes a product of the first variable x.sub.i and the parameter a.sub.i.
13. The device according to claim 4, wherein the second function F.sub.i includes a first-term function, the first-term function includes a product of the first variable x.sub.i, the parameter a.sub.i, and a random number r.sub.i, the random number r.sub.i is positive, and a random number r.sub.p related to the ordinal number p is different from a random number r.sub.q related to the ordinal number q.
14. The device according to claim 12, wherein the second function F.sub.i includes the first-term function and a second-term function, and the second-term function includes the first variable set and a first parameter set {J} as variables.
15. The device according to claim 14, wherein the processor includes a third processing part and a fourth processing part, the third processing part performs a part of a calculation related to the second-term function, the fourth processing part performs an other part of the calculation related to the second-term function, and at least a portion of the other part of the calculation related to the second-term function is simultaneously performed with at least a portion of the part of the calculation related to the second-term function.
16. The device according to claim 12, wherein the processor includes a first processing part and a second processing part, the first processing part performs a part of a calculation related to the first-term function, the second processing part performs an other part of the calculation related to the first-term function, and at least a portion of the other part of the calculation related to the first-term function is simultaneously performed with at least a portion of the part of the calculation related to the first-term function.
17. The device according to claim 4, wherein the update of the first variable set includes updating the first variable x.sub.i by adding a first function to the first variable x.sub.i before the update, and the first function includes the second variable y.sub.i as a variable.
18. The device according to claim 17, wherein the processor includes a fifth processing part and a sixth processing part, the fifth processing part performs a part of a calculation related to the first function, the sixth processing part performs an other part of the calculation related to the first function, and at least a portion of the other part of the calculation related to the first function is simultaneously performed with at least a portion of the part of the calculation related to the first function.
19. A calculation program, the calculation program causing a computer to perform repeating an update processing, the update processing including an update of a first variable set and an update of a second variable set, the first variable set including a first variable x.sub.i (the ordinal number i being an integer of 1 to N, and N being one integer not less than 2), the second variable set including a second variable y.sub.i, the update of the second variable set includes updating the second variable y.sub.i by adding a second function F.sub.i to the second variable y.sub.i before the update, the second function F.sub.i including the first variable x.sub.i as a variable, the second function F.sub.i including a parameter a.sub.i, the ordinal number p being one integer not less than 1 and not more than N, the ordinal number q being one integer not less than 1 and not more than N, the ordinal number q being different from the ordinal number p, a parameter a.sub.p being different from a parameter a.sub.q.
20. A calculation method, comprising: causing a processor to perform repeating an update processing, the update processing including an update of a first variable set and an update of a second variable set, the first variable set including a first variable x.sub.i (the ordinal number i being an integer of 1 to N, and N being one integer not less than 2), the second variable set including a second variable y.sub.i, the update of the second variable set includes updating the second variable y.sub.i by adding a second function F.sub.i to the second variable y.sub.i before the update, the second function F.sub.i including the first variable x.sub.i as a variable, the second function F.sub.i including a parameter a.sub.i, an ordinal number p being one integer not less than 1 and not more than N, an ordinal number q being one integer not less than 1 and not more than N, the ordinal number q being different from the ordinal number p, a parameter a.sub.p being different from a parameter a.sub.q.
Description
BRIEF DESCRIPTION OF THE DRAWINGS
[0004]
[0005]
[0006]
[0007]
[0008]
[0009]
[0010]
[0011]
[0012]
[0013]
[0014]
[0015]
[0016]
[0017]
[0018]
DETAILED DESCRIPTION
[0019] According to one embodiment, a calculating device includes a processor configured to perform a matrix transformation processing, and an update processing. The matrix transformation processing includes deriving a second matrix by transforming a plurality of first row vectors included in a first matrix, The first matrix is input. The update processing includes an update of a first variable set, and an update of a second variable set. The update of the second variable set includes obtaining the second variable set after the update by adding a first update function of the updated first variable set to the second variable set before the update. The first update function includes at least one of a first multiply-add operation or a second multiply-add operation. The first multiply-add operation includes a multiply-add operation of the updated first variable set and a component of the second matrix. The second multiply-add operation includes a multiply-add operation of a component of the second matrix and a variable dependent on the updated first variable set.
[0020] Various embodiments are described below with reference to the accompanying drawings.
[0021] In the specification and drawings, components similar to those described previously or illustrated in an antecedent drawing are marked with like reference numerals, and a detailed description is omitted as appropriate.
First Embodiment
[0022]
[0023] As shown in
[0024] The processor 70 may include, for example, a CPU (Central Processing Unit), etc. The processor 70 includes, for example, an electronic circuit, etc. The calculating device 110 may be a calculation system.
[0025] In the example, the calculating device 110 includes an acquisition part 78. For example, the acquisition part 78 is configured to acquire various data. The acquisition part 78 includes, for example, an I/O port, etc. The acquisition part 78 is an interface. The acquisition part 78 may include the function of an output part. The acquisition part 78 may include, for example, a communication function.
[0026] In the example, the calculating device 110 includes storage 79a. The storage 79a is configured to store various data. The storage 79a may be, for example, memory. The storage 79a may include at least one of ROM (Read Only Memory) or RAM (Random Access Memory),
[0027] The calculating device 110 may include a display part 79b, an input part 79c, etc. The display part 79b may include various displays. The input part 79c includes, for example, a device (e.g., a keyboard, a mouse, a touch input panel, a speech recognition input device, etc.) that includes an operation function.
[0028] Multiple components that are included in the calculating device 110 can communicate with each other by at least one of wired or wireless methods. The locations at which the multiple components included in the calculating device 110 are located may be different from each other. For example, a general-purpose computer may be used as the calculating device 110. For example, multiple computers that are connected to each other may be used as the calculating device 110. A dedicated circuit may be used as at least a part of the calculating device 110 (e.g., the processor 70, etc.). For example, multiple circuits that are connected to each other may be used as the calculating device 110.
[0029] As shown in
[0030] Examples of operations performed by the calculating device 110 according to the embodiment will now be described. For example, the following processing may be performed by the processor 70.
[0031]
[0032] As shown in
[0033] For example, the processor 70 acquires problem data (a first matrix J′) (step S101). For example, the first matrix J′ is input by a user of the calculating device 110, The acquisition part 78 acquires the first matrix J′ that is input. The first matrix J′ that is acquired by the acquisition part 78 is supplied to the processor 70. For example, the first matrix J′ corresponds to a first parameter set {J}.
[0034] The matrix transformation processing M_P includes deriving a second matrix J by transforming multiple first row vectors included in the first matrix J′ that is input (step S105).
[0035] For example, the processor 70 initializes various parameters (step S102) and then performs the update processing (step S108). The update processing includes an update of a first variable set and an update of a second variable set. As described below, the update of the second variable set includes obtaining the second variable set after the update by adding a first update function of the updated first variable set to the second variable set before the update. The first update function includes at least one of a first multiply-add operation or a second multiply-add operation. The first multiply-add operation includes a multiply-add operation of the updated first variable set and a component of the second matrix J (after transformation). The second multiply-add operation includes a multiply-add operation of a component of the second matrix J and a variable dependent on the updated first variable set, Examples of the update processing are described below.
[0036] For example, the transformation of the first matrix J′ is performed by using the L1-norms of the row vectors to normalize the row vectors of the first matrix J′. For example, the following first formula is performed.
[0037] The denominator of the right side of the first formula above corresponds to the L1-norm.
[0038] Matrices may be displayed in tensor form in the embodiments. For example, the ith row vector of the first matrix J′ may be defined by (J.sup.(1).sub.i, J.sup.(2).sub.i,1, . . . , J.sup.(2).sub.i,N, J.sup.(3).sub.i,1,1, . . . , J.sup.(3).sub.i,N,N, . . . ). For example, the ith row vector of the second matrix J may be defined by (J.sup.(1).sub.i, J.sup.(2).sub.i,1, . . . , J.sup.(2).sub.i,N, J.sup.(3).sub.i,1,1, . . . , J.sup.(3).sub.i,N,N, . . . ).
[0039]
[0040] As shown in
[0041] In the second formula, “N.sub.i” corresponds to the L1-norm of the ith row vector of the matrix J (described above) when displayed in tensor form.
[0042] The multiple first row vectors that are included in the first matrix J′ include a first input vector and a second input vector (multiple input vectors). On the other hand, the second matrix J after transformation (normalization) includes multiple second row vectors. The multiple second row vectors include a first output vector and a second output vector. The first output vector is obtained by using the L1-norm of the first input vector to normalize the first input vector. The second output vector is obtained by using the L1-norm of the second input vector to normalize the second input vector. Similar normalization is performed for the third input vector, the third output vector, and the other input and output vectors as well.
[0043] The update processing is performed using such a second matrix J after transformation (normalization). A highly-accurate solution is obtained thereby.
[0044] According to the embodiment, the transformation may include transforming the value after normalization with the L1-norm and the value before normalization into an interior division value. For example, one of the multiple elements included in an output vector after transformation is defined by the interior division value of one value of the multiple elements included in the vector after normalization with the first L1-norm and one value of the multiple elements included in the input vector before normalization. The interior division value of “α” and “β” is represented by rα+(1−r)β. The interior division ratio “r” is not less than 0 and not more than 1.
[0045] For example, the multiple first row vectors that are included in the first matrix J′ include the first and second input vectors. A third matrix can be defined at this time. The third matrix includes multiple third row vectors. The multiple third row vectors include a first intermediate vector and a second intermediate vector. The first intermediate vector is obtained by using the L1-norm of the first input vector to normalize the first input vector. The second intermediate vector is obtained by using the L1-norm of the second input vector to normalize the second input vector. On the other hand, the multiple second row vectors include the first and second output vectors. The nth element (n being one integer not less than 1 and not more than N, and N being an integer not less than 2) of the first output vector is the interior division value of the nth element of the first input vector and the nth element of the first intermediate vector. The nth element of the second output vector is the interior division value of the nth element of the second input vector and the nth element of the second intermediate vector. Thus, the update processing is performed using the second matrix that is obtained. A highly-accurate solution is obtained thereby.
[0046] An example of processing that includes the update processing will now be described. In the following figures, step S105 (the matrix transformation processing M_P) that is performed between steps S101 and S102 is not illustrated.
[0047]
[0048]
[0049] The first variable set includes a first variable x.sub.i. The ordinal number i is an integer of 1 to N. “N” is one integer not less than 2. The first variable x.sub.i corresponds to the ith element of the first variable set {x}. The second variable set includes a second variable y.sub.i. The second variable y.sub.i corresponds to the ith element of the second variable set {y}.
[0050] The update y_UD of the second variable set (step S120) includes updating the second variable y.sub.i by adding a second function F.sub.i to the second variable y.sub.i before the update. The second function F.sub.i includes the first variable x.sub.i as a variable. For example, the second function F.sub.i is a function of the first variable x.sub.i. The second function F.sub.i includes a parameter a.sub.i.
[0051] The second function F.sub.i may include a first-term function and a second-term function. For example, the second function F.sub.i includes the sum of the first-term function and the second-term function. The update y_UD of the second variable set includes an update y_UD-1 based on the first-term function and an update y_UD-2 based on the second-term function.
[0052] The first-term function includes the first variable x.sub.i and the parameter a.sub.i as variables. In other words, the first-term function is a function that includes the first variable x.sub.i and the parameter a.sub.i. The update y_UD-1 based on the first-term function includes, for example, adding the first-term function including the first variable x.sub.i and the parameter a.sub.i to the second variable y.sub.i before the update (step S121).
[0053] The second-term function includes the first variable set {x} and the first parameter set {J} as variables. In other words, the update y_UD-2 based on the second-term function includes, for example, adding the second-term function of the first variable set {x} and the first parameter set {J} to the second variable y.sub.i before the update (step S122). Step S121 may be performed after step S122. Step S122 may be performed after step S121.
[0054] On the other hand, the update x_UD of the first variable set (step S110) includes updating the first variable x.sub.i by adding a first function G.sub.i to the first variable x.sub.i before the update. The first function G.sub.i includes the second variable y.sub.i as a variable. For example, the update x_UD of the first variable set (step S110) includes adding the first function G.sub.i of the second variable y.sub.i to the first variable x.sub.i before the update.
[0055] As described above, the second function F.sub.i that is used in the update y_UD of the second variable set includes the parameter a.sub.i. The parameter a.sub.i is, for example, a bifurcation parameter. According to the embodiment, the parameter a.sub.i for one ordinal number i is different from the parameter a.sub.i for another ordinal number i. For example, the ordinal number p is one integer not less than 1 and not more than N. The ordinal number q is one integer not less than 1 and not more than N. The ordinal number q is different from the ordinal number p. According to the embodiment, the parameter a.sub.p is different from the parameter a.sub.q. For example, a highly-accurate calculation result is obtained by such a parameter a.sub.i.
[0056] In a reference example, the same parameter a.sub.i is applied to all in ordinal number i. For example, in the reference example, the same parameter a.sub.i is applied to each loop of the update processing.
[0057] In contrast, according to the embodiment, different parameters a.sub.i of at least two different ordinal numbers i are applied. A highly-accurate calculation result is obtained thereby.
[0058] According to the embodiment, different parameters a.sub.i are applicable to each loop of the update processing. For example, each loop of the update processing includes a first update and a second update. The second update is performed after the first update. The parameter a.sub.i of the second update may be different from the parameter a.sub.i of the first update. The parameter a.sub.p of the second update may be different from the parameter a.sub.p of the first update. The parameter a.sub.q of the second update may be different from the parameter a.sub.q of the first update. For example, according to the embodiment, the parameter a.sub.i is updated. A calculation result of even higher accuracy is obtained thereby.
[0059] Several examples related to the update (the modification) of the parameter a.sub.i will now be described.
[0060] In the first example, when referenced to the initial parameter a.sub.i, the parameter a.sub.i is increased after the loop of the update processing (at the end of the calculation). For example, the processor 70 performs the update processing K times. “K” is an integer not less than 2. The parameter a.sub.i of the Kth update processing is greater than the parameter a.sub.i of the first update processing. In such a case, the increment of the parameter a.sub.i of the second update referenced to the parameter a.sub.i of the first update is set to decrease as the absolute value of the difference between the first variable x, and a first value A.sub.i increases.
[0061] In the first example, for example, the absolute value of the difference between the first variable x.sub.p and the first value A.sub.p is greater than the absolute value of the difference between the first variable x.sub.q and the first value A.sub.q. In such a case, the increment of the parameter a.sub.p of the second update referenced to the parameter a.sub.p of the first update is set to be less than the increment of the parameter a.sub.q of the second update referenced to the parameter a.sub.q of the first update. Such processing is performed by the processor 70.
[0062] In a second example, when referenced to the initial parameter a.sub.i, the parameter a.sub.i is reduced after the loop of the update processing (at the end of the calculation). The parameter a.sub.i of the Kth update processing is less than the parameter a.sub.i of the first update processing. In such a case, the decrement of the parameter a.sub.i of the second update referenced to the parameter a.sub.i of the first update decreases as the absolute value of the difference between the first variable x.sub.i and the first value A.sub.i increases.
[0063] In the second example, for example, the absolute value of the difference between the first variable x.sub.p and the first value A.sub.p is greater than the absolute value of the difference between the first variable x.sub.q and the first value A.sub.q. In such a case, the decrement of the parameter a.sub.p of the second update referenced to the parameter a.sub.p of the first update is set to be less than the decrement of the parameter a.sub.q of the second update referenced to the parameter a.sub.q of the first update. Such processing is performed by the processor 70.
[0064] Thus, the parameter a.sub.i is modified according to the first variable x.sub.i. For example, the processor 70 controls the first variable x.sub.i to be within a first range. The first range is not less than a first boundary value and not more than a second boundary value. The first value A.sub.i, the first value A.sub.p, and the first value A.sub.q described above are not more than the second boundary value of not less than the first boundary value. The first boundary value and the second boundary value correspond to the “walls” of the first range in which the first variable x.sub.i is controlled.
[0065] For example, the first value A.sub.i may be a substantially median value of the first and second boundary values. The first value A.sub.p and the first value A.sub.q may be substantially median values of the first and second boundary values.
[0066]
[0067] When the first variable x.sub.i is not within the first range, the flow proceeds to step S142. Processing is performed in step S142 to cause the first variable x.sub.i to be within the first range. The first variable x.sub.i is returned to the first range. In step S142, for example, the second variable y.sub.i is set to 0. Then, the flow proceeds to step S130.
[0068] An update a_UD of the parameter a.sub.i is performed in step S130. In the first example, when referenced to the initial parameter a.sub.i , the parameter a.sub.i is increased after the loop of the update processing (at the end of the calculation). In the update a_UD of the parameter a.sub.i of the first example, the increment of the parameter a.sub.i is set to decrease as the first variable x.sub.i moves away from the first value A.sub.i.
[0069] As shown in
[0070] As shown in
[0071] As shown in
[0072] Thereafter, the operation of the loop between steps S151 and S152 is performed until the iteration count nt reaches a determined value Nt. An example of the update y_UD of the second variable set (step S120) is described below.
[0073] For example, the following third formula is calculated in the update x_UD of the first variable set (step S110).
x.sub.i+=dt*y.sub.i (3)
[0074] In the third formula, “dt” is, for example, a constant. “dt” may be predetermined. The third formula indicates that the variable at the left side before the “+” is updated by adding the right side to the variable. This is similar for similar formulas illustrated below as well. The “asterisk (*)” is the multiplication symbol.
[0075] After step S110, the flow proceeds to step S155 via steps S141, S142, and S130 described above. The following fourth formula is performed in step S155.
nt+=1 (4)
[0076] In other words, the iteration count nt is increased by 1. When the iteration count nt is less than the determined value Nt in step S152, the flow returns to step S151. The calculation ends when the iteration count nt reaches the determined value Nt.
[0077] The processor 70 is configured to output at least the first variable x.sub.i obtained after repeating the update processing and at least one function of the first variable x.sub.i obtained after repeating the update processing (step S160).
[0078]
[0079]
[0080]
[0081] As shown in
[0082]
[0083] As shown in
[0084]
[0085] As shown in
[0086] For example, the fifth processing part 70e performs a part of the calculation related to the first function G.sub.i (step S110a). The sixth processing part 70f performs another part of the calculation related to the first function G.sub.i (step S110b). At least a portion of the other part of the calculation related to the first function G.sub.i is simultaneously performed with at least a portion of the part of the calculation related to the first function G.sub.i.
[0087] Thus, the parallel processing (the parallel computation) for the ordinal number i may be performed in at least one of the update y_UD-1 based on the first-term function, the update y_UD-2 based on the second-term function, or the update x_UD of the first variable set. For example, the calculations related to mutually-different ordinal numbers i are performed in parallel. The optimization problem can be quickly calculated by parallel processing. For example, a large-scale problem can be quickly solved. For example, the values of the signs (−1 or 1) of the first variable x.sub.i give the solution of the combinatorial optimization problem corresponding to the first parameter set {J}.
[0088]
[0089]
[0090] In the example of
y.sub.i+=dt*c*(Σ.sub.j=1.sup.NJ.sup.(2).sub.j*x.sub.j+Σ.sub.j=1.sup.NΣ.sub.k=n.sup.NJ.sup.(3)
.sub.k*x
*x.sub.k+ . . . ) (5)
[0091] As illustrated in the fifth formula, the first parameter set {J} includes first-, second-, third-, and higher-order tensors. The second -term function includes a multiply-add operation term of at least a part of the first parameter set {J} and at least a part of the first variable set {x}. When the first parameter set {J} is second-order, the first parameter set {J} corresponds to a matrix. Thus, the first parameter set {J} may include third- or higher-order tensors. In the fifth formula, “c” is a parameter. For example, “c” may be calculated between steps S151 and S120. Examples of “c” are described below.
[0092] The following sixth formula is calculated in the update y_UD-1 based on the first-term function.
y.sub.i+=dt*(−a.sub.i*x.sub.i+c*J.sup.(1)) (6)
[0093] Namely, the first-term function that is included in the second function F.sub.i includes the product of the first variable x.sub.i and the parameter a.sub.i.
[0094] In the example of
|x.sub.i|<1 (7)
[0095] When the seventh formula is satisfied in step S141, the flow proceeds to step S130. When the seventh formula is not satisfied in step S141, the flow proceeds to step S142. The following eighth formula is performed in step S142.
x.sub.i=sgn(x.sub.i),
y.sub.i=0 (8)
[0096] In the eighth formula, “sgn(x.sub.i)” represents the value of the sign (−1 or 1) of the first variable x.sub.i. The “processing” of the eighth formula and various subsequent formulas may be represented using a programming language.
[0097] In the example of
nt+=1,
c.sub.a=if(nt<nt0,c.sub.a0,0),
a.sub.i+=−a.sub.i*(1−c.sub.a*x.sub.i.sup.2)/(Nt−nt+1) (9)
[0098] In the ninth formula, “C.sub.a”, “C.sub.a0”, and “nt0” are parameters. “c.sub.a”, “C.sub.a0”, and “nt0” may be predetermined, A function that is defined in the following tenth formula is applied to the ninth formula.
if(A,a,b) (10)
[0099] When “A” is true, the value of the function of the tenth formula is “a” of the tenth formula, When “A” is false, the value of the function of the tenth formula is “b” of the tenth formula. The update a_UD of the parameter a.sub.i is performed based on the ninth formula above. In the example of
y.sub.i+=dt*c*(Σ.sub.j=1.sup.NJ.sup.(2).sub.i,j*s.sub.j+Σ.sub.j=1.sup.NΣ.sub.k=1.sup.NJ.sup.(3).sub.i,j,k*s.sub.j*s.sub.k=. . . ) (11)
[0100] In the eleventh formula, “s.sub.j” in the second term inside the parentheses on the right side is represented by the following twelfth formula.
s.sub.j=sgn(x.sub.j) (12)
[0101]
[0102] In the example of
[0103] As shown in
Z.sub.i+=−dt*g*(Z.sub.i−x.sub.j) (13)
[0104] In the thirteenth formula, “g” is a constant. “ ” may be predetermined. “Z.sub.i” of the thirteenth formula corresponds to the temporal average of the first variable x.sub.i. In the example as shown in
[0105] In the example of
nt+=1,
c.sub.a=if(nt<nt0,c.sub.a0,0),
a.sub.i+=−a.sub.i*(−c.sub.a*|Z.sub.i|.sup.2)/(Nt−nt+1) (14)
[0106] Then, steps S155, S152, and S160 described with reference to
[0107] For example, in a third example, the processor 70 performs the update processing K times, The parameter a.sub.i of the Kth update processing is greater than the parameter a.sub.i of the first update processing. Each loop of the update processing includes the first update and the second update performed after the first update. The increment of the parameter a.sub.i of the second update referenced to the parameter a.sub.i of the first update is set to decrease as the absolute value of the difference between a variable Z.sub.i and the first value A.sub.i increases for two ordinal numbers i. The variable Z.sub.i changes dependently on the first variable x.sub.i.
[0108] For example, in the third example, the absolute value of the difference between the variable Z.sub.p and the first value A.sub.p is greater than the absolute value of the difference between the variable Z.sub.q and the first value A.sub.q. In such a case, the increment of the parameter a.sub.p of the second update referenced to the parameter a.sub.p of the first update is set to be less than the increment of the parameter a.sub.q of the second update referenced to the parameter a.sub.q of the first update. The variable Z.sub.p changes dependently on the first variable x.sub.p. The variable Z.sub.q changes dependently on the first variable x.sub.q.
[0109] For example, in a fourth example, the processor 70 performs the update processing K times. The parameter a.sub.i of the Kth update processing is less than the parameter a.sub.i of the first update processing. Each loop of the update processing includes the first update and the second update performed after the first update. The decrement of the parameter a.sub.i of the second update referenced to the parameter a.sub.i of the first update is set to decrease as the absolute value of the difference between the variable Z.sub.i and the first value A.sub.i increases for two ordinal numbers i. The variable Z.sub.i changes dependently on the first variable x.sub.i.
[0110] For example, in the fourth example, the absolute value of the difference between the variable Z.sub.p and the first value A.sub.p is greater than the absolute value of the difference between the variable Z.sub.q and the first value A.sub.q. In such a case, the decrement of the parameter a.sub.p of the second update referenced to the parameter a.sub.p of the first update is set to be less than the decrement of the parameter a.sub.q of the second update referenced to the parameter a.sub.q of the first update. The variable Z.sub.p changes dependently on the first variable x.sub.p. The variable Z.sub.q changes dependently on the first variable x.sub.q.
[0111]
[0112] In the example of
[0113] In
b1<x.sub.j<b2 (15)
[0114] In the fifteenth formula, “b1” corresponds to the first boundary value. “b2” corresponds to the second boundary value.
[0115] In
x.sub.i=if (x.sub.i<b1,b1,b2),
y.sub.i=0 (16)
[0116] In
nt+=1,
c.sub.a=if(nt<nt0,c.sub.a0,0),
a.sub.i+=−a.sub.i*(1−c.sub.a*|x.sub.i−A.sub.i|.sup.2)/(Nt−nt+1) (17)
[0117] For example, in the seventeenth formula, “A.sub.i” may be represented by the following eighteenth formula.
A.sub.i=(b1+b2)/2 (18)
[0118] In the example as shown in the eighteenth formula, the first value A.sub.i (e.g., the first value A.sub.p and the first value A.sub.q) is the median value of the first boundary value (b1) and the second boundary value (b2).
[0119]
[0120] In the example of
[0121] In
nt+=1,
c.sub.a=if(nt<nt0,c.sub.a0,0),
a.sub.i+=−a.sub.i*(1−c.sub.a*|Z.sub.i−A.sub.i|.sup.2)/(Nt−nt+1) (19)
[0122] According to the embodiment, various modifications of the update a_UD of the parameter a.sub.i are possible.
[0123] According to the embodiment, an update that uses a random number may be performed, For example, the following twentieth formula is calculated in the update y_UD-1 based on the first-term function (step S121).
y.sub.i+=dt*(−r.sub.i*a.sub.i*x.sub.i+c*J.sup.(1).sub.i) (20)
[0124] For example, the twentieth formula is calculated instead of the sixth formula.
[0125] For example, the second function F.sub.i includes the first-term function. The first-term function includes the product of the first variable x.sub.i, the parameter a.sub.i, and the random number r.sub.i. The random number r.sub.i is positive. The random number r.sub.i for one ordinal number i is different from the random number r.sub.i for another ordinal number i. For example, the random number r.sub.p that is related to the ordinal number p is different from the random number r.sub.q related to the ordinal number q. Such random numbers (noise terms) make it easier to separate the first variable x.sub.i from the “walls” (the boundaries of the first range).
[0126] For example, the parameter “c” is obtained by the following twenty-first formula.
[0127] The formulas above (e.g., the fifth formula, the sixth formula, etc.) are calculated using the parameter “c” obtained by the twenty-first formula.
[0128] Calculation examples will now be described.
[0129]
[0130]
[0131]
[0132] As shown in
[0133] An example of calculation results for a third condition will now be described. In the third condition, the second matrix J after transformation is used, and the individual control of a.sub.i of the ninth formula and the random number r.sub.i of the twentieth formula are applied. In the third condition, the random number “r.sub.i” is 1+c.sub.r*r.sub.i′. “C.sub.r” is a parameter that determines the width of the random number “r.sub.i”. “r.sub.i” is a uniform random number that is not less than −1 and not more than 1. The parameters of the third condition are shown in
[0134]
[0135] The horizontal axis of
[0136]
[0137]
[0138] As shown in
Second Embodiment
[0139] A second embodiment relates to a calculation program. The calculation program causes a computer to repeatedly perform the update processing described above.
Third Embodiment
[0140] A third embodiment is a computer-readable recording medium. A program that causes a computer to repeatedly perform the update processing described above is recorded in the recording medium.
Fourth Embodiment
[0141] The embodiment relates to a calculation method. The calculation method causes the processor 70 to repeatedly perform the update processing described above.
[0142] For example, the above processing (instructions) of the various information (data) is executed based on a program (software). For example, the above processing of the various information is performed by a computer storing the program and reading the program.
[0143] The above processing of the various information may be recorded in a magnetic disk (a flexible disk, a hard disk, etc.), an optical disk (CD-ROM, CD-R, CD-RW, DVD-ROM, DVD±R, DVD±RW, etc.), semiconductor memory, or another recording medium as a program that can cause a computer to perform the execution.
[0144] For example, the information that is recorded in the recording medium can be read by a computer (or an embedded system). The recording format (the storage format) of the recording medium is arbitrary. For example, the computer reads the program from the recording medium and causes a CPU to execute the instructions described in the program based on the program. In the computer, the acquisition (or the reading) of the program may be performed via a network.
[0145] At least a part of the above processing of the information may be performed by various software operating on a computer (or an embedded system) based on a program installed in the computer from a recording medium. The software includes, for example, an OS (operating system), etc. The software may include, for example, middleware operating on a network, etc.
[0146] The recording medium according to embodiments also includes a recording medium to which a program obtained using a LAN, the Internet, or the like is downloaded and stored, The above processing may be performed based on multiple recording media.
[0147] The computer according to embodiments includes one or multiple devices (e.g., personal computers, etc.). The computer according to embodiments may include multiple devices connected by a network.
[0148] Embodiments may include the following configurations (e.g., technological proposals).
Configuration 1
[0149] A calculating device, comprising:
[0150] a processor configured to perform [0151] a matrix transformation processing, and [0152] an update processing,
[0153] the matrix transformation processing including deriving a second matrix by transforming a plurality of first row vectors included in a first matrix, the first matrix being input,
[0154] the update processing including [0155] an update of a first variable set, and [0156] an update of a second variable set,
[0157] the update of the second variable set including obtaining the second variable set after the update by adding a first update function of the updated first variable set to the second variable set before the update,
[0158] the first update function including at least one of a first multiply-add operation or a second multiply-add operation,
[0159] the first multiply-add operation including a multiply-add operation of the updated first variable set and a component of the second matrix,
[0160] the second multiply-add operation including a multiply-add operation of a component of the second matrix and a variable dependent on the updated first variable set.
Configuration 2
[0161] The calculating device according to Configuration 1, wherein
[0162] the plurality of first roe, vectors includes a first input vector and a second input vector,
[0163] the second matrix includes a plurality of second row vectors,
[0164] the plurality of second row vectors includes a first output vector and a second output vector,
[0165] the first output vector is obtained by using a L1-norm of the first input vector to normalize the first input vector, and
[0166] the second output vector is obtained by using a L1-norm of the second input vector to normalize the second input vector.
Configuration 3
[0167] The calculating device according to Configuration 1, wherein
[0168] the plurality of first row vectors includes a first input vector and a second input vector,
[0169] a third matrix includes a plurality of third row vectors,
[0170] the plurality of third row vectors includes a first intermediate vector and a second intermediate vector,
[0171] the first intermediate vector is obtained by using a L1-norm of the first input vector to normalize the first input vector,
[0172] the second intermediate vector is obtained by using a L1-norm of the second input vector to normalize the second input vector,
[0173] the plurality of second row vectors includes a first output vector and a second output vector,
[0174] an nth element (n being one integer not less than 1 and not more than N, and N being an integer not less than 2) of the first output vector is an interior division value of an nth element of the first input vector and an nth element of the first intermediate vector, and
[0175] an nth element of the second output vector is an interior division value of an nth element of the second input vector and an nth element of the second intermediate vector,
Configuration 4
[0176] The calculating device according to any one of Configurations 1 to 3, wherein
[0177] the processor is configured to perform repeating the update processing,
[0178] the first variable set includes a first variable x.sub.i (the ordinal number i being an integer of 1 to N, and N being one integer not less than 2),
[0179] the second variable set includes a second variable y.sub.i,
[0180] the update of the second variable set includes updating the second variable y.sub.i by adding a second function F.sub.i to the second variable y.sub.i before the update,
[0181] the second function F.sub.i includes the first variable x.sub.i as a variable,
[0182] the second function F.sub.i includes a parameter a.sub.i,
[0183] an ordinal number p is one integer not less than 1 and not more than N,
[0184] an ordinal number q is one integer not less than 1 and not more than N,
[0185] the ordinal number q is different from the ordinal number p, and
[0186] a parameter a.sub.p is different from a parameter a.sub.q.
Configuration 5
[0187] The calculating device according to Configuration 4, wherein
[0188] the repeating of the update processing includes: [0189] a first update; and [0190] a second update performed after the first update, and
[0191] the parameter a.sub.p of the first update is different from the parameter a.sub.p of the second update.
Configuration 6
[0192] The calculating device according to Configuration 5, wherein
[0193] the processor performs the update processing K times (K being an integer not less than 2),
[0194] the parameter a.sub.i of the Kth update processing is greater than the parameter a.sub.i of the first update processing,
[0195] an absolute value of a difference between the first variable x.sub.p and a first value A.sub.p is greater than an absolute value of a difference between the first variable x.sub.q and a first value A.sub.q, and
[0196] an increment of the parameter a.sub.p of the second update referenced to the parameter a.sub.p of the first update is less than an increment of the parameter a.sub.q of the second update referenced to the parameter a.sub.q of the first update,
Configuration 7
[0197] The calculating device according to Configuration 5, wherein
[0198] the processor performs the update processing K times (K being an integer not less than 2),
[0199] the parameter a.sub.i of the Kth update processing is less than the parameter a.sub.i of the first update processing,
[0200] an absolute value of a difference between the first variable x.sub.p and a first value A.sub.p is greater than an absolute value of a difference between the first variable x.sub.q and a first value A.sub.q, and
[0201] a decrement of the parameter a.sub.p of the second update referenced to the parameter a.sub.p of the first update is less than a decrement of the parameter a.sub.q of the second update referenced to the parameter a.sub.q of the first update.
Configuration 8
[0202] The calculating device according to Configuration 5, wherein
[0203] the processor performs the update processing K times (K being an integer not less than 2),
[0204] the parameter a.sub.i of the Kth update processing is greater than the parameter a.sub.i of the first update processing,
[0205] an absolute value of a difference between a variable Z.sub.p and a first value A.sub.p is greater than an absolute value of a difference between a variable Z.sub.q and a first value A.sub.q,
[0206] an increment of the parameter a.sub.p of the second update referenced to the parameter a.sub.p of the first update is less than an increment of the parameter a.sub.q of the second update referenced to the parameter a.sub.q of the first update,
[0207] the variable Z.sub.p changes dependently on the first variable x.sub.p, and
[0208] the variable Z.sub.q changes dependently on the first variable x.sub.q.
Configuration 9
[0209] The calculating device according to Configuration 5, wherein
[0210] the processor performs the update processing K times (K being an integer not less than 2),
[0211] the parameter a.sub.i of the Kth update processing is less than the parameter a.sub.i of the first update processing,
[0212] an absolute value of a difference between a variable Z.sub.p and a first value A.sub.p is greater than an absolute value of a difference between a variable Z.sub.q and a first value A.sub.q,
[0213] a decrement of the parameter a.sub.p of the second update referenced to the parameter a.sub.p of the first update is less than a decrement of the parameter a.sub.q of the second update referenced to the parameter a.sub.q of the first update,
[0214] the variable Z.sub.p changes dependently on the first variable x.sub.p, and
[0215] the variable Z.sub.q changes dependently on the first variable x.sub.q.
Configuration 10
[0216] The calculating device according to any one of Configurations 6 to 9, wherein
[0217] the processor controls the first variable x.sub.i in a first range,
[0218] the first range is not less than a first boundary value and not more than a second boundary value, and
[0219] the first value A.sub.p and the first value A.sub.q are not less than the first boundary value and not more than the second boundary value.
Configuration 11
[0220] The calculating device according to any one of Configurations 6 to 9, wherein
[0221] the processor controls the first variable x.sub.i to be not less than a first boundary value and not more than a second boundary value, and
[0222] the first value A.sub.p and the first value A.sub.q are substantially median values of the first and second boundary values.
Configuration 12
[0223] The calculating device according to any one of Configurations 6 to 11, wherein
[0224] the second function F.sub.i includes a first-term function, and
[0225] the first-term function includes a product of the first variable x.sub.i and the parameter a.sub.i.
Configuration 13
[0226] The calculating device according to any one of Configurations 4 to 12, wherein
[0227] the second function F.sub.i includes a first-term function,
[0228] the first-term function includes a product of the first variable x.sub.i, the parameter a.sub.i, and a random number r.sub.i,
[0229] the random number r.sub.i is positive, and
[0230] a random number r.sub.p related to the ordinal number p is different from a random number r.sub.q related to the ordinal number q.
Configuration 14
[0231] The calculating device according to Configuration 12 or 13, wherein
[0232] the second function F.sub.i includes the first-term function and a second-term function, and
[0233] the second-term function includes the first variable set and a first parameter set {J} as variables.
Configuration 15
[0234] The calculating device according to Configuration 14, wherein
[0235] the second-term function includes a multiply-add operation term of at least a part of the first parameter set {J} and at least a part of the first variable set.
Configuration 16
[0236] The calculating device according to Configuration 14 or 15, wherein
[0237] the first parameter set includes a tensor that is third- or higher-order.
Configuration 17
[0238] The calculating device according to any one of Configurations 14 to 16, wherein
[0239] the processor includes a third processing part and a fourth processing part,
[0240] the third processing part performs a part of a calculation related to the second-term function,
[0241] the fourth processing part performs an other part of the calculation related to the second-term function, and
[0242] at least a portion of the other part of the calculation related to the second-term function is simultaneously performed with at least a portion of the part of the calculation related to the second-term function.
Configuration 18
[0243] The calculating device according to any one of Configurations 12 to 17, wherein
[0244] the processor includes a first processing part and a second processing part,
[0245] the first processing part performs a part of a calculation related to the first-term function,
[0246] the second processing part performs an other part of the calculation related to the first-term function, and
[0247] at least a portion of the other part of the calculation related to the first-term function is simultaneously performed with at least a portion of the part of the calculation related to the first-term function.
Configuration 19
[0248] The calculating device according to any one of Configurations 4 to 18, wherein
[0249] the update of the first variable set includes updating the first variable x.sub.i by adding a first function to the first variable x.sub.i before the update, and
[0250] the first function includes the second variable y.sub.i as a variable.
Configuration 20
[0251] The calculating device according to Configuration 19, wherein
[0252] the processor includes a fifth processing part and a sixth processing part,
[0253] the fifth processing part performs a part of a calculation related to the first function,
[0254] the sixth processing part performs an other part of the calculation related to the first function, and
[0255] at least a portion of the other part of the calculation related to the first function is simultaneously performed with at least a portion of the part of he calculation related to the first function.
Configuration 21
[0256] The calculating device according to Configuration 19 or 20, wherein
[0257] the first function is independent of the first variable set, and
[0258] the second function is independent of the second variable set.
Configuration 22
[0259] The calculating device according to any one of Configurations 4 to 21, wherein
[0260] the processor is configured to output at least the first variable x.sub.i obtained after the repeating of the update processing and at least one function of the first variable x.sub.i obtained after the repeating of the update processing.
Configuration 23
[0261] A calculation program,
[0262] the calculation program causing a computer to perform repeating an update processing,
[0263] the update processing including an update of a first variable set and an update of a second variable set,
[0264] the first variable set including a first variable x.sub.i (the ordinal number i being an integer of 1 to N, and N being one integer not less than 2),
[0265] the second variable set including a second variable y.sub.i,
[0266] the update of the second variable set includes updating the second variable y.sub.i by adding a second function F.sub.i to the second variable y.sub.i before the update,
[0267] the second function F.sub.i including the first variable x.sub.i as a variable,
[0268] the second function F.sub.i including a parameter a.sub.i,
[0269] the ordinal number p being one integer not less than 1 and not more than N,
[0270] the ordinal number q being one integer not less than 1 and not more than N,
[0271] the ordinal number q being different from the ordinal number p,
[0272] a parameter a.sub.p being different from a parameter a.sub.p.
Configuration 24
[0273] A recording medium in which a calculation program is recorded,
[0274] the recording medium being computer-readable,
[0275] the calculation program causing a computer to perform repeating an update processing,
[0276] the update processing including an update of a first variable set and an update of a second variable set,
[0277] the first variable set including a first variable x.sub.i (the ordinal number i being an integer of 1 to N, and N being one integer not less than 2),
[0278] the second variable set including a second variable y.sub.i,
[0279] the update of the second variable set includes updating the second variable y.sub.i by adding a second function F.sub.i to the second variable y.sub.i before the update,
[0280] the second function F.sub.i including the first variable x.sub.i as a variable,
[0281] the second function F.sub.i including a parameter a.sub.i,
[0282] an ordinal number p being one integer not less than 1 and not more than N,
[0283] an ordinal number q being one integer not less than 1 and not more than N,
[0284] the ordinal number q being different from the ordinal number p,
[0285] a parameter a.sub.p being different from a parameter a.sub.q.
Configuration 25
[0286] A calculation method, comprising:
[0287] causing a processor to perform repeating an update processing,
[0288] the update processing including an update of a first variable set and an update of a second variable set,
[0289] the first variable set including a first variable x.sub.i (the ordinal number i being an integer of 1 to N, and N being one integer not less than 2),
[0290] the second variable set including a second variable y.sub.i,
[0291] the update of the second variable set includes updating the second variable y.sub.i by adding a second function F.sub.i to the second variable y.sub.i before the update,
[0292] the second function F.sub.i including the first variable x.sub.i as a variable,
[0293] the second function F.sub.i including a parameter a.sub.i,
[0294] an ordinal number p being one integer not less than 1 and not more than N,
[0295] an ordinal number q being one integer not less than 1 and not more than N,
[0296] the ordinal number q being different from the ordinal number p,
[0297] a parameter a.sub.p being different from a parameter a.sub.q.
[0298] According to embodiments, a calculating device, a calculation program, a recording medium, and a calculation method can be provided in which the calculation accuracy can be increased.
[0299] Hereinabove, exemplary embodiments of the invention are described with reference to specific examples, However, the embodiments of the invention are not limited to these specific examples, For example, one skilled in the art may similarly practice the invention by appropriately selecting specific configurations of components included in calculating devices such as processors, acquisition parts, holding parts, etc., from known art. Such practice is included in the scope of the invention to the extent that similar effects thereto are obtained.
[0300] Further, any two or more components of the specific examples may be combined within the extent of technical feasibility and are included in the scope of the invention to the extent that the purport of the invention is included.
[0301] Moreover, all calculating devices, calculation programs, recording media, and calculation methods practicable by an appropriate design modification by one skilled in the art based on the calculating devices, the calculation programs, the recording media, and the calculation methods described above as embodiments of the invention also are within the scope of the invention to the extent that the purport of the invention is included.
[0302] Various other variations and modifications can be conceived by those skilled in the art within the spirit of the invention, and it is understood that such variations and modifications are also encompassed within the scope of the invention.
[0303] While certain embodiments have been described, these embodiments have been presented by way of example only, and are not intended to limit the scope of the inventions. Indeed, the novel embodiments described herein may be embodied in a variety of other forms; furthermore, various omissions, substitutions and changes in the form of the embodiments described herein may be made without departing from the spirit of the inventions. The accompanying claims and their equivalents are intended to cover such forms or modifications as would fall within the scope and spirit of the invention.