Skip to content
m·amathatlas
ExploreAboutOpen problemsCited authorsMy libraryFeedback
Sign in
FRENES
Loading views…Recent views only, across all languages. Vercel history is unavailable for this page. Repeat visits in the same tab are grouped for 30 minutes.
ShareLinkedInXFacebookWhatsApp
← All open problems
Unanswered question

Frog game on tree graphs is in NP but not in P (NP-complete)?

CombinatoricsDynamics & ergodic theoryTheoretical computer science

Imported on November 28, 2026

The forum classified this question as unanswered when collected. This does not certify an open research problem; check the answers and revision history at the source.

Read the question with its definitions and background below. The source provides the full formulation and further discussion; the glossary and Wikipedia links offer additional reading aids.

Problem statement

Problem

We can restrict ourselves to tree graphs. What is the complexity of the following problem?

Let GGG be simple connected graph with vertices in VVV, edges in EEE, and a vertex weighted function fff (counting frogs on vertices). Given GGG and a vertex v∈Vv\in Vv∈V, is the frog game solvable in vvv?

Frog game rules

To play the frog game, start by placing one frog on each vertex: f0(u)=1,u∈Vf_0(u)=1,u\in Vf0​(u)=1,u∈V.

Given GGG and fk=ff_k=ffk​=f after kkk moves have been made, a new move consists of:

Selecting two nonempty (contain at least one frog, i.e. f(v1),f(v2)>0f(v_1),f(v_2)\gt 0f(v1​),f(v2​)>0) vertices v1,v2∈Vv_1, v_2\in Vv1​,v2​∈V that are connected by a path of f(v1)f(v_1)f(v1​) distinct edges.

Moving all frogs from v1v_1v1​ to v2v_2v2​: fk+1(v1)=0f_{k+1}(v_1)=0fk+1​(v1​)=0 and fk+1(v2)=fk(v2)+fk(v1)f_{k+1}(v_2)=f_k(v_2)+f_k(v_1)fk+1​(v2​)=fk​(v2​)+fk​(v1​).

That is, all frogs on a vertex vvv must jump over exactly f(v)f(v)f(v) distinct edges and onto a nonempty vertex. (Imagine the vertex being a lily pad and sinking after frogs jump off of it.).

We say that the frog game is solvable in some vertex v∈Vv\in Vv∈V if there exists a sequence of moves such that all frogs end up in the vertex vvv: Meaning f0,f1,…,fn−1,n=∣V∣f_0, f_1, \dots, f_{n-1}, n=|V|f0​,f1​,…,fn−1​,n=∣V∣ where fn−1(u)=∣V∣f_{n-1}(u)=|V|fn−1​(u)=∣V∣ for u=vu=vu=v and fn−1(u)=0f_{n-1}(u)=0fn−1​(u)=0 for u≠vu\ne vu=v.

Here is a short presentation with examples.

I suspect this problem is in NP but not in P (NP-complete?), can we prove this?

Algorithmic approach

We can solve this problem recursively.

For example, given a path graph "v1−v2−v3−v4−v5v_1 - v_2 - v_3 - v_4 - v_5v1​−v2​−v3​−v4​−v5​" and the goal v2v_2v2​;

We compute the multiset of path distances from the goal v2v_2v2​ to other vertices: D={1,1,2,3}D=\{1,1,2,3\}D={1,1,2,3}.

We consider all partitions of ∣V∣−1=4|V|-1=4∣V∣−1=4 that can be made with elements of DDD:

A.4=3+1B.4=2+1+1\begin{array}{} \text{A.} & 4 & = & 3 + 1\\ \text{B.} & 4 & = & 2 + 1 + 1\\ \end{array}A.B.​44​==​3+12+1+1​

Now we check each partition by assigning the respective vertices as new sub-goals (in all possible ways) and applying this procedure recursively. (Set f(w)=0f(w)=0f(w)=0 for unusable vertices www within the sub-goal.)

A.\text{A.}A. For example, when looking at the first partition, we have two possible selections of sub-goals. We can either consider v1v_1v1​ or v3v_3v3​, as both could be "111" in "4=3+14=3+14=3+1".

If we take v3v_3v3​, then the other sub-goal is graph "v1−0−0−v4−v5v_1 - 0 - 0 - v_4 - v_5v1​−0−0−v4​−v5​" in v5v_5v5​, but 222 cannot be partitioned using elements of D={4,1}D=\{4,1\}D={4,1}, therefore this selection of sub-goals is impossible.

