作者christensen ()
看板Grad-ProbAsk
標題[理工] 資結請教!謝謝!
時間Fri Apr 3 16:28:12 2009
1. The Ackerman’s function A(m, n) is defined as follows. What is A(2, 3)?
┌ n+1, if m = 0
A(m,n)= { A(m -1,1), if n = 0
└ A(m -1, A(m, n -1)), otherwise
2.Given a data sequence: 82 16 9 95 27 75 42 69 34
(a) Considering the binary searching method, first sort the above data sequence
andthen search data 69 (i.e., key). What is the searched data for each
search pass? 這題是什麼意思啊?
(b) For solving the collision problem in hashing search, what is the result
of using linear probing (i.e., linear open addressing) ?
Note: linear probing function: (h(key) + 1) mod N, h(key) = key mod N ;
array size N = 11 (i.e., A[0] ~ A[10])
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 122.118.9.176
1F:推 fish0835:A(2,n)=2n+3 => A(2,3)=9 04/03 16:31
2F:→ fish0835:2.a的意思是說 BS的作法是Sort之後再做search 04/03 16:33
3F:→ fish0835:問題是問 search 69中間有什麼data會被search到 04/03 16:34
4F:→ fish0835:答案是42,75,69 04/03 16:37
5F:→ fish0835:2b.Hash table為: 42,34, ,69, ,82,16,95,27,9,75 04/03 16:41
6F:→ fish0835:我應該沒誤解他的意思...Orz 04/03 16:43