lkml.org 
[lkml]   [2003]   [Apr]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [ANNOUNCE] udev 0.1 release
On Fri, 11 Apr 2003, John Bradford wrote:

> [Puzzle]
>
> Say the power supply had five 5.25" drive power connecters, how many 1
> into 3 power cable splitters would you need to connect all 4000 disks?

never seen a 3 into 1, but we'll play along.

every 3 in 1 connector you use, triples your connections, go two
levels deep, it's 3 * 3 = 9, pretty obvious.

I'm just going to use one connector off the power supply for now.

3 ^ 7 = 2187

So we'll use another two off the PS and not go as deep

2 * (3 ^ 6) = 1458

2187 + 1458 = 3645

Need another 4000 - 3645 = 355

3 ^ 5 = 243.

Need another 355 - 243 = 112

Use another connector

3 ^ 4 = 81

Need another 112 - 81 = 31. So close but out of first level connectors.

So I put a 3 way splitter on one of those.

3 ^ 3 = 27. argh!

Need another 31+1(had to use up a connector) - 27 = 5.
So I put another 3 way splitter. 5 + 1 = 6.

3 ^ 1 = 3. Need another three. Take one off, pass it around, and we're
almost done. Add another 3 way splitter, we've got two connectors left
over, and everything is plugged in. Turn on the ps. Boom, done.

Now, to count up the total.

level 1 = 1 = 1
level 2 = 1 + 3 = 4
Level 3 = 4 + 9 = 13
Level 4 = 13 + 27 = 40
Level 5 = 40 + 81 = 121
Level 6 = 121 + 243 = 324
Level 7 = 324 + 729 = 1053

So anyways, I used one level 7, two level 6's, one level 5, one level 4,
one level 1, one level 3, one level 1, another level 1 and finally another
level 1

total of 1053 + 324 + 324 + 121 + 40 + 1 + 13 + 1 + 1 + 1

I come up with 1879.

If i'm too high, that's to account for the fact you broke some connectors
at some point, so you used the spares.

If i'm too low, that's to account for the fact that out of 4000 drives, a
few are going to be DOA and you couldn't hook them up anyways.

Someone PLEASE tell me the simpler way to do this.

Mike

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:34    [from the cache]
©2003-2014 Jasper Spaans. Advertise on this site