SIMPLIFYING CLAUSES FOR MAX-SAT
20180024967 ยท 2018-01-25
Inventors
Cpc classification
International classification
Abstract
A method includes obtaining a plurality of clauses associated with a plurality of logical variables, each of the clauses consisting of a weight and a disjunction of one or more literals of the logical variables, detecting conditions associated with one or more inference rules, and simplifying the plurality of clauses on the basis of the detecting.
Claims
1. A computer-implemented method comprising: obtaining a plurality of clauses associated with a plurality of logical variables, each of the clauses in the plurality of clauses including a weight and a disjunction of one or more literals of the logical variables; detecting (i) whether any clauses in the plurality of clauses other than a first clause (ab, w.sub.11), a second clause (
c, w.sub.21), a fourth clause (
2. The method of claim 1, wherein the modifying includes replacing any clauses having non-zero weight from among the first, second, third, fourth, and fifth clauses with a replacement first clause (T, w.sub.r11), a replacement second clause (T, w.sub.r12), a replacement third clause (c, w.sub.r21) or (a
c, w.sub.r21), a replacement fourth clause (b
3. The method of claim 2, wherein w.sub.r11, w.sub.r12, w.sub.r21, w.sub.r22, and w.sub.r0 are equal to w.sub.11, w.sub.12, w.sub.21, w.sub.22, and w.sub.0, respectively.
4. The method of claim 1, further comprising determining, based on the simplified plurality of clauses, an optimal assignment of values to the plurality of logical variables, the optimal assignment of values determined so as to maximize the sum of the weights of clauses satisfied by the assignment.
5. The method of claim 4, further comprising summing the weights of clauses satisfied by the optimal assignment of values, the resulting sum including w.sub.11 and w.sub.12 if the detecting indicates (i) that no clauses in the plurality of clauses other than the first, second, third, fourth, and fifth clauses include a literal of the first logical variable a and, a non-zero weight and (ii) that min(w.sub.11,w.sub.12)w.sub.0+max(w.sub.21, w.sub.22), wherein the resulting sum represents the benefit of the optimal assignment of values.
6. The method of claim 4, further comprising summing the weights of clauses not satisfied by the optimal assignment of values, the resulting sum not including w.sub.11 or w.sub.12 if the detecting indicates (i) that no clauses in the plurality of clauses other than the first, second, third, fourth, and fifth clauses include a literal of the first logical variable a and a non-zero weight, and (ii) that min(w.sub.11,w.sub.12)w.sub.0+max(w.sub.21, w.sub.22), wherein the resulting sum represents the cost of the optimal assignment of values.
7. The method of claim 4, wherein: the plurality of clauses are associated with a graph having a plurality of vertices and a plurality of weighted edges connecting the vertices, such that each vertex of the plurality of vertices is represented by one of the logical variables and the plurality of clauses includes two clauses (uv, w.sub.uv) and (
8. The method of claim 7, wherein the obtaining includes generating the plurality of clauses based on the graph.
9. The method of claim 1, further comprising: storing, in a memory, a data structure including, for each of the logical variables, a list of the clauses that include a literal of the logical variable and a non-zero weight, wherein the detecting includes confirming that the number of clauses in the list of clauses for the first logical variable a is not more than a threshold before detecting one or more of (i) whether any clauses in the plurality of clauses other than the first, second, third, fourth, and fifth clauses include a literal of the first logical variable a and a non-zero weight and (ii) whether min(w.sub.11,w.sub.12)w.sub.0+max(w.sub.21, w.sub.22).
10. The method of claim 1, further comprising repeating the detecting after the simplifying.
11. A computer-implemented method comprising: obtaining a plurality of clauses associated with a plurality of logical variables, each of the clauses including of a weight and a disjunction of one or more literals of the variables; detecting (i) whether the plurality of clauses includes a first clause (ab, H) and a second clause (a
c, H), where a is a first logical variable, b is a second logical variable, c is a third logical variable, and a weight of H signifies a hard clause that must be satisfied by any assignment of values to the plurality of logical variables, (ii) whether any hard clauses in the plurality of clause other than the first and second clauses include the literal a, and (iii) whether w.sub.unit()+w.sub.unit(b)X.sub.b and w.sub.unit()+w.sub.unit(c)X.sub.c, where w.sub.unit() is the weight w.sub.1 of a clause (a, w.sub.1) included in the plurality of clauses, w.sub.unit(b) is the weight w.sub.2 of a clause (b, w.sub.2) included in the plurality of clauses, w.sub.unit(c) is the weight w.sub.3 of a clause (c, w.sub.3) included in the plurality of clauses, X.sub.b is the sum of the weights of all clauses in the plurality of clauses, other than hard clauses including the literal a, that include at least one of the literals a and
12. The method of claim 11, wherein the modifying includes removing one of the first and second clauses if the detecting indicates (i) that the plurality of clauses includes the first and second clauses, (ii) that no hard clauses in the plurality of clauses other than the first and second clauses include the literal a, and (iii) that w.sub.unit()+w.sub.unit(b)X.sub.b and w.sub.unit()+w.sub.unit(c)X.sub.c.
13. The method of claim 11, further comprising determining, based on the simplified plurality of clauses, an optimal assignment of values to the plurality of logical variables, the optimal assignment of values determined so as to maximize the sum of the weights of clauses satisfied by the assignment.
14. The method of claim 13, further comprising summing the weights of clauses satisfied by the optimal assignment of values, the resulting sum representing the benefit of the optimal assignment of values.
15. The method of claim 13, further comprising summing the weights of clauses not satisfied by the optimal assignment of values, the resulting sum representing a cost of the optimal assignment of values.
16. The method of claim 13, wherein: the plurality of clauses are associated with a graph having a plurality of vertices and a plurality of edges connecting the vertices, such that each vertex of the plurality of vertices is represented by one of the logical variables and the plurality of clauses includes a clause (v, H) for each edge of the plurality of edges, where u and v are logical variables representing the vertices connected by the edge; and the determining includes determining a solution to a minimum vertex cover problem of the graph, the minimum vertex cover problem being to find a set of vertices with minimum size among the plurality of vertices such that, for each of the plurality of edges, the set of vertices includes at least one of the two vertices connected by the edge, where the value of each of the logical variables in the determined optimal assignment indicates whether the vertex represented by the logical variable is in the set or not in the set.
17. The method of claim 16, wherein the obtaining includes generating the plurality of clauses based on the graph.
18. The method of claim 11, further comprising storing, in a memory, a data structure including, for each of the logical variables, a list of the clauses that include a literal of the logical variable and a non-zero weight, wherein the detecting includes: confirming that the number of hard clauses in the list of clauses for the first logical variable a is not more than a threshold before detecting one or more of (i) whether the plurality of clauses includes the first and second clauses, (ii) whether any hard clauses in the plurality of clauses other than the first and second clauses include the literal a, and (iii) whether w.sub.unit()+w.sub.unit(b)X.sub.b and w.sub.unit()+w.sub.unit(c)X.sub.c.
19. A non-transitory computer readable storage medium having instructions embodied therewith, the instructions executable by a processor to cause the processor to perform operations comprising: obtaining a plurality of clauses associated with a plurality of logical variables, each of the clauses including of a weight and a disjunction of one or more literals of the logical variables; detecting (i) whether any clauses in the plurality of clauses other than a first clause (ab, w.sub.11), a second clause (
c, w.sub.21), a fourth clause (
20. An apparatus comprising: the computer readable storage medium of claim 19; and a processor operable to execute the instructions.
Description
BRIEF DESCRIPTION OF THE DRAWINGS
[0012]
[0013]
[0014]
[0015]
[0016]
[0017]
[0018]
[0019]
[0020]
[0021]
[0022]
[0023]
[0024]
[0025]
[0026]
[0027]
DETAILED DESCRIPTION
[0028] Hereinafter, example embodiments of the present invention will be described. The embodiments should not be construed as limiting the scope of the invention, which is defined by the claims. The combinations of features described in the embodiments are not necessarily essential to the invention.
[0029]
[0030] The input section 110, obtains a plurality of clauses associated with a plurality of logical variables, each of the clauses consisting of a weight and a disjunction of one or more literals of the logical variables. Each of the clauses may take the form (Z, w), where Z is the disjunction of one or more literals and w is the weight of the clause. Examples of clauses associated with the logical variables x.sub.1, x.sub.2, and x.sub.3 are (x.sub.1x.sub.2, w.sub.1), (
x.sub.3, w.sub.2), (
is the symbol for disjunction (i.e. OR), the literals of a logical variable x refer to x and its negation
[0031] In some applications of MAX-SAT, the plurality of clauses may be associated with a graph having a plurality of vertices and a plurality of weighted edges connecting the vertices, such that each vertex of the plurality of vertices is represented by one of the logical variables. The graph may represent an arrangement of elements in a system. Non-limiting examples of systems include a computer system in which the elements may be processing elements, a communication network in which the elements may be communicating devices, a query execution system, a real or virtual structure or model, a process flow in which the elements are computation, decision, or other process nodes, or generally any spatial, temporal, or conceptual arrangement of components or items of information having a real-world application in a technical, business, or other practical setting.
[0032] In the example of the apparatus 100 shown in
[0033] The input section 110 may receive data including a graph and/or a plurality of clauses through any combination of input device(s). For example, the input section 110 may be configured to receive mouse input, keyboard input, touchscreen input, eye tracking input, voice commands, and/or gestures. The input section 110 may receive the data from a remote user terminal or a remote user device.
[0034] The clause storage 120 stores the plurality of clauses obtained by the input section 110. The clause storage 120 may store the plurality of clauses after one or more modifications have been applied to the plurality of clauses by the apparatus 100. The clause storage 120 may store modified versions of the plurality of clauses in place of previous versions or in addition to previous versions.
[0035] The detecting section 130 detects various conditions of the plurality of clauses stored in the clause storage 120 in accordance with inference rules.
[0036] The clause simplifying section 140 simplifies the plurality of clauses stored in the clause storage 120 on the basis of the detecting by the detecting section 130. The simplifying may include modifying the plurality of clauses according to assumptions that can be made on the basis of inference rules. For example, the clause simplifying section 140 may receive a detection result from the detecting section 130, obtain the plurality of clauses stored in the clause storage 120, and simplify the plurality of clauses to produce a simplified plurality of clauses based on the detection result. The clause simplifying section 140 may then store the simplified plurality of clauses in the clause storage 120 and/or provide the simplified plurality of clauses to the output section 170. A simplified plurality of clauses output by the output section 170 in this way can be used downstream of the apparatus 100, for example, by a separate MAX-SAT solver.
[0037] Depending on the detection results, the assumptions allowed by inference rules may or may not apply. In this specification, the meaning of simplifying the plurality of clauses on the basis of the detecting includes the meaning of simplifying or not depending on the detection result. In other words, if the clause simplifying section 140 receives a detection result and, in response to conditions being unmet, leaves the plurality of clauses unchanged, it can still be said that the clause simplifying section 140 simplified the plurality of clauses on the basis of the detecting. Likewise, the simplified plurality of clauses produced by the clause simplifying section 140 may be identical to the original plurality of clauses. That is, a plurality of clauses can be said to be a simplified plurality of clauses by virtue of the fact that detection results were checked and acted on by simplifying the clauses if appropriate.
[0038] The assignment determining section 150 determines, based on the simplified plurality of clauses, an optimal assignment of values to the plurality of logical variables, the optimal assignment of values determined so as to maximize the sum of the weights of clauses satisfied by the assignment. The assignment determining section 150 may determine one or more optimal assignments of values using known computational methods of MAX-SAT solvers, for example, the computational method of the open source SAT4J solver obtainable on the World Wide Web at sat4j.org. The assignment determining section 150 may provide the one or more optimal assignments of values to the output section 170.
[0039] The weight summing section 160 may sum the weights of clauses satisfied by the optimal assignment of values determined by the assignment determining section 150, the resulting sum representing the benefit of the optimal assignment of values. Alternatively, or additionally, the weight summing section 160 may sum the weights of clauses not satisfied by the optimal assignment of values determined by the assignment determining section 150, the resulting sum representing the cost of the optimal assignment of values. In order to sum the weights, the weight summing section 160 may receive the plurality of clauses along with optimal assignment of values from the assignment determining section 150 as shown in
[0040] The output section 170 outputs one or more of the various outputs of the apparatus 100 for use by a downstream device or user. For example, the outputs may be stored, uploaded to a server, printed, displayed on a screen, or otherwise made available for viewing or analysis. The various outputs of the apparatus 100 output by the output section 170 may include, for example, the simplified plurality of clauses produced by the clause simplifying section 140, one or more optimal assignments of values determined by the assignment determining section 150, and/or one or more sums produced by the weight summing section 160.
[0041] The output section 170 may output any of the various outputs to an external storage or to a computer or server through a network such as the Internet, WAN, and/or LAN. The outputting may include storing, uploading to a server, printing, displaying on a screen, or otherwise making the various outputs available for viewing or analysis. The output section 170 may output any of the various outputs through any output device or combination of output devices. For example, the output section 170 may be configured to provide still or moving visual output, audio output, or vibration or other touch-based output via a screen, speaker, printer, or other output device. The output section 170 may provide the various outputs to a remote user terminal or a remote user device.
[0042] The apparatus 100 shown in
TABLE-US-00001 TABLE 1 Resulting Rule Given Conditions Inference 1 (i) no clauses in the MAX-SAT instance other than a a b first clause (a b, w.sub.11), a second clause (
c, w.sub.21), a fourth clause (
b = c b, H) and a second clause (a
c, H); (ii) no hard clauses in the plurality of clauses other than the first and second clauses contain the literal a; and (iii) w.sub.unit() + w.sub.unit(b) X.sub.b and w.sub.unit() + w.sub.unit(c) X.sub.c, where w.sub.unit() is the weight w.sub.1 of a clause (, w.sub.1) included in the plurality of clauses, w.sub.unit(b) is the weight w.sub.2 of a clause (b, w.sub.2) included in the plurality of clauses, w.sub.unit(c) is the weight w.sub.3 of a clause (c, w.sub.3) included in the plurality of clauses, X.sub.b is the sum of the weights of all clauses in the plurality of clauses, other than hard clauses containing the literal a, that contain at least one of the literals a and
[0043] Thus, according to Inference Rule 1, if conditions (i) and (ii) shown in the corresponding row of Table 1 are satisfied, the resulting inference that ab can be made. In other words, the clauses of the MAX-SAT instance can be simplified under the assumption that ab. Similarly, according to Inference Rule 2, if conditions (i), (ii), and (iii) shown in the corresponding row of Table 1 are satisfied, the resulting inference that b=c can be made. In other words, the clauses of the MAX-SAT instance can be simplified under the assumption that b=c.
[0044] By simplifying a MAX-SAT instance in accordance with one or both of Inference Rules 1 and 2, the apparatus 100 can decrease the time and resources necessary to find a solution. Thus, when applied in a practical setting in any number of technical fields that use MAX-SAT, the apparatus 100 can be used to produce practical results associated with such fields, e.g. test results, technical designs, actual products, etc., more quickly and efficiently. Moreover, considering the decreased time and resources necessary to find a solution to a MAX-SAT instance even in the abstract, the apparatus 100 represents an improvement to existing MAX-SAT solvers. That is, when implemented as a MAX-SAT solver (applicable to a wide range of technical fields), the apparatus 100 consumes less time and resources than existing MAX-SAT solvers.
[0045]
[0046] First, the apparatus 100 obtains a plurality of clauses associated with a plurality of logical variables, each of the clauses consisting of a weight and a disjunction of one or more literals of the logical variables (S210). For example, the input section 110 of the apparatus 100 may obtain the plurality of clauses by receiving the plurality of clauses from outside the apparatus, or the clause generating section 111 of the input section 110 may generate the plurality of clauses based on a graph and the input section 110 may obtain the generated plurality of clauses. The input section 110 may store the obtained plurality of clauses in the clause storage 120.
[0047] Next, the apparatus 100 applies one or more inference rules to the plurality of clauses (S220). For example, the detecting section 130 of the apparatus 100 may detect whether conditions of one or more inference rules are met by the plurality of clauses stored in the clause storage 120, and the clause simplifying section 140 of the apparatus 100 may simplify the plurality of clauses stored in the clause storage 120 on the basis of the detection. In this way, the apparatus 100 may apply Inference Rule 1 and/or Inference Rule 2.
[0048] Next, the apparatus 100 determines, based on the simplified plurality of clauses, an optimal assignment of values to the plurality of logical variables, the optimal assignment of values determined so as to maximize the sum of the weights of clauses satisfied by the assignment (S230). For example, the assignment determining section 150 of the apparatus 100 may determine the optimal assignment by known methods.
[0049] Lastly, the apparatus 100 sums the weights of the clauses satisfied or not satisfied by the optimal assignment of values (S240). For example, the weight summing section 160 of the apparatus 100 may sum the weights of the satisfied clauses so that the resulting sum represents the benefit of the assignment or may sum the weights of the unsatisfied clauses so that the resulting sum represents the cost of the assignment.
[0050] In the example operational flow shown in
[0051]
[0052]
[0053]
[0054] After the input section 110 of the apparatus 100 has received an input graph in step S410, in step S420 the clause generating section 111 may generate, based on the graph, a plurality of clauses associated with the graph such that each vertex of the plurality of vertices is represented by a logical variable and the plurality of clauses includes two clauses (uv, w.sub.uv) and (
v, w.sub.uv) and (
[0055]
[0056] The data structure shown in v, w.sub.uv) and (
b, w.sub.ab), (
c, w.sub.ac), (
e, w.sub.ae), (
, w.sub.ae), (b
c, w.sub.bc), (
e, w.sub.be), (
, w.sub.be), (c
d, w.sub.cd), (
e, w.sub.de), and (
, w.sub.de). Of these, (a
b, w.sub.ab), (
c, w.sub.ac), (
e, w.sub.ae), and (
, w.sub.ae) contain a literal of the logical variable a. Therefore, the data structure shown in
b, w.sub.ab), (
c, w.sub.ac),(
e, w.sub.ae), and (
, w.sub.ae) for the logical variable a. As shown in
b, w.sub.ab), (
c, w.sub.ac), (
e, w.sub.ae), and (
, w.sub.ae) is stored in association with the logical variable a. Other lists are similarly stored for each of the logical variables b, c, d, and e. As mentioned above, a clause with weight w=0 is considered equivalent to the non-existence of the clause, while the data structure stores only clauses having non-zero weight. Thus, although other clauses can be said to exist in the set of clauses, they do not appear in the data structure. Since each of the edges is represented in the data structure, it can be assumed that each of the weights w.sub.ab, w.sub.ac, w.sub.ae, w.sub.bc, w.sub.be, w.sub.cd, and w.sub.de is non-zero.
[0057] The plurality of clauses generated for the graph as explained above can be used to solve the maximum cut problem. That is, if the value of each of the logical variables indicates whether the vertex represented by that logical variable is in the subset or not in the subset (e.g. TRUE=in the subset, FALSE=not in the subset), then a solution to the MAX-SAT instance consisting of the clauses generated for the graph yields a solution to the maximum cut problem. This is because each pair of clauses (uv, w.sub.uv) and (
[0058] By applying Inference Rule 1 to the MAX-SAT instance generated for the maximum cut problem as explained above with respect to
[0059]
[0060] After the input section 110 of the apparatus 100 has received an input graph in step S410, in step S420 the clause generating section 111 may generate, based on the graph, a plurality of clauses associated with the graph such that each vertex of the plurality of vertices is represented by a logical variable and the plurality of clauses includes a clause (v, H) for each edge of the plurality of edges, where u and v are logical variables representing the vertices connected by the edge. That is, the clause generating section 111 may generate (
v, H) for each edge (S720). In the example operational flow of
[0061]
[0062] The data structure shown in v, H) for each edge, the plurality of clauses associated with the graph shown in
b, H), (a
c, H), (a
e, H), (b
c, H), (b
e, H), (c
d, H), and (d
e, H). Of these, (, 1), (a
b, H), (a
c, H), and (a
e, H) contain a literal of the logical variable a. Therefore, the data structure shown in
b, H), (a
c, H), and (a
e, H) for the logical variable a. As shown in
b, H), (a
c, H), and (a
e, H) is stored in association with the logical variable a. Other lists are similarly stored for each of the logical variables b, c, d, and e. As mentioned above, a clause with weight w=0 is considered equivalent to the non-existence of the clause, while the data structure stores only clauses having non-zero weight. Thus, although other clauses can be said to exist in the set of clauses, they do not appear in the data structure.
[0063] The plurality of clauses generated for the graph as explained above can be used to solve the minimum vertex cover problem. That is, if the value of each of the logical variables indicates whether the vertex represented by that logical variable is in the set or not in the set (e.g. TRUE=in the set, FALSE=not in the set), then a solution to the MAX-SAT instance consisting of the clauses generated for the graph yields a solution to the minimum vertex cover problem. This is because each clause (v, H) guarantee that at least one of the two vertices connected by each edge is included in the set. Therefore, when the assignment determining section 150 determines an optimal assignment of values to a plurality of logical variables associated with clauses that are associated with a graph, the determination of the optimal assignment may include determining a solution to the minimum vertex problem of the graph, where the value of each of the logical variables in the determined optimal assignment indicates whether the vertex represented by the logical variable is in the minimum vertex cover set or not in the minimum vertex cover set.
[0064] By applying Inference Rule 2 to the MAX-SAT instance generated for the minimum vertex problem as explained above with respect to
[0065]
[0066] b, w.sub.11), a second clause (
c, w.sub.21), a fourth clause (
[0067]
[0068] In the example of
[0069] b, H) and a second clause (a
c, H), where a is a first logical variable, b is a second logical variable, and c is a third logical variable, (ii) whether any hard clauses in the plurality of clause other than the first and second clauses contain the literal a, and (iii) whether w.sub.unit()+w.sub.unit(b)X.sub.b and w.sub.unit()+w.sub.unit(c)X.sub.c, where w.sub.unit() is the weight w.sub.1 of a clause (, w.sub.1) included in the plurality of clauses, w.sub.unit(b) is the weight w.sub.2 of a clause (b, w.sub.2) included in the plurality of clauses, w.sub.unit(c) is the weight w.sub.3 of a clause (c, w.sub.3) included in the plurality of clauses, X.sub.b is the sum of the weights of all clauses in the plurality of clauses, other than hard clauses containing the literal a, that contain at least one of the literals a and
[0070]
[0071] In the example of
[0072]
[0073] b, w.sub.11), the second clause (
c, w.sub.21), the fourth clause (
b, w.sub.11) and the second clause (
c, w.sub.r21) or (a
c, w.sub.r21), a replacement fourth clause (b
c, w.sub.r21), the replacement fourth clause (
[0074] The clause simplifying section 140 may store the simplified plurality of clauses in the clause storage 120 in place of or in addition to the previous version. If the simplified plurality of clauses is simplified on the basis of Inference Rule 1 as explained above, the plurality of clauses may include the first replacement clause (T, w.sub.r11) and the second replacement clause (T, w.sub.r12), which have tautologically satisfied disjunctions T and weights substantially equal or equal to w.sub.11 and w.sub.12, respectively. Therefore, when the weight summing section 160 refers to the simplified clauses to sum the weights of clauses satisfied or unsatisfied by the optimal assignment of values in step S240 of
[0075] b, H) and the second clause (a
c, H), (ii) that no hard clauses in the plurality of clauses other than the first and second clauses contain the literal a, and (iii) that w.sub.unit()+w.sub.unit(b)X.sub.b and w.sub.unit()+w.sub.unit(c)X.sub.c (Yes at S1510), the clause simplifying section 140 modifies the plurality of clauses according to the assumption that b=c. Under the assumption that b=c, the first clause (a
b, H) and the second clause (a
c, H) are equivalent. Thus, the clause simplifying section 140 may remove one of the first and second clauses.
[0076]
[0077]
[0078] The host controller 1610 connects the RAM 1614 with the CPU 1612 and the graphics controller 1616, which access the RAM 1614 at a high transfer rate. The CPU 1612 operates according to programs stored in the ROM 1630 and the RAM 1614, thereby controlling each unit. The graphics controller 1616 obtains image data generated by the CPU 1612 on a frame buffer or the like provided in the RAM 1614, and causes the image data to be displayed on the display device 1618. Alternatively, the graphics controller 1616 may contain therein a frame buffer or the like for storing image data generated by the CPU 1612.
[0079] The input/output controller 1620 connects the host controller 1610 with the communication interface 1622, the hard disk drive 1624, and the DVD-ROM drive 1626, which are relatively high-speed input/output units. The communication interface 1622 communicates with other electronic devices via a network. The hard disk drive 1624 stores programs and data used by the CPU 1612 within the computer 1600. The DVD-ROM drive 1626 reads the programs or the data from the DVD-ROM 1601, and provides the hard disk drive 1624 with the programs or the data via the RAM 1614.
[0080] The ROM 1630 and the keyboard 1642 and the input/output chip 1640, which are relatively low-speed input/output units, are connected to the input/output controller 1620. The ROM 1630 stores therein a boot program or the like executed by the computer 1600 at the time of activation, a program depending on the hardware of the computer 1600. The keyboard 1642 inputs text data or commands from a user, and may provide the hard disk drive 1624 with the text data or the commands via the RAM 1614. The input/output chip 1640 connects the keyboard 1642 to the input/output controller 1620, and may connect various input/output units via a parallel port, a serial port, a keyboard port, a mouse port, and the like to the input/output controller 1620.
[0081] A program to be stored on the hard disk drive 1624 via the RAM 1614 is provided by a recording medium such as the DVD-ROM 1601 or an IC card. The program is read from the recording medium, installed into the hard disk drive 1624 within the computer 1600 via the RAM 1614, and executed in the CPU 1612.
[0082] A program that is installed in the computer 1600 can cause the computer 1600 to function as an apparatus such as the apparatus 100 of
[0083] A program that is installed in the computer 1600 can also cause the computer 1600 to perform an operational flow such as the operational flow of
[0084] The information processing described in these programs is read into the computer 1600, resulting in the cooperation between a program and the above-mentioned various types of hardware resources. An apparatus or method may be constituted by realizing the operation or processing of information in accordance with the usage of the computer 1600.
[0085] For example, when communication is performed between the computer 1600 and an external device, the CPU 1612 may execute a communication program loaded onto the RAM 1614 to instruct communication processing to the communication interface 1622, based on the processing described in the communication program.
[0086] The communication interface 1622, under control of the CPU 1612, reads transmission data stored on a transmission buffering region provided in a recording medium such as the RAM 1614, the hard disk drive 1624, or the DVD-ROM 1601, and transmits the read transmission data to a network or writes reception data received from a network to a reception buffering region or the like provided on the recording medium. In this way, the communication interface 1622 may exchange transmission/reception data with a recording medium by a DMA (direct memory access) method or by a configuration in which the CPU 1612 reads the data from the recording medium or the communication interface 1622 of a transfer destination and writes the data into the communication interface 1622 or the recording medium of the transfer destination, so as to transfer the transmission/reception data.
[0087] In addition, the CPU 1612 may cause all or a necessary portion of a file or a database to be read into the RAM 1614 such as by DMA transfer, the file or the database having been stored in an external recording medium such as the hard disk drive 1624, the DVD-ROM drive 1626 (DVD-ROM 1601) and perform various types of processing on the data on the RAM 1614. The CPU 1612 may then write back the processed data to the external recording medium by means of a DMA transfer method or the like. In such processing, the RAM 1614 can be considered to temporarily store the contents of the external recording medium, and so the RAM 1614, the external recording apparatus, and the like are collectively referred to as a memory, a storage section, a recording medium, a computer readable medium, etc.
[0088] Various types of information, such as various types of programs, data, tables, and databases, may be stored in the recording apparatus to undergo information processing. Note that the CPU 1612 may also use a part of the RAM 1614 to perform reading/writing thereto on a cache memory. In such an embodiment, the cache is considered to be contained in the RAM 1614, the memory, and/or the recording medium unless noted otherwise, since the cache memory performs part of the function of the RAM 1614.
[0089] The CPU 1612 may perform various types of processing on the data read from the RAM 1614, which includes various types of operations, processing of information, condition judging, search/replace of information, etc., as described throughout this disclosure and designated by an instruction sequence of programs, and writes the result back to the RAM 1614. For example, when performing condition judging, the CPU 1612 may judge whether each type of variable is larger, smaller, no smaller than, no greater than, or equal to the other variable or constant, and when the condition judging results in the affirmative (or in the negative), the process branches to a different instruction sequence or calls a subroutine.
[0090] In addition, the CPU 1612 may search for information in a file, a database, etc., in the recording medium. For example, when a plurality of entries, each having an attribute value of a first attribute is associated with an attribute value of a second attribute, are stored in a recording apparatus, the CPU 1612 may search for an entry matching the condition whose attribute value of the first attribute is designated, from among the plurality of entries stored in the recording medium, and reads the attribute value of the second attribute stored in the entry, thereby obtaining the attribute value of the second attribute associated with the first attribute satisfying the predetermined condition.
[0091] The above-explained program or module may be stored in an external recording medium. Exemplary recording mediums include a DVD-ROM 1601, as well as an optical recording medium such as a Blu-ray Disk or a CD, a magneto-optic recording medium such as a MO, a tape medium, and a semiconductor memory such as an IC card. In addition, a recording medium such as a hard disk or a RAM provided in a server system connected to a dedicated communication network or the Internet can be used as a recording medium, thereby providing the program to the computer 1600 via the network.
[0092] The present invention may be a system, a method, and/or a computer program product. The computer program product may include a computer readable storage medium (or media) having computer readable program instructions thereon for causing a processor to carry out aspects of the present invention.
[0093] The computer readable storage medium can be a tangible device that can retain and store instructions for use by an instruction execution device. The computer readable storage medium may be, for example, but is not limited to, an electronic storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any suitable combination of the foregoing.
[0094] A non-exhaustive list of more specific examples of the computer readable storage medium includes the following: a portable computer diskette, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or Flash memory), a static random access memory (SRAM), a portable compact disc read-only memory (CD-ROM), a digital versatile disk (DVD), a memory stick, a floppy disk, a mechanically encoded device such as punch-cards or raised structures in a groove having instructions recorded thereon, and any suitable combination of the foregoing. A computer readable storage medium, as used herein, is not to be construed as being transitory signals per se, such as radio waves or other freely propagating electromagnetic waves, electromagnetic waves propagating through a waveguide or other transmission media (e.g., light pulses passing through a fiber-optic cable), or electrical signals transmitted through a wire.
[0095] Computer readable program instructions described herein can be downloaded to respective computing/processing devices from a computer readable storage medium or to an external computer or external storage device via a network, for example, the Internet, a local area network, a wide area network and/or a wireless network. The network may comprise copper transmission cables, optical transmission fibers, wireless transmission, routers, firewalls, switches, gateway computers, and/or edge servers. A network adapter card or network interface in each computing/processing device receives computer readable program instructions from the network and forwards the computer readable program instructions for storage in a computer readable storage medium within the respective computing/processing device.
[0096] Computer readable program instructions for carrying out operations of the present invention may be assembler instructions, instruction-set-architecture (ISA) instructions, machine instructions, machine dependent instructions, microcode, firmware instructions, state-setting data, or either source code or object code written in any combination of one or more programming languages, including an object oriented programming language such as Smalltalk, C++ or the like, and conventional procedural programming languages, such as the C programming language or similar programming languages. The computer readable program instructions may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server.
[0097] In the latter scenario, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet Service Provider). In some embodiments, electronic circuitry including, for example, programmable logic circuitry, field-programmable gate arrays (FPGA), or programmable logic arrays (PLA) may execute the computer readable program instructions by utilizing state information of the computer readable program instructions to personalize the electronic circuitry, in order to perform aspects of the present invention.
[0098] Aspects of the present invention are described herein with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and/or block diagrams, and combinations of blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer readable program instructions.
[0099] These computer readable program instructions may be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions/acts specified in the flowchart and/or block diagram block or blocks.
[0100] These computer readable program instructions may also be stored in a computer readable storage medium that can direct a computer, a programmable data processing apparatus, and/or other devices to function in a particular manner, such that the computer readable storage medium having instructions stored therein comprises an article of manufacture including instructions which implement aspects of the function/act specified in the flowchart and/or block diagram block or blocks.
[0101] The computer readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other device to cause a series of operational steps to be performed on the computer, other programmable apparatus or other device to produce a computer implemented process, such that the instructions which execute on the computer, other programmable apparatus, or other device implement the functions/acts specified in the flowchart and/or block diagram block or blocks.
[0102] The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of instructions, which comprises one or more executable instructions for implementing the specified logical function(s).
[0103] In some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems that perform the specified functions or acts or carry out combinations of special purpose hardware and computer instructions.
[0104] While the embodiment(s) of the present invention has (have) been described, the technical scope of the invention is not limited to the above described embodiment(s). It is apparent to persons skilled in the art that various alterations and improvements can be added to the above-described embodiment(s). It is also apparent from the scope of the claims that the embodiments added with such alterations or improvements can be included in the technical scope of the invention.
[0105] The operations, procedures, steps, and stages of each process performed by an apparatus, system, program, and method shown in the claims, embodiments, or diagrams can be performed in any order as long as the order is not indicated by prior to, before, or the like and as long as the output from a previous process is not used in a later process. Even if the process flow is described using phrases such as first or next in the claims, embodiments, or diagrams, it does not necessarily mean that the process must be performed in this order.
APPENDIX
[0106] Preliminaries.
[0107] First, we introduce some notations. For any literal l, var (l) represents the variable to which literal l refers to. This means that var(x.sub.i)=var(
[0108] For any clause c in formula , w.sub.all(c) denotes the sum of the weights of all clauses that contain all of the literals in c, and w.sub.unit(c) denotes the weight of clause c. For example, given a formula ={(x.sub.1x.sub.2
x.sub.3, 1), (x.sub.1, 2)}, we have w.sub.all(x.sub.1)=3, w.sub.all(x.sub.1
x.sub.2)=1, (note here that the two literals x.sub.1 and x.sub.2 are contained in clause x.sub.1
x.sub.2
x.sub.3), w.sub.unit(x.sub.1)=2, and w.sub.unit(x.sub.1
x.sub.2)=0.
[0109] We say that two formulas and are equivalent if the costs of the optimum assignments of these formulas are equal. Given a formula with literals l.sub.1 and l.sub.2, |.sub.l.sub.
[0110] Lemma 8 (Degree-2 Not-Equal Soft Clause Rule).
[0111] If an input formula can be represented as
={(a,w.sub.0),(ab,w.sub.11),(
c,w.sub.21),(
.sub.0 does not contain var(a), and
min{w.sub.11,w.sub.12}w.sub.0+max{w.sub.21,w.sub.22}
then we have |.sub.ab. This means that
[0112] Proof.
[0113] Let =\.sub.0. We consider the two cases (i) bc and (ii) b=c separately. Suppose that (i) bc. Let I.sub.ac* be the optimum assignment under the condition that ac for . Having that ac and bc yield a=b, we have cost(, I.sub.ac*)min{w.sub.11,w.sub.12} since one of the two clauses (ab, w.sub.11) and (
[0114] Suppose that (ii) b=c. Then we have cost(, I.sub.a=b*)min{w.sub.11,w.sub.12}+min{w.sub.21, w.sub.22}=w.sub.121+(w.sub.21+w.sub.22)max{w.sub.21, w.sub.22}, where I.sub.a=b* is the optimum assignment under the condition that a=b for and the last equality is due to the fact w.sub.21+w.sub.22=min{w.sub.21, w.sub.22}+max{w.sub.21, w.sub.22}. We also have cost(, I.sub.ab)w.sub.0, where I.sub.ab is the assignment obtained by flipping the value of literal a from I.sub.a=b. From the assumption min{w.sub.11, w.sub.12}w.sub.o+max{w.sub.21, w.sub.22}, we know that cost(, I.sub.a=b*)cost(, I.sub.ab). By the definition of I.sub.a=b* and I.sub.ab, the costs associated with the clauses in .sub.0 are the same for I.sub.a=b* and I.sub.ab because literal a does not appear in any clause in .sub.0. Hence we know that cost(, I.sub.a=b*)cost(, I.sub.ab)=cost(, I.sub.a=b*)cost(, I.sub.ab). Therefore we know that cost(, I.sub.a=b*)cost(,I.sub.ab)cost(, I.sub.ab*) where I.sub.ab* is the optimum assignment under the condition that ab for . This inequality means that |.sub.ab as desired.
[0115] Lemma 10 (Degree-2 Hard Binary Clause Rule).
[0116] Let (l.sub.1,l.sub.2) be the set of the clauses that contain at least one of the literals l.sub.1 or l.sub.2, and let .sub.hard(l) be the set of the hard clauses that contain literal l in . If |.sub.hard (u) |=2 and all of the clauses in .sub.hard(u) are binary (that is, we can represent .sub.hard (u)={(u
v.sub.1, ), (u
v.sub.2, )} by using two literals v.sub.1 and v.sub.2) and formula satisfies
[0117] Proof.
[0118] To prove this lemma, it is enough to show cost(I.sub.v.sub.v.sub.1, ). Let I.sub.v.sub.
where we use Inequality (1) for the last inequality. Hence we have cost(, I.sub.v.sub.