Hubbry Logo
Quadratic unconstrained binary optimizationQuadratic unconstrained binary optimizationMain
Open search
Quadratic unconstrained binary optimization
Community hub
Quadratic unconstrained binary optimization
logo
7 pages, 0 posts
0 subscribers
Be the first to start a discussion here.
Be the first to start a discussion here.
Quadratic unconstrained binary optimization
Quadratic unconstrained binary optimization
from Wikipedia

Quadratic unconstrained binary optimization (QUBO), also known as unconstrained binary quadratic programming (UBQP), is a combinatorial optimization problem with a wide range of applications from finance and economics to machine learning.[1] QUBO is an NP hard problem, and for many classical problems from theoretical computer science, like maximum cut, graph coloring and the partition problem, embeddings into QUBO have been formulated.[2][3] Embeddings for machine learning models include support-vector machines, clustering and probabilistic graphical models.[4] Moreover, due to its close connection to Ising models, QUBO constitutes a central problem class for adiabatic quantum computation, where it is solved through a physical process called quantum annealing.[5]

Definition

[edit]

Let the set of binary digits (or bits), then is the set of binary vectors of fixed length . Given a symmetric or upper triangular matrix , whose entries define a weight for each pair of indices , we can define the function that assigns a value to each binary vector through

Alternatively, the linear and quadratic parts can be separated as

where and . This is equivalent to the previous definition through using the diag operator, exploiting that for all binary values .

Intuitively, the weight is added if both and . The QUBO problem consists of finding a binary vector that minimizes , i.e., .

In general, is not unique, meaning there may be a set of minimizing vectors with equal value w.r.t. . The complexity of QUBO arises from the number of candidate binary vectors to be evaluated, as grows exponentially in .

Sometimes, QUBO is defined as the problem of maximizing , which is equivalent to minimizing .

Properties

[edit]

QUBO is scale invariant for positive factors , which leave the optimum unchanged:

.

In its general form, QUBO is NP-hard and cannot be solved efficiently by any polynomial-time algorithm.[6] However, there are polynomially-solvable special cases, where has certain properties,[7] for example:

  • If all coefficients are positive, the optimum is trivially . Similarly, if all coefficients are negative, the optimum is .
  • If is diagonal, the bits can be optimized independently, and the problem is solvable in . The optimal variable assignments are simply if , and otherwise.
  • If all off-diagonal elements of are non-positive, the corresponding QUBO problem is solvable in polynomial time.[8]

QUBO can be solved using integer linear programming solvers like CPLEX or Gurobi Optimizer. This is possible since QUBO can be reformulated as a linear constrained binary optimization problem. To achieve this, substitute the product by an additional binary variable and add the constraints , and . Note that can also be relaxed to continuous variables within the bounds zero and one.

Applications

[edit]

QUBO is a structurally simple, yet computationally hard optimization problem. It can be used to encode a wide range of optimization problems from various scientific areas.[9]

Maximum Cut

[edit]

Given a graph with vertex set and edges , the maximum cut (max-cut) problem consists of finding two subsets with , such that the number of edges between and is maximized.

The more general weighted max-cut problem assumes edge weights , with , and asks for a partition that maximizes the sum of edge weights between and , i.e.,

By setting for all this becomes equivalent to the original max-cut problem above, which is why we focus on this more general form in the following.

For every vertex in we introduce a binary variable with the interpretation if and if . As , every is in exactly one set, meaning there is a 1:1 correspondence between binary vectors and partitions of into two subsets.

We observe that, for any , the expression evaluates to 1 if and only if and are in different subsets, equivalent to logical XOR. Let with . By extending above expression to matrix-vector form we find that

is the sum of weights of all edges between and , where . As this is a quadratic function over , it is a QUBO problem whose parameter matrix we can read from above expression as

after flipping the sign to make it a minimization problem.

Cluster Analysis

