Optimal value calculation device, optimal value calculation method, and program
Patent Information
- Application Number
- JP2025519229
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Filing Date
- 2023-05-09
- Publication Date
- 2024-11-14
AI Technical Summary
Existing algorithms for solving the k-set selection problem, while more efficient than brute force enumeration, still require significant time and often fail to provide exact optimal solutions, with decision graphs like ZDDs being inefficient due to their size and complexity.
An optimal value calculation device and method utilizing a zero-suppression binary decision graph to efficiently calculate the maximum value of an objective function through dynamic programming, preprocessing to satisfy QDD constraints, and hash tables to store and retrieve partial optimal values, enabling exact solutions to k-set selection problems.
This approach significantly reduces calculation time for k-set selection problems, allowing for efficient determination of exact optimal values even with large-scale set families, thereby solving k-set selection problems in a relatively short time.
Abstract
Description
Optimum value calculation device, optimum value calculation method and program
[0001] The present disclosure relates to an optimum value calculation device, an optimum value calculation method, and a program.
[0002] The k-set selection problem is a problem in which, when a set family and an objective function are given, k distinct sets are selected from the set family so as to maximize the objective function. A rigorous method for solving the k-set selection problem is to enumerate all k sets that can be selected, but this takes exponential time.
[0003] Therefore, as a conventional technique for efficiently solving the k-set selection problem, an algorithm for calculation using a decision diagram has been proposed (e.g., Non-Patent Documents 1 and 2). In addition, a conventional technique for efficiently finding an approximate solution to the k-set selection problem is also known (e.g., Non-Patent Document 3).
[0004] David Bergman, Andre A. Cire, Willem-Jan van Hoeve, and John Hooker. Decision Diagrams for Optimization. Artificial Intelligence: Foundations, Theory, and Algorithms. Springer, 2016.David Bergman, Andre A. Cire, Willem-Jan van Hoeve, and JN Hooker. Discrete optimization with decision diagrams. INFORMS Journal on Computing, 28(1):47-66, 2016. Julien Baste, Lars Jaffke, Tomas Masarik, Geevarghese Philip, and Gunter Rote. FPT algorithms for diverse collections of hitting sets. Algorithms, 12(12):254, 2019.
[0005] However, although the algorithms proposed in Non-Patent Documents 1 and 2 are more efficient than enumerating all k selectable sets, they still require a huge amount of time, requiring a time linear or greater than the number of sets contained in a given set family. On the other hand, the method described in Non-Patent Document 3 can reduce the calculation time, but cannot find a strict optimal solution.
[0006] The present disclosure has been made in consideration of the above points, and provides a technique that can efficiently find an exact solution to a k-set selection problem.
[0007] An optimal value calculation device according to one aspect of the present disclosure is an optimal value calculation device for calculating an optimal value for a k-set selection problem, and includes: an input unit that inputs a zero-suppressed binary decision diagram that represents a set family of the k-set selection problem, an objective function that satisfies predetermined constraints, and k that is 2 or greater; an optimal value calculation unit that calculates, as the optimal value, a maximum value of the objective function using the zero-suppressed binary decision diagram, the objective function, and the k; and an output unit that outputs the optimal value to a predetermined output destination, wherein the optimal value calculation unit calculates partial optimal values of the objective function while sequentially extending k paths from a root node of the zero-suppressed binary decision diagram to a node having label i by dynamic programming, and calculates, as the optimal value, the partial optimal value when the k paths are extended from the root node to a terminal node.
[0008] A technique is provided that can efficiently find an exact solution to the k-set selection problem.
[0009] 1 is a diagram showing an example of the hardware configuration of an optimal value calculation device according to the present embodiment; FIG. 2 is a diagram showing an example of the functional configuration of an optimal value calculation device according to the present embodiment; FIG. 3 is a flowchart showing an example of the flow of an optimal value calculation process according to the present embodiment; FIG. 4 is a diagram showing an example of the algorithm of a DP_MAIN function; FIG. 5 is a diagram showing an example of the algorithm of a DP_TRANSITION function; FIG. 6 is a diagram showing an example of the algorithm of a FIND_SAME_PAIRS function; and FIG. 7 is a diagram showing an example of the algorithm of an EXTEND_FROM_SAME_PAIRS function.
[0010] An embodiment of the present invention will be described below.
[0011] <Preparation> ・Family of Sets Let a set consisting of multiple items be a universal set U. In this case, a family of sets is a genus F ⊆ 2 consisting of a set of items included in the universal set U. U This is what I mean.
[0012] The k-set selection problem is a problem in which, when a set family and an objective function are given, k distinct sets are selected from the set family that maximize the objective function. Examples of the k-set selection problem include the following:
[0013] Diversity maximization: This is a problem of maximizing the sum of the Hamming distances between all pairs of sets among k selected sets.
[0014] Set Covering: The problem of choosing k sets such that all items in the universal set occur.
[0015] Antenna placement: The problem is to select k antennas so that as many buildings as possible are included, with the elements of the set being considered as buildings and the set being considered as buildings covered by the antennas.
[0016] Value maximization: This is a problem of selecting k sets so that the value of the elements contained in the selected sets is maximized, assuming that the value of each element varies depending on the number of times that element is selected.
[0017] Decision graphs are known as data structures that can compress and represent discrete structures. Decision graphs include binary decision diagrams (BDDs, Reference 1), which can represent logical functions, and zero-suppressed binary decision diagrams (ZDDs, Reference 2), which can represent sets. It is known that the efficiency of approaches to solving problems such as the k-set selection problem using decision graphs such as ZDDs depends on the size of the decision graph representing the set set (i.e., the number of nodes in the decision graph).
[0018] Definition of ZDD A ZDD is a variant of a BDD and is a data structure that can manipulate a finite set. A ZDD is a directed acyclic graph (DAG) that satisfies the following properties:
[0019] ZDD Z is a set of eight Z = (U, V, λ, δ 0 , δ 1 , r, ⊥, T). Note that while the symbols ⊥ and T are generally used to represent terminal nodes, uptack and downtack symbols, respectively, in the text of this specification they are substituted by the vertical symbol "⊥" and capital tau "T."
[0020] U = {1, ..., |U|} represents the universal set, and each element corresponds to the item we want to handle. ZDD has two types of nodes: terminal nodes and non-terminal nodes. V is the set of all non-terminal nodes, and ⊥ and T represent terminal nodes, respectively. r∈V represents the root of ZDD. All nodes in ZDD are reachable from the root r.
[0021] Each node in a ZDD has a label belonging to U∪{0}, and λ represents a label function that extracts a label from a node. That is, λ:V∪{⊥,T}→U∪{0}, and the label of a node v can be obtained by λ(v). The label of a non-terminal node is one of the items in the universal set U, and the label of a terminal node is 0.
[0022] Each non-terminal node has two children, called the 0-child and the 1-child. For a non-terminal node v∈V, δ 0 (v) is its 0-child, δ 1 (v) represents its 1-child. An edge from a non-terminal node to its 0-child is called a 0-edge, and an edge from a non-terminal node to its 1-child is called a 1-edge.
[0023] For any non-terminal node v∈V, λ(v)>λ(δ 0 (v)) and λ(v)>λ(δ 1 (v)) holds, i.e., it is guaranteed that any non-terminal node will always have a label greater than its children.
[0024] The size of ZDD Z is defined as the number of its non-terminal nodes, denoted as |Z|. Also, the set of non-terminal nodes V i Let {v|∀v∈V, λ(v)=i} be the set of nodes belonging to level i. Furthermore, |V for 1≦i≦|U| i The maximum value of | is called the width of the ZDD.
[0025] ・The set family represented by ZDD is ZDD Z = (U, V, λ, δ 0 , δ 1 , r, ⊥, T) represents the family of sets F(r) on the universal set U. However, F(r) can also be written as F(Z).
[0026] The set family F(v) represented by each node v is recursively defined by the following (1) and (2).
[0027] (1) When node v is a terminal node: if v=T, then F(v)={φ}, and if v=⊥, then F(v)=φ.
[0028] (2) If node v is a non-terminal node: F(v) = {λ(v)} × F(δ 1 (v)) ∪ F(δ 0 (v)).
[0029] From the above definition, the set s = {e 1 , ..., e d} corresponds to the following path from the root on the ZDD Z: Start the path from the root, and at a non-terminal node with label e, if e∈s, extend the path to a 1-edge, otherwise extend the path to a 0-edge. This will eventually result in a path that reaches one of the terminal nodes.
[0030] If a path reaches T, it means that s∈F(Z), and if it reaches ⊥, it means that s∈F(Z) is not true. Therefore, there are |F(Z)| paths from the root r to the terminal node T. The number of paths from node v to the terminal node T is called the cardinality of v, and is represented by |F(v)|.
[0031] <Formulation of k-sets selection problem> Based on the above preparations, the k-sets selection problem to be addressed in this embodiment is formulated.
[0032] set family F⊆2 U and k∈N + (where k≧2, N+ is the set of all non-zero positive integers), and the objective function g: (2 U ) k →R (where R is the set of all real numbers), the k-set selection problem is 1 , ..., s k For ∈F, g(s 1 , ..., s k ) where 1≦i<j≦|U| i ≠s j is.
[0033] That is, in this embodiment, the objective function g is a function that takes k sets as arguments and returns a real number. The objective function g also satisfies the following constraints 1 and 2.
[0034] Constraint 1: The objective function g is g(s 1 , ..., s k ) = I◇ n g n ([n∈s 1 ], ..., [n∈s k ])◇ n-1 ...◇ 1 g 1 ([1∈s 1 ], ..., [1∈s k ]), where n = |U| and ◇ i (1≦i≦n) is any left-associative operator (typical examples include addition, multiplication on positive real numbers, etc.), and I is ◇ n is the identity element of g. 1 , ..., g n is a function that takes k arguments of 0 or 1 and returns a real number. Also, in the calculation process, for any a, b, c∈R (where R is the set of all real numbers) and a≦b, a◇ i c≦b◇ i It is guaranteed that c.
[0035] Also, square brackets [.] are unary operators that return 1 if the contents of the brackets are true, and 0 if they are false.
[0036] each g i is a symmetric function. iThe value of g is determined only by how many times element i appears in the k sets of arguments of g. For simplicity, we will use the following to define g when element i appears x times in the k sets. i The value of "g i (x)" That is, x = [i∈s 1 ]+・・・+[i∈s k ].
[0037] Constraint 2: The value of g can be calculated in Θ(|U|) time when the number of times each element appears in the selected k sets is known.
[0038] If the objective function satisfies the above constraints 1 and 2, it can be efficiently optimized using the algorithm described below. Hereinafter, such a function will be referred to as a "factorizable function." Generally, when calculating the value of an objective function, all of its arguments must be known. On the other hand, if the objective function is a factorizable function, the value of the objective function can be calculated partially by determining how many times a certain element appears in the input.
[0039] An optimum value calculation device 10 that can efficiently solve the optimum value (that is, the optimum objective function value) of the k-set selection problem formulated above will be described below.
[0040] <Example of Hardware Configuration of Optimal Value Calculation Device 10> An example of the hardware configuration of the optimal value calculation device 10 according to this embodiment is shown in Fig. 1. As shown in Fig. 1, the optimal value calculation device 10 according to this embodiment has an input device 101, a display device 102, an external I / F 103, a communication I / F 104, a RAM (Random Access Memory) 105, a ROM (Read Only Memory) 106, an auxiliary storage device 107, and a processor 108. Each of these pieces of hardware is connected to each other via a bus 109 so as to be able to communicate with each other.
[0041] The input device 101 is, for example, a keyboard, a mouse, a touch panel, a physical button, etc. The display device 102 is, for example, a display, a display panel, etc. Note that the optimum value calculation device 10 does not necessarily have to have at least one of the input device 101 and the display device 102, for example.
[0042] The external I / F 103 is an interface with an external device such as a recording medium 103a. Examples of the recording medium 103a include a CD (Compact Disc), a DVD (Digital Versatile Disk), an SD memory card (Secure Digital memory card), and a USB (Universal Serial Bus) memory card.
[0043] The communication I / F 104 is an interface for connecting the optimum value calculation device 10 to a communication network. The RAM 105 is a volatile semiconductor memory (storage device) that temporarily stores programs and data. The ROM 106 is a non-volatile semiconductor memory (storage device) that can store programs and data even when the power is turned off. The auxiliary storage device 107 is a storage device (storage device) such as an HDD (Hard Disk Drive), an SSD (Solid State Drive), or a flash memory. The processor 108 is various types of arithmetic devices such as a CPU (Central Processing Unit) or a GPU (Graphics Processing Unit).
[0044] 1 is an example, and the hardware configuration of the optimum value calculation device 10 is not limited to this. For example, the optimum value calculation device 10 may have multiple auxiliary storage devices 107 or multiple processors 108, may not have some of the hardware shown in the figure, or may have various hardware other than the hardware shown in the figure.
[0045] <Example of functional configuration of optimal value calculation device 10> An example of functional configuration of the optimal value calculation device 10 according to this embodiment is shown in Fig. 2. As shown in Fig. 2, the optimal value calculation device 10 according to this embodiment has an input unit 201, an optimal value calculation unit 202, and an output unit 203. These units are realized by, for example, processing in which one or more programs installed in the optimal value calculation device 10 are executed by the processor 108 or the like. Here, the optimal value calculation device 10 according to this embodiment has a set family F ⊆ 2 U ZDD Z represents k∈N+ (However, N + is the set of all natural numbers greater than or equal to 2), and the objective function g: (2 U ) k →R (where R is the set of all real numbers). Note that ZDD Z can be constructed by the method described in Reference 3, for example.
[0046] The input unit 201 receives a given ZDD Z and k∈N + and the objective function g.
[0047] The optimum value calculation unit 202 calculates the optimum value of the ZDD Z and k∈N input by the input unit 201. + and the objective function g, the optimal value of the k-set selection problem is calculated. Here, the optimal value calculation unit 202 includes a preprocessing unit 211, an operation unit 212, and an optimal value acquisition unit 213.
[0048] As a preprocessing step, the preprocessing unit 211 converts the ZDD Z to satisfy the constraints of a QDD (Quasi Decision Diagram). A QDD is a ZDD to which nodes are added so that the label difference between all parent and child nodes is 1. That is, a QDD is a ZDD to which the following constraints are added, and is a subgraph of a ZDD: for every non-terminal node v, λ(v) = λ(δ 0 (v)) + 1 and λ(v) = λ(δ 1 (v)) + 1. The method of converting a ZDD to satisfy the constraints of a QDD is an existing method, and is described in, for example, Reference 4.
[0049] In addition, the preprocessing unit 211 generates a hash table h for 0≦i≦|U| as preprocessing. i :(V i ×N + ) * →R (where R is the set of all real numbers). i ×N + ) * (V i ×N +) is repeated 0 or more times. These hash tables assign real values to states called frontier states and store the correspondence between the frontier states and real values. Frontier states are fingerprints used to determine whether intermediate states generated during the calculation process are equivalent, and their definition will be explained later.
[0050] Here, h is a hash table, and the following operations are defined as operations on this hash table h.
[0051] h. add(key, value): Registers the value corresponding to the key in the hash table h.
[0052] h. find(key): retrieves a value corresponding to the key from the hash table h. However, if the value corresponding to the key is not registered in the hash table h, NULL is returned.
[0053] The operation unit 212 performs dynamic programming (DP) on the ZDD Z that satisfies the constraints of the QDD to calculate the optimal value for the k-set selection problem. The results obtained in the dynamic programming calculation process are stored in a hash table h i (0≦i≦|U|). Details of this dynamic programming will be described later.
[0054] The optimum value acquisition unit 213 uses the hash table h 0 The maximum value stored in is taken as the optimal value for the k-set selection problem.
[0055] The output unit 203 outputs the optimum value acquired by the optimum value acquisition unit 213 to a predetermined output destination. The predetermined output destination may be, for example, the display device 102 such as a display, the auxiliary storage device 107 such as an HDD, SSD, or flash memory, or other equipment, devices, or terminals connected via a communication network.
[0056] <Flow of Optimum Value Calculation Processing> The flow of the optimum value calculation processing according to this embodiment will be described below with reference to FIG.
[0057] The input unit 201 receives a given ZDD Z and k∈N + and the objective function g are input (step S101).
[0058] Next, the optimum value calculation unit 202 calculates the ZDD Z and k∈N input in step S101. + and the objective function g, the DP_MAIN function is executed to calculate the optimal value a for the k-set selection problem (step S102). + and the objective function g as inputs, and calculates the optimal value a by dynamic programming. The algorithm will be described in detail later.
[0059] Then, the output unit 203 outputs the optimum value a calculated in step S102 to a predetermined output destination (step S103).
[0060] <Algorithm of DP_MAIN function> The DP_MAIN function is ZDD Z and k∈N + and the objective function g are input, and the optimal value a for the k-set selection problem is output. Here, ZDD Z and the objective function g can be accessed from functions other than the DP_MAIN function. Also, the DP_MAIN function and other functions called from this function use lists as data structures. 1 , ..., e d A list consisting of 1 , ..., e d ) In addition, the following operations are defined as operations on the list L.
[0061] L. push(e): Adds element e to the end of list L. L. pop(): Deletes the element at the end of list L. The element at the beginning of a list is also called the first element or the first element of the list.
[0062] The algorithm of the DP_MAIN function will be described below with reference to FIG.
[0063] The preprocessing unit 211 transforms the ZDD Z so that it satisfies the constraints of the QDD (line 1). This transformation ensures that all paths in the transformed ZDD Z pass through |U| nodes from the root r to T.
[0064] The preprocessing unit 211 generates a hash table h for each level i (0≦i≦|U|). i :(V i ×N + ) * → Prepare R (where R is the set of all real numbers) (line 2).
[0065] The operation unit 212 executes lines 3 to 6. These lines aim to maximize the objective function g by selecting k distinct sets from the set family represented by ZDD Z. Selecting k sets from ZDD Z is equivalent to selecting k paths from the root to T. Therefore, the goal is to select k optimal r-T paths. Note that the optimal k paths are constructed in parallel from the root upwards, rather than extracting each path one by one.
[0066] First, the frontier state at the root level can only be a state in which all the endpoints of the k paths are gathered at the root. Therefore, the operation unit 212 calculates the frontier state ((r, k)) and its value (i.e., h |U| Let ((r, k))) be I and h |U| (line 3). From here on, starting from the root level, k paths are simultaneously extended one level at a time to calculate the optimal solution up to the intermediate levels. Assume that there are k paths from the root to a node (node) belonging to level i. Note that it is okay for there to be duplicate paths. Let P be the (multiple) set consisting of these k paths, and let P' be the set obtained by removing duplicate paths from this multiset P.
[0067] Then, the frontier state S for a multiset P is defined as follows:
[0068] The frontier state S is V × N +The multiset S consists of pairs belonging to level i, namely, S = {(node of p belonging to level i, number of times p appears in multiset P) | path p∈P'}. Hereinafter, pairs included in the frontier state will be called "node weight pairs." A node weight pair (v, w) indicates that w paths from the root follow the same route to reach node v.
[0069] Next, the operation unit 212 loops from the root level l=|U| to the level l=1, which is one level above the terminal node (line 4), and calculates all the frontier states found at each level and the h for the frontier states. l The DP_TRANSITION function is executed using the values of the frontier state and the h for that frontier state (lines 5 and 6). l Using the values of and as input, find all the frontier states of the next level and l-1 The details of the algorithm of the DP_TRANSITION function will be described later.
[0070] Note that one frontier state corresponds to one unique subproblem in dynamic programming, i.e., two different sets of paths are equivalent at that level if they lead to the same frontier state.
[0071] When k paths are extended from the root to the terminal node, the only possible frontier state at level 0 is one that consists of k (T, 1). For this reason, the optimum value acquisition unit 213 uses a list consisting of k (T, 1) as a key to create a hash table h 0 (line 7). Then, the optimal value acquisition unit 213 returns the value a acquired on line 7 as the optimal value for the k-set selection problem (line 8).
[0072] <Algorithm of DP_TRANSITION function> The DP_TRANSITION function takes a list (v 1 , w 1 ), ..., (v d , w d) and the value a for that frontier state as input. Now, if the current level is l, then v i ∈V l (1≦i≦d), and w 1 +...+w d = k. Also, V l It is assumed that there is a total order and the list is sorted in ascending order. a represents the partial maximum value of the objective function that can be realized in the current frontier state. Note that the variables l and h l represents the same as the DP_MAIN function.
[0073] The algorithm of the DP_TRANSITION function will now be described with reference to FIG.
[0074] The operation unit 212 creates an empty list L for storing the frontier states of the next level (first line).
[0075] The operation unit 212 calls the FIND_SAME_PAIRS function to find all frontier states at the next level that are reachable from the current frontier state (line 2). The FIND_SAME_PAIRS function tries all possible ways to determine how many of the w paths should be extended toward the 0-edge and how many should be extended toward the 1-edge for each node weight pair (v, w) included in the current frontier state, and generates all frontier states at the next level determined by this. Note that there are w ways to extend a path per node weight pair (v, w). That is, for 0≦i≦w, it is possible to extend i paths toward the 0-edge and w-i paths toward the 1-edge.
[0076] <FIND_SAME_PAIRS function algorithm> The FIND_SAME_PAIRS function returns a list (v 1 , w 1 ), ..., (v d , w d )), the value a for its frontier state, the list L, and x as input. Now, if the current level is l, then v i ∈V l (1≦i≦d), and w 1 +...+w d= k. Also, V l is assumed to have a total order, and the list is sorted in ascending order. L is a list representing the frontier state of the next level to which the current frontier state is transitioned, a is the partial maximum value of the objective function that can be realized in the current frontier state, and x is the number of paths extended to the 1-edge side in the current level. x is used to calculate the objective function. Note that the variables l and h l represents the same as the DP_MAIN function.
[0077] The algorithm of the FIND_SAME_PAIRS function will be described below with reference to FIG.
[0078] If the current frontier state is an empty list (d=0 in line 1), the operation unit 212 executes lines 2 to 4, which indicates that all processing of the current frontier state has been completed, and then returns to the caller (line 5). That is, since elements with a weight part of 0 are redundant node weight pairs, the operation unit 212 first deletes elements with a weight part of 0 from L, and then rearranges L in ascending order to obtain L' (line 2). Next, the operation unit 212 checks whether L' is a hash table of the next level h l-1 If it is already registered, the maximum tentative value b that can be realized in the frontier state is obtained (line 3). l-1 If you are not registered with or are already registered but b<a◇ l g l If (x) (line 3), the operation unit 212 sets L′ and a◇ l g l (x) and the hash table h l-1 (Line 4) where a◇ l g l (x) represents the value of the objective function realized by the call to the FIND_SAME_PAIRS function.
[0079] On the other hand, if the current frontier state is not an empty list (i.e., if the current frontier state is still being processed), the operation unit 212 executes lines 6 to 10. If the frontier state contains multiple identical node weight pairs, simply trying all possible branches for all of those pairs would result in the same frontier state being generated repeatedly. Therefore, by extracting and arranging identical node weight pairs together, and extending more of the node weight pairs to the 0-edge side as they are further to the left, repeated extension of the same path can be avoided. In other words, by imposing a constraint that the number of extensions to the 1-edge side is monotonically non-decreasing, it is possible to avoid redundant calculation of the same transition.
[0080] The operation unit 212 selects the first element of L (v 1 , w 1 ) is prepared, and c is initialized to 1 since there is always one head element itself (line 6).
[0081] The operation unit 212 performs the operation (v) within a range that does not exceed the size of the list L (i.e., within a range of c+1≦d). 1 , w 1 ) (line 7), and increments c by 1 each time such a node weight pair is found (line 8). Note that since list L is sorted in ascending order, if identical node weight pairs exist, they are adjacent. Therefore, the method in lines 7 and 8 can find all node weight pairs that are identical to the first element.
[0082] The operation unit 212 sets j as a variable representing the minimum number of branches that can be extended to the 1-branch side. 1 and 0-child δ 0 (v 1 ) and the smaller of the two concentrations is w 1 Let the value subtracted from be j (line 9). This means that if there is no particular reason, there can be no problem with the number of paths extended to the 1-branch side being 0. 0 (v 1 ) concentration is w 1 If it is smaller than 0-δ 0 (v 1) must be extended to the 1-edge side. In other words, among the w paths that have the same route from the root to node v, δ 1 (v) The maximum extension to the side is |δ 1 (v) | Book, δ 0 (v) The maximum extension to the side is |δ 0 (v) | paths, and the number of different paths from node v to T is at most |v|. Therefore, if the number of paths that have traveled the same route is greater than or equal to |v| and reach v, it becomes impossible to select different sets.
[0083] The operation unit 212 calls the EXTEND_FROM_SAME_PAIRS function and 1 There are c pieces in 1 Try all methods to extend the end points of the path and count the total number of paths x that have been extended to the 1-branch side (line 10). 1 , w 1 ,c,j,((v c+1 , w c+1 ), ..., (v d , w d )), L, x, and a are given as input. In this EXTEND_FROM_SAME_PAIRS function, there are c (v 1 , w 1 ) are processed in order so that the number of branches extended to the 1-branch side is monotonically non-decreasing.
[0084] <Algorithm of EXTEND_FROM_SAME_PAIRS function> The EXTEND_FROM_SAME_PAIRS function takes the node weight pair (v, w) currently being considered, its number c, the minimum number j that can be extended to the 1-edge side for this node weight pair (v, w), and a list of the remaining node weight pairs (v 1 , w 1 ), ..., (v d , w d )), a list L, x, and the value a for the current frontier state, where ((v 1 , w 1 ), ..., (v d , wd )) are sorted in ascending order, L is a list representing the frontier state of the next level to which the current frontier state will transition, a is the partial maximum value of the objective function that can be realized in the current frontier state, and x is the number of paths extended to the 1-edge side at the current level.
[0085] The algorithm of the EXTEND_FROM_SAME_PAIRS function will be described below with reference to FIG.
[0086] If c = 0 (line 1), the operation unit 212 calls the FIND_SAME_PAIRS function again (line 2), and then returns to the caller of the EXTEND_FROM_SAME_PAIRS function (line 3). This causes the process to repeat, searching for an element equal to the first node weight pair. Note that the case of c = 0 indicates that all processes related to node weight pairs equal to (v, w) have been completed.
[0087] If c≠0, (v, w) is still being processed, so the operation unit 212 executes lines 4 to 9. The minimum number of branches that can be extended to the 1-branch side is given by j, and the maximum number of branches that can be extended to the 1-branch side is w or the 1-child δ of v. 1 (v), whichever is smaller. Therefore, the operation unit 212 calculates the 1-child δ of i=j to w or v. 1 (v) and (v) are looped to find the smaller one, and all possible stretching methods are actually tried (line 4).
[0088] If the number of paths extended to the 1-edge side is i, then the w-i path will reach the 0-child of node v at the next level, and i paths will reach the 1-child of node v. Therefore, the operation unit 212 adds these to the frontier state at the next level (lines 5 and 6). Then, to continue processing the node weight pair (v, w), the operation unit 212 calls the EXTEND_FROM_SAME_PAIRS function again (line 7). At this time, the EXTEND_FROM_SAME_PAIRS function is passed v, w, c-1, i, ((v 1 , w 1 ), ..., (v d , w d)), L, x+i, and a are given as inputs. That is, since one (v, w) has been processed, c is decreased by 1, and i is given as an input to the EXTEND_FROM_SAME_PAIRS function to make the number of extensions to the 1-branch side monotonically non-decreasing.
[0089] After returning from the call of the EXTEND_FROM_SAME_PAIRS function on line 7 above, the operation unit 212 deletes the elements added on lines 5 and 6 from L (lines 8 and 9) in order to return the frontier state of the next level to the state before extending i branches from (v, w) to the 1-branch side.
[0090] <Summary> As described above, the optimal value calculation device 10 according to this embodiment can significantly reduce the time required to calculate the optimal value of the k-sets selection problem (i.e., the optimal objective function value). Therefore, the optimal value calculation device 10 according to this embodiment can solve, for example, even a k-sets selection problem in which a large-scale set family is given, in a relatively short time.
[0091] The present invention is not limited to the above-described specifically disclosed embodiments, and various modifications, changes, and combinations with known technologies are possible without departing from the scope of the claims.
[0092] [References] Reference 1: Randal E. Bryant. Graph-based algorithms for Boolean function manipulation. IEEE Transactions on Computers, C-35(8):677-691, 1986. Reference 2: Shin-ichi Minato. Zero-Suppressed BDDs for Set Manipulation in Combinatorial Problems. In Proc. of the 30th ACM / IEEE Design Automation Conference (DAC'93), pp. 272-277, 1993. Reference 3: Japanese Patent Application Laid-Open No. 2020-201556 Reference 4: Donald E. Knuth. The Art of Computer Programming. Volume 4, fascicle 1, Bitwise Tricks & Techniques; Binary Decision Diagrams. Addison-Wesley, 2009.
[0093] REFERENCE SIGNS LIST 10 Optimum value calculation device 101 Input device 102 Display device 103 External I / F 103a Recording medium 104 Communication I / F 105 RAM 106 ROM 107 Auxiliary storage device 108 Processor 109 Bus 201 Input unit 202 Optimum value calculation unit 203 Output unit 211 Preprocessing unit 212 Operation unit 213 Optimum value acquisition unit
Claims
1. An optimal value calculation device for calculating an optimal value for a k-set selection problem, comprising: an input unit for inputting a zero-suppressed binary decision diagram representing a set family for the k-set selection problem, an objective function that satisfies specified constraints, and k that is 2 or greater; an optimal value calculation unit for calculating a maximum value of the objective function as the optimal value using the zero-suppressed binary decision diagram, the objective function, and the k; and an output unit for outputting the optimal value to a specified output destination, wherein the optimal value calculation unit calculates a partial optimal value of the objective function while sequentially extending k paths from a root node of the zero-suppressed binary decision diagram to a node having label i using dynamic programming, and calculates as the optimal value the partial optimal value when the k paths are extended from the root node to a terminal node.
2. Let U = {1, ..., |U|} be the universal set, s 1 , ..., s k Let us denote the set of k included in the set family of the universal set U, the objective function g, n = |U|, ◇ i Let (1≦i≦n) be any left-associative operator, and I be ◇ n The identity element of g 1 , ..., g n is a function that takes k arguments of 0 or 1 and returns a real number, and the constraint is that the objective function g is g(s 1 , ..., s k ) = I◇ n g n ([n∈s 1 ], ..., [n∈s k ])◇ n-1 ...◇ 1 g 1 ([1∈s 1 ], ..., [1∈s k 2. The optimum value calculation device according to claim 1, wherein [.] is a unary operator that returns 1 if the content is true and 0 if the content is false.
3. The optimum value calculation unit calculates a◇ when the partial optimum value for label i is a and satisfies a predetermined condition. i g i ([i∈s 1 ], ..., [i∈s k3. The optimum value calculation device according to claim 2, wherein the partial optimum value for label i+1 is updated by:
4. An optimal value calculation device according to any one of claims 1 to 3, wherein the optimal value calculation unit converts the zero-suppressed binary decision diagram so as to satisfy a QDD constraint, and calculates the optimal value using the converted zero-suppressed binary decision diagram.
5. The optimal value calculation device according to claim 4, wherein the optimal value calculation unit calculates partial optimal values of the objective function by treating a set of k paths having the same list of pairs of a node having label i and the number of times that said node appears in the k paths as the same sub-problem and extending the set in sequence using the dynamic programming.
6. An optimum value calculation method for a computer that calculates an optimum value of a k-set selection problem, the optimum value calculation method executing the following: an input procedure for inputting a zero-suppressed binary decision diagram that represents a set family for the k-set selection problem, an objective function that satisfies certain constraints, and k that is 2 or greater; an optimum value calculation procedure for calculating the maximum value of the objective function as the optimum value using the zero-suppressed binary decision diagram, the objective function, and the k; and an output procedure for outputting the optimum value to a certain output destination, wherein the optimum value calculation procedure calculates a partial optimum value of the objective function while sequentially extending k paths from a root node of the zero-suppressed binary decision diagram to a node having label i by dynamic programming, and calculates as the optimum value the partial optimum value when the k paths are extended from the root node to a terminal node.
7. A program for causing a computer to execute the following steps for calculating an optimal value of a k-set selection problem: an input procedure for inputting a zero-suppressed binary decision diagram representing a set family for the k-set selection problem, an objective function that satisfies certain constraints, and k that is 2 or greater; an optimal value calculation procedure for calculating the maximum value of the objective function as the optimal value using the zero-suppressed binary decision diagram, the objective function, and the k; and an output procedure for outputting the optimal value to a certain output destination, wherein the optimal value calculation procedure calculates a partial optimal value of the objective function while sequentially extending k paths from a root node of the zero-suppressed binary decision diagram to a node having label i using dynamic programming, and calculates as the optimal value the partial optimal value when the k paths are extended from the root node to a terminal node.
