整数划分问题的一些证明
NO.1
在自然数n的所有二项分拆中,当n是偶数2m时,以分成m+m时乘积最大;当n是奇数2m+1时,以分成m+(m+1)时乘积最大。换句话说,把自然数S(S>1)分拆为两个自然数m与n的和,使其积mn最大的条件是:m=n,或m=n+1。
这句话从小学开始就有很多版本,什么“给你一条绳子,周长一定,如何将围成的四边形面积最大”之类的问题都是这一个数学模型。
证明:
分两种情况讨论
1.n为偶数。
则原问题可以化为:对于一个自然偶数n,求证m*m>(m-1)(m+1)(m=n/2)
显而易见,m*m>m^2-1
2.n为奇数
则原问题可以化为:对于一个自然奇数n,求证m(m+1)>(m-1)(m+2)
M(m+1)=m^2+m
(m-1)(m+2)=m^2+m-2
M^2+m>m^2+m-2
故m(m+1)>(m-1)(m+2)
证毕。
——————————————我是华丽丽的分割线————————————
NO.2
把自然数S(S>1)分拆为若干个自然数的和:
S=a1+a2+…+an,
则当a1,a2,…,an中至多有两个2,其余都是3时,其连乘积m=a1a2…an有最大值。
证明:
首先,1是不会对连乘积有任何帮助。排除掉划分1的可能。
其次,对任意一个数a=m*n,假设n=m+1,就是对2个相邻的自然数,那么连乘积就是m的n次方或者n的m次方。
n^m=(m+1)^m=m^m+2m^(m-1)+...+1
m^n=m^(m+1)=m^m+m^m+... +m^m
因为
当n>2时,m^m>2*m^(m-1)
所以,当n>2时,m^n>n^m
这说明把数的每一项分的尽可能小,对连乘积有利。
但是3比2有利。(就是当n=2时的情况)
综上所述,当a1,a2,…,an中至多有两个2,其余都是3时,其连乘积m=a1a2…an有最大值。
————————————我是华丽丽的分割线————————————
NO.3
把自然数N分解成若干个互不相同的正整数,使乘积最大;
假设最大积的分解为
n=a1+a2+a3+...+a[t-2]+a[t-1]+a[t]
(a1<a2<a3<...<a[t-2]<a[t-1]<a[t])
则问题的方案为
sum=2+3+...+k
m=n-sum
case m of
0:ansset=[2,k]
1..k-1:ansset=[2..k+1-m)and(k+1-m..k+1]
K:ansset=[3..k)and[k+2,k+2]
证明:
以下部分非我所写,来自某一个问题的discuss,如果有人知道出处请联系我。
1. 1<a1
if a1=1, then a1(=1), a[t] together could be replaced by a[t]+1.
2. to all i, a[i+1]-a[i]<=2;
if some i make a[i+1]-a[i]>=3,
then a[i],a[i+1] together could be replaced by a[i]+1,a[i+1]-1 together.
3. at MOST one i, fits a[i+1]-a[i]=2
if i<j and a[i+1]-a[i]=2 and a[j+1]-a[j]=2 then
a[i],a[j+1] could be replaced by a[i]+1, a[j+1]-1
4. a1<=3
if a1>=4, then a1,a2 together could be replaced by 2, a1-1, a2-1 together
5. if a1=3 and one i fits a[i+1]-a[i]=2 then i must be t-1
if i<t-1 then a[i+2] could be replaced by 2, a[i+2]-2 together
Now, from the five rules above, we could make the mutiple maximum.
to an N, find the integer k, fits
A=2+3+4+...+(k-1)+k <= N < A+(k+1)=B
Suppose N = A + p, (0 <= p < k+1)
1) p=0, then answer is Set A
2) 1<=p<=k-1 then answer is Set B - { k+1-p }
3) p=k, then answer is Set A - {2} + {k+2}
We can prove this is the best choice with ease,
as any other choice will lead to at least one of the following:
1) a1>=4 or a1=1
2) two a[i+1]-a[i]=1 or one a[i+1]-a[i]=2
3) a1=3 and some i<t-2 fits a[i+1]-a[i]=1