[BITList] THE DOOR

x50type at cox.net x50type at cox.net
Sat Feb 2 22:02:34 GMT 2013


you mean like this, Hugh..............?


In the central prison of Sikinia there are n cells numbered 1 to n, each occupied by a single prisoner. The state of each cell can be changed from closed to open and vice versa by a half-turn of the key. To celebrate the Centennial Anniversary of the Republic it was decided to grant a partional amnesty. The president sent an officer to the prison with the instruction: 

for i:=1 to n do
  turn the keys of cells i, 2i, 3i, ... .

A prisoner was freed if at the end his door was open. Which prisoners are set free? Remark: Do not think, just sieve!



ct



From: HUGH 
Sent: Saturday, February 02, 2013 1:53 PM
To: BitList 
Subject: Re: [BITList] THE DOOR

Colin,

I sent a dissection of this trick a few years back, whether to BITlist or to BIShip I can't recall. It's a disguised sieve.

Hugh.


--------------------------------------------------------------------------------
_______________________________________________
To unsubscribe from this email List, send an email to:
BITList-unsubscribe at lists.bcn.mythic-beasts.com

BITList mailing list
BITList at lists.bcn.mythic-beasts.com
http://lists.bcn.mythic-beasts.com/mailman/listinfo/bitlist

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.bcn.mythic-beasts.com/pipermail/bitlist/attachments/20130202/52012ad5/attachment.htm 


More information about the BITList mailing list