A Sublinear Implicit Algorithm for Maximum Bipartite Matchings
Total Page:16
File Type:pdf, Size:1020Kb
A Sublinear Implicit Algorithm for Maximum Bipartite Matchings Beate Bollig and Tobias Pr¨oger TU Dortmund, LS2 Informatik, 44221 Dortmund, Germany Abstract. The maximum bipartite matching problem is one of the most fundamental algorithmic graph problems, e.g., many resource-allocation problems can be formulated as a maximum matching problem on a bipar- tite graph. Since in some applications graphs become larger and larger, a research branch has emerged which is concerned with the design and analysis of implicit algorithms for classical graph problems. Inputs are given as characteristic Boolean functions of the edge sets and problems have to be solved by efficient functional operations. Here, an implicit maximum bipartite matching algorithm is presented that uses only a sublinear number of functional operations with respect to the number of vertices of the input graph. This is the first sublinear implicit algorithm for a problem unknown to be in the complexity class NC. The algorithm uses a new sublinear algorithm for the computation of maximal node- disjoint paths. As a by-product a maximal matching algorithm is shown which uses only a ploylogarithmic number of operations. 1 Introduction Since some modern applications require huge graphs, explicit representations by adjacency matrices or adjacency lists may cause conflicts with memory lim- itations and even polynomial time algorithms are sometimes not fast enough. As time and space resources do not suffice to consider individual vertices and edges, one way out seems to be to deal with sets of vertices and edges rep- resented by their characteristic functions. Ordered binary decision diagrams, denoted OBDDs, introduced by Bryant in 1986 [6], are well suited for the rep- resentation and manipulation of Boolean functions, therefore, a research branch has emerged which is concerned with the design and analysis of so-called im- plicit or symbolic algorithms for classical graph problems on OBDD-represented graph instances (see, e.g., [8, 9], [12], [19], [20, 21], and [24]). Implicit algorithms have to solve problems on a given graph instance by efficient functional opera- tions offered by the OBDD data structure. Representing graphs with regularities by means of data structures smaller than adjacency matrices or adjacency lists seems to be a natural idea but for several graph problems it has been proved that an exponential blow-up from input to output size is possible in the implicit setting ([1]-[4] and [20]). Nevertheless, OBDD-based algorithms are successful in many applications and already in [7] it has been pointed out that worst-case hardness results do not adequately capture the complexity of the problems on real-world instances. In [21,22] it has been shown that a problem can be solved with a polylogarithmic number of functional operations in the implicit setting if and only if the problem is in NC, the complexity class that contains all prob- lems computable in polylogarithmic time with polynomially many processors. As a consequence there cannot exist implicit algorithms with a polylogarithmic number of operations for P -complete problems assuming that P 6= NC. Due to the problem’s rich area of applications the maximum bipartite match- ing problem has received a considerable amount of attention for explicit graph representations, e.g., many resource-allocation problems can be formulated as a maximum matching problem on a bipartite graph. It is still unknown whether the maximum bipartite matching problem is in NC. For special cases the situ- ation is different, e.g., in [16] an NC algorithm is given for perfect matchings in regular bipartite graphs and in [17] for planar bipartite graphs. In [11] the maximum bipartite matching problem is solved in O(|V |2/3 log3 |E|) time using M(|V |) processors, where M(|V |) is the number of processor needed to compute a matrix product in O(log |V |) time. An interior point based algorithm solves the problem in time O(|E|1/2 log3 |V |) using O(|E|3) processors [10]. Computing maximal matchings in parallel, i.e., a matching that is not a proper subset of another matching, seems to be easier even for general graphs. Using an efficient degree reduction procedure in [15] the first optimal parallel algorithm is pre- sented that runs in time O(log3 |V |) using O((|E| + |V |)/ log3 |V |) processors on bipartite graphs. In the paper we present an implicit algorithm for maximum matchings in bipartite graphs that uses only O(|V |3/4 log5/2 |V |) functional oper- ations. This is the first sublinear implicit algorithm for a problem unknown to be in NC. A main ingredient is an implicit algorithm for the maximal node-disjoint path problem that uses O(|V |1/2 log3 |V |) operations. An important submodule is a maximal bipartite matching algorithm with O(log4 |V |) functional opera- tions. The paper is organized as follows. In Section 2 we define some notation and review some basics concerning OBDDs, implicit graph representations, and matchings. Furthermore, we extend slightly a result presented by Hopcroft and Karp [13] on the length of shortest augmenting paths with respect to a given matching M which allows us later on to decrease the number of functional op- erations for the computation of maximum bipartite matchings by a factor of O(log1/2 |V |). We start with the description of some implicit algorithms for sim- ple graph problems in Section 3. Section 4 contains an implicit algorithm for the maximal matching problem. Here, we make use of the algorithm presented in [15] but for the implicit setting also new ideas are necessary. Combining a method due to [11] and an improvement due to [14] an implicit algorithm for maximal node-disjoint paths is described in Section 5. The main result is presented in Section 6, an implicit sublinear maximum bipartite matching algorithm. The construction of single augmenting paths shown in [19] for an implicit maximum flow algorithm in 0-1 networks with O(|V | log2 |V |) functional operations is one 2 of the ingredients but we have to add more ideas. Finally, we finish the paper with some concluding remarks. 2 Preliminaries In order to make the paper self-contained we briefly recall the main notions we are dealing with in this paper. 2.1 Ordered Binary Decision Diagrams When working with Boolean functions as in circuit verification, synthesis, and model checking, ordered binary decision diagrams are a very common dynamic data structure. Definition 1. Let Xn = {x1,...,xn} be a set of Boolean variables. A variable ordering π on Xn is a permutation on {1,...,n} leading to the ordered list xπ(1),...,xπ(n) of the variables. In the following a variable ordering π is sometimes identified with the corre- sponding ordering xπ(1),...,xπ(n) of the variables if the meaning is clear from the context. Definition 2. A π-OBDD on Xn is a directed acyclic graph G = (V, E) whose sinks are labeled by the Boolean constants 0 and 1 and whose non-sink (or de- cision) nodes are labeled by Boolean variables from Xn. Each decision node has two outgoing edges, one labeled by 0 and the other by 1. The edges between deci- sion nodes have to respect the variable ordering π, i.e., if an edge leads from an −1 −1 xi-node to an xj -node, then π (i) ≤ π (j) (xi precedes xj in xπ(1),...,xπ(n)). n Each node v represents a Boolean function fv ∈ Bn, i.e., fv : {0, 1} → {0, 1}, n defined in the following way. In order to evaluate fv(b), b ∈{0, 1} , start at v. After reaching an xi-node choose the outgoing edge with label bi until a sink is reached. The label of this sink defines fv(b). The size of a π-OBDD G is equal to the number of its nodes and the π-OBDD size of a function f is the size of the minimal π-OBDD representing f. The OBDD size of f is the minimum of all π-OBDD(f). Now, we briefly describe a list of important operations on data structures for Boolean functions and the corresponding time and additional space requirements for OBDDs (for a detailed discussion see, e.g., [23]). In the following let f and g be Boolean functions in Bn on the variable set Xn = {x1,...,xn} and Gf and Gg be π-OBDDs for the representations of f and g, respectively. n – Evaluation: Given Gf and an input b ∈{0, 1} , compute f(b). This can be done in time O(n). – Replacements by constants: Given Gf , an index i ∈{1,...,n}, and a Boolean constant ci ∈ {0, 1}, compute a π-OBDD for the subfunction f|xi=ci . This can be done in time O(|Gf |) and the π-OBDD for f|xi=ci is not larger than Gf . 3 – Equality test: Given Gf and Gg, decide, whether f and g are equal. This can be done in time O(|Gf | + |Gg|). – Synthesis: Given Gf and Gg and a binary Boolean operation ⊗ ∈ B2, com- pute a π-OBDD Gh for the function h ∈ Bn defined as h := f ⊗ g. This can be done in time and space O(|Gf | · |Gg|) and the size of Gh is bounded above by O(|Gf | · |Gg|). – Quantification: Given Gf , an index i ∈ {1,...,n}, and a quantifier Q ∈ {∃, ∀}, compute a π-OBDD Gh for the function h ∈ Bn defined as h := (Qxi)f, where (∃xi)f := f|xi=0 ∨ f|xi=1 and (∀xi)f := f|xi=0 ∧ f|xi=1. The computation of Gh can be realized by two replacements of constants and a 2 synthesis operation.