【发布时间】:2019-08-18 03:42:05
【问题描述】:
我一直在阅读Introduction To Algorithms 的Rabin Karp 算法。除以下内容外,一切都有意义。
In general, with a d-ary alphabet {0, 1, . . ., d - 1}, we choose q so
that dq fits within a computer word
我不明白 computer word 是什么以及在此算法的上下文中拟合 dq within a computer word 的意义是什么。
我在某处读到它与单精度数学有关,但我也不懂single-precision math。
谁能分解这些术语?谢谢。
【问题讨论】:
-
A
computer word是一个模棱两可的术语,它可能表示字节,但也可能表示(我认为这是正确的含义)processor word,它表示处理器字的大小(通常为 32 或 64 位)。单精度通常是指float类型,而不是双精度,称为double。在第一种情况下,这些术语实际上是特定于硬件的,在第二种情况下,实现和语言相关。
标签: algorithm clrs rabin-karp