Chinaunix首页 | 论坛 | 博客
  • 博客访问: 669697
  • 博文数量: 183
  • 博客积分: 9166
  • 博客等级: 中将
  • 技术积分: 1920
  • 用 户 组: 普通用户
  • 注册时间: 2009-01-31 16:17
文章分类

全部博文(183)

文章存档

2010年(159)

2009年(24)

分类:

2010-04-19 22:15:41

from : 

原文:

Present a computation whose result is 5, being a composition of commonly used mathematical functions and field operators (anything from simple addition to hyperbolic arc-tangent functions will do), but using only two constants, both of them 2.

It is too easy to do it using round, floor, or ceiling functions, so we do not allow them.

Update 1/11: You can only use 2 instances of the constant 2, so solutions like (2+2+2/2) is illegal. You can not use variables so (x+x+x+x+x)/x is not allowed. You can use square root and power, but squaring will cost you one "2" and other constant powers are not allowed.


利用各种数学函数和数学符号,用两个数字 2 得到一个 5 。不过,有一些限制条件:
    1. 只能够使用两次数字 2 。因此,像 2 + 2 + 2/2 这样的算式是不行的。
    2. 不允许使用变量,因此 (2x + 2x + x)/x 也是不合法的。
    3. 不允许使用其它常量,因此 2 + 2 + ln(e) 是不合法的,因为用到了常量 e 。诸如 (2+i)(2-i) 的妙解也因此被禁止了。
    4. 不允许使用取整类的函数,否则问题就太简单了,例如⌈√(2*2)!⌉。


  
 
 
 
 
 
 
 
 =====================================================

一些解:


    一个非常巧妙的解是 cos(atan(2))-2 。注意直角边为 1:2 的直角三角形,斜边长应该是 √5 ,那么 cos(atan(2)) 就应该等于 1/√5 ,它的 -2 次方就是我们要求的结果了。
    另一个比较万能的解则是 -log2(ln(√√√√√√exp(2))) 。显然 √exp(2) 就等于 e ,再连续开 5 次平方后就等于e1/32 ,取对数后就是 1/32 ,相当于 2-5 。因此, -log2(1/32) 就恰好等于 5 了。显然,我们还能用这种方法把两个 2 变成任意一个整数。

阅读(913) | 评论(1) | 转发(0) |
给主人留下些什么吧!~~

安何2010-04-30 14:30:33