Jump to content

Recommended Posts

Posted

post-79880-0-29831900-1475345435.jpg

Blunderboar kept and watches his 12 golden eggs.. arranged according to shell thickness and with tags in troy weights.
He told Jack (his captive) to seek the two gold eggs that he swapped from the shelves using the available machines with
the least tries. If Jack succeed he shall become a servant.. else the giant's supper. What method must the boy execute?

Posted (edited)

What method must the boy execute?

 

Divide 12 pieces by 2, with 6 units each,

then measure mass, on weight, 6 eggs on the left, 6 eggs on the right.

 

If their mass is equal it means gold egg is in each of 6 units.

 

If their mass is not equal, two eggs end up in 6 eggs package.

Divide 6 pieces by 2, with 3 units each.

etc. etc.

 

Proceed further depending on result..

Typical question for programmers (sorting algorithm).

Variation of algorithm, could be splitting to 3 packages with 4 (or later 2).

Or use elements from 2nd branch.

 

KD-Tree

https://en.wikipedia.org/wiki/K-d_tree

Octree

https://en.wikipedia.org/wiki/Octree

Binary tree

https://en.wikipedia.org/wiki/Binary_tree

Edited by Sensei
Posted

@ Sensei

"'Divide 12 pieces by 2, with 6 units each,
then measure mass, on weight, 6 eggs on the left, 6 eggs on the right.

If their mass is equal it means gold egg is in each of 6 units."

 

-All are golden eggs with varying weights..1-12 troys

Posted (edited)

@ TimeSpaceLightForce

"All are golden eggs with varying weights"

 

If so, then let us mark their masses as m1,m2,m3,...,m12. Out of these there are two such eggs that have the same mass.

In such case, one option is to weight any two eggs and continue this for all the 12 golden eggs. The total possible combinations are 12!/2!(12-2)!=66. It's because if you pick one egg, you can weigh it with other 11 eggs. And this will happen for all 12 eggs, but there will be two identical combinations coming each case. Ex.- weighing m1 and m2, weighing m2 and m1. Thus, the final answer is 66.

Hope it's correct.

Edited by Sriman Dutta
Posted

@Sriman Dutta

There are 12 golden eggs.. arranged according to shell thickness and with tags in troy weights.

Tags 1,2,3..12 are troy units. No two eggs have same mass or weight.

 

-Right! There are 66 ways that two of these eggs can be swapped or exchange shelf position.

 

Find a way to sort the two misplaced gold eggs.. with weighing scale or the balance scale or both.

Posted

back from a break - will take a good look at this. Please do not post the answer other than in spoiler tags

 

 

 

like this

 

 

 

[_spoiler]

like this

[_/spoiler]

 

remove the leading underscore to use

  • 3 weeks later...
Posted

attachicon.gifge.jpg

Blunderboar kept and watches his 12 golden eggs.. arranged according to shell thickness and with tags in troy weights.

He told Jack (his captive) to seek the two gold eggs that he swapped from the shelves using the available machines with

the least tries. If Jack succeed he shall become a servant.. else the giant's supper. What method must the boy execute?

Are we supposed to know what the available machines are? a balance? a scale? something else?
Posted

Are we supposed to know what the available machines are? a balance? a scale? something else?

 

A balance and a scale I believe - they are depicted in the picture and OP mentioned just those

 

And thanks for reminding me - I had forgotten this puzzle

Posted (edited)

I think this is correct:

it took between 3-4 hours to finish.

 

edit to add:

Nope, needs one more detail:

correcting now.

 

 

 

We can seperate the eggs into 3 balanced groups of 4 eggs each.

However since a swap in the same row would not show up on a scale or balance, to get full coverage we need to do this in two different groups. The second group only ensures any pairing cannot be in the same row in both groups.

 

origional set:

01, 02, 03, 04

05, 06, 07, 08

09, 10, 11, 12

 

1st grouping

01, 06, 11, 08 = 26

02, 07, 12, 05 = 26

03, 04, 09, 10 = 26

 

2nd grouping

03, 08, 09, 06 = 26

04, 05, 10, 07 = 26

01, 02, 11, 12 = 26

 

 

example:

if egg 01 was swapped with egg 06 then balancing row 1 with row 2 in the first group would not detect anything wrong.

 

moving on to the second group we can see that 01 & 06 are in rows 1 & 3

therefore row 1 would be heavy, by 5oz and row 3 would be short by 5 oz.

 

The only two eggs that are different by 5oz between rows 1 & 3 are 06 and 01.

 

method:

1) To get the most information out of our scale and balance we put the balance on top of the scale.

2) Since two swapped eggs cannot exist in all three rows, there must be at least 1 that is correct.

3) Balance the first and second rows and record the following information

  • weight of the two sets: < 52, = 52, > 52
  • weight of each row: < 26, = 26, > 26
While it's not usually going to be necessary, it may require a second balancing to find the solution by going to the backup group, so the maximum number of balances would be 2.

 

If the swapped eggs are in the same row then every row = 26 and the scale balances.

When this happens we move on to the next group.

 

If two rows are not balanced, we can check the scale to always narrow it down to two rows

1&2, 1&3, or 2&3, and a deviation in oz on the scale.

 

If scale = 52 then the third row is correct

swap is between 1&2

Remove the light side to find the deviation ⇒ done

if scale > 52 then

