[Archive!] Pure mathematics, physics, chemistry, etc.: brain-training problems not related to trade in any way - page 335

 
Mathemat писал(а) >>
OK, the warder calls like this: Stirlitz (first) - second Stirlitz - second Stirlitz - second Stirlitz - second Stirlitz and so on until Stirlitz has been around 100 times. And only then is he going to summon all the others.
So Stirlitz feeds everyone to the crocodiles.


Stirlitz counts how many times the lamp was off when he entered the cell. 99 times he counts, which means all his comrades-in-arms have been there. Obviously, each comrade-in-arms has to turn off the light only once.

 
Mathemat писал(а) >>
You've got it like this: Who's reporting?

Stirlitz, when he counts 99 light bulbs, and he can count them after being in the cell at least 99 times.

 
OK, one more time then, Richie.
Every comrade-in-arms, apart from Stirlitz, turns off the lamp only once, the first time. If it is already off, it does nothing.
Stirlitz counts how many times the lamp has been turned off and turns it on. If it's on, he does nothing.
Is that it?

Well, that sounds about right. I've read another solution. They work the other way round.
Stirlitz turns it off if it was on and adds 1. Otherwise it does nothing.
Everyone else turns it on, but only the first time they've been. In other cases, nothing.
 
Mathemat писал(а) >>
OK, one more time then, Richie.
Every comrade-in-arms, apart from Stirlitz, turns off the lamp only once, the first time. If it is already off, it does nothing.
Stirlitz counts how many times the lamp has been turned off and turns it on. If it's on, he does nothing.
Is that it?
Is Stirlitz reporting?


Yes, it is.
 

avatara, where is your solution? Don't you have one?

 
Richie >>:


Штирлиц считает, сколько раз была лампа была выключена, когда он входил в камеру. 99 раз насчитает, значит там побывали все его сотоварищи. Понятно, что каждый сотоварищ должен выключать свет только один раз.

With this correction the answer is correct. Every convict (Stirlitz's okromes) turns off the lamp only when he is brought to the cell with the lamp burning for the first time.

All the other times, he does not touch the lamp.

// The question remains whether there is no shorter solution. Besides, Stirlitz can also be brought 55 times and then not let in.

 
Mathemat >>:
Короче, похоже на правду. Я вычитал другое решение. Они действуют наоборот.
Штирлиц выключает, если была включена, и добавляет 1. В остальных случаях ничего не делает.
Все остальные включают, но только в первый раз, когда побывали. В остальных случаях - ничего.

This decision is shorter by one go. Accepted.

 
MetaDriver писал(а) >>

// The question remains whether there is no shorter solution. Besides, Stirlitz can be brought in 55 times and then kept out.


And how else to pass a hundred by bits? >> I personally do not see any other solution.

 
MetaDriver >>:

Это решение короче на одну ходку. Принимается.

And yet it doesn't guarantee it. What if Stirlitz is only taken to see a lamp three times?

 
Richie >>:

avatara, где ваше решение? У вас его нет?

Nonsense. If the conditions of the task are met perfectly - there is no solution for me. in the sense of an almost endless challenge to the one I like.

Although if one were to negotiate the role of Stirlitz. I could play...

;)