Questions tagged «hamming-distance»

7
大集合中有效查找汉明距离低的二进制字符串
问题: 给定一个大的(约1亿个)无符号32位整数列表,一个无符号32位整数输入值以及最大汉明距离,请返回输入值指定汉明距离内的所有列表成员。 持有清单的实际数据结构是开放的,性能要求决定了内存中的解决方案,构建数据结构的成本是次要的,查询数据结构的低成本至关重要。 例: For a maximum Hamming Distance of 1 (values typically will be quite small) And input: 00001000100000000000000001111101 The values: 01001000100000000000000001111101 00001000100000000010000001111101 should match because there is only 1 position in which the bits are different. 11001000100000000010000001111101 should not match because 3 bit positions are different. 到目前为止,我的想法是: 对于汉明距离为0的简并情况,只需使用排序列表并对特定输入值进行二进制搜索。 …
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.