如何估算复杂的算法设施需求?

发布于 2024-09-15 06:39:17 字数 223 浏览 2 评论 0原文

我想了解如何使用一些众所周知的启发式方法有效地估计某些复杂算法的硬件要求。
IE。我想快速估计在合理的时间内或以其他方式破解我的 TEA O(2^32) 或 XTEA O(2^115.15) 需要多少计算机能力

拥有设施电源对于 1000 x 4GHz 四核 CPU,执行给定算法需要多少时间?
我也对 O(log N) 等算法的其他算法复杂度估计感兴趣

。 布阿

I'd like to understand how to efficiently estimate hardware requirements for certain complex algorithms using some well known heuristic approach.
Ie. I'd like to estimate quickly how much computer power is necessary to crack my TEA O(2^32) or XTEA O(2^115.15) in some reasonable time or other way round :

Having facility power of a 1000 x 4GHz quad core CPU's, how much time would it take to execute given algorithm?
I'd be also interested in other algo complexity estimations for algorithms like O(log N) etc..

regards
bua

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

末が日狂欢 2024-09-22 06:39:17

好吧,所以我想出了这样的事情:
简化CPU时钟与MIPS相同。

有一定数量的指令,例如。 2^115 和带有 ex 的处理器。 1GHz时钟
即:

i = 2^115.15
时钟=1GHz
ipersec=1/10e+9

秒 = i *

python 中的 ipersec:

def sec(N,cpuSpeedHz):
    instructions=math.pow(2, N)
    return instructions*(1./cpuSpeedHz)

ex

sec(115.15, math.pow(10,9)) / (365*24*60*60)
1.4614952014571389e+18

因此需要 1.4 ^ 18 年来计算它,

因此拥有 1mln 4 核 1Ghz 处理器需要:

sec(115.15, 1000000*4*math.pow(10,9)) / (365*24*60*60)
365373800364.28467

需要 3.6 ^ 11 年(~ 3600 mld 年) )

简化版:

2^115.15 = 2^32 * 2^83.15
时钟 = 2^32 ~ 4Ghz
2^83.15 =

>>> math.pow(2,83.15)/(365*24*60*60)
3.4028086845230746e+17

检查:

2^32 = 10 ^ 9.63295986
>>> sec(115.15, math.pow(2,32))/(365*24*60*60)
3.4028086845230746e+17

ok, so I'd came up with some thing like this:
Simplifying that CPU clock is this same as MIPS.

having amount of instructions ex. 2^115 and a processor with ex. 1GHz clock
which is:

i = 2^115.15
clock = 1GHz
ipersec=1/10e+9

seconds = i * ipersec

in python:

def sec(N,cpuSpeedHz):
    instructions=math.pow(2, N)
    return instructions*(1./cpuSpeedHz)

ex

sec(115.15, math.pow(10,9)) / (365*24*60*60)
1.4614952014571389e+18

so it would take 1.4 ^ 18 years to calculate it

so having 1mln 4 cores 1Ghz processors it would take:

sec(115.15, 1000000*4*math.pow(10,9)) / (365*24*60*60)
365373800364.28467

it would take 3.6 ^ 11 years (~ 3600 mld years)

simplified version:

2^115.15 = 2^32 * 2^83.15
clock = 2^32 ~ 4Ghz
2^83.15 =

>>> math.pow(2,83.15)/(365*24*60*60)
3.4028086845230746e+17

checking:

2^32 = 10 ^ 9.63295986
>>> sec(115.15, math.pow(2,32))/(365*24*60*60)
3.4028086845230746e+17
心凉 2024-09-22 06:39:17

选择你喜欢的答案:

  1. 超出你的承受能力
  2. 对你的机器进行键盘记录会便宜得多
  3. 你打算在哪里存储实现 O(2^115) 时间复杂度所需的 2^20 个明文
  4. 一大堆

如果有人如果你真的想要你的 pr0n 收藏,那么打破钥匙扣比打破钥匙要容易得多。

Pick whichever answer you like:

  1. More than you can afford
  2. It would be far, far cheaper to keylog your machine
  3. Where are you going to store to 2^20 plaintexts needed to achieve the O(2^115) time complexity
  4. A whole bunch

If someone really wants your pr0n collection it is much easier to break the key holder than it is the key.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文