Redian新闻
>
how to query in the universal hash table?
avatar
how to query in the universal hash table?# JobHunting - 待字闺中
r*t
1
2.5% paypal rebate (requirement: you haven't added it to your worklife
rewards program).
Other Office Depot receipts: will pay 0.5% (rewards added ok. please send
scans and I will decide).
Thanks.
avatar
w*r
2
图片上不了,一锅家常豆腐都变紫了,也不知道为什么?
大厨们帮咱小的看看
原料:豆腐,茄子,青椒,莲藕,木耳
用了碘盐,水淀粉
铁锅
先炒,然后稍微炖了一下,出来就变紫了,紫压压的一碗,怪吓人的。。。不过味道还
可以
犹豫着,吃,还是扔了,怪可惜的,本想有两顿好吃啊
avatar
g*s
3
hartime123 once posted the doubt and it seems not answered yet.
we all know universal hash is a hash function family H that has the
similar hash property.
for the insert op, we randomly select h from H and apply h to the input
key k and put it to h(k)
but what if now we need to query if k is in the hash table? we don't know
which hash function h is used to insert k. iterating H one by one
looks too naive.
avatar
EA
4
茄子不是紫色的吗?

【在 w******r 的大作中提到】
: 图片上不了,一锅家常豆腐都变紫了,也不知道为什么?
: 大厨们帮咱小的看看
: 原料:豆腐,茄子,青椒,莲藕,木耳
: 用了碘盐,水淀粉
: 铁锅
: 先炒,然后稍微炖了一下,出来就变紫了,紫压压的一碗,怪吓人的。。。不过味道还
: 可以
: 犹豫着,吃,还是扔了,怪可惜的,本想有两顿好吃啊

avatar
r*d
5
在java里hash函数不是随机选择的,而是由class定死的,所以给定key,所映射的
index是一定的。
如果hash函数发生碰撞就需要遍历table[index]链表里的所有元素了。

【在 g*********s 的大作中提到】
: hartime123 once posted the doubt and it seems not answered yet.
: we all know universal hash is a hash function family H that has the
: similar hash property.
: for the insert op, we randomly select h from H and apply h to the input
: key k and put it to h(k)
: but what if now we need to query if k is in the hash table? we don't know
: which hash function h is used to insert k. iterating H one by one
: looks too naive.

avatar
w*r
6
但是都变紫了,紫黑色了,连豆腐外面也是紫的,咬开来是白的。好像化学反应了?

【在 EA 的大作中提到】
: 茄子不是紫色的吗?
avatar
g*s
7
but here the focus is universal hashing ah.

【在 r**d 的大作中提到】
: 在java里hash函数不是随机选择的,而是由class定死的,所以给定key,所映射的
: index是一定的。
: 如果hash函数发生碰撞就需要遍历table[index]链表里的所有元素了。

avatar
d*n
8
能吃。这个不是初中化学么?
直链淀粉遇碘呈蓝色,支链淀粉遇碘呈紫红色。这并非是淀粉与碘发生了化学反应(
reaction),而是产生相互作用(interaction),而是淀粉螺旋中央空穴恰能容下碘分子
,通过范德华力,两者形成一种蓝黑色错合物。实验证明,单独的碘分子不能使淀粉变
蓝,实际上使淀粉变蓝的是碘分子离子(I3)。

【在 w******r 的大作中提到】
: 但是都变紫了,紫黑色了,连豆腐外面也是紫的,咬开来是白的。好像化学反应了?
avatar
l*9
9
iterating Hash functions is acceptable, the searching time is still O(1).
avatar
w*r
10
我也查了,淀粉遇碘变紫,。。。没想到做了一道有化学反应的菜,但是有毒没?

【在 d******n 的大作中提到】
: 能吃。这个不是初中化学么?
: 直链淀粉遇碘呈蓝色,支链淀粉遇碘呈紫红色。这并非是淀粉与碘发生了化学反应(
: reaction),而是产生相互作用(interaction),而是淀粉螺旋中央空穴恰能容下碘分子
: ,通过范德华力,两者形成一种蓝黑色错合物。实验证明,单独的碘分子不能使淀粉变
: 蓝,实际上使淀粉变蓝的是碘分子离子(I3)。

avatar
g*k
11
我理解的是每一个hash table建立之后hash function h就已经绑定了。
只是建立hash table之前你随机选择H中的一个h而已。
不是每次都要随机选择h来compute hash key

【在 g*********s 的大作中提到】
: hartime123 once posted the doubt and it seems not answered yet.
: we all know universal hash is a hash function family H that has the
: similar hash property.
: for the insert op, we randomly select h from H and apply h to the input
: key k and put it to h(k)
: but what if now we need to query if k is in the hash table? we don't know
: which hash function h is used to insert k. iterating H one by one
: looks too naive.

avatar
m*s
12
直链淀粉遇碘呈蓝色,支链淀粉遇碘呈紫红色。这并非是淀粉与碘发生了化学反应,而
是产生相互作用。淀粉螺旋中央空穴恰能容下碘分子,通过范德华力,两者形成一种蓝
黑色錯合物。实验证明,单独的碘分子不能使淀粉变蓝,实际上使淀粉变蓝的是三碘阴
离子(I3-)。
http://zh.wikipedia.org/zh/%E6%B7%80%E7%B2%89
avatar
j*w
13

Insert: When save h(k), save the original k together.
Query: Compute h_i(y) for every hash function h_i in H, then check all
content at h_i(y)

【在 g*********s 的大作中提到】
: hartime123 once posted the doubt and it seems not answered yet.
: we all know universal hash is a hash function family H that has the
: similar hash property.
: for the insert op, we randomly select h from H and apply h to the input
: key k and put it to h(k)
: but what if now we need to query if k is in the hash table? we don't know
: which hash function h is used to insert k. iterating H one by one
: looks too naive.

avatar
m*s
14
一来就看到这个,很欢乐啊,原来不止我一个人搞乌龙。原谅我不厚道的笑了……
avatar
s*i
15
这个回答不及格啊。

【在 g*****k 的大作中提到】
: 我理解的是每一个hash table建立之后hash function h就已经绑定了。
: 只是建立hash table之前你随机选择H中的一个h而已。
: 不是每次都要随机选择h来compute hash key

avatar
o*p
16
碘盐有关系吗?

【在 w******r 的大作中提到】
: 图片上不了,一锅家常豆腐都变紫了,也不知道为什么?
: 大厨们帮咱小的看看
: 原料:豆腐,茄子,青椒,莲藕,木耳
: 用了碘盐,水淀粉
: 铁锅
: 先炒,然后稍微炖了一下,出来就变紫了,紫压压的一碗,怪吓人的。。。不过味道还
: 可以
: 犹豫着,吃,还是扔了,怪可惜的,本想有两顿好吃啊

avatar
s*i
17
这个题出得不make sense啊,之所以用universal hashing就是遍历hash function的时
间是固定的,从而减少可能search collision的时间。

【在 l*********9 的大作中提到】
: iterating Hash functions is acceptable, the searching time is still O(1).
avatar
o*p
18
正常人是不需要吃碘盐的,而且吃了以后可能还有点不良副作用,换点海盐吧。

【在 w******r 的大作中提到】
: 图片上不了,一锅家常豆腐都变紫了,也不知道为什么?
: 大厨们帮咱小的看看
: 原料:豆腐,茄子,青椒,莲藕,木耳
: 用了碘盐,水淀粉
: 铁锅
: 先炒,然后稍微炖了一下,出来就变紫了,紫压压的一碗,怪吓人的。。。不过味道还
: 可以
: 犹豫着,吃,还是扔了,怪可惜的,本想有两顿好吃啊

avatar
g*k
19
are you sure? how about reading the text again?

这个回答不及格啊。

【在 s********i 的大作中提到】
: 这个回答不及格啊。
avatar
l*i
20
建议弄清楚再说。
一般来说,含碘盐不会因为遇到淀粉就变紫。国内用的都是含碘盐,淀粉用的也不少,
菜都是紫的么?
avatar
c*y
21
Your understanding is correct. I had the same question before and checked
with a Professor in our CS department, who teaches Algorithms. What he said
is the same as you did.
Hope this is helpful

【在 g*****k 的大作中提到】
: 我理解的是每一个hash table建立之后hash function h就已经绑定了。
: 只是建立hash table之前你随机选择H中的一个h而已。
: 不是每次都要随机选择h来compute hash key

