Finding product of $n$ numbers in circle using minimal number of questions about 3 of them Each of $n$ tablets lined on a circle is marked by a number $1$ or $-1$. What is the minimum number of questions you should ask to determine the product of all $n$ numbers ($n \in \mathbb{N}$, $n > 3$), if one question is allowed to know the product numbers of


*

*any three tablets?

*any three tablets placed in a row? 



I converted this problem to problem in $GF(2)$ and suspect that number of questions $Q(n)$ is 
$$Q(n) = \begin{cases}
    \frac{n}{3},& \text{if } n \equiv 0 \mod 3\\
    \lfloor{\frac{n}{3}\rfloor}+3, & \text{if } n \not\equiv 0 \mod 3
\end{cases} $$
for the first case.
And
$$Q(n) = \begin{cases}
    \frac{n}{3},& \text{if } n \equiv 0 \mod 3\\
    n, & \text{if } n \not\equiv 0 \mod 3
\end{cases} $$
for second case.
But I'm not sure if it is a correct result and how to prove it's optimality.
 A: All instances of the problem are isomorphic, so there can be no adaptive strategies – a strategy consist only in a set of triples to ask questions about, with nothing to be gained by making later questions depend on earlier results.
Then minimality implies that the result depends on each answer (since otherwise the question could have been omitted); in other words, up to a sign the result is the product of all answers. For the product of all answers to always be the correct result, each tablet must appear an odd number of times.
If $n\equiv0\bmod3$, asking about $\frac n3$ adjacent triples is clearly optimal, since each tablet must appear at least once.
In variant $1$ of the problem, if $n\equiv1\bmod3$, we can’t include every tablet exactly once, so we need at least $\left\lfloor\frac n3\right\rfloor+1$ questions. For $n\ge7$, we can do this by choosing one tablet to be included $3$ times and including all other tablets once by forming $3$ pairs to go with the singleton once each and forming triples of the rest. This doesn’t work for $n=4$, though; here we need $4$ questions.
In variant $1$ of the problem, if $n\equiv2\bmod3$, we can’t include all tablets exactly once, nor can we include only one tablet $3$ times, so we need at least $\left\lfloor\frac n3\right\rfloor+2$ questions. We can do this by choosing $2$ tablets to include $3$ times and include all other tablets once by choosing $3$ singletons to go with the pair once each and forming triples of the rest. This works even for $n=5$, so here there’s no special case.
To summarize, in variant $1$ of the problem the number of questions required is
$$
\begin{cases}
4&n=4\;,\\
\frac n3&n\equiv0\bmod3\;,\\
\left\lfloor\frac n3\right\rfloor+1&n\equiv1\bmod3\land n\ne4\;,\\
\left\lfloor\frac n3\right\rfloor+2&n\equiv2\bmod3\;.\\
\end{cases}
$$
In variant $2$, consider a boundary between two tablets that are included a different number of times. Disregard all questions in which they were both included. This leaves a different number of questions in which they were included with their two left and right neighbours. The difference must be even, since both tablets were included an odd number of times. But if they were included an even number of times with the same two of their neighbours (say, on the left), these questions were superfluous, since they cancel in the result.
The contradiction shows that there is no such boundary, so all tablets are included the same number of times. If $n\not\equiv0\bmod3$, this number can’t be $1$, so it must be at least $3$, and it’s obvious how to include every tablet $3$ times (by asking about all possible adjacent triples); so the optimum in this case is $n$ questions.
A: In both cases obviously every tablet has to be included in some question, so $Q(n)\geq \frac n 3$ which proves that for $3\mid n$, $Q(n) = \frac n 3$. Now in second case suppose $3 \nmid n$ and $Q(n) \leq n-1$. Let values of tablets be $a_1$, $a_2$ $\dots$ $a_n$. Then there has to be $x$, $x+1$, $x+2$ triplet which we didn't ask. WLOG, assume that $x = 1$. then, 


*

*if $n = 3k+1$, we can't distinguish this case with the case:


$$-a_1,-a_2,-a_3, a_4, -a_5,-a_6, a_7, -a_8,-a_9, a_{10}, \dots , -a_{n-2},-a_{n-1},a_n$$
we changed values of everything but $a_{3t+1}$ for $t\geq 1$.here product of every triplet stayed the same except $a_1\cdot a_2\cdot a_3$.


*if $n=3k+2$, we change values of everything but $a_{3t}, t\geq 1$ and $a_1$, and similarly product of every triplet stays the same except $a_1\cdot a_2\cdot a_3$. 


so we get a contradiction and $Q(n)=n$.
But in the first case your answer is incorrect since $Q(5)=3$, because 
$$abcde=(abc)(abd)(abe)$$. I don't know what the actual answer is though.
