• 07-12-2014, 04:54:48
    #1
    Arkadaşlar merhaba, Bilgisayar mühendisliği öğrencisiyim. Algoritmalardan finalde çıkabilecek 5 tane sorum var yardımlarınızı bekliyorum. Konu Hash Table'larla alakalı.

    Exercises 11.2-1

    Suppose we use a hash function h to hash n distinct keys into an array T of length m.
    Assuming simple uniform hashing, what is the expected number of collisions? More
    precisely, what is the expected cardinality of {{k, l} : k ≠ l and h(k) = h(l)}?

    Exercises 11.2-2

    Demonstrate the insertion of the keys 5, 28, 19, 15, 20, 33, 12, 17, 10 into a hash table with
    collisions resolved by chaining. Let the table have 9 slots, and let the hash function be h(k) = k
    mod 9.

    Exercises 11.2-3

    Professor Marley hypothesizes that substantial performance gains can be obtained if we
    modify the chaining scheme so that each list is kept in sorted order. How does the professor's
    modification affect the running time for successful searches, unsuccessful searches, insertions,
    and deletions?

    Exercises 11.3-4

    Consider a hash table of size m = 1000 and a corresponding hash function h(k) = m(k A mod 1) ⌊ ⌋
    for A=0.61 . Compute the locations to which the keys 61, 62, 63, 64, and 65 are mapped.

    Exercises 11.4-1

    Consider inserting the keys 10, 22, 31, 4, 15, 28, 17, 88, 59 into a hash table of length m = 11
    using open addressing with the primary hash function h'(k) = k mod m. Illustrate the result of
    inserting these keys using linear probing, using quadratic probing with c1 = 1 and c2 = 3, and
    using double hashing with h2(k) = 1 + (k mod (m - 1)).

    Arkadaşlar bu soruların kodsal çözümü lazım. Lütfen yardımlarınızı bekliyorum.
  • 07-12-2014, 05:11:32
    #2
  • 07-12-2014, 09:17:17
    #3
    Consider a hash table of size m = 1000 and a corresponding hash function h(k) = m(k A mod 1)
    google da arayın çıkan sonuçlar ilginizi çekecektir.
    1. alındığı kitap
    2. çözüm 1,
    3. çözüm 2,
    4. çözüm n

    https://www.google.com.tr/search?q=Consider+a+hash+table+of+size+m+%3D+1000+and+a+corresponding+hash+function+h%28k%29+%3D+m%28k+A+mod+1%29
  • 08-12-2014, 00:19:13
    #4
    Yardımlarınızı bekliyorum birşey bulamadım.