Open Side Menu Go to the Top
Register
Puzzles ITT Puzzles ITT

11-28-2016 , 01:14 PM
Quote:
Originally Posted by xander biscuits
Hint: It's not dependent on the number of coins in the bag
Quote:
Originally Posted by Lattimer
OP also hinted that the solution is not dependent on the number of coins. So if there are X coins, the answer is not a function of X.
Quote:
Originally Posted by Gabethebabe
Seems hard to believe. If you start with 4million gold coins, 2 mllion bronze and 2 million brass and you have the bad luck of comparing two of the same coins 4M times, I don't see how you can do better than continue wth 4M coins for the next run.
xander, can you clarify this a little bit?

Is the solution really the same if you have 15 total coins or if you have 4,000,015 total coins?
Puzzles ITT Quote
11-28-2016 , 02:11 PM
Yes the solution is the same regardless of how many coins you have assuming that you can put them through the machine instantaneously. The only time that counts is the waiting time of 24 hours before you can put the same coin through the machine.

Also there is a chance that you have exactly 50% gold.
Also there is >0% brass coins and >0% bronze coins.
Puzzles ITT Quote
11-28-2016 , 02:21 PM
Damn, I really thought Gabe was on the right track there. (It still seems like a solution to the problem, but apparently not the most efficient one)
Puzzles ITT Quote
11-28-2016 , 02:42 PM
Whatever the solution is, it can't take any more scans than the 7 coin scenerio in my example. Which seems to max out between 8 and 14 scans. My math is limited to some basic statistical functions and analysis, so I am of no use on this one.
Puzzles ITT Quote
11-28-2016 , 02:45 PM
I've been running through a lot of scenarios and I think the answer is 48 hours (3 scans). I'm trying to develop a proof (or to disprove that answer).
Puzzles ITT Quote
11-28-2016 , 03:16 PM
Three is certainly the minimum. If N=4 you can compare once and get 2 times ninmatching coins (so Gold1-Brass and Gold2-Bronze) compare again and get Gold1-Bronze and Gold2-Brass, so you need to compare a third time to get Gold-Gold and Brass-Bronze.
Puzzles ITT Quote
11-28-2016 , 03:33 PM
Quote:
Originally Posted by Gabethebabe
Coin problem
Pass all coins (say: X). Coin pairs that are equal ==> throw away one of them. Coin pairs that compare differently: throw away both. If you started with an odd number, you keep the odd one. In this way of discarding, if gold was prevalent, it remains prevalent. If you have 1 coin left, that one is gold. If you have one equal pair left, these are gold. If you have 3 left, the pair is gold. Even if all coins compared equal, you have discarded half of them.
OK, so this approach is WRONG. You cannot throw away the nnmatching coins. Proof with N=16, you could get this:
GG
GG
Bronze-Bronze
Bronze-Bronze
G-Brass
G-Brass
G-Brass
G-Brass

Now if you throw away nonmatching coins, you are left with 4Bronze and 4Gold and no solution.

You must keep all coins and make another, smart comparison
Puzzles ITT Quote
11-28-2016 , 03:34 PM
Ok guys, sorry for the screw up but I listened to the podcast again since there were so many questions in the thread and there are >50% gold coins and the number of gold coins cannot = 50%

sorry for sending you down the wrong path potentially
Puzzles ITT Quote
11-28-2016 , 04:04 PM
Quote:
Originally Posted by xander biscuits
Also there is a chance that you have exactly 50% gold.
Also there is >0% brass coins and >0% bronze coins.
Quote:
Originally Posted by xander biscuits
Ok guys, sorry for the screw up but I listened to the podcast again since there were so many questions in the thread and there are >50% gold coins and the number of gold coins cannot = 50%

sorry for sending you down the wrong path potentially

So 3 gold, 1 brass, 1 bronze is the smallest # of coins you can have.

A + B; if same = gold.

...
Puzzles ITT Quote
11-28-2016 , 04:34 PM
With N=4 you need 3 comparisons to get the job done.

Let A=Brass and O = Bronze.

Now N=5, or GGGAO. One comparison gets the job done. If you have a matching pair, it is G, if you have none, the odd coin =G.

N=6 or GGGGAO. One comparison, you will get a matching pair and you are done.

N=7 or GGGGAOX, with X being able to be any of GAO. One comparison:
If you get one pair, that is G.

If you get three pairs, two will be GG and one will be AA/OO, simply break up all pairs and compare a second time to find exactly one matching pair = GG.

