# Infinity Loop

A problem inspired by the game, Infinity Loop, for iPhone and Android.

Consider a subset $$S$$ of an infinite lattice grid, consisting of all points $$(x,y)$$ where $$x,y$$ are integers ranging from $$1$$ to $$10$$ inclusive.

Let each lattice point be assigned an integer $$a_{x,y}$$ ranging from $$0$$ to $$4$$ inclusive. Define a connection of $$S$$ as an operation in which you add line segments between two horizontally or vertically adjacent lattice points, such that the point $$x,y$$ is connected to exactly $$a_{x,y}$$ segments for all points in the set. Each pair of adjacent points may have at most one line segment connecting them. Points in the corners can have at most 2 line segments, points on the sides 3, and points in the middle 4.

Given that you know all the $$a_{x,y,}$$, is it always possible to tell whether a connection of $$S$$ exists?

Note by Daniel Tan
2 years, 1 month ago

MarkdownAppears as
*italics* or _italics_ italics
**bold** or __bold__ bold
- bulleted- list
• bulleted
• list
1. numbered2. list
1. numbered
2. list
Note: you must add a full line of space before and after lists for them to show up correctly
paragraph 1paragraph 2

paragraph 1

paragraph 2

[example link](https://brilliant.org)example link
> This is a quote
This is a quote
    # I indented these lines
# 4 spaces, and now they show
# up as a code block.

print "hello world"
# I indented these lines
# 4 spaces, and now they show
# up as a code block.

print "hello world"
MathAppears as
Remember to wrap math in $$...$$ or $...$ to ensure proper formatting.
2 \times 3 $$2 \times 3$$
2^{34} $$2^{34}$$
a_{i-1} $$a_{i-1}$$
\frac{2}{3} $$\frac{2}{3}$$
\sqrt{2} $$\sqrt{2}$$
\sum_{i=1}^3 $$\sum_{i=1}^3$$
\sin \theta $$\sin \theta$$
\boxed{123} $$\boxed{123}$$