Skip to main content
added 143 characters in body
Source Link
TheGreatEscaper
  • 12k
  • 1
  • 43
  • 96

CLAIM: If we know that a group of n$n$ coins has an odd number of reals, in one weighing we can identify a group of less than or equal to (n/2) + 1$(n/2)+1$ coins (I know that's not always an integer, hence less than or equal to), that also contains an odd number of reals.
PROOF: Let 2x$2x$ be the largest even number less than or equal to n/2$n/2$. Put x$x$ coins on either side of the scale.
CASE 1: The scale reads an even amount. In this case, we KNOW that out of our 2x$2x$ coins, we have an even number of fakes. This is easy to show by perturbation - imagine starting with x$x$ real coins on each side, and changing a coin to a fake requires changing another coin to a fake to keep the scale reading even. So if there are an even number of odds in our 2x$2x$ coins, there are an even number of reals. This means there are an ODD number of reals in the coins we didn't weigh, which is at most (n/2)+1$(n/2)+1$.
CASE 2: The scale reads an odd amount. For similar reasoning to above, we have an ODD number of fakes in our 2x$2x$ coins, and an ODD number of reals in our 2x$2x$ coins. This amount is less than or equal to n/2$n/2$.

So you can see that we can identify a MUCH smaller sample space with an odd number of real coins.

Even cooler to note is that this algorithm works with coin roles reversed.

If the number of coins with an odd number of reals, n$n$, is 0 mod 4, then x$x$ will be n/4$n/4$. So our weighing, without a doubt, will lead to identifying a group of n/2$n/2$ coins with an odd number of reals.
If the number of coins with an odd number of reals, n$n$, is 1 mod 2 (i.e. 1 or 3 mod 4), then we KNOW we can split it into two groups that differ in size by only 1. One of these groups is even, in which case we set that to be 2x$2x$. So, if n$n$ is 1 mod 4, we know our weighing will lead to EITHER (n+1)/2$(n+1)/2$ or (n-1)/2$(n-1)/2$.
Last case is n$n$ is 2 mod 4. n = 4z + 2$n=4z+2$. Set x$x$ to be z$z$. So we will either identify a group of size 2z$2z$, or 2z + 2$2z+2$, i.e. (n/2)+1$(n/2)+1$ or (n/2)-1$(n/2)-1$.

SIXTH WEIGH: Put ALL THE COINS on one side of the scale. If a real coin weighs w$w$ grams, then we will get a number 99w +- $99w+-$(some even numberoffset by fakes). We know the dispositionoffset of the fake coins is even, since there's an even number of fakes! So, we now KNOW the decimal residue of 99w$99w$ mod 2, call it r$r$.
99w$99w$ mod 2 = r$r$.
99(w+-1)$99(w+-1)$ mod 2 = r +- 99$r+-99$.
99 is odd, so a 99 fake coins would have a different mod residue to r$r$, which we have already identified from our weighing. (Note - i know that 99 fake coins do not necessarily have the same direction of wrong weighting, but the disposition is odd, anyway, making a different residue)

CLAIM: If we know that a group of n coins has an odd number of reals, in one weighing we can identify a group of less than or equal to (n/2) + 1 coins (I know that's not always an integer, hence less than or equal to), that also contains an odd number of reals.
PROOF: Let 2x be the largest even number less than or equal to n/2. Put x coins on either side of the scale.
CASE 1: The scale reads an even amount. In this case, we KNOW that out of our 2x coins, we have an even number of fakes. This is easy to show by perturbation - imagine starting with x real coins on each side, and changing a coin to a fake requires changing another coin to a fake to keep the scale reading even. So if there are an even number of odds in our 2x coins, there are an even number of reals. This means there are an ODD number of reals in the coins we didn't weigh, which is at most (n/2)+1.
CASE 2: The scale reads an odd amount. For similar reasoning to above, we have an ODD number of fakes in our 2x coins, and an ODD number of reals in our 2x coins. This amount is less than or equal to n/2.

So you can see that we can identify a MUCH smaller sample space with an odd number of real coins.

Even cooler to note is that this algorithm works with coin roles reversed.

If the number of coins with an odd number of reals, n, is 0 mod 4, then x will be n/4. So our weighing, without a doubt, will lead to identifying a group of n/2 coins with an odd number of reals.
If the number of coins with an odd number of reals, n, is 1 mod 2 (i.e. 1 or 3 mod 4), then we KNOW we can split it into two groups that differ in size by only 1. One of these groups is even, in which case we set that to be 2x. So, if n is 1 mod 4, we know our weighing will lead to EITHER (n+1)/2 or (n-1)/2.
Last case is n is 2 mod 4. n = 4z + 2. Set x to be z. So we will either identify a group of size 2z, or 2z + 2, i.e. (n/2)+1 or (n/2)-1.

SIXTH WEIGH: Put ALL THE COINS on one side of the scale. If a real coin weighs w grams, then we will get a number 99w +- (some even number). We know the disposition of the fake coins is even, since there's an even number of fakes! So, we now KNOW the decimal residue of 99w mod 2, call it r.
99w mod 2 = r.
99(w+-1) mod 2 = r +- 99.
99 is odd, so a 99 fake coins would have a different mod residue to r, which we have already identified from our weighing.

CLAIM: If we know that a group of $n$ coins has an odd number of reals, in one weighing we can identify a group of less than or equal to $(n/2)+1$ coins (I know that's not always an integer, hence less than or equal to), that also contains an odd number of reals.
PROOF: Let $2x$ be the largest even number less than or equal to $n/2$. Put $x$ coins on either side of the scale.
CASE 1: The scale reads an even amount. In this case, we KNOW that out of our $2x$ coins, we have an even number of fakes. This is easy to show by perturbation - imagine starting with $x$ real coins on each side, and changing a coin to a fake requires changing another coin to a fake to keep the scale reading even. So if there are an even number of odds in our $2x$ coins, there are an even number of reals. This means there are an ODD number of reals in the coins we didn't weigh, which is at most $(n/2)+1$.
CASE 2: The scale reads an odd amount. For similar reasoning to above, we have an ODD number of fakes in our $2x$ coins, and an ODD number of reals in our $2x$ coins. This amount is less than or equal to $n/2$.

So you can see that we can identify a MUCH smaller sample space with an odd number of real coins.

Even cooler to note is that this algorithm works with coin roles reversed.

If the number of coins with an odd number of reals, $n$, is 0 mod 4, then $x$ will be $n/4$. So our weighing, without a doubt, will lead to identifying a group of $n/2$ coins with an odd number of reals.
If the number of coins with an odd number of reals, $n$, is 1 mod 2 (i.e. 1 or 3 mod 4), then we KNOW we can split it into two groups that differ in size by only 1. One of these groups is even, in which case we set that to be $2x$. So, if $n$ is 1 mod 4, we know our weighing will lead to EITHER $(n+1)/2$ or $(n-1)/2$.
Last case is $n$ is 2 mod 4. $n=4z+2$. Set $x$ to be $z$. So we will either identify a group of size $2z$, or $2z+2$, i.e. $(n/2)+1$ or $(n/2)-1$.

SIXTH WEIGH: Put ALL THE COINS on one side of the scale. If a real coin weighs $w$ grams, then we will get a number $99w+-$(offset by fakes). We know the offset of the fake coins is even, since there's an even number of fakes! So, we now KNOW the decimal residue of $99w$ mod 2, call it $r$.
$99w$ mod 2 = $r$.
$99(w+-1)$ mod 2 = $r+-99$.
99 is odd, so a 99 fake coins would have a different mod residue to $r$, which we have already identified from our weighing. (Note - i know that 99 fake coins do not necessarily have the same direction of wrong weighting, but the disposition is odd, anyway, making a different residue)

added 4 characters in body
Source Link
TheGreatEscaper
  • 12k
  • 1
  • 43
  • 96

THIS IS A PARTIAL ANSWER. It identifies an evena real coin within 9 weighs. I'm posting it here because I believe it covers concepts that could be useful in creating the optimal solution.

THIS IS A PARTIAL ANSWER. It identifies an even within 9 weighs. I'm posting it here because I believe it covers concepts that could be useful in creating the optimal solution.

THIS IS A PARTIAL ANSWER. It identifies a real coin within 9 weighs. I'm posting it here because I believe it covers concepts that could be useful in creating the optimal solution.

Source Link
TheGreatEscaper
  • 12k
  • 1
  • 43
  • 96

THIS IS A PARTIAL ANSWER. It identifies an even within 9 weighs. I'm posting it here because I believe it covers concepts that could be useful in creating the optimal solution.

Here's the most important algorithm in my solution:

CLAIM: If we know that a group of n coins has an odd number of reals, in one weighing we can identify a group of less than or equal to (n/2) + 1 coins (I know that's not always an integer, hence less than or equal to), that also contains an odd number of reals.
PROOF: Let 2x be the largest even number less than or equal to n/2. Put x coins on either side of the scale.
CASE 1: The scale reads an even amount. In this case, we KNOW that out of our 2x coins, we have an even number of fakes. This is easy to show by perturbation - imagine starting with x real coins on each side, and changing a coin to a fake requires changing another coin to a fake to keep the scale reading even. So if there are an even number of odds in our 2x coins, there are an even number of reals. This means there are an ODD number of reals in the coins we didn't weigh, which is at most (n/2)+1.
CASE 2: The scale reads an odd amount. For similar reasoning to above, we have an ODD number of fakes in our 2x coins, and an ODD number of reals in our 2x coins. This amount is less than or equal to n/2.

So you can see that we can identify a MUCH smaller sample space with an odd number of real coins.

Even cooler to note is that this algorithm works with coin roles reversed.

However, we need to iron out some details.

If the number of coins with an odd number of reals, n, is 0 mod 4, then x will be n/4. So our weighing, without a doubt, will lead to identifying a group of n/2 coins with an odd number of reals.
If the number of coins with an odd number of reals, n, is 1 mod 2 (i.e. 1 or 3 mod 4), then we KNOW we can split it into two groups that differ in size by only 1. One of these groups is even, in which case we set that to be 2x. So, if n is 1 mod 4, we know our weighing will lead to EITHER (n+1)/2 or (n-1)/2.
Last case is n is 2 mod 4. n = 4z + 2. Set x to be z. So we will either identify a group of size 2z, or 2z + 2, i.e. (n/2)+1 or (n/2)-1.

Apply the important algorithm, and use that second paragraph to find out all possible cases.

START: 99 coins have odd no. of reals.
ONE WEIGH: We have identified a group of size 48 or 49 with odd no. of reals. If you identified 49, stop and skip to THE ANNOYING CASE.
TWO WEIGHS: Identified group of size 24 or 25 with odd no. of reals.
THREE WEIGHS: Found group of size 12 13 with odd reals.
FOUR WEIGHS: Found a group of size 6 7 with odd reals.
FIVE WEIGHS: Found a group of size (2 or 3 or 4) with odd reals.

The bolding will make sense later.

Alright, so now we need to do some sneaky stuff.

SIXTH WEIGH: Put ALL THE COINS on one side of the scale. If a real coin weighs w grams, then we will get a number 99w +- (some even number). We know the disposition of the fake coins is even, since there's an even number of fakes! So, we now KNOW the decimal residue of 99w mod 2, call it r.
99w mod 2 = r.
99(w+-1) mod 2 = r +- 99.
99 is odd, so a 99 fake coins would have a different mod residue to r, which we have already identified from our weighing.

Now apply this knowledge:

NINE WEIGHS FINISH: If you identified a group of 2 coins, one is real and one is not. Just weigh one, see what its residue is MOD 2, multiply by 99, and if you get residue r, the other one is fake, and if you don't get residue r, it's fake, and you're done in seven weighs.
If you identified a group of 4 coins, weigh three of them one by one, and similar logic to above to determine if real or fake, and you're done in nine ways worst case.
You can't have identified 3 coins, because each bolded item in that list can only be reached by the bolded item above, and I said to stop if you identified 49. However, to identify a REAL coin, it doesn't matter if you keep going at 49 coins and get down to 3, at which you can identify a real in 8 weighs.

THE ANNOYING CASE is one in which identifying a real is easy by the same method, but identifying a fake suddenly becomes a lot more work. I'll leave off this partial here. I think that:

Residues, and parity of scale display

Are two important concepts that are fairly high powered. Hopefully someone has the insight to use these concepts in a more watertight fashion.