[edit]
Binary Clustering with QUBO
20 points with random cluster assignment
A bad cluster assignment.
20 points with sensible cluster assignment
A good cluster assignment.
Visual representation of a clustering problem with 20 points: Circles of the same color belong to the same cluster. Each circle can be understood as a binary variable in the corresponding QUBO problem.

Next, we consider the problem of cluster analysis, where we are given a set of points in -dimensional space and want to assign each point to one of two classes or clusters, such that points in the same cluster are similar to each other. For this example we set and . The data is given as a matrix , where each row contains two cartesian coordinates. For two clusters, we can assign a binary variable to the point corresponding to the -th row in , indicating whether it belongs to the first () or second cluster (). Consequently, we have 20 binary variables, which form a binary vector that corresponds to a cluster assignment of all points (see figure).

One way to derive a clustering is to consider the pairwise distances between points. Given a cluster assignment , the expression evaluates to 1 if points and are in the same cluster. Similarly, indicates that they are in different clusters. Let denote the Euclidean distance between the points and , i.e.,

,

where is the -th row of .

In order to define a cost function to minimize, when points and are in the same cluster we add their positive distance , and subtract it when they are in different clusters. This way, an optimal solution tends to place points which are far apart into different clusters, and points that are close into the same cluster.

Let with for all . Given an assignment , such a cost function is given by

where .

From the second line we can see that this expression can be re-arranged to a QUBO problem by defining

and ignoring the constant term . Using these parameters, a binary vector minimizing this QUBO instance will correspond to an optimal cluster assignment w.r.t. above cost function.

Connection to Ising models

[edit]

QUBO is very closely related and computationally equivalent to the Ising model, whose Hamiltonian function is defined as

with real-valued parameters for all . The spin variables are binary with values from instead of . Note that this formulation is simplified, since, in a physics context, are typically Pauli operators, which are complex-valued matrices of size , whereas here we treat them as binary variables. Many formulations of the Ising model Hamiltonian further assume that the variables are arranged in a lattice, where only neighboring pairs of variables can have non-zero coefficients; here, we simply assume that if and are not neighbors.

Applying the identity yields an equivalent QUBO problem [10]

whose weight matrix is given by

again ignoring the constant term, which does not affect the minization. Using the identity , a QUBO problem with matrix can be converted to an equivalent Ising model using the same technique, yielding

and a constant offset of .[10]

References

[edit]
[edit]
Revisions and contributorsEdit on WikipediaRead on Wikipedia
from Grokipedia
Quadratic unconstrained binary optimization () is a problem that seeks to minimize a quadratic objective function over binary variables, formulated as finding the vector x{0,1}nx \in \{0,1\}^n that minimizes xTQx+cTxx^T Q x + c^T x, where QQ is an n×nn \times n and cc is a vector in Rn\mathbb{R}^n. This model unifies a wide range of NP-hard problems, including , stable set, and graph partitioning, by encoding constraints implicitly through penalty terms in the objective function. The origins of trace back to the late and early , with foundational work on pseudo-Boolean functions by researchers such as Fortet (1959–1960) and and Rudeanu (1968), who formalized quadratic forms in binary variables for applications. Subsequent developments in the and , including contributions from , Hansen, and others, advanced algorithms for quadratic 0-1 optimization and established its . gained renewed prominence in the due to its equivalence to the in statistical physics, enabling applications in hardware like D-Wave systems and neuromorphic computing platforms. Key features of QUBO include its flexibility in modeling diverse problems through binary decision variables and quadratic interactions, as well as its amenability to both classical solvers (e.g., relaxations, metaheuristics) and quantum-inspired methods. While general QUBO is intractable, special cases—such as those on planar graphs or with low-rank matrices—admit polynomial-time solutions, and algorithms achieve ratios like O(1/logn)O(1/\log n) via SDP-based rounding. Notable applications span (e.g., clustering), (e.g., RNA folding, ), logistics (e.g., vehicle routing), and (e.g., via minimization). This versatility positions QUBO as a for advancing optimization in both theoretical and practical domains, particularly with emerging hardware accelerations.

