Total amateur here. I'm working on a problem related to enumerating $NxN$ mazes. As part of the problem, I'm trying to count the number of ways that a line of $N$ one-armed people can hold hands. Adjacent people can hold hands to form a pair, but pairs of pairs can't be adjacent. For small $N$'s (up to six) I've manually generated the permutations, and it seems that the answer might be $$\mathrm{fib}(N+2) - 1$$ $\mathrm{fib}(N)$ being the $N$th fibonacci number. I have no idea why though. Any ideas?
Non-adjacent pairs of pairs
-
0For the one-armed part, does every person HAVE to be part of a pair? If so, I reckon there's only one way in a line. – 2017-01-27
-
0No. I think I may not have stated the problem optimally. If every one armed person can hold hands with at most one neighbor, what is the cardinality of the set of all possible hand holding combinations. – 2017-01-28
-
0Or asked another way: Amy I stupid for not grokking why the number of independent sets of a list of N items is Fibonacci like? And the answer appears to be yes. Yes I am :) – 2017-01-28
3 Answers
A quick induction will help us.
Suppose you know the number of way $n$ (one handed) people can hold hand $H(n)$.
Now, add another people at the right end.
Either this person don't hold hand with the one on the left, and we're back at the previous situation
Either this person hold hand with the one on the left, we "remove" this pair, and we're back to the situation with $n-1$ people.
Hence $H(n+1) = H(n) + H(n-1)$ : here come the Fibonnacci numbers
-
0That's beautiful, never would have thought of that! – 2017-01-28
If you have a line of $N$ people holding hands, either the last person is holding hands with the one before and you have a line of $N-2$ people holding hands or the last person is not holding hands and you have a line of $N-1$ people holding hands. This shows the recurrence is the Fibonacci one. Then you just have to get the index right. There is one way for nobody to hold hands and one way for one person to hold hands, so it looks to me like Fibonacci$(N+1)$
I think I follow. Thanks.
Does this reasoning extend to two or more dimensions? If it were a grid of NxN one armed people, and each person could hold hands with only one of four neighbours then what is cardinality of the set of all possible hand holding combinations?
If we extend into 2d in such a way that the possible pairs of held hands are the cells of a grid, and the one armed people are on the vertices, then it appears that the answer is the number of independent sets on the grid, OEIS A006506.
BUT. If A006506 is a natural extension of the fibs into 2d, I fail to see the pattern. Can the terms of A006506 be generated by some '2d' analog of the Fibonacci sequence rule? Is there some natural seeming function on the Fibonacci numbers that converts Fibonacci terms into A006506 terms? If so, what it is escapes me.