# In an infinite maze of squares with p% walls, will you be boxed in?

If you are in an infinite maze of squares, where each border between two squares has a $$p$$% chance of being a wall, what is the probability $$F(p)$$ that you are trapped in a finite space?

For a better math definition of the problem:

First imagine a finite $$n \times n$$ grid of squares, where $$n$$ is odd. The border between two squares or between a square and the outside has a $$p$$% chance of being a wall. You start in the middle. $$f(n,p)$$ is the probability that you are trapped in the $$n \times n$$ maze. $$F(p)=\lim_{n\to\infty}f(n,p)$$. What is $$F(p)$$, or at least what can we know about it?

• Welcome to Puzzling, take our tour! Could you please provide proper attribution for this question? Or did you come up with it yourself? Jan 18 at 4:53
• Exactly this question is the subject of the field of percolation: en.wikipedia.org/wiki/Percolation_theory. It turns out that F(p) is 0 for p<1/2 and 1 for p>=1/2. Jan 18 at 12:24
• You mean F(p)<1 for p<1/2 - there is always a positive probability of the starting square being boxed in. Jan 18 at 13:29
• Er, sorry, yes. I was mixing up the probability that a given place (say the origin) is part of an infinite component, with the probability that there is an infinite component. I don't know whether the precise question asked here is one whose answer is fully known. Jan 18 at 15:45
• @bobble I came up with the question myself when I was thinking about the backrooms but maybe someone else has thought of it before me. I am not sure. Jan 19 at 5:40