Definition and Formulation

Problem Statement

Quadratic unconstrained binary optimization () provides a unified framework for modeling and solving a broad class of NP-hard problems through the use of binary decision variables xi{0,1}x_i \in \{0,1\}. This approach represents decision choices as binary states, with interactions between variables captured in a quadratic objective function, enabling the encoding of diverse discrete problems such as graph partitioning and facility location without additional constraints beyond the binary requirement. By reducing complex constrained formulations to an unconstrained via penalty terms, QUBO simplifies the structure while preserving the problem's essential features. The origins of QUBO trace back to the late 1950s and early 1960s, when studies on pseudo-Boolean functions and binary quadratic optimization emerged in operations research. Seminal work by Hammer and Rudeanu in 1968 formalized these concepts in the context of Boolean methods for optimization, laying the groundwork for unconstrained quadratic binary programming. Subsequent contributions by Fred Glover in the 1970s advanced binary optimization techniques, further developing QUBO's applications in areas like project selection and clustering. QUBO's value stems from its versatility in transforming varied combinatorial problems into a standard quadratic format, which supports efficient solving with algorithms like and specialized hardware such as quantum annealers from D-Wave Systems. This encoding facilitates exploration by classical and quantum methods alike, often outperforming problem-specific solvers for large instances. For example, a basic two-variable QUBO instance seeks to minimize the expression involving the product of the variables plus each variable individually, yielding the optimal binary assignment of zeros for both to achieve the minimum value.

Mathematical Expression

The Quadratic Unconstrained Binary Optimization () problem seeks to find a binary vector x{0,1}nx \in \{0,1\}^n that minimizes the objective function xTQx+cTxx^T Q x + c^T x, where QQ is an n×nn \times n and cc is a vector in Rn\mathbb{R}^n, both containing real-valued entries. Linear terms from an original problem can be absorbed into this quadratic objective by adding the components of cc to the diagonal entries of QQ, yielding the compact form xTQxx^T Q x (leveraging the binary property xi2=xix_i^2 = x_i). This naturally incorporates both linear and quadratic contributions: the diagonal elements qiiq_{ii} (including absorbed linear biases) capture the linear terms qiixiq_{ii} x_i, while the off-diagonal elements qijq_{ij} (for iji \neq j) encode the quadratic interactions. In the common convention, the objective expands to xTQx+cTx=i=1n(qii+ci)xi+1i<jnqijxixj,x^T Q x + c^T x = \sum_{i=1}^n (q_{ii} + c_i) x_i + \sum_{1 \leq i < j \leq n} q_{ij} x_i x_j, where for a symmetric QQ, the off-diagonal qijq_{ij} typically represents half the pairwise interaction strength to avoid double-counting in the matrix form. In standard notation, QQ serves as the interaction matrix, with diagonal elements qiiq_{ii} termed biases (representing unary influences on each variable) and off-diagonal elements qijq_{ij} termed couplings (representing pairwise interactions between variables). This convention facilitates formulation across diverse optimization contexts, including those amenable to quantum annealing hardware.

Properties

Computational Complexity

