Advanced maths

Zero forcing number calculator with forcing steps

Find a smallest initial colored set that forces every vertex under the standard zero-forcing rule.

Your numbers

Each row: from,to; optional third weight. Empty allowed for an edgeless graph.

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 a smallest initial colored set that forces every vertex under the standard zero-forcing rule. The output includes an ordered forcing witness rather than just a count. It separates this propagation rule from domination, burning and other coloring processes whose similar diagrams can hide different mathematical definitions.

THE FORMULAZ(G)=min |S| under the unique-uncolored-neighbor forcing rule.

A worked example

Color endpoint zero of path 0–1–2–3. It forces one, then one forces two, then two forces three. One initial color is sufficient and zero is insufficient, so the forcing number is one.

Good to know

Standard undirected simple zero forcing, n≤16; sequential witness. No PSD, skew or probabilistic forcing variant.

Apply the unique-uncolored-neighbor rule

A colored vertex can force an adjacent uncolored vertex only when that neighbor is its sole uncolored neighbor. The forced vertex becomes colored and can later force another. Being adjacent to several colored vertices is not itself a forcing rule, and an uncolored vertex cannot force anything.

Colors are permanent in this process. The task is to choose an initial set from which repeated valid forces eventually color every vertex. The standard convention is used; positive-semidefinite, skew and other zero-forcing variants can have different minima and must not be compared without matching their rules.

Zero forcing propagates from one endpoint along a path01230 forces 1, then 2, then 3Initially colored: {0}One white neighborZ(P4) = 1
Color endpoint zero of path 0–1–2–3. It forces one, then one forces two, then two forces three. One initial color is sufficient and zero is insufficient, so the forcing number is one. Diagram is schematic; labels specify the numerical values.

The Graph burning number calculator with a burning sequence allows fire to spread to every neighbor, with older sources traveling farther. Zero forcing uses the stricter sole-uncolored-neighbor rule and reports the individual forced steps.

Use graph labels rather than color names as inputs

Vertices are indexed zero through n minus one, and the graph is simple and undirected. The solver chooses the initial set instead of asking you to supply a guessed optimum. Optional edge weights are ignored because forcing depends on adjacency and color status, not travel time or weight magnitude.

Isolated vertices can never be forced by another vertex, so every isolated vertex must be initially colored. This is not handled by inventing self-loops. An empty graph on n vertices therefore needs all n initial colors, a useful boundary check on the meaning of the process.

Trace the endpoint path example

For path zero–one–two–three, initially color only zero. Its sole uncolored neighbor is one, so zero forces one. Then one has two neighbors but zero is already colored, leaving two as its only uncolored neighbor. One forces two, and two then forces three.

One initial vertex is sufficient and an empty initial set cannot perform a force, so the minimum is one. Starting instead at an internal vertex leaves two uncolored neighbors and cannot begin with that single color. Initial-set placement matters even when its size is the same.

Read the forcing sequence as a certificate

Every row lists a colored source and the neighbor it forces at that stage. To check a row, update all earlier forces, then count that source’s remaining uncolored neighbors. Exactly one must remain, and it must be the listed target. The final colored set must contain every declared vertex.

The order is sequential. Independent forces might be performed in parallel in another presentation, but this page does not minimize parallel propagation time. A long witness is not evidence of a larger zero-forcing number; the objective counts initial colors, not the number of later forcing rows.

Understand minimum-set verification

Initial subsets are considered by increasing size. For a candidate subset, repeatedly applying valid forces reaches its closure. The standard rule is monotone: coloring more vertices cannot invalidate an already available target by making another neighbor uncolored. A completed closure determines whether that starting set succeeds.

When the first successful cardinality is found, every smaller starting cardinality has already been tested. This provides the minimum proof for graphs up to sixteen vertices. The exact choice of a minimum witness can vary because several sets may achieve the same size. No ranking of uniquely important starting vertices is claimed.

Distinguish zero forcing from nearby propagation models

Domination requires every vertex to be selected or immediately adjacent to a selected vertex; it does not require a unique-neighbor condition or a sequence. Burning spreads automatically from earlier sources while allowing a new ignition each round. Neither rule can be used to verify a zero-forcing witness.

Graph coloring ordinarily assigns different labels to adjacent vertices to avoid conflicts. Here the colored/uncolored distinction tracks propagation and no proper-coloring condition is imposed. The common word coloring does not make a chromatic number and a zero-forcing number interchangeable, even when small examples happen to match.

Use applications with their assumptions stated

Zero forcing relates to several structural questions, including certain matrix minimum-rank bounds and network controllability models. Those connections require their own hypotheses. A forcing number alone does not establish that a physical system is observable or controllable under arbitrary dynamics and measurements.

Use the returned set and sequence as a discrete graph certificate. If an application restricts possible initial vertices, assigns unequal placement costs or allows vertex failures, the current minimum does not solve that constrained variant. Change the model explicitly rather than adding those assumptions after the calculation.

A few questions, answered

Can an uncolored vertex force a neighbor?

No. Only a colored vertex with exactly one uncolored neighbor can force under the standard rule.

Does the number minimize propagation rounds?

No. It minimizes initial colored vertices. The returned sequence is a validity witness, not an optimal parallel schedule.

Why does an isolated vertex need an initial color?

It has no neighbor that could ever force it.

Is zero forcing the same as domination?

No. Domination is immediate neighborhood coverage; zero forcing is a constrained iterative propagation process.

Find your calculator

Start typing to explore the library.