• Keine Ergebnisse gefunden

¨Ubungsblatt 10

N/A
N/A
Protected

Academic year: 2022

Aktie "¨Ubungsblatt 10"

Copied!
1
0
0

Wird geladen.... (Jetzt Volltext ansehen)

Volltext

(1)

P.Ueberholz Algorithmen und Datenstrukturen SS 2019

Ubungsblatt 10 ¨

Ubung 1:¨ Gegeben ist die Zahlenfolge

Z={63,6,28,82,38,65,35}

Sortieren Sie die Zahlen auf einem Blatt mit Radix-Sort, wobei auf jeder Stelle ein Counting-Sort angewendet werden soll. Geben Sie den Counting- Vektor vor und nach dem Sortieren der jeweiligen Stelle an.

Ubung 2:¨ Suchen Sie den Wertk=33 in der Schl¨usselfolge

F=1,5,9,17,24,27,29,33,37,42,43,46,50,52,56,59,60,61 mittels

a) bin¨arer Suche b) Interpolations-Suche

Geben Sie in jedem Schritt den Index der linken und der rechten Grenze, den Index des betrachteten Werts sowie den Wert selber an.

Ubung 3:¨ Bei Hash-Verfahren ist es wichtig, eine gute Hashfunktion zu verwen- den. Die multiplikative Methode verwendet die Funktion

h(k) = (a·k mod 2w)>>(w−r)

Bei welchem Index w ¨urde der Key-Wert 19 mit den Parameterw=7,r=4 unda=97 der Hashfunktion, also

h(k) = (97·kmod 27)>>3 abgespeichert werden?

Ubung 4 f ¨ur Motivierte:¨ Der Datentypintwird mit 32 Bit gespeichert. Schreiben Sie ein Programm, welches ein Feld mitnZufallszahlen vom Typintanlegt und mit Radix-Sort sortiert. Die 32 Bit-Zahlen sollen in 4 Gruppen a 8 Bit aufgeteilt und anschließend in 4 Phasen sortiert werden, wobei zuerst nach den hintersten 8 Bit sortiert wird.

1

Referenzen

ÄHNLICHE DOKUMENTE

The user should then either let the CASORT continue if he does not need the information that was truncated, or he should restart the CASORT and give a

parameter affects whether the output file is space compressed.. This is the first sort key specification. If no key is specified, FASTSORT will assume the entire

Z = (12,5,11,6, 13,9, 20,3, 1,19,8) Sortieren Sie die Zahlen auf einem Blatt mit dem. a) rekursiven Merge-Sort Algorithmus und dem b) iterativen

  Ist also kein allgemeines Sortierverfahren.. Radix-Sort sortiert diese Zahlen in Zeit für jedes beliebige.   Beweis: verwende Counting-Sort als stabilen Sortier-Algo.

Das besondere an Bitonic Sort ist, dass die Anzahl zu vergleichenden Elemente un- abh¨ angig von den Daten sind.. Bitonic Sort l¨ aßt sich deshalb in

Upon notification by customer to the nearest DIGITAL office that the computer system, including all required prerequisite hardware and software, is ready for the

(If the user specified an output_file exit procedure, then the status code data_seq_error is returned to that exit procedure; see the sort_$return entry below.)

Control cards supply the Sort-7 Timing program with a description of the Sort-7 program, the object ma- chine, and the file(s) to be sorted.. Two control cards are