Subscribe via feed.

Golden Needle in a Haystack

Posted by DP on September 5, 2014 – 12:32 pm

I have a very large plot of land on which I have stacked bales of hay, each measuring 1m x 1m x 1m. They are stacked 10 bales high, and span a couple thousand wide and deep. To keep them out of the weather I have also placed a tarp on top that cannot be seen through and should not be walked on or cut open in any way.
While stacking the hay I also stored several boxes of gold for safe keeping, but did not mark down where. However, to make it a little easier for my future self I grouped 8 boxes together so that they occupy a 2m x 2m x 2m space.

I now need some of my gold, but cannot retrieve it myself. I am hiring YOU to help me, and in return you will get to keep 1 gold bar from each of the boxes you return to me.
I need the gold available in a week, so time is somewhat important. You may work whenever you like, and at whatever pace you like. I do not have a minimum or maximum requirement.

Some other information:
- You must enter through the ‘side’ as to not disturb my tarp or the ground.
- You should remove at least 2 bales high so you can walk through, more if you wish.
- Bales above those removed will remain in place (magic?) – same with the tarp. [I suppose in theory you could remove all adjacent bales and 1 might ‘float’ right in front of you.]
- Once a bale is removed, a face of the 5 adjacent (but not diagonal) bales/boxes are revealed. You may remove any of which you can see the face.

Thoroughness is partially important (finding ALL of the gold within the search area), but Efficiency will yield the most gold found per hay bale removed.

The question: What is the most Efficient method of finding my gold? (ex: remove all bales, remove in a checker-board pattern, make a long 5-bale-high tunnel, etc.)

This info might also be helpful: When I stacked the hay I placed them in 16 x 16 x 10 piles each day with one group of gold boxes ‘randomly’ placed within the pile. The next day I placed another 16 x 16 x 10 pile directly adjacent along with another group of gold boxes somewhere within, and so on.

This post is under “MathsChallenge” and has 7 respond so far.
If you enjoy this article, make sure you subscribe to my RSS Feed.

