M*****y 发帖数: 666 | 1 如果两个人的年龄差是 d = m + x ( m a non- negative integer, x in [0,1) ),
determine the length of time during which the older one is k times the age
of the younger one, where k is an integer bigger than 1.
let k = p/q be a rational number, k > 1. Answer in terms of k, d, m and or x.
请会解的高手给一些指导,bow// | B*****t 发帖数: 335 | 2 设过了p年后一个人的年龄正好是另一个人年龄的k倍. 就是接下面的方程
k[a+p]=[a+m+x+p]; set a+p=P, [x] is floor of x;
==> k[P] = [P+m+x],
简单的思路如下,不明白的话,建议自己画个阶梯函数的图,一目了然。
f1(P)=k[P]和f2(P)=[P+d]都是单调递增的阶梯函数。
f1(P)<=f2(P) 当P->0
f1(P)>f2(P) 当P->oo,
故f1和f2一定有交差, 但是当k>2时不一定有交点!!!!
接着注意到f1的取值为..q-k, q, q+k, q+2k,q为整数。可以看到每当P增加1时,f1的
值增加k,
同理每当P+d增加1时,f2的值每次提升1。所以随着P的增加一旦f1超过f2,就再也追不
上了。
严格来说,设f1(P)=f2(P)=z,题目的本质就是解个不等式方程,z和k是整数,P和d是
实数
z/k<=P
z<=P+d
讨论一下答案就出来了。
x.
【在 M*****y 的大作中提到】 : 如果两个人的年龄差是 d = m + x ( m a non- negative integer, x in [0,1) ), : determine the length of time during which the older one is k times the age : of the younger one, where k is an integer bigger than 1. : let k = p/q be a rational number, k > 1. Answer in terms of k, d, m and or x. : 请会解的高手给一些指导,bow//
| M*****y 发帖数: 666 | 3 Figure out the solution:
K * [t] = [t+m+x]
d = m+x
case 1: t >= m/ (k-1) && m = (K-1)*[t] && t
case 2: t>=m/(k-1) + 1-x&& m+1=(k-1)*[t]&&t
For case 1: if (K-1) divides m is true , then length is 1-x, Otherwise,
length is 0
For case 2: if (k-1) divides (m+1) is true, then length is x, Otherwise,
length is 0
The final result should be the sum of length in case 1 and case 2
x.
【在 M*****y 的大作中提到】 : 如果两个人的年龄差是 d = m + x ( m a non- negative integer, x in [0,1) ), : determine the length of time during which the older one is k times the age : of the younger one, where k is an integer bigger than 1. : let k = p/q be a rational number, k > 1. Answer in terms of k, d, m and or x. : 请会解的高手给一些指导,bow//
|
|