Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon.

Pages: 1-

Developer challenge

Name: Anonymous 2011-05-27 4:27


You have 40 bowls, all placed in a line at exact intervals of 1 meter. You also have 9 oranges. You wish to place all the oranges in the bowls, no more than one orange in each bowl, so that there are no three oranges A, B, and C such that the distance between A and B is equal to the distance between B and C. How many ways can you arrange the oranges in the bowls?.

Name: Anonymous 2011-05-27 22:12

Unless this is a trick question, there are no ways.

The way your question is worded, no two pairs of oranges can be have the same pair-distance.  If the question specified "no three sequential oranges," then this could have been possible; but, the wording makes it impossible because it is easy to arbitrarily make a pair out of two oranges who are obey their own local sense of logic, but, out of that context, produce repeated numbers.

The best I've been able to do, by hand, is 1 2 4 8 13 21 30 40 and that's only eight oranges and all forty bowls.

Name: Anonymous 2011-05-28 2:05

the correct answer is FUCK, I'm going out

Name: Anonymous 2011-05-29 11:04

#2, you're not trying hard enough. there are many ways to do this.
by hand im finding 1-2-4-5-10-11-13-14-28 as one option. There are at least 12 translations of this, and that's if I start at 1 and choose the smallest possible number that's not invalid.

We can't translate the numbers because they don't act like a torus - replace the sequence with +13 on all values, and send 41 -> 1. 1-14-27 is invalid.

The answer is at least 13 there are more.

If you choose to keep the 9th unknown, it can be shown that you can pick any number bowl 28 or larger. Picking 40 gives 1 possible outcome, 39 gives 2, etc... down to 28 you get 91 possibilities. now what if we don't know the 8th?

Doing this by hand sucks, but I'm saying at least 91, with many more options.

There are even more options if you number the oranges and differentiate one from the other. ;]

Name: Anonymous 2011-05-29 11:41

Also, 1,2,4,5,10,11,13,14,28,29,31,32,37,38,40 is a string that meets the requirements with 15 oranges.

Name: Anonymous 2011-05-29 14:03

I managed to find a solution of 10268 different ways if the first 6 are:

1,2,4,5,10,11

...Using excel

Name: Anonymous 2011-05-30 6:39

>>6
what code did you use?

Don't change these.
Name: Email:
Entire Thread Thread List