Table of Contents
Fetching ...

Quantum Algorithm for Finding the Optimal Variable Ordering for Binary Decision Diagrams

Seiichiro Tani

TL;DR

The paper tackles the NP-hard problem of finding an optimal variable ordering for OBDDs, which dramatically affects OBDD size. It introduces a quantum divide-and-conquer approach that extends the classical Friedman–Supowit dynamic-programming framework and employs quantum minimum finding to select subproblems efficiently. The main result is a quantum algorithm that outputs a minimum-size OBDD and the corresponding variable ordering in $O^*(\gamma^n)$ time and space with $\\gamma \le 2.77286$, under the QRAM model, improving the classical $O^*(3^n)$ bound by an exponential factor and extending naturally to ZDDs and related representations. The work demonstrates a first quantum speedup for OBDD-related problems and provides a foundation for exploring quantum speedups in other decision diagram variants and DP-like combinatorial problems.

Abstract

An ordered binary decision diagram (OBDD) is a directed acyclic graph that represents a Boolean function. OBDDs are also known as special cases of oblivious read-once branching programs in the field of complexity theory. Since OBDDs have many nice properties as data structures, they have been extensively studied for decades in both theoretical and practical fields, such as VLSI design, formal verification, machine learning, and combinatorial problems. Arguably, the most crucial problem in using OBDDs is that they may vary exponentially in size depending on their variable ordering (i.e., the order in which the variable are to read) when they represent the same function. Indeed, it is NP hard to find an optimal variable ordering that minimizes an OBDD for a given function. Hence, numerous studies have sought heuristics to find an optimal variable ordering. From practical as well as theoretical points of view, it is also important to seek algorithms that output optimal solutions with lower (exponential) time complexity than trivial brute-force algorithms do. Friedman and Supowit provided a clever deterministic algorithm with time/space complexity $O^\ast(3^n)$, where $n$ is the number of variables of the function, which is much better than the trivial brute-force bound $O^\ast(n!2^n)$. This paper shows that a further speedup is possible with quantum computers by demonstrating the existence of a quantum algorithm that produces a minimum OBDD together with the corresponding variable ordering in $O^\ast(2.77286^n)$ time and space with an exponentially small error. Moreover, this algorithm can be adapted to constructing other minimum decision diagrams such as zero-suppressed BDDs, which provide compact representations of sparse sets and are often used in the field of discrete optimization and enumeration.

Quantum Algorithm for Finding the Optimal Variable Ordering for Binary Decision Diagrams

TL;DR

The paper tackles the NP-hard problem of finding an optimal variable ordering for OBDDs, which dramatically affects OBDD size. It introduces a quantum divide-and-conquer approach that extends the classical Friedman–Supowit dynamic-programming framework and employs quantum minimum finding to select subproblems efficiently. The main result is a quantum algorithm that outputs a minimum-size OBDD and the corresponding variable ordering in time and space with , under the QRAM model, improving the classical bound by an exponential factor and extending naturally to ZDDs and related representations. The work demonstrates a first quantum speedup for OBDD-related problems and provides a foundation for exploring quantum speedups in other decision diagram variants and DP-like combinatorial problems.

Abstract

An ordered binary decision diagram (OBDD) is a directed acyclic graph that represents a Boolean function. OBDDs are also known as special cases of oblivious read-once branching programs in the field of complexity theory. Since OBDDs have many nice properties as data structures, they have been extensively studied for decades in both theoretical and practical fields, such as VLSI design, formal verification, machine learning, and combinatorial problems. Arguably, the most crucial problem in using OBDDs is that they may vary exponentially in size depending on their variable ordering (i.e., the order in which the variable are to read) when they represent the same function. Indeed, it is NP hard to find an optimal variable ordering that minimizes an OBDD for a given function. Hence, numerous studies have sought heuristics to find an optimal variable ordering. From practical as well as theoretical points of view, it is also important to seek algorithms that output optimal solutions with lower (exponential) time complexity than trivial brute-force algorithms do. Friedman and Supowit provided a clever deterministic algorithm with time/space complexity , where is the number of variables of the function, which is much better than the trivial brute-force bound . This paper shows that a further speedup is possible with quantum computers by demonstrating the existence of a quantum algorithm that produces a minimum OBDD together with the corresponding variable ordering in time and space with an exponentially small error. Moreover, this algorithm can be adapted to constructing other minimum decision diagrams such as zero-suppressed BDDs, which provide compact representations of sparse sets and are often used in the field of discrete optimization and enumeration.

