Advanced maths

Maximum balanced biclique calculator with two vertex classes

Find the largest complete bipartite subgraph with equally many selected vertices on both supplied sides.

Your numbers

Left vertices use local labels 0 through L−1.
Right vertices use local labels 0 through R−1.
One row: left right, using separate zero-based side indices.

Calculated on your device. Your inputs aren’t sent to us.

Your result

Ready when you are

Enter your inputs and select Calculate.

Report an issue

Behind the numbers

How this calculation works

Find the largest complete bipartite subgraph with equally many selected vertices on both supplied sides. Return its side size and every cross edge in one optimum.

THE FORMULAMaximize k subject to |A|=|B|=k and A×B⊆E. For each left subset A, find its common right neighbors.

A worked example

The default has all nine edges between left 0,1,2 and right 0,1,2, plus the separate edge 3–3. The largest balanced biclique is K3,3: side size 3 and six total vertices.

Good to know

1–10 vertices per side; at most 100 distinct cross edges. Separate zero-based side labels; no weights.

What balanced size measures

A balanced biclique selects the same number of vertices from two specified sides and requires every possible connection between them. Its reported side size is k, while its total number of selected vertices is 2k. Distinguishing those quantities prevents a six-vertex answer from being mistaken for side size six.

Completeness is stricter than density. A candidate with eight of the nine cross connections required for a three-by-three block is not a K3,3, however close it looks. Conversely, edges touching vertices outside the selected block do not spoil that block: the calculation searches for a subgraph, not a whole connected component.

Nine edges certify K3,3001122Left: 3 verticesRight: 3 verticesCross edges: 3² = 9Balanced size = 3
Scroll across to see the full diagram.
Separate side labels 0–2 form a complete three-by-three block; k=3.

Compare this with the Maximal clique calculator from graph edge list. Find equally sized disjoint classes with every cross pair adjacent; within-class adjacency is irrelevant and ordinary clique search is a different condition.

Entering the two sides correctly

Left and right labels occupy separate namespaces. A row containing 0 0 connects left vertex zero to right vertex zero; it is a valid cross edge rather than a forbidden self-loop. Declare both side sizes explicitly so vertices without any incident cross edge remain represented in the input.

Each row supplies exactly one left index followed by one right index. Duplicate rows and indices outside the declared sides are rejected. Do not combine the two sides into a single numbering system or add within-side edges. Those changes describe a different graph from the bipartite instance this calculator accepts.

Reading the default three-by-three block

In the supplied example, left vertices zero, one and two each connect to right vertices zero, one and two. These nine edges form the selected complete block. Left vertex three only connects to right vertex three, so that additional edge provides a separate balanced block of side size one.

The larger block has side size three, six selected vertices and nine selected cross edges. A side-size-four answer would require all sixteen cross edges between the four supplied vertices on each side. Missing connections between the large block and the final pair therefore rule it out without needing a picture.

Why common neighborhoods solve the search

Fix a nonempty subset of left vertices. A right vertex can join their biclique precisely when it is adjacent to every selected left vertex. Intersecting their neighborhoods identifies all eligible right vertices. If that intersection contains at least as many vertices as the left subset, an equally sized right subset completes a balanced candidate.

The implementation examines every left subset and keeps the largest feasible candidate. For a fixed left subset, selecting extra eligible right vertices would break balance, so only the required number is retained. This exhaustive finite search establishes the maximum side size within the supported input bounds rather than returning a density heuristic.

Checking the returned witness

The left-vertex and right-vertex lists describe one optimum, and the cross-edge list expands their Cartesian product. Count both vertex lists and confirm they have equal lengths. Then check that each displayed pair appears in the original input; a side-size-k witness must contain exactly k squared distinct cross edges.

There may be several different optimum blocks. Reordering valid edge rows can affect which tied witness is displayed without changing the maximum size. If the input has no edges, the maximum size is zero and both selected lists are empty. Isolated vertices alone cannot produce a positive balanced biclique.

Bicliques versus matching and cover problems

A matching selects edges that have no shared endpoints, whereas a biclique demands all cross connections among its chosen endpoints. Three independent edges form a matching of size three but need not contain even a two-by-two complete block. A matching calculator therefore cannot substitute for this objective.

A biclique cover asks for several complete blocks whose edges jointly cover another edge set. This page instead returns one largest balanced block, leaving unrelated edges uncovered. Likewise, a large unbalanced block such as K2,7 contributes balanced side size two, because only two vertices may be selected from either side.

Limits and useful comparison cases

The ten-per-side restriction makes exhaustive subset examination practical; it is not a claim that larger instances are easy. The implementation accepts simple unweighted bipartite data only. It does not infer a bipartition from general edges, optimize total edge weight or require chosen vertices to satisfy additional application-specific constraints.

For a complete bipartite input with side sizes L and R, the answer must be min(L, R). Removing edges cannot increase the answer, while adding valid cross edges cannot decrease it. These checks are useful when editing a network export and comparing the effect of a proposed missing or new connection.

A few questions, answered

Does side size three mean three vertices altogether?

No. It means three vertices on each side, six altogether, with nine cross edges.

Is the row 0 0 a self-loop?

No. The first zero is a left vertex and the second a distinct right vertex.

Must every input vertex belong to the answer?

No. The selected complete balanced block may omit other vertices and edges.

Can a K2,7 give side size seven?

No. Its largest equally sized selection has two vertices on each side.

Find your calculator

Start typing to explore the library.