水手猴子和椰子程序matlab,[转载]水手分椰子类型题通解公式及推导(中英对照修改版)...

一,水手分椰子类型题简易通解公式

通解公式

(1), y=a(a/m)n-1-db/c,(用于b/c为正整数)

通解公式 (2),

y=[ka(a/m)n-1-db]/c,(用于b/c不为正整数)

其中:

y ── 被分的椰子的总个数

a ── 每次分的份数, (可为任意数)

n ── 总共分的次数(可为任意数)

b ── 每次分a份后的余数.

c ── 每次分a份后拿走的份数,

d ── 每次分a份后拿走c份后,剩下再分的份数.

m —— (a/d)的最大公约数

(a)在上试公式中,按照这种类型题题意的要求;y、a、b、c、d、m、都为正整数,n大于等于2(反之无意义)

(b)对于公式(1),若b/c为正整数,则通解公必定会有解。若b/c不是一个正整数,则用通解公式(2)求解,(c)对于公式(2),若b/m为正整数,则通解公必定会有解。若b/m不是一个正整数,则例题本身无解,也为通解公式(2)无解。(d)解公式(2)中的k,可通过求k公式: k=(fc+b)(m/d)n-1而得到,

(试中k大于等于0, f

是能使k取整的自然数, 在一般情况下,

k会小于=c),然后再将k值代进公式2,

便可很容易的直接得到解。

一,

Sailors assigned coconut problem, simple

General Solution Formula:

Solution Formula

(1), y=a(a/m)n-1-db/c,(for b / c is a positive

integer)

