Skip to main content
added 1 character in body
Source Link
Sleafar
  • 18.2k
  • 1
  • 47
  • 102

The weight of Cosmo's coin is

$341$, or represented as a binary number $101010101$.

Carl Löndahl found the second solution $171$.

Step 1

enter image description here

This image represents both sides of the scale, the colored part being the coin splitted in the corresponding weights. The part below demonstrates distribution of the weights for some possible weighings. In this case we only change the weights 256 and 512 ("bits" 8 and 9), and ignore changes in the rest of the bits. There are 2 possible cases. Let's call this number: $$S_1=2$$

Step 2

enter image description here

This time we look at the weights 128 and 64 ("bits" 6 and 7). We have again 2 possible cases. For each of the 2 cases we can choose 1 possible case from step 1 above which gives us together $2 * S_1$ cases.

enter image description here

But we have 1 additional case if we use all four "bits" 6 to 9. This gives us a new number: $$S_2=2*S_1+1=5$$

Step 3

enter image description here

Again 2 cases, this time using bits 4 and 5. Both can be combined with all cases from step 2.

enter image description here

One additional case using bits 4 to 7 which can be combined with all cases from step 1.

enter image description here

And one more case using bits 4 to 9. This gives us a total of: $$S_3=2*S_2+S_1+1=13$$

Step 4

enter image description here

Similar to previous chapters we can define: $$S_4=2*S_3+S_2+S_1+1=34$$

Step 5

I omitted the picture here as the pattern should be obvious now: $$S_5=2*S_4+S_3+S_2+S_1+1=89$$

Second solution (found by Carl Löndahl)

The nubmer of weighings can be calculated similarly for this number.

enter image description here
$$S_1=3$$
enter image description here

Here we see a difference, there are 2 cases without using bits 5 and 6, and this is also true for the following steps.$$S_2=2*S1+2=8$$ $$S_3=2*S_2+S_1+2=21$$ $$S_4=2*S_3+S_2+S_1+2=55$$ There is also a difference in the 5th step. Because bit 1 is already used we multiply with 1 instead of 2 here. $$S_5=1*S_4+S_3+S_2+S_1+2=89$$

General solution

Based on the thoughts above we can define a general way to calculate the number of weighings. First write the number in binary form. Then define a variable for each bit equal 1 from left to right as follows:

$x_1$ -> number of weights bigger or equal the value of the first set bit
$x_2$ -> number of remaining weights bigger or equal the value of the second set bit
$x_3$ -> number of remaining weights bigger or equal the value of the third set bit
...

The number can be then calculated as follows:
$$S_1 = x_1$$ $$S_2 = x_2*S1+(x_1-1)$$$$S_2 = x_2*S_1+(x_1-1)$$ $$S_3 = x_3*S_2+(x_2-1)*S_1+(x_1-1)$$ $$S_4 = x_4*S_3+(x_3-1)*S_2+(x_2-1)*S_1+(x_1-1)$$ $$S_5 = x_5*S_4+(x_4-1)*S_3+(x_3-1)*S_2+(x_2-1)*S_1+(x_1-1)$$

The weight of Cosmo's coin is

$341$, or represented as a binary number $101010101$.

Carl Löndahl found the second solution $171$.

Step 1

enter image description here

This image represents both sides of the scale, the colored part being the coin splitted in the corresponding weights. The part below demonstrates distribution of the weights for some possible weighings. In this case we only change the weights 256 and 512 ("bits" 8 and 9), and ignore changes in the rest of the bits. There are 2 possible cases. Let's call this number: $$S_1=2$$

Step 2

enter image description here

This time we look at the weights 128 and 64 ("bits" 6 and 7). We have again 2 possible cases. For each of the 2 cases we can choose 1 possible case from step 1 above which gives us together $2 * S_1$ cases.

enter image description here

But we have 1 additional case if we use all four "bits" 6 to 9. This gives us a new number: $$S_2=2*S_1+1=5$$

Step 3

enter image description here

Again 2 cases, this time using bits 4 and 5. Both can be combined with all cases from step 2.

enter image description here

One additional case using bits 4 to 7 which can be combined with all cases from step 1.

enter image description here

And one more case using bits 4 to 9. This gives us a total of: $$S_3=2*S_2+S_1+1=13$$

Step 4

enter image description here

Similar to previous chapters we can define: $$S_4=2*S_3+S_2+S_1+1=34$$

Step 5

I omitted the picture here as the pattern should be obvious now: $$S_5=2*S_4+S_3+S_2+S_1+1=89$$