If we take v1v_1v1​, then the other sub-goal is graph "0−0−v3−v4−v50 - 0 - v_3 - v_4 - v_50−0−v3​−v4​−v5​" in v5v_5v5​, with D={1,2}D=\{1,2\}D={1,2} and one possible partition "2=22=22=2". Going one step deeper, we get a trivial sub-sub-goal of "v3−v4v_3 - v_4v3​−v4​" in v3v_3v3​ with trivial D={1}D=\{1\}D={1} and partition "1=11=11=1". Therefore, this partition and selection of sub-goals gives a solution of the problem in v2v_2v2​. Therefore, the graph is solvable in v2v_2v2​.

B.\text{B.}B. For example, when looking at the second partition, the jumps at distance 111 are trivial and only possible selection for sub-goals, and the other sub-goal is to have 222 frogs at vertex v4v_4v4​ using the remaining usable vertices v4−v5v_4-v_5v4​−v5​; that is, it is again a trivial sub-goal with D={1}D=\{1\}D={1} and partition "1=11=11=1". Therefore, the graph is solvable in v2v_2v2​.

In general, this procedure is exponential at worst. When the vertex is not solvable, we will need to check all partitions and all selections of sub-goals.

Can we do better? (Is it possible that this problem is in P?)

Note that it is not hard to prove that path graphs PkP_kPk​ specifically, i.e. "v1−v2−⋯−vkv_1-v_2-\dots-v_kv1​−v2​−⋯−vk​", are solvable in every vertex for every k∈Nk\in\mathbb Nk∈N. That is, certain classes of graphs can be solved in terms of theorems, by explicitly constructing sequences of jumps that solve vertices or showing certain vertices are never solvable.

But I doubt that can be done for all tree graphs.

Note that I posted a similar question a long time ago on Computer Science, asking about a better approach than the exponential partition analysis (here I ask about complexity class), but there I got nothing new after two bounties. (Not sure if this counts as a cross-post, but I'll link it here just in case).

Statement and context adapted from MathOverflow · Vepir

CC BY-SA 4.0 · Formatting adapted; mathematical formulas preserved · Source history

A few useful definitions

Graph
A set of vertices connected by edges. A vertex’s degree counts the incident edges; the statement specifies whether directions or multiple edges are allowed.

Topics : graph-theory · computational-complexity · trees · discrete-dynamical-systems

Authors listed by the source : Vepir

Sources and original status

  • MathOverflow Status in source : unanswered at collection

Last activity on the question : October 18, 2022

Coverage, sources and method

This count measures imported entries, including distinct variants. It is not a count of all open mathematical questions worldwide. One entry may belong to several fields and sources.

This directory is neither exhaustive nor updated in real time. “Reported open” describes the source classification observed at import; imported entries have not each undergone independent mathematical verification. The 32 explained entries were reviewed separately.

Formal Conjectures: only “research open” statements with no reported formal proof are retained; their tag is checked in a pinned repository revision. Variants remain distinct. A “sorry” placeholder is not sufficient to establish open status.

Erdős: solved or independent problems and entries with a Lean solution are excluded, including “open (Lean)”. Exact matches to the main Formal Conjectures statements are merged.

Open Problem Garden: the open index is checked against the solved index; spam, identified clones and some outdated statuses are excluded. Statements and definition context are attributed to their original pages; formulas are preserved and the content remains under the GFDL. Recognized duplicates across sources are merged; this does not resolve every mathematical equivalence.

OEIS: direct extraction of conjectural comments and formulas, one entry per sequence, excluding mentioned resolutions. MathOverflow and Math Stack Exchange: questions classified as unanswered by their API, excluding closed posts and non-research categories. They remain distinct from problems reported open. This is a partial, dated collection; every entry credits its authors and license.

Documented exclusions account for recent announcements and conflicting statuses. A stronger variant or a special case can remain open after a different statement is settled.

Attribution: The Formal Conjectures Authors; teorth/erdosproblems and contributors; Open Problem Garden and contributors. Each source retains its license.

  • Formal Conjectures · 1,924 · Apache-2.0 / CC-BY-4.0
  • Erdős Problems (teorth) · 622 · Apache-2.0
  • Open Problem Garden · 404 · GFDL (source content); only title/category/link metadata imported
  • OEIS · 18,857 · CC BY-SA 4.0
  • MathOverflow · 19,035 · CC BY-SA (version on each entry)
  • Mathematics Stack Exchange · 35 · CC BY-SA (version on each entry)
Report a development or correction
mathatlas

An independent atlas to understand, read, and question research.

The papers present claimed results at different stages of verification.
NewsletterShare feedbackAbout Data and privacy
Created by Sonny Mupfuni