Skip to content

[Model] MaximumBipartiteSubgraph #887

@isPANN

Description

@isPANN

Motivation

MAXIMUM BIPARTITE SUBGRAPH (GT25) from Garey & Johnson, A1.1. Find a bipartition of vertices maximizing the number of edges crossing the partition (equivalently, find a maximum-size bipartite subgraph). NP-hard even for cubic graphs (Garey, Johnson, Stockmeyer 1976). Polynomial for planar graphs (Hadlock 1975, Orlova and Dorfman 1972). For simple unweighted graphs, this is equivalent to MaxCut with unit weights.

This issue proposes adding the MaxCut/SimpleGraph/One variant with alias MaximumBipartiteSubgraph, connecting the G&J GT25 problem to the existing reduction graph. The unweighted variant serves as target for R268 (Maximum2Satisfiability → MaximumBipartiteSubgraph).

Implementation

Variant: MaxCut<SimpleGraph, One> — MaxCut with unit edge weights.
Alias: MaximumBipartiteSubgraph

This reuses the existing MaxCut model infrastructure. The implementation requires:

  1. Register MaxCut/SimpleGraph/One in declare_variants!
  2. Add MaximumBipartiteSubgraph as an alias in the CLI

Definition

Name: MaxCut/SimpleGraph/One (alias: MaximumBipartiteSubgraph)
Reference: Garey & Johnson, Computers and Intractability, A1.1 GT25; Garey, Johnson, Stockmeyer 1976

Mathematical definition:

INSTANCE: Graph G = (V, E).
OBJECTIVE: Find a partition of V into disjoint sets V₁, V₂ that maximizes the number of edges with one endpoint in V₁ and the other in V₂.

Equivalently: find a subset E' ⊆ E of maximum size such that (V, E') is bipartite.

Variables

  • Count: n = |V| (one per vertex)
  • Per-variable domain: {0, 1} (partition side)
  • Meaning: The bipartition assignment. An edge {u,v} crosses the partition iff the endpoints are on different sides. The objective maximizes the number of crossing edges.

Schema (data type)

Uses existing MaxCut<SimpleGraph, One>:

Field Type Description
graph SimpleGraph The input graph G = (V, E)
edge_weights Vec<One> Unit weights (all equal to 1)

Complexity

  • Best known exact algorithm: Same as MaxCut: O*(2^(0.7907 · num_vertices)) via reduction to MaxTriangle + fast matrix multiplication (Williams 2004, ω < 2.3714).
  • Complexity string: "2^(0.7907 * num_vertices)"
  • Special cases: Polynomial for planar graphs via T-join / matching (Hadlock 1975). Approximable: greedy gives 1/2 approximation; SDP gives 0.878 (Goemans-Williamson 1995).

Extra Remark

Full book text:

INSTANCE: Graph G = (V,E), positive integer K ≤ |E|.
QUESTION: Are there a subset E' ⊆ E with |E'| ≥ K and a partition of V into disjoint sets V_1, V_2 such that each edge in E' has one endpoint in V_1 and one endpoint in V_2?

Reference: Transformation from MAXIMUM 2-SATISFIABILITY [Garey, Johnson, and Stockmeyer, 1976].
Comment: NP-complete even if every vertex in G has degree at most 3 [Garey, Johnson, and Stockmeyer, 1976]. Solvable in polynomial time for planar graphs [Hadlock, 1975], [Orlova and Dorfman, 1972].

Note: The original G&J formulation is a decision problem with threshold K. We use the equivalent optimization formulation: maximize the number of bipartite edges.

How to solve

  • It can be solved by (existing) bruteforce. (Enumerate all 2^n partitions; count crossing edges; return maximum.)
  • It can be solved by reducing to integer programming. (Inherits MaxCut's existing ILP reduction with unit weights.)
  • Other:

Reduction Rule Crossref

Example Instance

Input:
Graph G with V = {v0, v1, v2, v3, v4} (5 vertices), 7 edges:
E = {(v0,v1), (v0,v2), (v0,v3), (v1,v2), (v1,v4), (v2,v3), (v3,v4)}

Optimal partition: V₁ = {v0, v2, v4}, V₂ = {v1, v3} (config = [0, 1, 0, 1, 0]).
Crossing edges: (v0,v1)✓, (v0,v3)✓, (v1,v2)✓, (v1,v4)✓, (v2,v3)✓, (v3,v4)✓ — 6 out of 7 edges.
Non-crossing: (v0,v2) — both in V₁.

Why 7 is impossible: Edge (v0,v1,v2) forms a triangle — at least one edge must have both endpoints on the same side. So at most 6 edges can cross.

Suboptimal partition: V₁ = {v0, v4}, V₂ = {v1, v2, v3} — 5 crossing edges.

Expected Outcome

Optimal value: Max(6) — the maximum number of bipartite edges is 6 out of 7. Out of 32 partitions, there are 6 distinct crossing-edge counts: 0, 2, 3, 4, 5, 6.

Metadata

Metadata

Assignees

No one assigned

    Labels

    GoodAn issue passed all checks.modelA model problem to be implemented.

    Type

    No type

    Projects

    Status

    Done

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions