English 中文(简体)
区分重要——>散射地点价值
原标题:Determing the Double Hashing functions given key -> hash location values

鉴于一些关键因素及其 ha的价值,我如何决定双重散射作用?

<>>>>>

页: 1

最佳回答
h(x) = (x+1) % 13

你们已经做些什么,但你在加起来后想要模块化,因此产生的数值为[0,12]而不是[1,13]......,但你是正确的。

我最能到来的是:

r(x) = (x+6) % 19

这对我来说是没有道理的,但我之所以这样做,是因为所给出的价值观(38和101对模块13有1的区别,它们有6个空间)。 我感到,就像第19号单元确实使这一突破成为可能,因此,虽然这似乎合适,但我会寻求更好的答案,但是,我所谈到的是,我觉得像我这样,有办法推翻猜测和检查。

Best of luck, feel free to drop comments if you have any questions about this.

问题回答

暂无回答




相关问题
hmac-sha1 in ruby differs from C# HMACSHA1

I am trying to test the API from ankoder.com and have problem on the digest calculation for the authentication token . The sample is ruby while I am trying to call from C#. When I compare the digest ...

Make md5 strong

Im making a website that will intergrate with game that only support md5 hashing metod (atm). Which ofc is not especially safe anymore. But how could i make it stronger? Should I just generate long ...

Ordering a hash to xml: Rails

I m building an xml document from a hash. The xml attributes need to be in order. How can this be accomplished? hash.to_xml

Utility to hash and list files with identical contents?

UltraEdit saves temporary, ie. unsaved/untitled, files as (regex) "Edit.d+". When UltraEdit is killed (I do this when some software nags me to reboot), I noticed that it doesn t always save files in ...

How can I assign multiple values to a hash key?

For the sake of convenience I am trying to assign multiple values to a hash key in Ruby. Here s the code so far myhash = { :name => ["Tom" , "Dick" , "Harry"] } Looping through the hash gives a ...

Concurrent modification whilst traversing a ruby Hash

Suppose you had this: def wipeProduct(hash, nameToDelete) hash.each do |i| key = i[0] productName = i[1].first hash.delete(key) if productName==nameToDelete end end I m not sure it ...

Ruby (RoR) XML to hash and then show in views

I have some xml on server (http://server.com/my.xml). Here is the example: <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE current PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3....

热门标签