Second solution (found by Carl Löndahl)

The nubmer of weighings can be calculated similarly for this number.

enter image description here
$$S_1=3$$
enter image description here

Here we see a difference, there are 2 cases without using bits 5 and 6, and this is also true for the following steps.$$S_2=2*S1+2=8$$ $$S_3=2*S_2+S_1+2=21$$ $$S_4=2*S_3+S_2+S_1+2=55$$ There is also a difference in the 5th step. Because bit 1 is already used we multiply with 1 instead of 2 here. $$S_5=1*S_4+S_3+S_2+S_1+2=89$$

General solution

Based on the thoughts above we can define a general way to calculate the number of weighings. First write the number in binary form. Then define a variable for each bit equal 1 from left to right as follows:

$x_1$ -> number of weights bigger or equal the value of the first set bit
$x_2$ -> number of remaining weights bigger or equal the value of the second set bit
$x_3$ -> number of remaining weights bigger or equal the value of the third set bit
...

The number can be then calculated as follows:
$$S_1 = x_1$$ $$S_2 = x_2*S1+(x_1-1)$$ $$S_3 = x_3*S_2+(x_2-1)*S_1+(x_1-1)$$ $$S_4 = x_4*S_3+(x_3-1)*S_2+(x_2-1)*S_1+(x_1-1)$$ $$S_5 = x_5*S_4+(x_4-1)*S_3+(x_3-1)*S_2+(x_2-1)*S_1+(x_1-1)$$

The weight of Cosmo's coin is

$341$, or represented as a binary number $101010101$.

Carl Löndahl found the second solution $171$.

Step 1

enter image description here

This image represents both sides of the scale, the colored part being the coin splitted in the corresponding weights. The part below demonstrates distribution of the weights for some possible weighings. In this case we only change the weights 256 and 512 ("bits" 8 and 9), and ignore changes in the rest of the bits. There are 2 possible cases. Let's call this number: $$S_1=2$$

Step 2

enter image description here

This time we look at the weights 128 and 64 ("bits" 6 and 7). We have again 2 possible cases. For each of the 2 cases we can choose 1 possible case from step 1 above which gives us together $2 * S_1$ cases.

enter image description here

But we have 1 additional case if we use all four "bits" 6 to 9. This gives us a new number: $$S_2=2*S_1+1=5$$

Step 3

enter image description here

Again 2 cases, this time using bits 4 and 5. Both can be combined with all cases from step 2.

enter image description here

One additional case using bits 4 to 7 which can be combined with all cases from step 1.

enter image description here

And one more case using bits 4 to 9. This gives us a total of: $$S_3=2*S_2+S_1+1=13$$

Step 4

enter image description here

Similar to previous chapters we can define: $$S_4=2*S_3+S_2+S_1+1=34$$

Step 5

I omitted the picture here as the pattern should be obvious now: $$S_5=2*S_4+S_3+S_2+S_1+1=89$$

Second solution (found by Carl Löndahl)

The nubmer of weighings can be calculated similarly for this number.

enter image description here
$$S_1=3$$
enter image description here

Here we see a difference, there are 2 cases without using bits 5 and 6, and this is also true for the following steps.$$S_2=2*S1+2=8$$ $$S_3=2*S_2+S_1+2=21$$ $$S_4=2*S_3+S_2+S_1+2=55$$ There is also a difference in the 5th step. Because bit 1 is already used we multiply with 1 instead of 2 here. $$S_5=1*S_4+S_3+S_2+S_1+2=89$$

General solution

Based on the thoughts above we can define a general way to calculate the number of weighings. First write the number in binary form. Then define a variable for each bit equal 1 from left to right as follows:

$x_1$ -> number of weights bigger or equal the value of the first set bit
$x_2$ -> number of remaining weights bigger or equal the value of the second set bit
$x_3$ -> number of remaining weights bigger or equal the value of the third set bit
...

The number can be then calculated as follows:
$$S_1 = x_1$$ $$S_2 = x_2*S_1+(x_1-1)$$ $$S_3 = x_3*S_2+(x_2-1)*S_1+(x_1-1)$$ $$S_4 = x_4*S_3+(x_3-1)*S_2+(x_2-1)*S_1+(x_1-1)$$ $$S_5 = x_5*S_4+(x_4-1)*S_3+(x_3-1)*S_2+(x_2-1)*S_1+(x_1-1)$$

added 1477 characters in body
Source Link
Sleafar
  • 18.2k
  • 1
  • 47
  • 102