The quadratic unconstrained binary optimization (QUBO) problem is NP-hard. This hardness follows from a polynomial-time reduction from the maximum cut problem, which is a well-known NP-hard combinatorial optimization task that can be directly formulated as a QUBO instance by setting the off-diagonal elements of the matrix QQ to negative weights corresponding to the graph edges and adjusting the diagonal for normalization. The decision version of QUBO—determining whether there exists a binary vector x{0,1}n\mathbf{x} \in \{0,1\}^n such that xTQxk\mathbf{x}^T Q \mathbf{x} \leq k for a given threshold kk—is NP-complete. Membership in NP is straightforward, as a proposed solution x\mathbf{x} can be verified in polynomial time by computing the quadratic form. Completeness arises from the equivalence between QUBO and the Ising spin glass model, whose decision problem (e.g., whether the ground-state energy is at most zero) is NP-complete via reductions from problems like 3-SAT. Certain special cases of QUBO are solvable in polynomial time. If QQ is diagonal, the objective decouples into nn independent linear terms over single binary variables, allowing the minimum to be found by evaluating each term separately in O(n)O(n) time. If QQ is positive semidefinite, the quadratic form is convex, and its minimum over the hypercube [0,1]n[0,1]^n occurs at a binary vertex; this can be solved exactly via a semidefinite programming relaxation or interior-point methods for convex quadratic programming, both polynomial-time algorithms. QUBO remains NP-hard in parameterized settings with sparsity constraints on QQ. Specifically, the problem is NP-hard even when QQ has only O(n)O(n) nonzero entries, as the reduction from preserves sparsity: is NP-hard on cubic graphs (maximum degree 3), which yield QUBO instances with O(n)O(n) nonzeros corresponding to the O(n)O(n) edges.

Mathematical Characteristics

Quadratic unconstrained binary optimization (QUBO) constitutes a specialized instance of , wherein the decision variables are confined to the vertices of the binary hypercube {0,1}n\{0,1\}^n. The objective is to minimize f(x)=xTQx+cTxf(x) = x^T Q x + c^T x, with QQ a symmetric n×nn \times n matrix and cRnc \in \mathbb{R}^n. This formulation inherits the combinatorial structure of the hypercube, rendering the feasible set discrete and finite, while the quadratic nature introduces potential non-convexity depending on the spectral properties of QQ. The matrix QQ fundamentally shapes the optimization landscape. As a symmetric matrix, its definiteness is determined by its eigenvalues: if QQ is positive semidefinite (all eigenvalues non-negative), f(x)f(x) is convex over the continuous relaxation, facilitating easier analysis. However, in typical QUBO instances, QQ is indefinite, featuring both positive and negative eigenvalues, which induces non-convexity and results in a multimodal objective function replete with local minima over the binary domain. This indefiniteness arises frequently in applications, as off-diagonal elements of QQ encode interactions that can be attractive or repulsive, mirroring spin systems without explicit constraints. The eigenvalue spectrum of QQ further elucidates the problem's intrinsic challenges. The presence of negative eigenvalues signals non-convexity, with the count of such eigenvalues correlating to the extent of the ruggedness in the energy landscape; more negative eigenvalues generally amplify the number and depth of local minima, thereby increasing the likelihood of suboptimal solutions in local search methods. For instance, even low-rank indefinite QQ (e.g., rank 2) can harbor exponentially many local optima, underscoring the deceptive nature of the discrete quadratic form. To derive bounds, QUBO problems are often relaxed to continuous quadratic optimization over [0,1]n[0,1]^n, which preserves the objective but expands the domain. When QQ is indefinite, this relaxation remains non-convex, but semidefinite programming (SDP) provides a convex outer approximation yielding lower bounds on the minimum value. A standard SDP relaxation minimizes Q,X\langle Q, X \rangle subject to (1\diag(X)T\diag(X)X)0,\begin{pmatrix} 1 & \diag(X)^T \\ \diag(X) & X \end{pmatrix} \succeq 0, with \diag(X)=1\diag(X) = \mathbf{1} (typically after linear transformation to the equivalent over {1,1}\{-1,1\} variables), solvable in polynomial time via interior-point methods and offering tightness for certain structured instances.

Equivalences and Mappings

Relation to Ising Model