7 Responds so far- Add one»

  1. 1. DP Said:

    I should note that I do not have a solution for this problem. I do have some information based on a source site, but nothing certain.

    I also apologize for the length of the problem statement. I wanted to cover some of the assumptions being made, but in a more creative way.

  2. 2. Wizard of Oz Said:

    Most efficient way? Set fire to the bales. Should be easier to find the gold in the ashes.

  3. 3. Curtis Said:

    Well…..I wouldn’t move any….

    The 2m cube of gold is in a random position within a stack 16 x 16 x 10 metre bales

    I calculate that this gives 15 x 15 x 9 different positions for the gold within the stack….

    ….. of these 2025 possible positions, 15 x 9 would be on the single outside face (of a day’s stacking that was visible from the outside.) 135 possible positions.

    so the probability of seeing the gold on the outside face is 135/2025 =6.67%

    The whole giant stack of 2000 x 2000 represents 125 daily stacks visible down each side and 123 stacks across each end, 496 stacks visible on all 4 sides.

    each of these 496 stacks has a probability of 6.67% of visible gold. (maybe slightly different for the corners)

    Therefore a 8km stroll around the entire stack would likely yield 496 x 0.067 gold stacks around 33 stacks of 8 boxes.

    I expect my 264 gold bars reward in the post shortly!

    (all on the assumption that “within the pile” does not mean “concealed within the pile”)

  4. 4. Wizard of Oz Said:

    We need a ruling here . . .

    Is the assumption at the end of Curtis’s post # 3 correct? In other words can the gold boxes be exposed on the outside of a pile? This includes the top and bottom as well as rhe sides.

    This would make quite a big difference to the answer.

  5. 5. DP Said:

    Well… He technically did not break the rules of the problem.
    I can say that the top and bottom of the pile could change probabilities (checking vs. not checking that level), but they are not ‘exposed’ since the bales/boxes would be touching tarp/ground.

    When I first thought this question up I almost posted it as a machine that could remove/replace 1m x 1m x 1m chunks of dirt into the ground 10 layers deep with a layer on top and gold boxes in the mix. You would then have to use the machine to remove chunks of dirt to find the boxes, and at least 2 chunks high for the machine to ‘tunnel’ through the ground. This way nothing would be exposed, and fits the real solution I’m looking for.

    I chose not to explain it that way, and so I suppose Curtis has found the most efficient way of finding my gold (100% in-fact – gold boxes found per box-or-bale removed; infinite per my previous definition). Although, I’m not sure I would have hidden it in such plain-sight.

    What do I do once all of the surface gold is found? Strip a layer and start again? Checker-board it? Dig a tunnel?

  6. 6. johnp24 Said:

    I immediately thought of a fire as well. Ever see a barn fire after making hay before the hay has properly dried in the field?

    Next obvious answer is I watched DP from my prison cell across the field hiding his gold. Upon my release from prison at a spry young age of 60 (42.8 years served and tried at age 16 as an adult for grand theft I was imprisoned at 17.2 years old), I was hired by you and due to my meticulous record keeping know the exact location of each box.

    Like the great pyramid designers and builders, DP was very meticulous and started his stack so it was exactly square and perfectly aligned sides to N, E, S, and W.

    You specified the top is covered by a tarp and the bottom of the 10 high stack cannot be viewed from below, much like an ice cream sandwich. I would assume no exterior bales would be replaced by boxes of gold, defeating the purpose of hiding the gold. I would also assume this would never happen at any point during the stacking of the hay. This means 3 sides of the first 16×16x10 cube in each row would never have gold on the outside. All remaining day’s stacks would never have gold on the 2 visible faces.

    Think of each 16×10x2000 stack as a separate unit. The first 125 16×16x10 cubes would never have gold on the outside bales as this would be foolish method to hide. Each 16×16x10 cubes can only have gold hidden on the 1 side butting up against the previous cubes.

    Resulting rows of 16×16x2000 could have gold hidden though on the side that butts up against existing rows. Most efficient way to search is to search the first row (South) DP created and then the last row (North) and then the remaining East and West sides (123 cubes each).

    Knowing this, I would start my digging at coordinates X, Y, Z or 4,3,1 if looking at the southwest corner since this is where the farmer started. My first 2 bales are 4,3,1 and 4,4,1 since I have to take 2 or more outside bales (waste bales) so I can walk through. Obviously these 2 cannot have gold in them per my assumption above. If I see gold ahead in either of the 2 boxes then I can go down 1 row, up 1 row, or straight ahead to get the 8 boxes of gold, hidden in 2×2x2 groups. Otherwise I continue straight ahead to the 2nd column or bales. Again, I either see gold or I do not and then proceed ahead to 3 column.

    Once I reach column 4 though my logic changes a bit. If I do not see gold in front of me I will then start to go straight up. Repeat my upward progress 4 times as this will expose the greatest number of bales with the fewest removed bales. If no gold has been found, I drop back down to the 3rd level and continue to column 7 and then straight up 4 times.

    I have now removed a maximum of 22 bales and either can eliminate 800 bales (5×16x10) or found the gold at some point in my first 22 bales. If no gold is found, I move to coordinates 8,3,1 and 8,4,1 and repeat process. Again, I remove a maximum 22 bales and can eliminate another 640 bales (4×16x10). If no gold is found, I move to coordinates 12,3,1 and 12,4,1 and repeat process. Again, I remove a maximum 22 bales and can eliminate another 960 bales (6×16x10). Total 66 bales removed maximum per 16×16x10 cube or 8250 bales removed.

    Why the difference in number of bales eliminated? Think of day 1 and the N, E, S, and W sides would never have boxes of gold in them. As I work from West to East as DP did in his Pyramid like endeavor, I eliminate different number of rows within each 16×16x10 unit.

    Day 2 through Day 125 logic:
    These cubes of bales require a bit different approach since the West side can have gold hidden since they butt up against the East side of previous day.

    I start at 3,3,1 and 3,4,1 and do the exact same 22 bale method as Day 1. I then move to 7,3,1 and 7,4,1 and do the exact same 22 bale method. I then move to 11,3,1, and 11,4,1 and do the exact same 22 bale method. I then move to 14,3,1, and 14,4,1 and do the exact same 22 bale method.

    In these cubes I remove a total of 88 bales to expose all 2560 bales.

    Row 1 requires a maximum of 10978 bales of the 320,000 bales be removed to expose all 2000 boxes of gold. Worth $980,000,000 so I might stop here. Repeat for the North face but add 12 bales per cube since each cut requires further depth. Total bales removed 12478. Repeat with West and East face minus the already searched corners and you have a 123 cubes to search and 100 bales to remove for a total of 24600 bales. This gives me a maximum of 48056 bales removed to retrieve 5968 boxes of gold (or approx 8 bales per box of gold retrieved) and my 1 bar per box is worth $2,924,320,000.

    Going for the full $122,500,000,000 at $1225 per Troy ounce seems greedy but could be done using the following method.

    Rows 2-125 can be done similarly but require you to go nearly the full length of all 2000 columns going from West to East. This requires me to remove 1997 columns of hay 2 high and then every 3rd column for 4 trips through or a total of 6662 bales. Total bales removed 26648.

    Total maximum bales removed 26648 * 124 + 10978 + 12478 = 3327808 bales of the possible 40000000 (or approx 12 to 1 ratio). Found 250,000 boxes of gold. My take is $122,500,000,000. If only I had the time to spend it.

    DAY 1 CUBE DAY 2-15 CUBE

    ROWS 2-124

  7. 7. DP Said:

    Thanks! If I’m imagining this correctly it appears to be a square wave type of dig. Going inward 4 bales (2 bales high), then upward 3 bales, then forward 4 bales, then downward 3 bales. Repeat.
    And you are right about me being meticulous. I was actually looking for this solution as an efficient way to play a certain video game which requires you to dig or MINE for certain ores which you process and build or CRAFT into useful tools to further your progress. Diamonds are the most rare and valuable resource in the game, and are commonly found in the pattern given in the problem statement.
    Now I can find and collect diamonds and other useful things efficiently!

Post a reply

PHP Warning: PHP Startup: Unable to load dynamic library 'C:\Program Files (x86)\Parallels\Plesk\Additional\PleskPHP5\ext\php_mssql.dll' - The specified module could not be found. in Unknown on line 0 PHP Warning: PHP Startup: Unable to load dynamic library 'C:\Program Files (x86)\Parallels\Plesk\Additional\PleskPHP5\ext\php_pdo_mssql.dll' - The specified module could not be found. in Unknown on line 0