Uploaded by carlalouw2101

1 - Coin Weighing - Filled In

advertisement
1
Coin Weighing
Warm up problem:
a) There are 9 coins, all identical except that one is slightly heavier than the others. Find the
heavy coin using two weighings on a pan balance.
b) There are 8 coins, all identical except that one is slightly heavier or slightly lighter than the
others. Find the counterfeit using three weighings on a pan balance. You do not have to
identify the counterfeit as being too heavy or too light.
Coin Weighing Part 1: Adaptive Solutions
Definition 1: An adaptive solution is a step by step solution where at each step we adapt
depending upon the outcome of previous steps.
Note: When finding an adaptive solution to the warm up problem the following notation is very
helpful. Let:
“o” be a coin with an unknown weight.
“G” be a coin that is known to have the correct weight.
“H” be a coin that might be too heavy but is not too light.
“L” be a coin that might be too light but is not too heavy.
→
→
→
𝐿
𝑅
𝐡
represent the case when the scale tips to the left.
represent the case when the scale tips to the right.
represent the case when the scale balances.
Example 1: Find an adaptive solution to part “a” of the warm up problem.
2
Example 2: Find an adaptive solution to part “b” of the warm up problem.
3
Example 3: There are 12 coins, all identical except that one is slightly heavier or slightly lighter
than the others. Find the counterfeit using three weighings on a pan balance. Your solution must
be able to identify the counterfeit as being too heavy or too light.
4
Coin Weighing Part 2: Nonadaptive Solutions
Definition 2: In a nonadaptive solution all the steps are fully predetermined.
Example 4: Find a nonadaptive solution to part a) of the warm up problem:
There are 9 coins, all identical except that one is slightly heavier than the others. Find the heavy
coin using two weighings on a pan balance.
In your solution let “L” represent when the scale tips to the left, let “R” represent when the scale
tips to the right, and let “B” represent when the scale balances. With this notation “LB” will
mean that the first weighing tipped to the left and the second weighing balanced.
Counterfeit Coin
How the Scale Responds
LL
RR
LR
RL
BL
LB
BR
RB
BB
Example 5: Can example 4 be solved with 10 coins and two weighings?
5
Example 6: How many different ways can the scale respond with 3 weighings?
Example 7: Can a heavy counterfeit be identified among 27 coins with three weighings?
Example 8: Can a heavy counterfeit be identified among 28 coins with three weighings?
The Coin Theorem Part 1: Let 2 ≤ 𝑐 ≤ 3𝑀 . Given 𝑐 identical coins (one which is slightly
heavier than the others), the counterfeit can be found in 𝑀 weighings on a pan balance.
However, given 3𝑀 + 1 identical coins, 𝑀 + 1 weighings are needed.
Number of Weighings
The Maximum Number of Coins that a Heavy
Counterfeit can be Found Among
6
Example 9: Find a nonadaptive solution to part b) of the warm up problem:
There are 8 coins, all identical except that one is slightly heavier or slightly lighter than the
others. Find the counterfeit using three weighings on a pan balance. You do not have to identify
the counterfeit as being too heavy or too light.
Counterfeit Coin
How the Scale Responds
1
2
3
4
5
6
7
8
Definition: The ceiling function ⌈π‘₯⌉ rounds the number π‘₯ up to the closest integer. The floor
function ⌊π‘₯⌋ rounds the number π‘₯ down to the closest integer. If π‘₯ is already an integer, no
rounding is done. For example: ⌈5.001⌉ = 6, ⌊5.55⌋ = 5, ⌈5.0⌉ = 5, ⌊5.0⌋ = 5
Example 10: How many coins can be paired with responses if every coin that appears on the
scale is paired with two unique responses?
7
The Shifting Trick: This trick gives a non-adaptive solution to some coin weighing problems
when the number of coins is multiple of 3. You can also use this trick to add three coins to some
existing non-adaptive solutions.
Step 1: Find all Shifting Sets. Take any way the scale can respond (other than all L’s, all R’s, or
all B’s) shift this response according to the following diagram:
For example, if we are solving a coin weighing problem with three weighings. We need to pick
a response other than 𝐿𝐿𝐿, 𝑅𝑅𝑅, 𝐡𝐡𝐡. Say for example, we pick the response 𝐿𝐿𝑅 or 𝑅𝑅𝐿. We
can focus on the 𝐿𝐿𝑅 part of the response or we could focus on the 𝑅𝑅𝐿 part of response, let’s
focus on 𝐿𝐿𝑅. L shifts to B and R shifts to L so the 𝐿𝐿𝑅 response shifts to BBL:
𝐿𝐿𝑅
𝐡𝐡𝐿
Similarly,
𝐡𝐡𝐿
𝑅𝑅𝐡
This gives us what we call a shifting set LLR or RRL, BBL or BBR, RRB or LLB.
Repeat this process until all shifting sets are found.
Shifting Set 1
Shifting Set 2
Shifting Set 3
Shifting Set 4
LLR or RRL
BBL or BBR
RRB or LLB
RLL or LRR
LBB or RBB
BRR or BLL
LRL or RLR
BLB or BRB
RBR or LBL
BLR or BRL
RBL or LBR
LRB or RLB
8
Step 2: Use the Shifting Sets. Pick a shifting set and place coins on the scale corresponding to
it. Repeat this process for each shifting set until you have placed as the desired amount of coins
on the scale.
For example, if we are solving a 3-coin weighing problem with three weighings we could pick
the shifting set:
1: LLR or RRL
2: BBL or BBR
3: RRB or LLB
and place three coins on the scale corresponding to this shifting set:
1
3
2
1
3
2
2
1
3
We can repeat this process to add 3 more coins to the solution, by picking the shifting set:
4: RLL or LRR
5: LBB or RBB
6: BRR or BLL
1
1
2
5
4
4
3
3
1
4
2
6
2
5
3
5
6
6
9
The Shifting Trick Extension: The shifting trick can also be used to add three coins to some
existing non-adaptive solutions. As long as none of the responses in the shifting set are already
used in the existing non-adaptive solution, that shifting set can be used to can add three coins.
Example 11: There are 8 coins, all identical except that one is counterfeit and is either heavier
or lighter than the others. For convivence, number the coins from 1 to 8:
1
2
3
4
5
6
7
8
A successfully non-adaptive solution is given below that finds the counterfeit in three weighings
for coins 1 to 5:
1
3
2
4
Scale
Heavy
Scale
Response Coin Response
Light
Coin
Heavy
or
Lights
Coin
5
1
3
2
4
5
1
3
2
4
LLL
1
RRR
1
--
RRL
2
LLR
2
--
LRR
3
RLL
3
--
RLR
4
LRL
4
--
BBB
--
BBB
--
5
5
Use the shifting trick to add three coins to the above non-adaptive 5-coin solution to obtain a
non-adaptive 8-coin solution. Display your solution by adding coins 6,7, and8 to each weighing
in the diagram above and complete that last three rows of the table. All shifting sets are listed
below decide which shifting set to use.
Shifting Set 1
Shifting Set 2
Shifting Set 3
Shifting Set 4
LLR or RRL
BBL or BBR
RRB or LLB
RLL or LRR
LBB or RBB
BRR or BLL
LRL or RLR
BLB or BRB
RBR or LBL
BLR or BRL
RBL or LBR
LRB or RLB
10
On this page, the two examples will explain why the maximum number of coins that can be
solved with 3 weighings is 13.
Example 12: There are 13 coins, all identical except that one is slightly heavier or slightly
lighter than the others. Find the counterfeit using three weighings on a pan balance. You do not
have to identify the counterfeit as being too heavy or too light.
Counterfeit
Coin
How the Scale
Responds
Shifting
Set
LLR or RRL
BBL or BBR
1
RRB or LLB
RLL or LRR
LBB or RBB
2
BRR or BLL
LRL or RLR
BLB or BRB
3
RBR or LBL
BLR or BRL
RBL or LBR
4
LRB or RLB
LLL or RRR
BBB
Example 12: Explain why the previous example cannot be solved with 14 coins.
N/A
11
3𝑀
The Coin Theorem Part 2: Let 3 ≤ 𝑐 ≤ ⌊ 2 ⌋. Given 𝑐 identical coins (one of which is slightly
heavier or lighter than the others) the counterfeit can be found in 𝑀 weighings on a pan balance.
3𝑀
However, given ⌈ 2 ⌉ identical coins, 𝑀 + 1 weighings are needed.
Number of Weighings
The Maximum Number of Coins that
Counterfeit (heavy or lighter) can be Found
Among
Download