Solution Formula (2), y=[ka(a/m)n-1-db]/c, (when b / c is not a

positive integer use

y

——The total number is to be assigned coconut

a

——each time you want to assign the number of copies of (non-zero

natural number)

n ——Coconut assigned the total number

of times

c ── after

each allocation, to take away part of the

d── after each allocation.Pick

up the part after, the remaining part.

m —— (a/d) of the greatest

common divisor

(A)

In the above formula, according to the meaning of the subject of

this type; y, a, b, c, d, m, n are positive integers, wherein, n is

greater than or equal to 2

.

(B) for equation (1), when

b/c is a positive integer, the formula (1) will

certainly get the solution. If b/c is not a positive

integer, using the formula (2) solving

(c)

for the equation (2), if b/m is a positive

integer, the formula (2) will answer. If b/m

is not a positive integer, then the formula (2) has no

solution.

(D) Equation (2) is k, by the formula of k:

k=(fc+b)(m/d)n-1 is obtained, (k Test of

greater than or equal 0, f can be natural number k to obtain an

integer, in general, k will be less than = c), and then

substituting into equation 2 the value of k, can be easily obtained

directly solution.

二,公式的推导

其推导过程如下(Its

derivation is as follows):

设,第6次,5个水手一起分椰子时,看到的数量为(last,

five seaman with distribution of coconut,see the coconut

number)ax+b,x为最后一次分a份后,每份的个数

(X,for the sixth time, distribution of coconut,

coconut each a number)。

那么,第5个水手分椰子时,

看到的椰子数为(Fifth

divided  coconut, see the

coconut number):(ax+b)a/d+b=a2x/d+ba/d+b

第4个水手分椰子时,看到的椰子数为(Fourth

seaman  divided coconut, see the

coconut number):(a2x/d+ab/d+b)a/d+b=a3x/d2+b(a/d)2+ba/d+b

同样有,第3个水手分椰子时,

看到的椰子数为 (Equally third seaman  divided

coconut, see the coconut number ):a4x/d3+b(a/d)3+b(a/d)2+ba/d+b

然后,再一路往后推,第1个水手分椰子时,

看到的椰子数为(Then, as before

pushing back, first seaman divided coconut, see

the coconut number):

y=a6x/d5+[(a/d)5+(a/d)4+(a/d)3+(a/d)2+(a/d)+1]b,

上式中的括号内是一个公比为(d/a)的等比数例, 根据等比数例递推公式有 (n

the type of

brackets,is a'public'(d/a) as the'number

cases',According to the geometric progression recursion formula and

generalize:

y=anx/dn-1+{(a/d)n-1[1-(d/a)n/(1-d/a)]}/b

=anx/dn-1+[(a/d)n-1-d/a]ab/c

=anx/dn-1+ban/cdn-1-db/c

=(canx+ban)/cdn-1-db/c

=an(cx+b)/cdn-1-db/c

=an(x+b/c)/dn-1-db/c

从而得到求解的基本方程.y=an(x+b/c)/dn-1-db/c,并由此可得到,一个及简易公式和二个通解公式,现分析如下:

Thereby

obtaining the basic equation solving. y=an(x+b/c)/dn-1-db/cAnd thus

obtain a simple formula, and two-pass solution formula is analyzed

as

follows:

(1)当上式中的a(a/d)n-1部分,

若(a/d)无公约数时,则an与dn-1互质,

故上式可进一步写成:y=an[(x+b/c)/dn-1]-db/c

从上式可看出:根据题意dn-1必然是正整数,当(b/c)也为正整数,则(x+b/c)/dn-1必可取得最小自然数1,

或1

的任意整倍数,即y=kan-db/c,故(b/c)为正整数时,公式必定有解,

通常在计算时为了简便,k一般取最小自然数1,

则上述方程可简写成,简易公式:y=an-db/c,这个公式可看作是这种类型题目其中的一个通解,但不一定是最小解。

(1) When the

above formula,a(a/d)n-1 section, if (a/d) no divisor,

then the an and dn-1 are relatively prime, the above formula can be

further written

as:y=an[(x+b/c)/dn-1]-db/c

be seen from the above

equation: According to these questions is intended,

((b/c)must be a positive integer

when((b/c)is also a positive

integer,then y=kan-db/c,inevitable.get the

smallest natural number1, or any multiple of 1,ie,y=an-db/c,so

when((b/c)when the a positive

integer,the formula is bound to answers.

(2)若出现(a/d)有公约数这种情况时,此时y值,还会有比公式,y=an-db/c更小的解,现在我们接着 y=an(x+b/c)/dn-1-db/c,这一步继续求证,设m为(a/b)的最大公约数,则有:

y=a[(a/m)/(d/m)]n-1(x+b/c)-db/c

=a(a/m)n-1(x+b/c)/(d/m)n-1

-db/c。

(2) If there is (a/d) a common

divisor, in this case, y value is also there will be a ratio of

General Solution smaller solution, now we

then,y=an(x+b/c)/dn-1-db/c this step and

continue projections, if the set: m of (a/b) of the greatest common

divisor, then there:

y

=a[(a/m)/(d/m)]n-1(x+b/c)-db/c

=a(a/m)n-1(x+b/c)/(d/m)n-1 -db/

根据上面第一种情况后面的同样道理,可得到:y=a(a/m)n-1-db/c

显然,如果我们把 1也看做是(a/d)的公约数,那么当(a/d)的公约数只有

1时,则y=a(a/m)n-1-db/c=an-db/c

也就是说:后者实质上是前者特殊形式,而y=a(a/m)n-1-db/c,不仅是“五猴分桃”这种类型题的通解公式,同时也是符合题意要求的,求解所有的此种类型题的最小解的通解公式,它的解集为:y=ka(a/m)n-1-db/c(k为任意整数)

According

to the first case above, followed by the same token, can be

obtained: y=a(a/m)n-1-db/c

Clearly,

if we put one, is seen as a (a / d) divisor , then, when (a / d) of

the divisor is only 1, then

y=a(a/m)n-1-db/c=an-db/c

In other words: the latter essence, it Is the a special form of the

former, while the y = a (a / m) n-1-db / c, Not just the "Sailor

assigned coconut" type general solution formula. Meanwhile, It is

also consistent with the requirements of the subject, to find the

smallest answer, the general

solution

(3),若b/c不为正整数,则可用通解公式;y=[ka(a/m)n-1-db]/c.来求解,其公式推导如下:

对于基础方程:

y=k(a/m)n-1(x+b/c)/(d/m)n-1-db/c。可将其中的

"a(a/m)n-1(x+b/c)/(d/m)n-1"

部分的分子和分母,同时剩以c,得到y=k(a/m)n-1(x+b/c)c/c(d/m)n-1-db/c,记为h,并使得(x+b/c)c=k(d/m)n-1

(k正整数)这样式h,便变成了y=k(a/m)n-1/c-db/c,进一步变形得到即通解公式2;y=[k(a/m)n-1-db]/c.(即通解公式2).

(3)

If b/c is not a positive integer,the available

general solution formula 2; y=[ka(a/m)n-1-db]/c to solve, the

formula is derived as follows:

For the base

equation: y=k(a/m)n-1(x+b/c)/(d/m)n-1-db/c。We can Put them,

"a(a/m)n-1(x+b/c)/(d/m)n-1" of this part of the numerator and

denominator, and multiplying c, to obtain

y=k(a/m)n-1(x+b/c)c/c(d/m)n-1-db/c,, denoted by h, and such that

(x+b/c)c=k(d/m)n-1 (k

positive integer), where h, then

becomesy=k(a/m)n-1/c-db/c, further deformation to obtain

y=[k(a/m)n-1-db]/c(ie, the general solution of

equation 2)

(4)关于公式2,求k公式的推导; 设x=[k(d/m)n-1-b]/c,

则有cx+b=k(d/m)n-1所以有k=cx+b/(d/m)n-1,最后得到:k=(fc+b)(m/d)n-1(k为正整数,f为能使k取整数的自然数)

(4) 2, the

derivation of a formula of k's formula; Let x = [k (d / m) n-1-b] /

c, there cx + b = k (d / m) n-1, there : k = cx + b / (d / m) n-1,

the last obtained: k = (fc + b) (m / d) n-1 (1.k is a positive

integer, 2.f that make k get natural number integer)

三,后记

本文在解决“五猴分桃问题”简易计算方法这个问题上,跳出了单个、局部考虑问题的思路,从这个问题的分的规律来寻找整体解决方案,得到了简易通解公式(1):y=a(a/m)n-1-db/c。和它的姊妹公式(2):y=[ka(a/m)n-1-db]/c。在通解公式里,

1,由于a和n可为任意数,且其它影响计算结果的因素又都可以是变量;因此这个公式穷极了,求解这类问题的深度和广度。

2、各个变量基本上都没有相关的系数计算,且基本上都是单独出现,另外公式有解无解的条件也简单明了,

因此这个通解公式应又是求解这种类型题的最简计算公式。

3通解公式所得到的解,又是符合这类题目的求最小解的要求,因此可以说,这个提出来已半个多世纪的数学问题,已经得到较园满的解决

Third,

Postscript

In this

paper, the simple calculation method to solve the "five monkey sub

peach problem," this issue, out of a single, partial consider the

idea, from the point of law of this issue to find the overall

solution, get a simple solution formula (1): y = a (a / m) n-1-db /

c. And its sister formula (2): y = [ka (a / m) n-1-db] / c. In

general solution formula,

the

1, due

to a and n can be any number, and other factors also affect the

calculation results can be variable; therefore a very poor this

formula, the depth and breadth of solving such

problems.

2, each variable is essentially

no correlation coefficient calculation, and there are basically

alone, while no solution equation solvability conditions are simple

and clear, so the general solution formula should also be the

easiest to solve this type of problem formula

.

3-way solution formula obtained

solution, and is consistent with the purpose of seeking such

practice requires a minimum solution, it can be said that the

proposed mathematical problem to have over half a century, has been

relatively garden full of

resolve

引用本文中的公式及公式的推导请注明来源,

否则依法追究侵权责任。

Cite this article equation and Formula

Derivation, please indicate the source, otherwise shall be held

tort liability.

本文作者:中国湖南省祁阳县陈小刚2012年

5月  9日

Author:

Xiao Gang-chen (Qiyang county 426100, Hunan province,

China)

中译英文:中国湖南省祁阳县唐文军2012年

5月 21日

Translator: Tang Wen-jun(University of South

China, Hunan province , China)

公式发表时间:2012年4月21日(见本人微博)

Formula

Posted: 21 April 2012 (see my microblogging)

本文修改时期;2014年 1月

18日

This paper modify period; January 18, 2014

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值