2

I tried to study the puzzle involving light bulbs placed on a circle with the following rule : each bulb has a switch and flipping it also flip the two adjacent switches. Given an initial configuration, the aim is to turn every bulb on.

I proceed as follow. Let $n\in\mathbb{N}^*$. For all $i\in\{1,\dots,n\}$, we define a function $\alpha_i$ such that : \begin{align*} \alpha_i\colon \mathbb{F}_2^n &\longrightarrow\mathbb{F}_2^n\\ (l_1,\dots,l_n) &\longmapsto \alpha_i(l):=(l_1,\dots, l_{i-2},l_{i-1}+1,l_i+1,l_{i+1}+1,l_{i+2},\dots,l_n) \end{align*} where indices are written modulo $n$. I then realized that the problem could be seen as the study of a group action of the power set (with the symmetric difference $\Delta$) : \begin{align*} \alpha\colon (\mathcal{P}(\{1,\dots,n\}),\Delta)\times\mathbb{F}_2^n &\longrightarrow\mathbb{F}_2^n\\ (I,l) &\longmapsto \alpha_I(l):=l+\sum_{i\in I}u_{\sigma^{i-1}} \end{align*} where $u=(1,1,0,\dots,0,1)$ belongs to $\mathbb{F^n_2}$, $\sigma$ denotes the circular shift $(1\ 2\ \dots \ n)$ and, for $x=(x_1,\dots,x_n)\in\mathbb{F}_2^n$, $x_{\sigma^{i-1}}:=(x_{\sigma^{i-1}(1)},\dots,x_{\sigma^{i-1}(n)})$.

My question is : can it be generalized to an other finite field? The $\alpha_i$'s can be used to study the problem over any finite field but it seems that the group action $\alpha$ cannot help since the symmetric difference $I\Delta I=\emptyset$ which implies that it can't "match" the characteristic of many fields. Can anyone think of a useful generalization of the symmetrical difference?

  • Can't you just replace $\mathcal{P}([n])$ and symmetric difference by the (underlying abelian group of) the $n$-dimensional vector space over any finite field $\mathbb{F}_q$? – regr4444 Jun 19 '25 at 22:40
  • That's exactly right. I should have thought of it, but thank you! – valtore1234 Jun 20 '25 at 05:56
  • 1
    Related. There the states of the lamps were strictly on/off (simpler than in your case), but the game was generalized in another way by leaving the number of adjacent affected lamps as a variable. – Jyrki Lahtonen Jun 22 '25 at 03:56
  • Your answer to the related post is quite complete! I recently found some of the results you wrote but the way you describes them is pleasant – valtore1234 Jun 24 '25 at 20:41

1 Answers1

3

This can be generalized as follows: We have $n$ bulbs, and each bulb has $m$ levels of luminance, and each switch controls three neighboring bulbs. Every flipping will increase the level of luminance by one (if there is no higher level, the flippingwill turn the bulb off). Is it guaranteed that all bulbs can be turned off at the same time, no matter what the initial configuration is?

It's better to think of this as a linear algebra problem. That is, if the $n$ following vectors spans $(\Bbb Z/m\Bbb Z)^n$: $$v_i=(0, \cdots, 0, \underbrace{1}_{(i-1)\text{ mod } n}, \underbrace{1}_{i}, \underbrace{1}_{(i+1)\text{ mod } n}, 0, \cdots, 0)$$

They form a matrix $A_n$. And it's possible to reach any configuration iff $A_n\in GL_n(\Bbb Z/m\Bbb Z)$ iff $\det A_n\in (\Bbb Z/m\Bbb Z)^*$. I don't see a simple way to evaluate the determinant, but through the Sage code:

def f(n):
    L = [[1 if j==i or j==(i-1) % n or j==(i+1) % n else 0 for j in range(n)] for i in range(n)]
    A = matrix(L)
    return A.det()

numerical evidence suggests for $n\ge 3$, $$\det A_n = \begin{cases} 0 & \text{ if } n\equiv 0, 3\mod 6 \\ 3 & \text{ if } n\equiv 1, 5\mod 6 \\ -3 & \text{ if } n\equiv 2, 4 \mod 6\end{cases}$$

I'll leave the above as an exercise for those interested.

Therefore, it's possible to turn off all the bulbs for all initial configurations, iff $3\not\mid mn$.

We can consider similar questions when the level of luminance of the bulbs form non-cyclic abelian groups (such as $\mathbb F_{p^k}$ for $k>1$), but it would be difficult to design rules for switches and map them to practical circuits.

Edit.

Here is how to compute $\det A_n=\sum_{\sigma\in S_n}[\sigma]$ where $[\sigma]=\text{sgn}(\sigma) A_{1\sigma(1)}A_{2\sigma(2)}\cdots A_{n\sigma(n)}$. For $[\sigma]\not=0$, we have $|i-\sigma(i)|\le 1$ for all $i$. Consider the cycle $(1\sigma(1)\sigma(\sigma(1))\cdots a)$ that contains $1$. If the length is at least $3$, then since $a\not=1$ and $a\not=\sigma(1)$, there is only one possibility left for $a$. That is, the cycle has to be either $(123\cdots n)$ or its inverse. Hence, we only need to compute the sum of $[\sigma]$'s for which $\sigma$ can be decomposed as a product of disjoint transpositions. Define $P_n$ be the sum of $(-1)^{m_P}$, where $P$ runs over all partitions of $\{1, \cdots, n\}$ in which every subset is either a singleton or consists of a pair of neighboring elements ($1$ and $n$ are not neighbors when $n\ge 3$), and $m_P$ is the number of pairs in $P$. It's easy to see $P_n = P_{n-1} - P_{n-2}$. And $\det A_n = 2(-1)^{n+1} + 2P_{n-2} - P_{n-1}$.

Just a user
  • 22,048