Perfect Hashing - PowerPoint PPT Presentation

About This Presentation
Title:

Perfect Hashing

Description:

Data Structures, CS, TAU, Perfect Hashing. 1. Perfect Hashing ... ???? ?????? B1 ...Bn * | bi = | Bi * ??? ????? : ???? f ?? ???????! (???????? ??????????) ... – PowerPoint PPT presentation

Number of Views:22
Avg rating:3.0/5.0
Slides: 12
Provided by: evgeny1
Category:

less

Transcript and Presenter's Notes

Title: Perfect Hashing


1
Perfect Hashing
???? ????? ????? S ?? n ?????? ????? U

?????? ?- Hash
???? ????? (Hash ???? - ??????)
????? ??? ???? Worst case
?????? ?????? ?????? ????? (??? ????? (O(n
??????)
???? (O(n
???? ???? ??-?????
2
???????
1) f ???? ?? ?? n ??????? ????? ?????? ????? n .
? ????? ??????? ?????? ???? ?? ???? ?????
???.
2) gi- ??????? ????? ?? ?? i ???? ?- Bi ?????
????? ²Bi ? ????? ??-?? ?????.
3
????? ??? ??????? ????
1) ?? Bi ???? ???? ? T ?? ???? (O(n
? ???? ???? f ??? ?? ??? ???? Bi ??????.
2) ???? ????? (????) ???????? gi ????? ?? Bi
? ²Bi ? ??? ?????????
???? ?????? ??????? !!
??????? ?????? ??????? ?-1) ?-2) ??? ?????.
? ?????? ??? ??????
4
???? ?????? B1 Bn
bi Bi
??? ????? ???? f ?? ???????!
(???????? ??????????)
??????
5
? ????? ?? ?????????? ?? ??
??????? n(n-1/n) n-1
6
4) ?? ?????? ?????
6) ???? f ??????. ???? ?????? ???
????? gt 1/2
? ????? ???? ????????? 2
7



8
????? ??????? gi
???? gi ????? ?????????
9
? ????? ?? ????????? ?? ????? gi
?? ???? ????????? ??? 2
10
???? ????? ??????? gi
???? ?? gi ?????? ???? ????? ??
?????? Bi ?? ?????????.
? ???? ??? ?????? ?????? ???? 2
(???? gi )
11
?????
Write a Comment
User Comments (0)
About PowerShow.com