The weight of Cosmo's coin is

$341$, or represented as a binary number $101010101$.

Carl Löndahl found the second solution $171$.

VariantStep 1

enter image description here

This image represents both sides of the scale, the colored part being the coin splitted in the corresponding weights. The part below demonstrates distribution of the weights for some possible weighings. In this case we only change the weights 256 and 512 ("bits" 8 and 9), and ignore changes in the rest of the bits. There are 2 possible cases. Let's call this number: $$V1=2$$$$S_1=2$$

VariantStep 2

enter image description here

This time we look at the weights 128 and 64 ("bits" 6 and 7). We have again 2 possible cases. For each of the 2 cases we can choose 1 possible case from variantstep 1 above which gives us together $2 * V1$$2 * S_1$ cases.

enter image description here

But we have 1 additional case if we use all four "bits" 6 to 9. This gives us a new number: $$V2=2*V1+1=5$$$$S_2=2*S_1+1=5$$

VariantStep 3

enter image description here

Again 2 cases, this time using bits 4 and 5. Both can be combined with all cases from variantstep 2.

enter image description here

One additional case using bits 4 to 7 which can be combined with all cases from variantstep 1.

enter image description here

And one more case using bits 4 to 9. This gives us a total of: $$V3=2*V2+V1+1=13$$$$S_3=2*S_2+S_1+1=13$$

VariantStep 4

enter image description here

Similar to previous chapters we can define: $$V4=2*V3+V2+V1+1=34$$$$S_4=2*S_3+S_2+S_1+1=34$$

VariantStep 5

I omitted the picture here as the pattern should be obvious now: $$V5=2*V4+V3+V2+V1+1=89$$$$S_5=2*S_4+S_3+S_2+S_1+1=89$$

Second solution (found by Carl Löndahl)

The nubmer of weighings can be calculated similarly for this number.

enter image description here
$$S_1=3$$
enter image description here

Here we see a difference, there are 2 cases without using bits 5 and 6, and this is also true for the following steps.$$S_2=2*S1+2=8$$ $$S_3=2*S_2+S_1+2=21$$ $$S_4=2*S_3+S_2+S_1+2=55$$ There is also a difference in the 5th step. Because bit 1 is already used we multiply with 1 instead of 2 here. $$S_5=1*S_4+S_3+S_2+S_1+2=89$$

General solution

Based on the thoughts above we can define a general way to calculate the number of weighings. First write the number in binary form. Then define a variable for each bit equal 1 from left to right as follows:

$x_1$ -> number of weights bigger or equal the value of the first set bit
$x_2$ -> number of remaining weights bigger or equal the value of the second set bit
$x_3$ -> number of remaining weights bigger or equal the value of the third set bit
...

The number can be then calculated as follows:
$$S_1 = x_1$$ $$S_2 = x_2*S1+(x_1-1)$$ $$S_3 = x_3*S_2+(x_2-1)*S_1+(x_1-1)$$ $$S_4 = x_4*S_3+(x_3-1)*S_2+(x_2-1)*S_1+(x_1-1)$$ $$S_5 = x_5*S_4+(x_4-1)*S_3+(x_3-1)*S_2+(x_2-1)*S_1+(x_1-1)$$

The weight of Cosmo's coin is

$341$, or represented as a binary number $101010101$.

Variant 1

enter image description here

This image represents both sides of the scale, the colored part being the coin splitted in the corresponding weights. The part below demonstrates distribution of the weights for some possible weighings. In this case we only change the weights 256 and 512 ("bits" 8 and 9), and ignore changes in the rest of the bits. There are 2 possible cases. Let's call this number: $$V1=2$$

Variant 2

enter image description here

This time we look at the weights 128 and 64 ("bits" 6 and 7). We have again 2 possible cases. For each of the 2 cases we can choose 1 possible case from variant 1 above which gives us together $2 * V1$ cases.

enter image description here

But we have 1 additional case if we use all four "bits" 6 to 9. This gives us a new number: $$V2=2*V1+1=5$$

Variant 3

enter image description here

Again 2 cases, this time using bits 4 and 5. Both can be combined with all cases from variant 2.

enter image description here

One additional case using bits 4 to 7 which can be combined with all cases from variant 1.

enter image description here

And one more case using bits 4 to 9. This gives us a total of: $$V3=2*V2+V1+1=13$$

Variant 4

enter image description here

Similar to previous chapters we can define: $$V4=2*V3+V2+V1+1=34$$