Paper Structure

This paper contains 24 sections, 13 theorems, 48 equations, 9 figures, 2 tables, 3 algorithms.

Key Result

Theorem 1

There exists a quantum algorithm that, for a function $f\colon \{ 0,1 \}^n\to\{ 0,1 \}$ given as its truth table, produces a minimum OBDD representing $f$ together with the corresponding variable ordering in $O^\ast(\gamma^n)$ time and space with an exponentially small error probability with respect

Figures (9)

  • Figure 1: The OBDDs represent the function $f(x_1,x_2,x_3,x_4,x_5,x_{6})=x_1\cdot x_2+x_3\cdot x_4+x_{5}\cdot x_{6}$ ("$\cdot$" and "$+$" denote AND and OR, respectively) under two variable orderings: $(x_1,x_2,x_3,x_4,x_5, x_{6})$ (left) and $(x_1,x_3,x_5,x_2,x_4,x_6)$ (right), where the solid and dotted arcs express $1$-edges and $0$-edges, respectively, and the terminal nodes for $\mathsf{true}$ and $\mathsf{false}$ are labeled with $\mathsf{T}$ and $\mathsf{F}$, respectively. For each $n\in \mathbb{N}$, the function $f(x_1,\dots, x_{2n})=x_1\cdot x_2+x_3\cdot x_4+\dots+x_{2n-1}\cdot x_{2n}$ has a $(2n+2)$-sized OBDD for the ordering $(x_1,\dots, x_{2n})$ and a $2^{n+1}$-sized OBDD for the ordering $(x_1,x_3,\dots, x_{2n-1},x_2,x_4,\dots,x_{2n})$MeiThe98Book. With the notations defined in \ref{['def:OBDD']}, $\{ V_0,\dots, V_6 \}$ is the partition of the node set; the top node is identified with $\mathsf{r}$; and the bottom two nodes are identified with $\mathsf{t}$ and $\mathsf{f}$. A more detailed explanation of these OBDDs is provided in \ref{['example:OBDDs']}.
  • Figure 2: Examples of a redundant node (left) and a pair of equivalent nodes (right), and their respective removal rules, where the solid and dotted arcs express $1$-edges and $0$-edges, respectively. In the example of a redundant node, $u_0$ and $u_1$ denote $\mathrm{child}_0[u]$ and $\mathrm{child}_1[u]$, respectively.
  • Figure 3: Schematic representation of $\mathsf{Cost}_{i}(f,\pi)$
  • Figure 4: Schematic representation of \ref{['lm:OBDDwidth']}: For any subset $I\subseteq [n]$, suppose that two permutations $\pi,\pi' \in \mathcal{S}_n$ satisfy $\{ \pi[1],\dots, \pi[\mathfrak{i}-1] \}=\{ \pi'[1],\dots, \pi'[\mathfrak{i}-1] \}$ and $\pi[\mathfrak{i}]=\pi'[\mathfrak{i}]$, where $\mathfrak{i}$ is the cardinaltiy of $I$. Then, it holds that the number of nodes labeled with $x_{i}$ in $\mathcal{B}(f,\pi)$ is equal to that of nodes labeled with $x_{i}$ in $\mathcal{B}(f,\pi')$, where $i=\pi[\mathfrak{i}]=\pi'[\mathfrak{i}]$.
  • Figure 5: Examples of data structures used in Algorithm $\mathsf{FS}$: $\textsc{table}_{I}$ and $\textsc{node}_I$ with $I=\{ 1,3,5 \}$ for the OBDD representing $f(x_1,\dots, x_{6})=x_1\cdot x_2+x_3\cdot x_4+\dots+x_{5}\cdot x_{6}$ for the variable ordering $(x_1,x_3, x_{5},x_2,x_4,x_{6})$. The pointers (integers) to the nodes labeled with $x_1, x_3, x_5$ are each shown at the top-left positions of the nodes.
  • ...and 4 more figures

Theorems & Definitions (20)

  • Theorem 1
  • Corollary 1
  • Definition 1: OBDDs
  • Remark 1
  • Remark 2
  • Example 1
  • Lemma 1: FriSup90IEEETC
  • Lemma 2
  • Theorem 2: Friedman and Supowit FriSup90IEEETC
  • Lemma 3: Quantum Minimum Finding DurHoy96ARXIVBuhCleWolZal99FOCSLeGMag18PODC
  • ...and 10 more