avatar
M*8
22
哦,想起来鲁迅看方志敏给他的信的典故了。
avatar
s*i
23
楼上几位,我错了,没学好。楼主的问题误导了我,也就是说universal hashing不存
在iterate hash function的问题。
avatar
d*9
24
是因为有莲藕吧。。。莲藕很粉的。。。

【在 w******r 的大作中提到】
: 图片上不了,一锅家常豆腐都变紫了,也不知道为什么?
: 大厨们帮咱小的看看
: 原料:豆腐,茄子,青椒,莲藕,木耳
: 用了碘盐,水淀粉
: 铁锅
: 先炒,然后稍微炖了一下,出来就变紫了,紫压压的一碗,怪吓人的。。。不过味道还
: 可以
: 犹豫着,吃,还是扔了,怪可惜的,本想有两顿好吃啊

avatar
g*A
25


【在 m*********s 的大作中提到】
: 直链淀粉遇碘呈蓝色,支链淀粉遇碘呈紫红色。这并非是淀粉与碘发生了化学反应,而
: 是产生相互作用。淀粉螺旋中央空穴恰能容下碘分子,通过范德华力,两者形成一种蓝
: 黑色錯合物。实验证明,单独的碘分子不能使淀粉变蓝,实际上使淀粉变蓝的是三碘阴
: 离子(I3-)。
: http://zh.wikipedia.org/zh/%E6%B7%80%E7%B2%89

avatar
t*x
26
矮油,我这个文科女看的云里雾里的,就是范德华力觉得眼熟,感觉他是刘德华的近亲

【在 d******n 的大作中提到】
: 能吃。这个不是初中化学么?
: 直链淀粉遇碘呈蓝色,支链淀粉遇碘呈紫红色。这并非是淀粉与碘发生了化学反应(
: reaction),而是产生相互作用(interaction),而是淀粉螺旋中央空穴恰能容下碘分子
: ,通过范德华力,两者形成一种蓝黑色错合物。实验证明,单独的碘分子不能使淀粉变
: 蓝,实际上使淀粉变蓝的是碘分子离子(I3)。

avatar
h*t
27
看这帖子真是感叹啊!
没有毒,只是形成络合物,吃下去遇胃酸(盐酸)就又变回去了。看到的颜色是络合物
的颜色。碘盐无色。

【在 w******r 的大作中提到】
: 我也查了,淀粉遇碘变紫,。。。没想到做了一道有化学反应的菜,但是有毒没?
avatar
h*t
28
她用的是铁锅,表面有氧化Fe3+,先把碘盐里部分的I- 氧化成I2,这样体系中就有了
I3-,后者和淀粉形成络合物。所以换个锅应该就不会变色了。单独的碘和碘盐都不会
和淀粉形成络合物。

【在 l*****i 的大作中提到】
: 建议弄清楚再说。
: 一般来说,含碘盐不会因为遇到淀粉就变紫。国内用的都是含碘盐,淀粉用的也不少,
: 菜都是紫的么?

avatar
x*y
29
看得我肚子疼!
avatar
h*n
30
莲藕用铁锅必然变黑色的。不过能吃
avatar
v*e
31
茄子和豆腐这个组合比较特殊啊
avatar
A*0
32
茄子本身就是紫色的,会掉色的吧?记得小时候家里炖土豆茄子,一大锅也是紫色的。
碘盐里面那点碘应该不至于和淀粉产生任何反应~~
avatar
c*h
33
碘盐里的碘不是-1价的I-,是碘酸钾。

【在 h**t 的大作中提到】
: 她用的是铁锅,表面有氧化Fe3+,先把碘盐里部分的I- 氧化成I2,这样体系中就有了
: I3-,后者和淀粉形成络合物。所以换个锅应该就不会变色了。单独的碘和碘盐都不会
: 和淀粉形成络合物。

相关阅读
logo
联系我们隐私协议©2024 redian.news
Redian新闻
Redian.news刊载任何文章,不代表同意其说法或描述,仅为提供更多信息,也不构成任何建议。文章信息的合法性及真实性由其作者负责,与Redian.news及其运营公司无关。欢迎投稿,如发现稿件侵权,或作者不愿在本网发表文章,请版权拥有者通知本网处理。