COMPUTER SCIENCE THEORY

The Science of Arrow Logic: Dependency Graphs

Behind every puzzle board in ArrowsGame lies a mathematical structure known as a Directed Acyclic Graph (DAG). Solving a level is equivalent to computing a valid topological ordering of the graph.

1. Arrow Blocking as Directed Edges

In graph theory, if Arrow A points down a lane containing Arrow B, then Arrow A cannot be removed until Arrow B is removed first. We represent this as a directed dependency edge: B → A (meaning B must precede A in the release sequence).

2. Topological Sorting

A topological sort of a directed graph is a linear ordering of its vertices such that for every directed edge U → V, vertex U comes before V in the ordering. When a player solves an arrow board, every correct tap sequence is literally a valid topological sort of the board's dependency graph.

3. Why Unsolvable Cycles Create Dead Ends

If a subset of arrows forms a directed cycle (e.g. A → B → C → A), no arrow in the cycle can ever be removed first. A graph with a cycle has no topological sort. This is why the ArrowsGame Level Creator runs an automated cycle-detection backtracking solver to guarantee every board is 100% solvable without cyclic deadlocks.

4. In-Degree Zero Nodes (Free Opening Exits)

At any point in the game, an arrow with in-degree = 0 has zero active blockers in front of it. These are the free opening exits highlighted by the Hint system.

Learn How the Solvability Verifier Works →