4 of 100: Pure Gold

All of these coins have one gold side and one silver side. You are only allowed to flip over pairs of adjacent coins. For which of these arrangements of 9 coins is it possible to make the entire row gold?

There's a lot going on here! Can you generalize your answer into a rule for when it's possible and when it's impossible to transform an arrangement to pure gold? When it's possible, how can you do it in the fewest number of flips? What if you could flip three adjacent coins instead of two?

Only A Only B It's possible for both It's impossible for both

This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try refreshing the page, (b) enabling javascript if it is disabled on your browser and, finally, (c) loading the non-javascript version of this page . We're sorry about the hassle.

26 solutions

Nguyen Quang
Jun 3, 2017

When you flip a pair of adjacent coins, the parity of the number of silver coins never change. So, if the initial arrangement has an odd number of silver coins, it's impossible to make it all gold.

Otherwise, there's exist a strategy to do this: keep finding the first silver coin (from left to right), and flip it with the next coin to the right.

PS: A generalization of this problems is given at Google Code Jam 2017 Qualification Round - Problem A

Thanks for the link to the Code Jam contest!

In other news, that interactive is super cool

Alex Li - 4 years ago

Should have read the problem more carefully. Thought it was to make them all silver

Kathy Campbell - 3 years, 11 months ago

By symmetry, its not just the parity of the number of silver coins but also the parity of number of gold coins that don't change.

Tejas Kasetty - 3 years, 11 months ago

Each flip of adjacent coins does one of the following:

>increases the number of gold coins by 2 (if both coins were silver)

>decreases the number of gold coins by 2 (if both coins were gold)

>leaves the number of gold coins unchanged (if one was silver and one was gold)

In every case, the parity (even or odd) of the number of gold coins does not change. For all 9 coins to be gold, it is necessary that the original number of gold coins be odd as well.

In arrangement B if we get all silver means the sides have to be gold. So getting silver one side means getting gold also one side

Ramakrishna G - 1 year, 2 months ago
Henny Lim
Jun 4, 2017

Since the number of coins is odd, if you could make the first and last coin gold at the same time, then it's impossible for that sequence to be all-gold or all-silver.

Any answer to this "What if you could flip three adjacent coins instead of two?".

Kevin Manley
Jun 7, 2017

When problem solving I often reduce to simpler case. In this way you can consider all possibilities in a systematic way. As you do this, you may see patterns. As you see patterns you can consider possible conceptual justification for those patterns. For this problem, I said, "What if I only had three coins? What are the possibilities?" ggg ggs gss gsg sss ssg sgg sgs. With this simpler case, its easy to see which cases can yield all gold coins. I first considered that if the total number of coins were odd, it would only be possible to solve where there was also on odd number of gold coins. I tested this conjecture with five coins. At this point, I realized that each flip would have to net +2, 0, or -2 gold coins. It follows that the only way to arrive at a row of gold coins is to begin with an even number of silver coins.

John Niemiec
Mar 14, 2018

Think about it this way. Keep pushing the coins until you get arrangement A to all gold. Now you now that if you can get arrangement B to equal arrangement A, then you know you can flip all the gold coins over for arrangement B. You can't do that and, therefore, it is only A.

Forrest McCann
Jun 12, 2017

If the number of silver faces up is even, then it is possible. If the number of silver faces up is odd, then it is impossible.

Jorge Luiz Bail
May 13, 2021

Because you can only ever change the amount of silver coins 2 at a time, the parity stays the same, meaning every combination's amount of silver coins is always the same parity, even or odd, from start to finish.]

This means:

If the amount of silver coins is even, you can turn it to all gold but not all silver

If the amount of silver coins is odd, you can turn it to all silver but not all gold

Nikhil Nagboth
May 14, 2020

No adjacent pairs for B. It doesn't change the pattern what so ever.

Satadal Paul
Feb 8, 2018

in arrangement 1 there are even number of silver coins ,but in arrangement 2 there are odd no of silver coins showing.

Arrangement A is the only one correct. Literally just trial and error. Pretty obvious lmao

Elisa See
Sep 24, 2017

if the amount of silver coins at the beginning are odd, you can't make it all gold, if it is an even amount of silver coins, it can be flipped.

Hazen Ellwood
Aug 13, 2017

Any arrangement with an odd number of silver coins will not be rearrangeable to an all gold pattern, arrangement B has 5 silver coins, 5 is odd, therefore it is impossible to arrange it. However, all arrangements with an even number of silver coins is possible, as Arrangement A has 4 silver coins, it is possible to flip it all gold.

Miguel Betran
Aug 3, 2017

"A" is the only possible solution as it starts with an odd number of coins showing the gold side. Since you can only change the sides of two coins at a time, if you don't have a starting amount of odd number of gold sided coins it is impossible to reach 9. 9 is an odd number therefore, it is impossible to reach 9 with only a potential of even numbers, this means B is impossible.

Uhalin Mohalin
Jun 11, 2017

Let a row be "flippable" if it can be reduced to only golden coins.

It is obvious that:

  1. Every arrangement of either an even or odd amount of golden coins is flippable.
  2. Every arrangement of an even amount of silver coins is flippable.

Hence [arrangement of even amount of silver coins]=[arrangement of either odd or even amount of golden coins] .

Since every arrangement can be reduced to an odd or even number of silver coins (be converting all golden coins to silver coins), we can reduce every arrangement of coins to either SSS=SG (odd) or SS=G even.