Suppose you get two pairs:
Possibilities are (number them 1-7 from left to right)

GG GG AG O
GG GG OG A
GG GG OA G
GG GG OA A
GG GG OA O
GG AA OG G
GG OO AG G

Next comparison is 1-5, 2-6 and 3-7. If you find one or more matching pairs ==> you found G. If no matching pairs, then the odd coin is G.

I have seen no system yet for bigger N's lol
Puzzles ITT Quote
11-28-2016 , 05:16 PM
Quote:
Originally Posted by xander biscuits
How long do you need before you can identify a gold coin with 100% certainty?
If # of coins doesn't matter, then the answer is zero time, given that coin comparing is instantaneous.

Rules:
1) > 50% of coins = gold
2) > 0% of coins = brass
3) > 0% of coins = bronze

This means GGGAO

If same = gold
If 2 sets are different, then the remaining coin is gold.

-------------

But that doesn't work when there are an even # of coins. Ie. 10/4/4.

All comparisons could be the same and you would have no idea which is gold and which is not.
Puzzles ITT Quote
11-28-2016 , 05:30 PM
Quote:
Originally Posted by housenuts
But that doesn't work when there are an even # of coins. Ie. 10/4/4.

All comparisons could be the same and you would have no idea which is gold and which is not.
Which is why the answer isn't 0 hours...
Puzzles ITT Quote
11-28-2016 , 05:36 PM
Quote:
Originally Posted by Lattimer
Which is why the answer isn't 0 hours...
Which is why I think there's a problem with either the question or the hint that # of coins doesn't matter.

It makes no sense that with 5 coins you can do it instantaneously, yet with 7+ coins you cannot, unless the answer is something we have not figured out.
Puzzles ITT Quote
11-28-2016 , 05:40 PM
I think the answer being sought is the minimum number of scans that will cover all values of N. Yes, when N=5 you can do it in 1. But as N approaches infinity the minimum # of scans needed is finite (presumably).

Last edited by Lattimer; 11-28-2016 at 05:47 PM.
Puzzles ITT Quote
11-28-2016 , 06:38 PM
I think my original answer of 48 hours (3 scans) is correct:

1st scan: Run all coins through (set aside the odd coin if it exists). Set aside the paired matches, in order, and discard the rest. Now shift the 2nd coin of each pair up 1. (for example, if you label the pairs as AA,BB,CC,DD, they are now AB,BC,CD,DA)

2nd scan: Run those pairs through. Set aside the new matches, in order, discard the rest. Shift again like above.

3rd scan: Run those pairs through. Set aside the new matches, in order, discard the rest.

The goal here is to get no more than 3 clusters of pairs. Gold pairs will outnumber the other 2 combined. If there are only 2 clusters and they are equal, then the original odd coin is gold.

If at any point you got down to 0 or 1 pair, you are done. 1 pair = Gold, 0 pair = odd coin is Gold
Puzzles ITT Quote
11-28-2016 , 06:45 PM
That is not the optimal solution

good work though...
Puzzles ITT Quote
11-28-2016 , 08:07 PM
Quote:
Originally Posted by Gabethebabe
Now N=5, or GGGAO. One comparison gets the job done. If you have a matching pair, it is G, if you have none, the odd coin =G.
Xander, if the number of coins is irrelevant, then Gabe has solved this with the above and the answer is one scan.

If the number of coins in the bag do not matter, the answer must be a constant and not a product of the number of coins. So, if Gabe or anyone has found a valid solution for 5 coins (or any number of coins), he has therefore found the solution for all number of coins.

What is faulty about this logic?
Puzzles ITT Quote
11-28-2016 , 08:17 PM
Quote:
Originally Posted by ArcticKnight
Xander, if the number of coins is irrelevant, then Gabe has solved this with the above and the answer is one scan.

If the number of coins in the bag do not matter, the answer must be a constant and not a product of the number of coins. So, if Gabe or anyone has found a valid solution for 5 coins (or any number of coins), he has therefore found the solution for all number of coins.

