• Keine Ergebnisse gefunden

Globally Order Preserving Multidimensional Linear Hashing

N/A
N/A
Protected

Academic year: 2022

Aktie "Globally Order Preserving Multidimensional Linear Hashing"

Copied!
16
0
0

Wird geladen.... (Jetzt Volltext ansehen)

Volltext

(1)

deposit_hagen

Publikationsserver der Universitätsbibliothek

Mathematik und

Informatik

Informatik-Berichte 71 – 07/1987

Andreas Hutflesz, Hans-Werner Six, Peter Widmayer

Globally Order Preserving

Multidimensional Linear Hashing

(2)

Globally Order Preserving

Multidimensional Linear Hashing (

1 )

Andreas Hutflesz (2), Hans-Werner Six (3 ), Peter Widmayer (2 )

Abstract

Dynamic multidimensional hashing schemes that locally preserve the order of keys have been derived to support proximity queries. In this paper, we present a dy- namic, globally order preserving ha.shing technique, based on linear ha.shing, where the spatial proximity of points is preserved beyond data buckets. Our method adaptively generates a bucket numbering which is a flexible variant of the well- known z-ordering. In addition to the standard set operations the z-ordering sup- ports the effi.cient implementation of proximity queries.

1. Introduction

In the physical design of engineering databa.ses, a major problem is the selection of an appropriate storage access scheme. When !arge sets of geometric objects have to be manipulated, proximity queries should be handled effi.ciently in a dynamic setting. In a number of recent papers (Robinson 1981, Nievergelt et al. 1984, Iüishnamurthy et al. 1985, Otoo 1986, Kriege! et al. 1986), index structures sup- porting insertions, deletions, and range queries in a set of multidimensional points have been proposed. The efficiency of range queries is achieved by using an order preserving mapping of points to data buckets, i.e., a mapping with the property that all points sharing a common data bucket are spatially close to each other.

\\'e call such a mapping locally order preserving, because the spatial proxirnity of points is not preserved beyond data buckets.

Typical range queries, e.g. in geographic inforrnation systerns, require the contents of rnany data buckets to be retrieved frorn the database. lt is well known that

( 1

) This work was partially supported by grants no. Si 374/ 1-1 and Wi 810/2-1 from the Deutsche Forschungsgemeinschaft

( ::?)

Institut für Angewandte Informatik und Formale Beschreibungsverfahren, Universität Karls- ruhe

(3) Institut fiir Pra.ktischP Informatik III. Fern Universität Ha.gen

(3)

access to physically consecutive buckets on a disk is less costly than to arbitrarily located buckets (Weikum et al. 1987). Hence, a mapping that associates physically close buckets with spatially close points would increase the efficiency of typical range queries. We call such a mapping globally order preserving.

In this paper we propose a dynamic, globally order preserving, multidimensional hashing method. Our approach is based on a generalization of linear hashing (Litwin 1980) to arbitrary dimensions. In contrast, the multidimensional variant of linear hashing presented by Kriege! et al. 1986 is not globally order preserving.

Our method adaptively generates a bucket numbering which is a flexible variant of the well-known z-ordering (see e.g. Tropf et al. 1981, Orenstein et al. 1984), supporting the efficient implementation of range queries.

In Section 2, we define the model of secondary storage more precisely, and we show how the savings in access time arise. Section 3 exhibits the main idea of the pa- per, that is, how to dynamically subdivide the data space and associate subspaces with buckets. Section 4 presents the technique in detail. A discussion of the prop- erties of our technique follows in Section 5. The paper concludes with a summary.

2. The model

vVe assume to operate on a secondary storage medium with direct access to blocks of data. Data can be accessed through read and write operations, where a read operation transmits one block of data from secondary storage to main memory, and a write operation transmits one block of data from main memory to secondary storage. Block access time is approximately equal for each block. All of the char- acteristics given above apply to disks {Knuth 1973), the most important secondary storage medium these days. To model disks more closely, we further assume that access time consists of three components, namely