The quadratic unconstrained binary optimization (QUBO) problem is mathematically equivalent to the classical Ising model from statistical mechanics, allowing for a direct transformation between the two formulations. In the QUBO framework, the objective is to minimize HQUBO=iQi,ixi+i<jQi,jxixjH_{\text{QUBO}} = \sum_{i} Q_{i,i} x_i + \sum_{i < j} Q_{i,j} x_i x_j, where xi{0,1}x_i \in \{0, 1\} are binary variables and QQ is an upper-triangular matrix of coefficients. The Ising model, conversely, minimizes the Hamiltonian HIsing=ihisi+i<jJi,jsisjH_{\text{Ising}} = \sum_{i} h_i s_i + \sum_{i < j} J_{i,j} s_i s_j, where si{1,+1}s_i \in \{-1, +1\} represent spin variables, hih_i are local magnetic fields, and Ji,jJ_{i,j} are coupling strengths between spins. This equivalence arises because both models are binary quadratic optimization problems, differing only in the representation of the binary domain. The transformation between QUBO and the Ising model is achieved via a simple affine mapping of variables. To convert from QUBO to Ising, substitute si=2xi1s_i = 2x_i - 1, which maps the binary xix_i to spins sis_i. Substituting this into the QUBO objective yields the Ising Hamiltonian: HIsing=ihisi+i<jJi,jsisj+C,H_{\text{Ising}} = \sum_i h_i s_i + \sum_{i<j} J_{i,j} s_i s_j + C, where the constant C=iQi,i2+i<jQi,j4C = \sum_i \frac{Q_{i,i}}{2} + \sum_{i<j} \frac{Q_{i,j}}{4} does not affect minimization, the linear terms become magnetic fields hi=Qi,i2+14jiQmin(i,j),max(i,j)h_i = \frac{Q_{i,i}}{2} + \frac{1}{4} \sum_{j \neq i} Q_{\min(i,j),\max(i,j)}, and the quadratic terms map to couplings Ji,j=Qi,j4J_{i,j} = \frac{Q_{i,j}}{4}. The reverse mapping from Ising to QUBO uses xi=si+12x_i = \frac{s_i + 1}{2}, transforming the fields and couplings back to QUBO coefficients accordingly. This bijection preserves the structure and optimal solutions of the problems, with linear terms in QUBO corresponding to external fields that bias spins, and quadratic terms to interactions that favor alignments or anti-alignments. This equivalence gained prominence in the 2010s through the development of quantum annealing hardware by , which natively solves on superconducting quantum processors. Earlier formulations of the date to 1925 in statistical physics for magnetism studies, but its optimization applications were revitalized by D-Wave's 2007 prototype and subsequent systems, prompting widespread reformulation of combinatorial problems as QUBO for compatibility. Seminal works, such as Lucas's 2014 survey, demonstrated how numerous NP-hard problems could be mapped to , bridging computer science and physics. The mapping is significant because it enables the application of physics-inspired algorithms and hardware designed for to solve QUBO instances efficiently. For instance, the large effective fields in QUBO-derived can simplify spin configurations by coercing many variables to fixed states, potentially reducing computational complexity in certain solvers. This interchangeability has facilitated interdisciplinary advances, allowing optimization researchers to leverage tools from while adapting for binary decision problems in fields like .

Reductions to Other Problems

