189. Numbers are written on cards, each of which is either "+1" or "-1". It is allowed to point to three cards and ask: "What is the product of the numbers on these cards?" (the numbers themselves are not told to us). What is the smallest number of such questions that need to be asked to find out the product of the numbers on all the cards, if the number of cards is: a) 30; b) 31; c) 32? In each case, prove that it is impossible to manage with fewer questions.

d) Fifty numbers, each of which is either "+1" or "-1", are written around a circle. It is required to find the product of all these numbers. In one question, the product of three consecutive numbers can be found. What is the smallest number of questions that need to be asked?
189. Answer: a) 10 questions; b) 11; c) 12; d) 50.

a) We divide 30 numbers into 10 triples and find the products in these triples. It is clear that fewer questions will not suffice, as each number must be part of some triple.

b) The product of the first seven numbers is found by multiplying $a_{1} a_{2} a_{3}, a_{1} a_{4} a_{5}$, and $a_{1} a_{6} a_{7}$, while the remaining 24 numbers are divided into triples as in part a). In this case, it is clear that fewer questions will not suffice.

c) The product of the first 5 numbers is found by multiplying $a_{1} a_{2} a_{3}, a_{1} a_{2} a_{4}$, and $a_{1} a_{2} a_{5}$, and the rest are divided into triples.

Since it is clear that every number must be part of some triple, the number of questions is at least 11.

In this case, one of the numbers is part of exactly two triples (if more than two, there will be a number not part of any triple). In the product of all 11 triples, the square of this number will appear, and thus we will not know the product of all the numbers.

d) With 50 questions, we can find the products $a_{1} a_{2} a_{3}, a_{2} a_{3} a_{4}, a_{3} a_{4} a_{5}, \ldots, a_{50} a_{1} a_{2}$. Multiplying them, we get the cube of the product of all the numbers, which coincides with the product itself.

Fewer than 50 questions are insufficient. For example, if we do not know the product of some triple $a_{1} a_{2} a_{3}$, there exist two sets with different products for which the products of all other triples coincide: a set where $a_{1} = a_{3} = a_{6} = a_{9} = \ldots = a_{48} = 1$, and the other numbers are -1, and a set of all ones. All products in the first set, except for $a_{1} a_{2} a_{3}$, are 1. In the second set, all products are 1.

$\nabla$ For $n$ numbers, among which the product of any three can be found, as in parts a) - c), the minimum number of questions is:
$k$, if $n = 3k$; $k+1$, if $n = 3k+1$; $k+2$, if $n = 3k+2$. If only the product of three numbers written in a circle is allowed, then for $n$ divisible by 3, $n / 3$ questions are needed, and for $n$ not divisible by 3, all $n$ questions are needed.