seek time; this is the time to move the read/write-head to the proper track;

latency time; this is the time to rotate the disk in the right position;

transmission time; this is the time to transmit one block of data.

Seek

+

latency time significantly dominate transmission time, typically by a factor of about 50. We assume that seek

+

latency time are approximately equal for randomly selected blocks.

In a mild abstraction from reality, assume that all blocks are arranged on secondary storage in a purely linear fashion; they are consecutively numbered frorn O to some maximum integer. Then, irnmediately after accessing block a, no seek and no la- tency time occur when accessing block a

+

1, because the disk's read/write-head

(4)

has just moved to block a

+

1 after transmitting block a. Therefore, consider- able savings in access time can be achieved by transmitting cons.ecutive blocks in sequence (see e.g. Weikum et al. 1987).

This effect has been used in all index structures by simply defining a data bucket to consist of several blocks of data; these blocks can always be transmitted con- secutively, as data buckets are the logical units of read and write operations of the index structures. As simple as this approach might be, its effectiveness is limited:

If logical data buckets consist of few data blocks, the number of seek operations in a range query is not reduced by much; if they consist of many data blocks, a !arge amount of data may be transmitted unnecessarily. \Ve will show how to circum- vent both disadvantages by arranging those objects in consecutive data blocks that are likely to belang to the answer of a proximity query. In this way, very few seek operations are needed, while simultaneously no blocks are accessed unnecessarily.

Note that for the other interesting operations, namely exact match, insert, and delete, it is of no concern whether the order of objects is preserved beyond buckets.

In fact, in many engineering database applications range queries play the major role once the database has been established. Therefore, our attempt at optimizing range queries seems well justified.

As to the objects, we restrict ourselves to storing a set of multidimensional points in a bounded universe. For expository purposes, the main idea is explained for 2-dimensional points in the next section; the detailed description in Section 4 is for arbitrary dimension.

3. The dynamic subdivision of the data space

First, we briefly recall the basic principle of multidimensional linear hashing. The data space is partitioned into grid cells. A hashing function associates a bucket number with each grid cell. All grid cells are of equal size to keep the map- ping simple. To accommodate non-uniform data distributions, overflow chains for buckets are used. The structure is made dynamic by including or excluding data buckets as the amount of data changes, based on the principle of linear hashing (Litwin 1980). A control function decides whether the number of buckets used has to change; in the simplest case, the control function just compares the average load with a threshold value. If one more bucket is needed, a bucket to be split is determined as in linear hashing. If one bucket less should be used, two buckets are merged as in linear hashing. A bucket split cuts the grid cell corresponding to the bucket in half, by splitting it in one dimension. Within one expansion, i.e., 1,vithin a series of splits that eventually double the number of buckets used, the

(5)

split dimension is fixed. From expansion to expansion, the dimension of the split changes, cyclically through all dimensions.

The multidimensional order preserving linear hashing (MOLHPE) proposed by Kriege! et al. 1986 chooses a numbering scheme for data buckets such that the dynamics of linear hashing can be accommodated easily. Figure 3.1 shows the situation after six full expansions in MOLHPE, starting with a single bucket, with 64 buckets being addressed. The order of the bucket numbers (relative bucket ad- dresses) apparently does not reflect spatial proximity of the represented subspaces.

50 Go

5'8

Gl 51-

61

S9 ~:>

1.i i~ L~

lt 1~

13'

1'5

~1

lro 44 42.. 4~ 41 1t5 41 '-tr l 11-

5 .2.5' 3 -2-1

7-

2.j

I+ i

5:L

5o

S'+ ~j 53 5-\ 55"

8 18 10 t6

~

22 11 30

32 ?>, 34 38 31

~'t- 3S

l9

~

1" 4

2

't 1

2.0

' 28

Figure 3.1: Nurnbering scherne of MOLHPE