Quadratic unconstrained binary optimization (QUBO) provides a versatile framework for solving NP-hard combinatorial problems, as numerous such problems can be polynomially reduced to QUBO by encoding binary decision variables and their interactions directly into the Q matrix. The diagonal elements of Q represent linear costs or rewards associated with individual binary variables, while off-diagonal elements capture pairwise interactions, allowing constraints and objectives to be integrated without explicit enforcement mechanisms. This reduction strategy leverages penalty functions to handle constraints implicitly, transforming constrained problems into unconstrained quadratic forms over binary variables. A prominent example is the reduction of the minimum vertex cover problem, where binary variables xj{0,1}x_j \in \{0,1\} indicate whether vertex jj is included in the cover (xj=1x_j = 1) or not. The objective minimizes the cover size via linear terms jVxj\sum_{j \in V} x_j, while ensuring every edge is covered adds penalty terms P(i,j)E(1xixj+xixj)P \sum_{(i,j) \in E} (1 - x_i - x_j + x_i x_j), with P>0P > 0 a sufficiently large scalar to enforce feasibility. The resulting formulation is minxTQx\min \mathbf{x}^T Q \mathbf{x}, where uncovered vertices contribute negatively to the diagonal through the expanded penalty but are outweighed by the inclusion cost, prioritizing minimal covers. The maximum independent set problem similarly reduces to QUBO, using binary variables xi{0,1}x_i \in \{0,1\} to denote inclusion in the set. To maximize the set size while prohibiting adjacent vertices, the formulation minimizes H=iVxi+2(i,j)ExixjH = -\sum_{i \in V} x_i + 2 \sum_{(i,j) \in E} x_i x_j, with negative diagonal entries in Q encouraging vertex selection and positive off-diagonal entries for edges penalizing violations. This setup ensures the optimal solution corresponds to the largest non-adjacent vertex subset. QUBO is synonymous with unconstrained quadratic binary programming, serving as a representation that facilitates these reductions across diverse domains. In modeling problems, QUBO incorporates restrictions—such as equalities Ax=bA\mathbf{x} = b or inequalities—via quadratic penalty terms like P(Axb)2P (A\mathbf{x} - b)^2, embedding them into the objective to maintain the pure unconstrained binary quadratic structure without separate constraint sets. Conversely, itself, being NP-hard, can be reduced to other NP-hard problems to leverage specialized solvers; for instance, any instance can be transformed into an equivalent problem by constructing a graph where edge weights derive from the off-diagonal Q elements and additional self-loops or gadgets account for diagonal terms, allowing MaxCut algorithms to solve the original . Similar graph-based transformations extend this to problems like the traveling salesman problem via embeddings that map interactions onto TSP tour constraints.

Applications

Maximum Cut Problem

The maximum cut problem seeks to partition the vertices of an undirected graph into two disjoint s such that the total weight of edges with endpoints in different subsets is maximized. For an unweighted graph, this corresponds to maximizing the number of crossing edges; for a weighted graph with edge weights wij>0w_{ij} > 0, it maximizes (i,j)Ewij(xi(1xj)+xj(1xi))\sum_{(i,j) \in E} w_{ij} (x_i (1 - x_j) + x_j (1 - x_i)), where xi{0,1}x_i \in \{0,1\} assigns vertex ii to one subset if xi=1x_i = 1 and the other if xi=0x_i = 0. This objective simplifies to ixi(jiwij)2(i,j)Ewijxixj\sum_i x_i \left( \sum_{j \sim i} w_{ij} \right) - 2 \sum_{(i,j) \in E} w_{ij} x_i x_j, which is a xTQx\mathbf{x}^T Q \mathbf{x} with Qii=jiwijQ_{ii} = \sum_{j \sim i} w_{ij} (the weighted degree of ii) and Qij=Qji=wijQ_{ij} = Q_{ji} = -w_{ij} if (i,j)E(i,j) \in E, or 00 otherwise. Maximizing this form yields the maximum cut value, making Max-Cut a direct instance; equivalently, minimizing xTQx-\mathbf{x}^T Q \mathbf{x} aligns with standard QUBO minimization frameworks. For example, consider an unweighted graph with 5 vertices and edges {(1,2),(1,3),(2,4),(3,4),(3,5),(4,5)}\{ (1,2), (1,3), (2,4), (3,4), (3,5), (4,5) \}. The corresponding QQ matrix is Q=(2110012010103110113100112).Q = \begin{pmatrix} 2 & -1 & -1 & 0 & 0 \\ -1 & 2 & 0 & -1 & 0 \\ -1 & 0 & 3 & -1 & -1 \\ 0 & -1 & -1 & 3 & -1 \\ 0 & 0 & -1 & -1 & 2 \end{pmatrix}.
Add your contribution
Related Hubs
User Avatar
No comments yet.