What is faulty about this logic?
Quote:
Originally Posted by Lattimer
I think the answer being sought is the minimum number of scans that will cover all values of N. Yes, when N=5 you can do it in 1. But as N approaches infinity the minimum # of scans needed is finite (presumably).
There's probably a solution like 4 scans that cover all values of N (from 5 to infinity) and that's what the problem is looking for. 1 scan works for 5 coins but not all number of coins.
Puzzles ITT Quote
11-28-2016 , 08:25 PM
Xander would you please clarify if the problem is looking for the minimum number of scans that can be applied to all values of N (or technically, length of time). If so, it's a given that it would be sub-optimal for small values of N.
Puzzles ITT Quote
11-29-2016 , 03:03 AM
Quote:
Originally Posted by Lattimer
Xander would you please clarify if the problem is looking for the minimum number of scans that can be applied to all values of N (or technically, length of time). If so, it's a given that it would be sub-optimal for small values of N.
this
Puzzles ITT Quote
11-29-2016 , 04:33 AM
The answer is 48h.

In the first round of comparison, you will be creating pairs of coins that are equal. Discard all unmatching coins.
Name the paired coins X1Y1, X2Y2, X3Y3, etc.

In the second round of comparison compare X1Y2, X2Y3, ... XNY1 as suggested by Lattimer in post 40.

You will discard unmatching coins again and keep the paired coins. Except that pairs of coins now lead to groups of (at least) 4.

For example if you find that X2=Y3, then you have a group of 4 consisting of X2, Y2, X3, Y3 of the same coin type. It is possible to get bigger groups of course, but at least 4.

Round 3. This is the final round where you start pooling groups.
Compare a coin1 from Group1 and coin1 of group2. If matching, discard the used coins (but these must be counted) and pool the 6 together. If not matching, keep them apart ldo, but discard the used coins (keeping the count)

Compare coin2 from group1 with coin1 of group3.

Soon you will find three different pools of coins. Now proceed to compare one coin of each group of 4 with the rapidly expanding coin pools until you have a pool that is > half of the coins.

Last edited by Gabethebabe; 11-29-2016 at 04:39 AM.
Puzzles ITT Quote
11-29-2016 , 04:48 AM
You have to be a little careful that your pools don't run out of unused coins. One pool running out of coins is not a problem, but two is.

First take 3 groups ABC
Compare A1-B1, A2-C1 and B2-C2. I think the most unfortunate is if these groups are all different.
Now take group D, compare D1 with A3 and D2 with B3. If you have a match, pool, if not pool with C (no comparison needed). Now take group E and first compare with the biggest pool that is left, then the second biggest and if no match, put in the smallest pool.

rinse and repeat.
Puzzles ITT Quote
11-29-2016 , 06:51 AM
Remember each group has at least 4 coins. Also remember that you know the results of each comparison as you make them.

Don't do A1-B2, A2-C1 AND B2-C2. 1st compare adjacent groups - A2-B1, B2-C1, C2-D1...Z2-A1. Regroup based on matches.

Now you might have found that B=C=D and F=G, for example. And you know that A<>BCD and BCD<>E, so next do A3-E3. If same, group together, and you now have 2+ spare coins from that group. If different, you've identified 3 unique groups (A, BCD, E).

Compare B3 to F3. If same, combine. If different, you know that FG=A, and combine. Repeat until all combined to 3 groups, and biggest=gold.

I think both this and Gabe's approach work, just slightly different ways to group.

Nice finish Gabe. I had the right approach, but I think due to the examples I was using I drew a slightly wrong conclusion for round 3.
Puzzles ITT Quote
11-29-2016 , 07:29 AM
Clock problem.

Heads = move clockwise = probability = P
Coins = counterclockwise = probability = Q
P+Q=1, ldo.

First critical point is to reach 1 or 11 or otherwise you cannot reach 12 ever. You will reach 1 or 11 at some point in time, for sure. When you do, you must calculate the probability of the coin travelling back from 1 to 11 (11 to 1) before hitting 12.

To go from 4 to 1 without ever going back is 3x anticlockwise or Q^3.
To go from 4 to 11 without ever going back is 7x clockwise or P^7.

So I think, firstly, to reach 1 before reaching 11 is:
Q^3/(Q^3+P^7).

To reach 11 before 1 = P^7/(Q^3+P^7)
Puzzles ITT Quote
11-29-2016 , 07:35 AM
Scenario 1. You are at 1.
The probability to go directly to 12 is Q. The probability to go directly to 11 is P^10. I am ignoring all the other scenarios and saying the probability to reach 12 = Q/(Q+P^10) and the probability to travel the entire way back is P^10/(Q+P^10)

Scenario 2. You are at 11.
The probability to go directly to 12 is P. The probability to go directly to 11 is Q^10. I am ignoring all the other scenarios and saying the probability to reach 12 = P/(P+Q^10) and the probability to travel the entire way back is Q^10/(P+Q^10)
Puzzles ITT Quote

      
m