As

an example, consider a range query that affects the buckets as indicated in Figure 3.1. These 9 blocks consist of 8 sequences of consecutive blocks, i.e., 8 seek operations are needed to retrieve them.

Instead of the numbering scheme of MOLHPE, we suggest a globally order pre- scrving nurnbering scheme, which we call the z+-ordering, for the primary buckets;

overflow buckets are not affected. Then the exarnple above has the form depicted in Figure 3.2.

The same range query that needed 8 seek operations before now needs only 4 seek operations. For other example range queries, the effect may be even more drastic;

for instance, if the depicted query range is extended by one bucket to the left and towards the top, the ratio of seek operations is 11 versus 2.

The z+ -ordering is related to the well-known z-ordering, a mapping of multi- Jimcnsional points into one-dimensional space. This mapping preserves spatial

(6)

l i 23 L~ 31

53,

ss

fit

c; !>

l-0

.ii

18

3o

52 S't bO 62.

1r 1~

1.5

21 't3 51 St 5~

1b 18

2

't

2,G

't!

S'o

s, SJ

s 1 1~ 1s 3+ 3~ 'ts 'ft- 4 G 12 14- 3" 3i 44

'f {;,

1 3 .9

11

1~ 15 ltl 43

0 2 2 10 32 3't 'to 'rl

Figure 3.2:

z+

-ordering

proximity beyond data buckets and hence supports the efficient implementation of range queries. In the literature the z-ordering has been discussed as a result of bit-interleaving techniques which transform multidimensional keys into one- dimensional ones (e.g. Tropf et al. 1981, Orenstein et al. 1984). The z+-ordering coincides with the z-ordering after each full expansion (see Figure 3.2). Within an expansion, both numbering schemes differ to a limited extent (see Figure 3.3).

l1

to tt 1 Lt 15 2.' 21 3o 31

1.1 19

1l 13 l't .2,5 2& .2.ß

1, 1&

;1 39

l 3

' 1 .3, 38 2,2 .2.3

9 33 35" 41. 't 3

