[存档!]纯数学、物理学、化学等:与贸易没有任何关系的大脑训练问题 - 页 451

 

下面是SMax=3000时的结果

2011.01.15 19:14:26 MetaSage (EURUSD,M1) //+---- Max = 3000 -------------------+
2011.01.15 19:14:21 MetaSage (EURUSD,M1) S=163; P=4192; a=32; b=131
2011.01.15 19:14:21 MetaSage (EURUSD,M1) S=127; P=1776; a=16; b=111
2011.01.15 19:14:21 MetaSage (EURUSD,M1) S=89; P=1168; a=16; b=73
2011.01.15 19:14:21 MetaSage (EURUSD,M1) S=65; P=244; a=4; b=61
2011.01.15 19:14:21 MetaSage (EURUSD,M1) S=17; P=52; a=4; b=13
2011.01.15 19:14:21 MetaSage (EURUSD,M1) //+---- 最大金额=3000 -------------------+

 
数目有多长?没有五秒钟...
 
Mathemat:

1.总的来说,你必须取消对金额的限制。所有的推理在本质上保持不变,只是更多的推理。

2.从引文中那个人需要Cray 1的事实来看,他的算法不如你的优化 :)

1.大是不可能的--我的乘法器扩展表在SMax=3400时已经装不下内存了。

对于一个给定的SMax,有任何关于最大乘积法的建议吗?

这里是3300的打印结果。

2011.01.15 19:18:12 MetaSage (EURUSD,M1) //+---- 最大总和 = 3300 -------------------+
2011.01.15 19:18:06 MetaSage (EURUSD,M1) S=163; P=4192; a=32; b=131
2011.01.15 19:18:06 MetaSage (EURUSD,M1) S=127; P=1776; a=16; b=111
2011.01.15 19:18:06 MetaSage (EURUSD,M1) S=89; P=1168; a=16; b=73
2011.01.15 19:18:06 MetaSage (EURUSD,M1) S=65; P=244; a=4; b=61
2011.01.15 19:18:06 MetaSage (EURUSD,M1) S=17; P=52; a=4; b=13
2011.01.15 19:18:06 MetaSage (EURUSD,M1) //+---- Max = 3300 -------------------+

.

2.不,只是mql5是一种非常快的语言...:)

 
Mathemat:
数目有多长?没有五秒钟...
大约1分钟。
 
MetaDriver: 对于给定的SMax的最大工作,有什么进展吗?
还没有,只是想知道这是否值得麻烦 :)
 

在SMax=3350时进行了检查。其结果是一样的。算起来大约一分钟,甚至更少。

现在的主要限制是内存。我们需要限制乘数分解表。

当前版本的PMax=SMax*(SMax/2-1)。可以进一步减少吗?你能启用它吗?

我认为要证明PMax<=SMax*(sqrt(SMax)-1)是很容易的。 我现在试着运行它,如果它崩溃了,说明我错了。:)

 
让我说说它的意义。
 

它没有工作(它建立了一个表,但它似乎太小了),但我设法找到了另一个解决方案(!):-)

2011.01.15 19:40:28 MetaSage (EURUSD,M1) 'MetaSage.mq5'中数组超出范围(100,47)。
2011.01.15 19:40:24 MetaSage (EURUSD,M1) S=343; P=9952; a=32; b=311
2011.01.15 19:40:24 MetaSage (EURUSD,M1) S=163; P=4192; a=32; b=131
2011.01.15 19:40:24 MetaSage (EURUSD,M1) S=127; P=1776; a=16; b=111
2011.01.15 19:40:24 MetaSage (EURUSD,M1) S=89; P=1168; a=16; b=73
2011.01.15 19:40:24 MetaSage (EURUSD,M1) S=65; P=244; a=4; b=61
2011.01.15 19:40:24 MetaSage (EURUSD,M1) S=17; P=52; a=4; b=13
2011.01.15 19:40:24 MetaSage (EURUSD,M1) //+---- 最大金额=4000 -------------------+
2011.01.15 19:40:24 MetaSage (EURUSD,M1) //============== START ========================

 

现在,如果我们能够确保这些不只是潜在的解决方案,而是真正的解决方案。

好的,我们可以进一步思考,设置一个限制,比如说,10,000。

P.S. 这就是你在表中的3300个数字?

3300*(3300/2-1) ~ 500万?

 
Mathemat:

1. 现在,如果我们能够确保这些不只是潜在的解决方案,而是真正的解决方案。

好的,我们可以进一步思考,设置一个限制,比如说,10,000。

2.附注:你的表格里有3300个数字,是这么多吗?

3300*(3300/2-1) ~ 500万?

1.那么,剧本是确保的方法。将其改为验证版本。会的,但我们先来处理PMax的问题。

2.是。

下面是对表格大小的一些摆弄。得到的结果是SMax=4100。

PMax设置如下:SMax*(uint)(SMax/6-1) = 2796200

2011.01.15 20:21:29 MetaSage (EURUSD,M1) //+---- Max = 4100 -------------------+
2011.01.15 20:21:18 MetaSage (EURUSD,M1) S=343; P=9952; a=32; b=311
2011.01.15 20:21:18 MetaSage (EURUSD,M1) S=163; P=4192; a=32; b=131
2011.01.15 20:21:18 MetaSage (EURUSD,M1) S=137; P=4672; a=64; b=73
2011.01.15 20:21:18 MetaSage (EURUSD,M1) S=127; P=1776; a=16; b=111
2011.01.15 20:21:18 MetaSage (EURUSD,M1) S=89; P=1168; a=16; b=73
2011.01.15 20:21:18 MetaSage (EURUSD,M1) S=65; P=244; a=4; b=61
2011.01.15 20:21:18 MetaSage (EURUSD,M1) S=17; P=52; a=4; b=13
2011.01.15 20:21:18 MetaSage (EURUSD,M1) //+---- Max = 4100 -------------------+
2011.01.15 20:21:18 MetaSage (EURUSD,M1) //============== START ========================

2011.01.15 20:21:00 MetaSage (EURUSD,M1) SMax*(uint)(SMax/6-1) = 2796200

.

我们看到,中间还有一个解决方案:S=137;P=4672;a=64;b=73。