Advanced maths

Eternal graph domination calculator with a winning defence strategy

Find the least number of guards that can defend every attack sequence in the classical one-guard-moves eternal domination game.

Your numbers

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 least number of guards that can defend every attack sequence in the classical one-guard-moves eternal domination game.

THE FORMULAWinning configurations form the greatest set W such that for every unoccupied attacked vertex v, some adjacent guard can move to v and leave a configuration in W.

A worked example

One guard at the center dominates the three-vertex path initially, but defending an endpoint leaves the other endpoint undefended. Two guards can defend forever, so its eternal domination number is2.

Good to know

Simple graphs on1–8vertices. Classical one-guard-moves model, one guard per occupied vertex; attacker chooses an unoccupied vertex, exactly one guard traverses one edge. Enumerate k-subset configurations and compute the greatest safety-game fixed point. Return minimum k, safe starting configurations and a bounded response table. Other eternal-domination models are not silently substituted.

Static coverage is only the starting point

A dominating set places guards so every unoccupied vertex has a neighboring guard. That is enough to answer one immediate attack, but moving the responding guard may spoil future coverage. Eternal domination asks whether a fixed number of guards can keep answering any adversarial sequence of attacks, with each response leaving a configuration that remains defensible.

This page uses the classical one-guard-moves game. An attack occurs at an unoccupied vertex, and exactly one guard moves across an edge onto that vertex. Other guards stay in place. No two guards occupy the same vertex. Rules allowing all guards to move, eviction attacks or directed motion define other games and must not be silently substituted for these rules.

Two guards maintain a closed defence set on a three-vertex path012Two guards start at {0,2}Attack1: move0 to1New configuration: {1,2}Attack0: move1 to0Return to {0,2}
Scroll across to see the full diagram.
One guard at the center dominates the three-vertex path initially, but defending an endpoint leaves the other endpoint undefended. Two guards can defend forever, so its eternal domination number is2.

Compare this with the Minimum dominating set calculator from graph edges. Find the least guards that can defend every infinite sequence of attacks by moving one adjacent guard onto each attacked unoccupied vertex while preserving a defensible configuration. Ordinary domination is static; the existing cops-and-robber game has a moving visible adversary and different turn rules.

Specify the entire finite graph

Use simple undirected edge pairs and a declared vertex count. The labels remain the same in configurations and response tables. Isolated vertices require guards because no other vertex can respond to an attack there. Loops and repeated edges are outside the supplied simple-graph convention; a repeated row is not an additional movement option.

The small vertex bound makes all guard configurations finite and enumerable. For k guards, a configuration is a k-element subset of vertices rather than an ordered list of individual guard identities. This removes irrelevant permutations of indistinguishable guards. Choosing a configuration is different from choosing an initial path for a moving robber, so the cops-and-robber calculator cannot provide this game’s answer.

Build a finite safety game

For a candidate guard count, list the dominating configurations. From a configuration and an attacked unoccupied vertex, enumerate legal responses by moving one adjacent occupied vertex to the attack. A successor must itself belong to the set of configurations that can continue defending. The attacker chooses the challenge; the defender needs at least one successful response to every possible challenge.

Begin with all dominating configurations and repeatedly remove any configuration that has an attack with no successor still in the current set. Continue until no more configurations can be removed. This greatest fixed point characterizes positions that can survive indefinitely. It is not enough to simulate a few attacks or to find a cycle that responds only to one cooperative attack pattern.

Why a finite certificate covers infinite play

A surviving configuration has a legal successor in the surviving set for every possible attack. Choose one such response for each challenge. After that response, the same condition holds again. Repeating the argument proves that the defender can continue for arbitrarily many turns, even though the certificate contains only finitely many configuration-response entries.

Conversely, a removed configuration receives a finite stage of elimination: some attack leads only to configurations removed earlier or to no legal response. These layers explain how an attacker can force failure. The calculator need not print every losing sequence, but an optimum guard count relies on resolving the game for all smaller guard counts rather than merely finding one durable starting arrangement.

The three-vertex path needs two

On path0–1–2, one central guard initially dominates both endpoints. If vertex0 is attacked, that guard must move from1 to0. Vertex2 then has no neighboring guard, so a subsequent attack at2 cannot be defended. Starting one guard at an endpoint is already nondominating. Thus one guard cannot win the eternal game.

Two guards suffice. Starting at endpoints0 and2, respond to an attack at1 by moving either adjacent guard there. From configuration{1,2}, the only unoccupied vertex is0, and moving the guard at1 to0 restores{0,2}. The symmetric response works on the other side. These safe configurations close under all attacks, establishing a two-guard winning strategy.

Interpret the response table

A strategy row identifies a current occupied subset, an attacked vertex, the responding guard’s old location and the successor occupied subset. Guard identities are not required. Check that the attacked vertex was empty, the old location was occupied, their pair was an input edge, and exactly one location changed. Then verify that the successor remains inside the winning configuration set.

The printed strategy table may be capped for readability while the fixed-point computation still covers every state. Display truncation and computation truncation are different. A limited preview can accompany a complete result when its completeness is stated; an interrupted fixed-point or guard-count search cannot support an exact minimum. The page should state both limits rather than hide missing states behind an optimistic label.

Use the result within its rules

A complete graph needs one guard, because a guard can move directly to any attacked vertex. An edgeless graph on n vertices needs n guards, with every vertex initially occupied. These are useful checks, but most graphs require the actual safety-game computation. Relabeling vertices preserves the minimum and simply renames a valid strategy.

The result is a mathematical guarantee for the stated finite turn-based game, not a real surveillance staffing recommendation. Travel time, simultaneous attacks, sensing failures and directed restrictions are absent. If those features matter, a new operational model is needed. Here, the value comes from separating static domination from the ability to maintain coverage after an adversary repeatedly forces movement.

A few questions, answered

Can all guards move after an attack?

No. This page uses exactly one moving guard per attack, the classical eternal-domination model.

Why is an ordinary dominating set insufficient?

Moving to defend the current attack can leave a different vertex undefended on the next turn.

How can a finite table guarantee endless defence?

Every attack from a winning configuration has a response returning to the finite winning set, so the argument repeats indefinitely.

Are guard identities important?

No. Configurations are occupied vertex subsets; the response specifies which occupied location changes.

Find your calculator

Start typing to explore the library.