(j

1

8 5 32 34 40 ~2

Figure 3.3: Five full expansions and apart of the 6th expansion in z+ -ordering

(7)

Let us now show how the z+ -ordering can be achieved dynamically for a set of points in the plane. At any stage, bucket addresses range from O up to some maximum integer. We start with a simple bucket, whose address is 0. After L expansions, 2L buckets with addresses 0, 1, ... , 2L - 1 are in use. In the (L

+

1)- st expansion, each bucket a, a E {O, ... , 2L - 1} is split into two buckets with addresses 2a and 2a+ 1. Note that this way of splitting differs from the philosophy applied in linear hashing as well as in MOLHPE, because here we use two new buckets among which the contents of one old bucket is distributed. This gives us more freedom in the selection of bucket numbers without increasing the number of read or write operations for a bucket split. The dimension of the split is fixed within an expansion; from one expansion to the next, the dirnension changes cyclical\y through the set of all dirnensions. Figure 3.4 shows four expansions in our scheme, starting with a single bucket.

1 3

1 -+

2

--+

i 3 G r

s 1 13 15 4

b

1l

1.'t

1. :!, ~

11.

f'J i 4- s

(j 2,

g 10

Figure 3.4: Four expansions, starting with a single bucket

(8)

When an expansion is carried out as a series of bucket splits, we have to be careful about the order in which buckets are split. It is clearly impossible to split buckets in increasing order of their bucket addresses, because in this case a bucket address 2a or 2a

+

1 would be created for use with a split bucket while still being used for a bucket not yet split in this expansion.

On the other hand, it is certainly correct to split buckets in decreasing order of bucket addresses, starting with the highest bucket address. This strategy, howenr, implies that the range of addresses doubles at the very beginning of each expansion, namely when bucket 2L - 1 is split into buckets 2L+l - 2 and 2L+l - 1, thereby leaving a large gap of unused buckets. This contradicts the philosophy of extending the range of bucket addresses stepwise as needed, in order to keep the ( average) load on the structure roughly constant over time.

In the following we illustrate how we can adaptively select buckets to be split in the course of an expansion in such a way that

at any time, there is an insignificantly srnall nurnber of gaps;

at any time, the operations exact rnatch, insert, delete, and range query can be carried out effi.ciently.

We achieve this behavior in the following way. When a bucket has tobe split, two new buckets with consecutive addresses of the form 2a and 2a

+

1 for a positive integer a have to be used. Starting with the situation after L expansions have been completed, the two consecutive bucket nurnbers that increase the range of used bucket nurnbers as little as possible are the bucket nurnbers 2L and 2L

+

1.

The bucket that has tobe split into buckets 2L and 2L

+

1 is bucket 2L-l. Hence, the first bucket to be split after expansion L is completed is defined to be bucket

~ L-I. Figure 3.5 gives the exarnple for L

=

4.

The next consecutive bucket nurnbers tobe used are 2L

+

2 and 2L

+

3. Therefore, bucket 2L-l

+

1 is split next. Now a gap of two consecutive bucket numbers within the range O ••. 2L - 1 exists, namely buckets 2L-l and 2L-i

+

1. This gap should be filled before the actual range of used buckets O ••. 2L +3 is extended any further.

Hence, bucket 2L-2 is split next (see Figure 3.5 for L

=

4).

Frorn these explanations, the general rule follows easily: Split the bucket whose rcsulting two buckets get the lowest free consecutive two bucket addresses. These two addresses either corne from a gap in the range O ••. 2L -1, or they are taken as the next two free numbers in the range 2L ... 2L+l - 1. The algorithm describing this procedure rnore formally is presented in the next section.

To better visualize the effect of this procedure, let us subdivide the data space represented by 2L buckets into L

+

1 regions. Region R0 denotes the initial bucket (with address O); region Ri, i

=

1, ... , L, denotes the set of buckets with addresses

..

(9)

5 7 13 1S

4: G 11 1Lt

1

1 3

~

11

(;J

l g 1.0 1,j11

u

"

~,3

iR tS

~' 11 i'

{f

Figure 3.5: Splitting buckets after four expansions

in the range 2i-l ... 2i - 1, i.e., the buckets with addresses that have been added during the i-th expansion (see Figure 3.6).

5 1 1j 15

't '

12,

i't

1

~

~ 11

ef ~

& 10

'R3

'R't

t1 'R.,_

'R„

Figure 3.6: Buckets and regions after four expansions

(10)

In the example of Figure 3.6., i.e., for L

=

4, the sequence of buckets to be split is the following {relative addresses of buckets within their regions are given m parentheses):

8(1 in R4), 9(2 in R4), 4(1 in Ra), 10(3 in R4), 11(4 in R4), 5(2 in Ra), 2(1 in R2), 12(5 in R4), 13(6 in R4), 6(3 in Ra), 14(7 in R4 ), 15(8 in R4 ), 7(4 in Ra), 3(2 in R2), 1(1 in Ri), 0(1 in Ro).

Note that in the last bucket split, i.e., the split of bucket 0, one of the resulting buckets happens to be bucket O itself; therefore, no gap of two consecutive buckets in R1 is needed (and also none can occur, of course).

This scheme is presented more formally and in full generality in the next section.

Here, it should be plausible that spatially close grid cells are mapped to physically close buckets dynamically in such a way that not too many gaps ever occur.

4. Basic algorithms

In this section, we precisely define the central functions used to maintain the z+ - ordering. We do not explicitly describe how to use them in insertions, deletions, exact match and range queries, because these can be carried out in the obvious way, once the central functions have been defined.

For all operations in our hashing scheme it is necessary to know the state of expansion. The expansion is carried out step by step until the number of addressed buckets has doubled. Therefore, we need a split pointer p to know the actual state of the expansion. Additional parameters characterizing the state of expansions arc:

the dimension D of the data points

the number L of completed expansions, starting with L

=

0 for the unpar- titioned data space

The split dimension s to be used within the (L

+

1)-st expansion, i.e., after L expansions have been completed, is defined as follows:

s := (L mod D)

+

1

To realize the split pointer p, we simply count the number of splitted buckets, beginning with p

=

1 after a full expansion. The values of the split pointer p range from 1 to 2L, meaning that p- 1 buckets are already split, or, equivalently, the p-th bucket will be split next. An expansion is completed as p exceeds 2L.

Then L will be increased by 1 and p will be reset to 1. We use several functions to realize the operations exact match, insert, delete, and range query.

9

(11)

The required functions are:

grow, to increase the split pointer p after a split;

shrink, to decrease the split pointer p before a merge;

splitbucket, to calculate the address a of the bucket to be split next, de- pending on the split pointer p;

expansionpointer, to calculate the split pointer p corresponding to bucket address a;

issplit, to decide whether or not the bucket with address a has been split;

hashaddress, to calculate the bucket address a of a specified data point with key K.

Now we will define these functions algorithmically.

procedure grow (var p, var L}

begin

if (p

=

2L) then

p := 1

L := L

+

1 { expansion completed}

end eise

p := p

+

1 endif

This procedure is used after a split to increment the split pointer p and, if necessary, the expansion level L.

procedure shrink (var p, var L) begin

end

if (L

=

0) then

shrinking is impossible eise if (p

=

1) then

p := 2L-l L := L - 1 else

p := p- 1 endif

endif

This procedure is used during a rnerge to decrement the split pointer p and, if necessary, the expansion level L.

(12)

function splitbucket (p, L) var a, y

begin

end

a := 0 y := L

p := p mod 2L while (p > 0) do

a := a

+

2Y

y := llog2(p

+

l)J p := (p

+

1) - 2Y endwhile

a ·-. - 2Y ~ return a

This function returns the address a of the next bucket to be split.

function expansionpointer ( a, L) var y, z, p, J

begin

end

p := 0

if (a

>

o) then y := llog2 aj z := a - 2Y

+

l

for j := 1 to y - 1 do p := p

+ l ;II-:.~ J

endfor

for j := y to L - 1 do p := p

+

z · 2i-y endfor

endif return p

This function calculates the split pointer p for which the next bucket to be split has address a.

function issplit ( a, p, L) begin

if (expansionpointer (a,L) < p) then

end

return true { a already split}

else

return false endif

This function returns true, if the bucket with address a has already been split

<luring the actual expansion, false otherwise.

(13)

function hashaddress (K, p, L, D)

{Key K = (K1 , .•. , KD) with Ki =

L;~

1 kij · 2-i, implying O

:S

Ki < 1}

var d, t, a, ;' { d runs through the dimensions, t runs through the bits}

begin

end

d := 1 t := 1 a := 0

for j := 1 to L do a := 2 · a

+

kdt

if (i mod D

=

O) then t := t

+

1

endif

d := ( d mod D)

+

1

endfor

if (issplit(a, p, L)) then a := 2 · a

+

kdt

endif return a

This function interlaces the bits of the cornponents K;, of K, cyclically through the dirnensions i

=

1, 2, ... , D. In this way, it cornputes the bucketaddress a for key K.

5. Storage utilization

Our expansion scherne generates gaps within the range of directly addressed buck- ets. We try to fill these gaps as fast as possible. In any given situation, however, a nurnber of buckets will be unused, according to the z+ -ordering. In this section, we are concerned with the average nurnber of unused buckets. We are not concerned with the average bucket occupancy of the used buckets, as this is unaffected by the z+ -ordering.

Now we want to calculate the average number of gaps during a full expansion.

To build the average we take into account all situations within an expansion, beginning with 2L buckets and ending with 2L+l buckets. Let us illustrate this at the example of D

=

2 and L

=

4 (see Figure 3.6). In the course of the next expansion, 2L buckets will be split in the 2L interrnediate steps of expansion L

+

1

(see Table 5.1).

In any of the regions R2 to RL, no rnore than two gaps can occur in the z+ - ordering. As soon as a gap occurs in R1 (i.e., bucket 1 is unused), bucket O is being split and the expansion is cornplete. '

(14)

number of gaps in region

split pointer R4 R3 R2 R1

1 0 0 0 0

2 1 0 0 0

3 2 0 0 0

4 0 1 0 0

5 1 1 0 0

6 2 1 0 0

7 0 2 0 0

8 0 0 1 0

g 1 0 1 0

10 2 0 1 0

11 0 1 1 0

12 1 1 1 0

13 2 1 1 0

14 0 2 1 0

15 0 0 2 0

16 0 0 0 1

Table 5.1: Gaps in the (L

+

1)-st expansion for L

=

4

Let us now sum up the number of gaps throughout the (L

+

1)-st expansion by adding the entries in Table 5.1. The entries in the row belonging to any given position of the split pointer show the number of gaps in regions RL, RL-l, ... , R1 ; we call this a gap vector. Each vector of L - 1 O's and l's for RL to R2 , and a 0 for R1 occurs exactly once as a. gap vector in the (L

+

1)-st expansion; we call these primary gap vectors. For each of the primary gap vectors, there is also a (secondary) gap vector in the table with a 2 instead of the leftmost 1. Furthermore, there is a final gap vector with a 1 for R1 and all other digits 0. No other gap vectors are in the table.

To see that this characteriza.tion holds in general, consider a gap vector with O's for RL down to Rj, for some j

=

{2, ... , L}, and O's and l's for Rj-l down to R2 ,

and a O for R1 • From this gap vector, we can derive a gap vector that differs from the given one in the digit for Ri only, i E {j, ... , L}, by performing 2L-i+l - 1 splits to get a 1 for Ri, or 2(2L-i+l - 1) splits to get a 2 for Ri. Starting from a gap vector of all O's, we can get all primary and all secondary gap vectors by generating successively the digits for R1,R2 , • •• ,RLi we get the final gap vector after 2L - 1 splits.

In all 2L-l primary gap vectors, we get a total of 2L-l • ( L

2

1 ) gaps. In the

2L-l - 1 secondary gap vectors, we get a total of 2L-l • (L

2

1) gaps as in the primary gap vectors, plus an additional 2L-I - 1 gaps for the 2's. The final gap vector contributes one gap. In total, we have

½ •

2L gaps over the whole expansion

13

(15)

with 2L situations. Now we easily see, that

½

gaps exist on the average. In the worst case, we have no more than L gaps. Hence, in the worst case as well as on the average, the number of gaps is bounded by a logarithmic function in the number of used data buckets.

For all practical situations, the gaps within the range of directly addressed buckets can be neglected, because their average number is very small in comparison with the used buckets (see Table 5.2).

during (L

+

1)-st expansion

number of average number average number average number full expansions of gaps of buckets of gaps

L 2 L ~ 2 · 2L per bucket

5 2.5 48 5.2083%

8 4 384 1.0416%

10 5 1536 0.3255%

12 6 6144 0.0976%

15 7.5 49152 0.0152%

20 10 1572864 0.0006%

Table 5.2: Average number of gaps

6. Summary

In this paper, we have presented a dynamic, globally order preserving rnultidirnen- sional hashing scherne, based on linear hashing, with the explicit goal of rnaking range queries very efficient. The rnajor advantage of the z+ -ordering is that disk seek operations in response to a range query are reduced significantly, while at the sarne time all other operations can be carried out at least as efficiently as in other approaches, and sometimes even rnore efficient. For instance, a bucket split needs only two seek operations in our scherne, one for reading the bucket to be split and one for writing the two resulting buckets (they have consecutive nurn- bers). A rninor disadvantage of the z+ -ordering is that a small number of gaps (unused buckets) is necessary during an expansion. In an expansion from 2L to 2L+l buckets, we have

½

unused buckets on the average. Even in a srnall database of thousand buckets, this arnounts to a waste of 0.3244%, a negligible percentage in the face of average bucket occupancies of around 70%.

(16)

References

D.E. Knuth:

The Art of Computer Prograrnming, Vol. 3: Sorting and Searching, Addison- Wesley Publishing Company, Reading, Mass., 1973.

H.-P. Kriege!, B. Seeger:

Multidimensional Order Preserving Linear Hashing with Partial Expansions, Proc. International Conference on Database Theory, Rome, 1986, 203-220.

R. Krishnamurthy, K.- Y. Whang:

Multilevel Grid Files, IBM Research Report, Yorktown Heights, 1985.

'vV. Litwin:

Linear Hashing: A New Tool for File and Table Addressing, Proc. 6th Interna- tional Conference on Very Large Data Bases, 1980, 212-223.

J. Nievergelt, H. Hinterberger, K.C. Sevcik:

The Grid File: An Adaptable, Symmetrie Multikey File Structure, ACM Trans.

on Database Systems, Vol. 9, 1, 1984, 38-71.

J .A. Orenstein, T .H. Merrett:

A Class of Data Structures for Associative Searching, Proc. 3rd ACM SIGACT / SIGMOD Symp. on Principles of Database Systems, 1984, 181-190.

E.J. Otoo:

Balanced Multidimensional Extendible Hash Tree, Proc. 5th ACM SIGACT / SIGMOD Symp. on Principles of Database Systems, 1986, 100-113.

J.T. Robinson:

The K-D-B-Tree: A Search Structure for Large Multidimensional Dynamic In- dexes, Proc. ACM SIGMOD Int. Conf. on Management of Data, 1981, 10-18.

H. Tropf, H. Herzog:

Multidimensional Range Search m Dynamically Balanced Trees, Angewandte Informatik 2, 1981, 71-77.

G. Weikum, B. Neumann, H.-B. Paul:

Konzeption und Realisierung einer mengenorientierten Seitenschnittstelle zum effizienten Zugriff auf komplexe Objekte, Proc. GI-Fachtagung Datenbanksy- steme in Büro, Technik und Wissenschaft, Darmstadt, 1987, 212-230.

15

Referenzen

ÄHNLICHE DOKUMENTE

Auch bei guten Hash-Funktionen treten immer noch Kollisionen auf (Taubenschlagprinzip), und wir m¨ ussen sie behandeln. L¨ osung

• Wir wissen bereits, dass Hashing bei festgelegter Hash Funktion immer schlecht sein kann. Hashing mit zufällig

From base of core to 483 mbsf, the green hornblende concentrations vary broadly, caused, in part, by higher concentrations of altered and opaque minerals and also

Ausnahmen der Klasse Exeption , die in einer Methode auftreten können und dort nicht selbst abgefangen werden, müssen explizit im Kopf der Methode aufgelistet werden !!!.. Achtung:.

Further, recall, we need two representations for each length (except for the longest string that we encode, which is not a prefix of a longer string), one for the context in which

Aufgabe 06.3: Einfügen in Hashtabellen (zur Präsentation an der Tafel vorbereiten) (5 Punkte) Fügen Sie nachstehende Mitarbeiter in eine Hashtabelle ein (Anfangsgröße der

Implementieren Sie eine Hashtabelle (hash map) für beliebige Objekte. Bei Kollisionen verwenden Sie Überlauflisten. Die Hashtabelle soll mit Länge 1 initialisiert werden und

Als Kollisionsstrategie verwenden Sie separate chaining und quadratic probing mit dem in der Vorlesung beschriebenen Trick, um bei der Suche alle Tabellenplätze