Digi Comp II

Limits 1s, 512 MB

The Digi Comp II is a machine where balls enter from the top and find their way to the bot-tom via a certain circuit defined by switches.Whenever a ball falls on a switch it either goes to the left or to the right depending on the state of the switch and flips this state in the process.Abstractly it can be modelled by a directed graph with a vertex of outdegree2for each switch and in addition a designated end vertex of outdegree0. One of the switch vertices is the start vertex, it has indegree0. Each switch vertex has an internal state (L/R). A ball starts at the start vertex and follows a path down to the end vertex, where at each switch vertex it will pick the left or right outgoing edge based on the internal state of the switch vertex. The internal state of a vertex is flipped after a ball passes through. A ball always goes down and therefore cannot get into a loop.

This is a companion discussion topic for the original entry at https://toph.co/p/digi-comp-ii