swap in light row & 3 + amount of deviation ⇒ done

if scale < 52 then

swap in heavy row & 3 + amount of deviation ⇒ done

 

 

 

I would add, that this is the perfect analog for comparing logic and math.

 

The scale represents the math while the balance represents the logic.

 

You could solve this problem with the scale only or the balance only however, combining both disciplines provides us with the greatest efficiency.

Edited by TakenItSeriously
Posted (edited)

I think this will work, but I don't know how to prove the optimal efficiency.

 

Is there a definitive solution?

 

 

 

We can seperate the eggs into 3 balanced groups of 4 eggs each.

However since a swap in the same row would not show up on a scale or balance, to get full coverage we need to have up to three groups.

 

1st group

03, 04, 09, 10 = 26

02, 05, 08, 11 = 26

01, 06, 07, 12 = 26

 

2nd group

05, 06, 07, 08 = 26

03, 04, 09, 10 = 26

01, 02, 11, 12 = 26

 

3rd group

03, 06, 07, 10 = 26

02, 04, 08, 12 = 26

01, 05, 09, 11 = 26

 

method:

1) To get the most information out of our scale and balance we put the balance on top of the scale.

2) Since two swapped eggs cannot exist in all three rows, there must be at least 1 that is correct.

 

repeat

change groups

until R1 <> R2

 

balance R1 & R2

if S < 52 then

egg swap is between Light R & R3

reduce to swaps that fit the weight deviation

rebalance if needed to achieve a silgle result

else If S = 52 then

egg swap is between R1 & R2

remove one row to get the weight of the other

reduce to swaps that fit the weight deviation

rebalance if needed to achieve a silgle result

else if S > 52

egg swap is between Heavy R & R3

reduce to swaps that fit the weight deviation

rebalance if needed to achieve a silgle result

endif

 

I'm not certain if its the most efficient. The matrixes may be arranged more efficiently to yield fewer duplicates. I'm uncertain how to calculate the optimum.

 

 

 

I would add, that this is the perfect analog for comparing logic and math. The scale represents the math while the balance represents the logic.

 

You could solve this problem with the scale only or the balance only however, combining both disciplines provides us with the greatest efficiency.

Edited by TakenItSeriously
  • 2 weeks later...
Posted

The balance on top of scale is clever. I accept it. Using it once give 2 readings but required 2 trials only.

The solutions I had in mind are as ff:

1) 4 trials using scale OR balance.

2) 2 trials each using scale AND balance.

Posted

1+12 = 13

2+11 = 13

3+10 = 13

4+9 = 13

Etc. Any more explanation needed?

 

Yes, clearly you need the puzzle explained to you in more detail cos you have failed to grasp it.

 

Firstly that would be a lot of weighings and more importantly you stand a fair chance of not getting an answer*; for instance, if 1 and 12 are swapped then they still weigh 13 and you are none the wiser. And even if you do get an anomaly you might not know if which of your pair is wrong; for instance, if 4&9 weighs 12 then you would not know if 4 had been swapped with 3 or 9 swapped with 8.

 

*In fact I can only think of a small subset of the phase space in which your method could possibly get an answer; if 1&12 weighed 23 then the only change would be 1 swapped for 11 etc.

Posted (edited)

Shoot fire, danged if you aren't right! Thx for the correction.

 

But... The balance would indicate if the pair had been swapped, 1 balance for each pair that is 6.

 

now balance each pair against another pair to find the two that are not 13, that is 3 more.

 

weigh each of one of those pairs, that is 2... Done.

 

11 actions.

Edited by Butch
Posted (edited)

He told Jack (his captive) to seek the two gold eggs.... with the least tries. If Jack succeed he shall become a servant.. else the giant's supper. What method must the boy execute?

 

Classic false choice dilemma. Jack need not be either servant or supper.

 

If success (answer of least tries) leads to servanthood, and failure (answer of not least tries) leads to supper, then Jack need only to not provide an answer, and lead a long fulfilled life.

 

EDIT: actually, the "else" puts a finality on the choice, and "supper" closes the time variable. So I'm wrong.

Edited by AbstractDreamer
  • 3 months later...
Posted


Using both machines twice:

1st try: balance (1)(2)(3)(4)=(10) ..all ok or swap on left pan

If (1)(2)(3)(4)>(10) try if (1)(4) =(2)(3) then weigh (10)!

..................................If (1)(4)<>(2)(3) weigh an egg from heavier pan .. the other if necessary.

else (1)(2)(3)(4)<(10) weigh (10)! for 2nd i.e 2 tries only

 

2nd try:balance (6)(8)(9)=(11)(12) ..all ok or swap on any pan

If (6)(8)(9)<(11)(12) then weigh (5)!.. if necessary (7)!

else

if (6)(8)(9)>(11)(12) then weigh (11)!..if necessary (12)! if both ok its 6&7!

 

3rd try: weigh if (4)(6)(11)=21 oz ...all ok

if = 21 -1,-2,-3 or +2,+3 or +1 :

so 4& [3,2,1] or 6& [8,9] or 11&12!!!

 

4th try: weigh if (1)(9)(7)= 17 oz then 2&3!

else 17 +1,+2 or -1 or -2 :

so 1&[2,3] or 9&8 or 7&5 !!!

Posted

This was a nice puzzle - just realise I didn't post my results. Will see if I still have them and check they correspond

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.