Proceedings of the Twenty-Ninth AAAI Conference on Artificial Intelligence BDD-Constrained Search: A Unified Approach to Constrained Shortest Path Problems Masaaki Nishino1 and Norihito Yasuda2 and Shin-ichi Minato2;3 and Masaaki Nagata1 1NTT Communication Science Laboratories, NTT Corporation 2ERATO Minato Discrete Structure Manipulation System Project, Japan Science and Technology Agency 3Graduate School of Information Science and Technology, Hokkaido University [email protected] Abstract able with the same method when we add constraints to the problem. Efficient algorithms have been proposed for solv- Dynamic programming (DP) is a fundamental tool used ing such constraint-added variants (e.g., (Oommen 1986)) of to obtain exact, optimal solutions for many combinato- rial optimization problems. Among these problems, im- DP-solvable problems, however, they are designed for spe- portant ones including the knapsack problems and the cific combinations of a problem and a class of constraints, computation of edit distances between string pairs can and there may not exist any efficient algorithm for practi- be solved with a kind of DP that corresponds to solving cal problems we want to solve. To develop a made-to-order the shortest path problem on a directed acyclic graph algorithm for each new combination of a problem and set (DAG). These problems can be solved efficiently with of constraints is unrealistic. In such cases, we usually resort DP, however, in practical situations, we want to solve to using integer linear programming (ILP) solvers, however, the customized problems made by adding logical con- they lack theoretical guarantees on the computation time and straints to the original problems. Developing an algo- it is difficult to estimate the solution time. rithm specifically for each combination of a problem and a constraint set is unrealistic. The proposed method, We propose a unified method for solving a class of op- BDD-Constrained Search (BCS), exploits a Binary De- timization problems that are made by adding constraints to cision Diagram (BDD) that represents the logical con- existing DP-solvable problems. Here we say that our method straints in combination with the DAG that represents the is unified since it can solve optimization problems in the problem. The BCS runs DP on the DAG while using the same way regardless of the kinds of constraints added. The BDD to check the equivalence and the validity of inter- class of problems our method can solve is the optimization mediate solutions to efficiently solve the problem. The problems that can be solved using DP of finding the shortest important feature of BCS is that it can be applied to (or longest) path on a directed acyclic graph (DAG). Many problems with various types of logical constraints in a unified way once we represent the constraints as a BDD. important optimization problems that are DP-solvable be- We give a theoretical analysis on the time complexity of long to this class. Typical examples in this class includes BCS and also conduct experiments to compare its per- the 0-1 knapsack problem (Kellerer, Pferschy, and Pisinger formance to that of a state-of-the-art integer linear pro- 2004), computation of the edit distance (Wagner and Fischer gramming solver. 1974) and the problem of finding the Viterbi path on a Hid- den Markov Model (HMM) (Rabiner 1989). Introduction The proposed method, named BDD-constrained search (BCS), uses a binary decision diagram (BDD) (Akers 1978; Dynamic programming (DP) is a fundamental tool used for Bryant 1986) to represent additional logical constraints im- solving various kinds of optimization problems to obtain posed on an optimization problem. Logical constraints are exact, optimal solutions. Many important problems such as constraints written as Boolean functions whose variables the knapsack problem, the computation of edit distances be- correspond to edges of the DAG. In the above knapsack tween string pairs, and the shortest path problem on a graph problem example, the constraints on pairs of items can be can be efficiently solved by using DP. To cover practical situ- represented by Boolean functions. If there are no additional ations, a natural demand is to extend optimization problems constraints, a shortest path problem on a DAG can be solved by adding some constraints. For example, suppose that we in time proportional to the number of edges due to the op- want to solve a knapsack problem and we know that some timal substructure property. If additional logical constraints combinations of items must not be contained in the solution. exist, however, the problem loses this property and we have Then we represent this property as constraints and solve the to enumerate all possible paths to solve the problem. Our problem with them to obtain a solution that does not con- key idea is to use a BDD as a “guide” to simultaneously tain the prohibited combinations of items. However, an opti- judge whether a partial path can be pruned, and find groups mization problem that can be solved by DP becomes unsolv- of partial paths with which the optimal substructure property Copyright c 2015, Association for the Advancement of Artificial holds, i.e., if the shortest path of the DAG contains any par- Intelligence (www.aaai.org). All rights reserved. tial path contained in the group, then the contained partial 1219 responding to the node. We use lo(n), hi(n), and label(n) to represent the low-edge, the high-edge, and the label of a BDD node n, respectively. We also use lo(n) and hi(n) to represent the nodes pointed to by the low-edge and the high-edge of node n, respectively. The intermediate node that comes first in the topological sorted order is the root node of the BDD, and we write it as root. A BDD has ex- actly two leaf nodes ? and > and we say these nodes are terminal nodes. Figure 1(b) shows an example of a BDD that represents Boolean function f = (e12 ^ e45) _ e13. The numbers to the left of the intermediate nodes are IDs used Figure 1: (a) An example weighted DAG and (b) an example later, and the BDD has four intermediate nodes n1; : : : ; n4. BDD that represents a Boolean function f = (e12 ^ e45) _ An edge with dashed line represents the low-edge of an e13. These examples are used throughout the paper. intermediate node and a normal edge represents the high- edge, and the symbol written in an intermediate node repre- sents the label of the node. A path from the root node to path is always the shortest one in the group. These pruning the >-terminal corresponds to an assignment of variables and grouping operations can drastically reduce the amount that makes the Boolean function true. In the above example, of computation and contribute to achieving efficient search there are three such paths, and each of them represents vari- under constraints, hence BCS can efficiently solve a broad able assignments: (e12 = 1; e13 = 1), (e12 = 0; e13 = 1) class of optimization problems. and (e12 = 1; e13 = 0; e45 = 1). In the following, we as- The following are key virtues of the BCS. sume a BDD is ordered and reduced. We say that a BDD A unified approach Our algorithm can solve many con- is ordered if the order of the labels of intermediate nodes is strained problems once logical constraints are cast as a same for all paths from the root to a terminal, and we say that BDD. Since BDD can represent any Boolean function, any a BDD is reduced if it is an ordered BDD with the minimum constraints represented as a Boolean function can be repre- number of nodes. It is known that a reduced and ordered sented as a BDD and hence can be used in BCS. BDD is canonical, i.e., a Boolean function has the unique Upper bounds on the running time We analyze the run- reduced BDD representation for given variable order. ning time of BCS and show it is bounded by the size of the BDD. Problems Solved by DAG Path Search Efficiency We conduct experiments on situations where constrained shortest path search on a DAG is used, and con- Our BDD-Constrained Search (BCS) method can solve a firm that BCS is faster than CPLEX, a state-of-the-art com- broad class of optimization problems that can be solved by mercial general purpose ILP solver. first constructing a DAG and then finding the shortest (or longest) path on the DAG. We define the class of these prob- Preliminary lems as DAGOPTPATH.DAGOPTPATH contains many im- Notations Let G = (V; E) represent a directed acyclic portant problems such as the 0-1 knapsack problems, com- graph, where V is a set of nodes and E is a set of edges. We putation of edit distance and its variants, and the problems use jV j and jEj to denote the number of nodes and edges, of finding the Viterbi path of a HMM. respectively. Let δ (e) and δ (e) be the source node and the The 0-1 knapsack problem The 0-1 knapsack prob- s t lem (Kellerer, Pferschy, and Pisinger 2004) is the problem target node of edge e. Each edge ei (i = 1;:::; jEj) has a (possibly negative) real value weight w . We assume that of finding a subset of the items that maximizes the sum i of scores of selected items, while satisfying the constraint both nodes v1; : : : vjV j and edges e1; : : : ; ejEj are in a topo- logical sorted order. We also use the notation e to repre- that the sum of the costs of the selected items is less than ij the limit K.
Details
-
File Typepdf
-
Upload Time-
-
Content LanguagesEnglish
-
Upload UserAnonymous/Not logged-in
-
File Pages7 Page
-
File Size-