[AccessD] OT: Friday Puzzles

Shamil Salakhetdinov shamil at smsconsulting.spb.ru
Sun Apr 25 14:09:00 CDT 2010


Yes. 

--Shamil

-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Max Wanadoo
Sent: Sunday, April 25, 2010 10:57 PM
To: 'Access Developers discussion and problem solving'
Subject: Re: [AccessD] OT: Friday Puzzles

All you need to do is take the "power" value less than or equal to the
greatest number.

Ie, 512 because the next "power" number is 1024 which is too great.

So, 2,4,8,16,32,64,128,256,stop

Max
 

-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Shamil
Salakhetdinov
Sent: Sunday, April 25, 2010 7:52 PM
To: 'Access Developers discussion and problem solving'
Subject: Re: [AccessD] OT: Friday Puzzles

BTW, the answer for the fist puzzle is as straightforward as this code (C#):

public static int GetSurvivorNumber(int lineSize)
{
    return (int)Math.Pow(2, (int)Math.Log(lineSize / 2, 2) + 1);  
}

Got it last night "out of nowhere"... Of course Drew's original "brute
force" solution was a 'must have' step to get to the above 'lightweight'
answer... Or one have to get studied in the modern computer science colleges
where they are taught to "crack" such puzzles in seconds... 

Thank you.

-- Shamil

-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Max Wanadoo
Sent: Sunday, April 25, 2010 9:33 PM
To: 'Access Developers discussion and problem solving'
Subject: Re: [AccessD] OT: Friday Puzzles

Me too and the only one with the correct answer!!

Max
 

-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Drew Wutka
Sent: Sunday, April 25, 2010 5:33 PM
To: Access Developers discussion and problem solving
Subject: Re: [AccessD] OT: Friday Puzzles

Hey, I answered it!

Drew

-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Arthur Fuller
Sent: Saturday, April 24, 2010 8:27 AM
To: Access Developers discussion and problem solving
Subject: Re: [AccessD] OT: Friday Puzzles

As many of you figured out, position 512 is the surviving position.

It's very interesting how many of you readers are so easily diverted
from
what might have been productive work! I shall endeavour to come up with
more
puzzles for you all.

It's also interesting that you all focused on the survivor problem.
Everyone
seems to have ignored the other one.

Arthur
-- 
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd


-- 
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com

-- 
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com




More information about the AccessD mailing list