So it only remains to show that SG is not flippable.

Assume that SG is flippable. That means that, while flipping, the adjacent coin has not been flipped. That is not allowed, hence SG is not flippable.

Thus:

  1. Every arrangement which reduces to an odd amount of silver coins is not flippable.
  2. Every arrangement which reduces to an even amount of silver coins is flippable.
Akhil Vettical
Jun 11, 2017

For the first arrangement you can use trial and error method to solve it and you will find that it has odd number of gold coins . So it means that we can only get the full arrangement with gold coins if there is odd number of gold coins and not for even number of gold coins.

Sack Weeber
Jun 8, 2017

Sack Weeber

Jade W.
Jun 7, 2017

For an odd number of coins, it is only possible to transform all coins into gold (flipping 2 at a time) if there is already an odd number of gold coins facing upward. This way, one gold coin could be "set off to the side" while the remaining even number of coins can be flipped in pairs until all are gold-side-up.

If there was only an even number of gold coins facing up, those coins could each help one other coin become gold, resulting in another even number and with one silver coin still left over.

For each arrangement, you are flipping two coins. For this, there are three possible scenarios.

If the two adjacent coins are gold, it turns both of them silver. This means the number of gold coins goes down by two and the number of silver coins goes up by two.

If the two adjacent coins are silver, it turns both of them into gold. This means the number of gold coins goes up by two, and the number of silver coins goes down by two.

If the two adjacent coins are silver and gold, it switches them. This means the number of gold coins and, by consequence, the number of silver coins stays the same.

This gives us a neat idea of what is happening for each switch, and the entire problem becomes much easier to handle. You will notice that with each switch, the number of coins of a certain color only go up or down by an even number. This means the parity , or the even-odd nature of the coins stay the same.

Defining the number of silver coins as S S , and the number of gold coins as G G , this can also be expressed by saying

S i n t i a l S f i n a l ( m o d 2 ) {S_{intial}} \equiv {S_{final}} \pmod{2}

and

G i n t i a l G f i n a l ( m o d 2 ) {G_{intial}} \equiv {G_{final}} \pmod{2}

while only flipping two coins. If you start with an odd number of silver coins, you will finish with an odd number of silver coins. A solution, in this case, would contain zero silver coins. 0 0 ( m o d 2 ) 0 \equiv 0 \pmod{2} , so the starting amount of silver coins must be even, giving us a general way to determine if you can solve this problem.

Arrangement A started with 4 silver coins, and 4 0 ( m o d 2 ) 4 \equiv 0 \pmod{2} , making it possible for Arrangement A.

Arrangement A started with 5 silver coins, and 5 1 ( m o d 2 ) 5 \equiv 1 \pmod{2} , making it not possible for Arrangement B, so the answer is o n l y A \boxed{only A} .

Chris Lee
Jun 7, 2017

If you've done problems like this before you might know (This is the answer to almost all questions like this) If you expect all gold, then if silver is even then all gold is possible, otherwise if silver is odd then you can't get all gold, but you can get all but 1 gold. And same for : If you expect all silver, then if gold is even then all silver is possible, otherwise if gold is odd then you can't get all silver, but you can get all but 1 silver.

Hayden Forsythe
Jun 6, 2017

So, I think that you can get the whole row gold only if there is an odd amount of gold to start out with. If there's an even amount of gold, there's an odd amount of blank spaces, which means you can get all golds. To get more golds, there needs to be an even amount of blanks, since we get two golds at a time only.

Jonathan Dapadap
Jun 4, 2017

It is only possible if the remaining ungold coins is even.

  • The answer is arrangement A , because if you look at the number of gold coins in each one, There is a odd number in A and an even in B. There is a odd number of coins in each arrangement, and you have to flip by 2, which Is even, so it is A.
Julie Wright
Jun 4, 2017

To change an arrangement to all-gold, you would need to flip each of the s silver coins an odd number of times and flip each of the g gold coins an even number of times. Total number of coin flips needs to be even, because you flip them in pairs. Flipping the g gold coins an even number of times must total an even number of flips. But flipping the s silver coins each an odd number of flips will only be an even number of total flips if s is even. So B, with 5 silver coins, won't get you there.

Ivan Kwek
Jun 4, 2017

Trial and Error

Majed Kalaoun
Jun 3, 2017

An arrangement can only be transformed to being all gold (by flipping adjacent coins) if and only if the number of silver coins are even; when you flip a pair of adjacent coins, the parity of the number of silver coins never change. Thus, if the initial arrangement has an odd number of silver coins, it's impossible to make it all gold.

In arrangement A, there are 4 silver coins, an even number. Therefore, arrangement A can be flipped until it has reached all gold. You can do that by flipping two adjacent coins continuously from left to right. However, in arrangement B, there are 5 silver coins, which makes it unable to be flipped in a way that makes it all gold.

I have found it perfectly possible to make all the coins in B face their gold side. Let's say that a silver side is 0 and a gold side is 1.

0 1 0 1 0 1 0 1 0 -> 0 1 0 1 0 1 0 0 1 -> 0 1 0 1 0 0 1 1 1 -> 0 1 0 0 1 1 1 1 1 -> 0 0 1 1 1 1 1 1 1 -> 1 1 1 1 1 1 1 1 1

Tamara Holt - 1 year, 5 months ago

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...