B******l 发帖数: 262 | 1 有三种颜色的球,红色13个,绿色16个,黄色 17个,有一个方法可以使球变色,拿出
两个不同颜色的球,就能变成第三种颜色,如拿出一个红色,一个黄色,就会变成两个
绿色的球。问有没有可能把这些球变成同一种颜色,如果可能,怎么做,如果不可能,
为什么。引申,x个红球,y个绿球,z个黄球,当x,y,z满足什么关系时,一定有解决
方案,否则无解。 | x***y 发帖数: 633 | 2 1 green + 1 yellow => 15 red + 15 green+ 16 yellow
15*(1 red + 1 green) => 46 yellow
As long as the difference between any 2 groups is a multiple of 3 and the
total amount is >= 4/3 * the difference.
【在 B******l 的大作中提到】 : 有三种颜色的球,红色13个,绿色16个,黄色 17个,有一个方法可以使球变色,拿出 : 两个不同颜色的球,就能变成第三种颜色,如拿出一个红色,一个黄色,就会变成两个 : 绿色的球。问有没有可能把这些球变成同一种颜色,如果可能,怎么做,如果不可能, : 为什么。引申,x个红球,y个绿球,z个黄球,当x,y,z满足什么关系时,一定有解决 : 方案,否则无解。
| b***e 发帖数: 1419 | 3 如果三数模3的余数各不相同, 就是分别是0, 1, 2, 则无解,因为(0,1,2)在题目所给
出的变换下总是回到(0,1,2)。否则有解, easy to see. | a**********k 发帖数: 1953 | 4 This one has a solution:
(0, 1, 2 ) -> (0+1, 1-1, 2-1)->(1,0,1)->(1-1,0+1,1-1)->(0,1,0)
I think it works as long as the difference between any two groups is even.
【在 b***e 的大作中提到】 : 如果三数模3的余数各不相同, 就是分别是0, 1, 2, 则无解,因为(0,1,2)在题目所给 : 出的变换下总是回到(0,1,2)。否则有解, easy to see.
| l*********r 发帖数: 674 | 5 你第一步错了:(0,1,2) -〉(2,0,1)而不是(1,0,1)。两个变成两个,而不是merge
成一个。球的总数不能变的。
【在 a**********k 的大作中提到】 : This one has a solution: : (0, 1, 2 ) -> (0+1, 1-1, 2-1)->(1,0,1)->(1-1,0+1,1-1)->(0,1,0) : I think it works as long as the difference between any two groups is even.
| b***e 发帖数: 1419 | 6 This is a different problem. But if you go this way, there's always a
solution, because if there are two ball with different colors, you can
merge them to reduce the total number of balls. So the end of the day,
you will certainly have all balls in the same color where the bottomline
is you have only 1 ball.
even.
【在 a**********k 的大作中提到】 : This one has a solution: : (0, 1, 2 ) -> (0+1, 1-1, 2-1)->(1,0,1)->(1-1,0+1,1-1)->(0,1,0) : I think it works as long as the difference between any two groups is even.
| z***i 发帖数: 9880 | 7 1.绿球+黄球=2红球,三种球数量变成15,15,16.
然后一路红球和绿球变下去就行了。
【在 B******l 的大作中提到】 : 有三种颜色的球,红色13个,绿色16个,黄色 17个,有一个方法可以使球变色,拿出 : 两个不同颜色的球,就能变成第三种颜色,如拿出一个红色,一个黄色,就会变成两个 : 绿色的球。问有没有可能把这些球变成同一种颜色,如果可能,怎么做,如果不可能, : 为什么。引申,x个红球,y个绿球,z个黄球,当x,y,z满足什么关系时,一定有解决 : 方案,否则无解。
| k*******a 发帖数: 772 | 8 每次变化,三个数之间3对差的对3的余数保持不变,所以要变成0 0 x的话,必须有两
个数,差能被3整除,而这两个数最后变成0 | m*****k 发帖数: 731 | 9 how about 5 2 0?
5+2 = 7>= (5-2)*4/3
I think so long as G1 - G2 = 3k and G3>=k then we have a solution.
【在 x***y 的大作中提到】 : 1 green + 1 yellow => 15 red + 15 green+ 16 yellow : 15*(1 red + 1 green) => 46 yellow : As long as the difference between any 2 groups is a multiple of 3 and the : total amount is >= 4/3 * the difference.
| j**w 发帖数: 382 | 10 13,16,17
0,29,4
2,27,2
0,29,0 |
|