Variant 5

I omitted the picture here as the pattern should be obvious now: $$V5=2*V4+V3+V2+V1+1=89$$

The weight of Cosmo's coin is

$341$, or represented as a binary number $101010101$.

Carl Löndahl found the second solution $171$.

Step 1

enter image description here

This image represents both sides of the scale, the colored part being the coin splitted in the corresponding weights. The part below demonstrates distribution of the weights for some possible weighings. In this case we only change the weights 256 and 512 ("bits" 8 and 9), and ignore changes in the rest of the bits. There are 2 possible cases. Let's call this number: $$S_1=2$$

Step 2

enter image description here

This time we look at the weights 128 and 64 ("bits" 6 and 7). We have again 2 possible cases. For each of the 2 cases we can choose 1 possible case from step 1 above which gives us together $2 * S_1$ cases.

enter image description here

But we have 1 additional case if we use all four "bits" 6 to 9. This gives us a new number: $$S_2=2*S_1+1=5$$

Step 3

enter image description here

Again 2 cases, this time using bits 4 and 5. Both can be combined with all cases from step 2.

enter image description here

One additional case using bits 4 to 7 which can be combined with all cases from step 1.

enter image description here

And one more case using bits 4 to 9. This gives us a total of: $$S_3=2*S_2+S_1+1=13$$

Step 4

enter image description here

Similar to previous chapters we can define: $$S_4=2*S_3+S_2+S_1+1=34$$

Step 5

I omitted the picture here as the pattern should be obvious now: $$S_5=2*S_4+S_3+S_2+S_1+1=89$$

Second solution (found by Carl Löndahl)

The nubmer of weighings can be calculated similarly for this number.

enter image description here
$$S_1=3$$
enter image description here

Here we see a difference, there are 2 cases without using bits 5 and 6, and this is also true for the following steps.$$S_2=2*S1+2=8$$ $$S_3=2*S_2+S_1+2=21$$ $$S_4=2*S_3+S_2+S_1+2=55$$ There is also a difference in the 5th step. Because bit 1 is already used we multiply with 1 instead of 2 here. $$S_5=1*S_4+S_3+S_2+S_1+2=89$$

General solution

Based on the thoughts above we can define a general way to calculate the number of weighings. First write the number in binary form. Then define a variable for each bit equal 1 from left to right as follows:

$x_1$ -> number of weights bigger or equal the value of the first set bit
$x_2$ -> number of remaining weights bigger or equal the value of the second set bit
$x_3$ -> number of remaining weights bigger or equal the value of the third set bit
...

The number can be then calculated as follows:
$$S_1 = x_1$$ $$S_2 = x_2*S1+(x_1-1)$$ $$S_3 = x_3*S_2+(x_2-1)*S_1+(x_1-1)$$ $$S_4 = x_4*S_3+(x_3-1)*S_2+(x_2-1)*S_1+(x_1-1)$$ $$S_5 = x_5*S_4+(x_4-1)*S_3+(x_3-1)*S_2+(x_2-1)*S_1+(x_1-1)$$

Source Link
Sleafar
  • 18.2k
  • 1
  • 47
  • 102

The weight of Cosmo's coin is

$341$, or represented as a binary number $101010101$.

Variant 1

enter image description here

This image represents both sides of the scale, the colored part being the coin splitted in the corresponding weights. The part below demonstrates distribution of the weights for some possible weighings. In this case we only change the weights 256 and 512 ("bits" 8 and 9), and ignore changes in the rest of the bits. There are 2 possible cases. Let's call this number: $$V1=2$$

Variant 2

enter image description here

This time we look at the weights 128 and 64 ("bits" 6 and 7). We have again 2 possible cases. For each of the 2 cases we can choose 1 possible case from variant 1 above which gives us together $2 * V1$ cases.

enter image description here

But we have 1 additional case if we use all four "bits" 6 to 9. This gives us a new number: $$V2=2*V1+1=5$$

Variant 3

enter image description here

Again 2 cases, this time using bits 4 and 5. Both can be combined with all cases from variant 2.

enter image description here

One additional case using bits 4 to 7 which can be combined with all cases from variant 1.

enter image description here

And one more case using bits 4 to 9. This gives us a total of: $$V3=2*V2+V1+1=13$$

Variant 4

enter image description here

Similar to previous chapters we can define: $$V4=2*V3+V2+V1+1=34$$

Variant 5

I omitted the picture here as the pattern should be obvious now: $$V5=2*V4+V3+V2+V1+1=89$$