An interesting math problem
Verify the regular solid shapes only can be five types.
证明正多面体只能有5种.
First: Look at the proof procedure below:
Yes, it's just so easy :0证明正多面体只能有5种.
First: Look at the proof procedure below:
1
/*证明正多面体只能有5种
2
*分别是正 4, 6, 8, 12, 20面体
3
*
4
* First: 欧拉公式 V+F-E=2
5
* 假设每个面均为 正m边形 每个顶点都有n条棱 >> 显然的 m>=3 & n>=3 1
6
* Second: m*F = 2E
7
* Third: n*V = 2E
8
*
9
* 由First, Second, Third得到下式
10
* 2E/n + 2E/m -E = 2 >> 1/n + 1/m = 1/E + 1/2
11
* 即 1/n + 1/m > 1/2
12
* 上式中得到 m & n 不能同时大于3 2
13
*
14
* Manual :由1,2可得到 m,n至少一个等于3,分情况讨论后即可得出结果
15
* Automation :1,2作为条件 得出结果 如下方法实现
16
*/
/*证明正多面体只能有5种2
*分别是正 4, 6, 8, 12, 20面体3
*4
* First: 欧拉公式 V+F-E=25
* 假设每个面均为 正m边形 每个顶点都有n条棱 >> 显然的 m>=3 & n>=3 16
* Second: m*F = 2E7
* Third: n*V = 2E8
* 9
* 由First, Second, Third得到下式10
* 2E/n + 2E/m -E = 2 >> 1/n + 1/m = 1/E + 1/211
* 即 1/n + 1/m > 1/212
* 上式中得到 m & n 不能同时大于3 213
* 14
* Manual :由1,2可得到 m,n至少一个等于3,分情况讨论后即可得出结果15
* Automation :1,2作为条件 得出结果 如下方法实现16
*/Then I try to carve it out with code
Second: The easiest solution
1
static void GetResult()
2
{
3
for (double i = 3; i < int.MaxValue; i++)
4
{
5
for (double j = 3; j < int.MaxValue; j++)
6
{
7
if (1/i + 1/j > 1.0/2.0)
8
{
9
Console.WriteLine("i={0},j={1}", i.ToString(),j.ToString());
10
}
11
}
12
}
13
}
static void GetResult()2
{3
for (double i = 3; i < int.MaxValue; i++)4
{5
for (double j = 3; j < int.MaxValue; j++)6
{7
if (1/i + 1/j > 1.0/2.0)8
{9
Console.WriteLine("i={0},j={1}", i.ToString(),j.ToString());10
}11
}12
}13
}Also, it's very easy, and I'm sure it is not a good methd. The biggest problem is that the efficiency is so low.
It must has better solutions to solve this question.
Log it here and fix the efficiency problem later.


浙公网安备 33010602011771号