100% satisfaction guarantee Immediately available after payment Both online and in PDF No strings attached 4.2 TrustPilot
logo-home
Summary

Zusammenfassung Lernzettel_Algodat_SoSe23

Rating
-
Sold
-
Pages
27
Uploaded on
04-08-2023
Written in
2023/2024

Zusammenfassung und Lernzettel

Institution
Course










Whoops! We can’t load your doc right now. Try again or contact support.

Written for

Institution
Study
Course

Document information

Uploaded on
August 4, 2023
Number of pages
27
Written in
2023/2024
Type
Summary

Subjects

Content preview

Algorithmen und Datenstrukturen und ihre Laufzeiten
Notationen
Notation Bedeutung
o(g(n)) f (n) wächst langsamer als g(n)
O(g(n)) f (n) wächst höchstens genauso schnell wie g(n)
Θ(g(n)) f (n) wächst genauso schnell wie g(n)
ω(g(n)) (Zahlentheorie) f (n) wächst nicht immer langsamer als g(n)
Ω(g(n)) (Komplexitätstheorie) f (n) wächst mindestens genauso schnell wie g(n)
ω(g(n)) f (n) wächst schneller als g(n)


1 Suchalgorithmen
1.1 Binäre Suchbäume (BST)
Ein binärer Suchbaum ist eine Datenstruktur, die schnelles Suchen, Einfügen
und Löschen von Elementen ermöglicht. Jeder Knoten hat höchstens zwei
Kinder, die als linker Knoten und rechter Knoten bezeichnet werden.

Operation Worst-Case Best-Case Durchschnitt
Suchen O(n) Ω(log n) Θ(log n)
Einfügen (add()) O(n) Ω(log n) Θ(log n)
Entfernen (re- O(n) Ω(log n) Θ(log n)
move())

1.2 AVL-Bäume
AVL-Bäume sind selbstbalancierende binäre Suchbäume. Bei jeder Änderung im
Baum wird die Balance überprüft und gegebenenfalls durch Rotationen wieder-
hergestellt.

Operation Worst-Case Best-Case Durchschnitt
Suchen O(log n) Ω(log n) Θ(log n)
Einfügen (add()) O(log n) Ω(log n) Θ(log n)
Entfernen (re- O(log n) Ω(log n) Θ(log n)
move())




1

,1.3 Rot-Schwarz-Bäume
Rot-Schwarz-Bäume sind eine Art von selbstbalancierenden binären Suchbäumen.
Jeder Knoten speichert einen zusätzlichen Bit für die Farbe, der zur Aufrechter-
haltung des Balances im Baum verwendet wird.

Operation Worst-Case Best-Case Durchschnitt
Suchen O(log n) Ω(log n) Θ(log n)
Einfügen (add()) O(log n) Ω(log n) Θ(log n)
Entfernen (re- O(log n) Ω(log n) Θ(log n)
move())

1.4 B-Bäume
B-Bäume sind eine Verallgemeinerung der binären Suchbäume, die für die Spe-
icherung auf externen Medien optimiert sind. Sie können mehr als zwei Kinder
haben.

Operation Worst-Case Best-Case Durchschnitt
Suchen O(log n) Ω(log n) Θ(log n)
Einfügen (add()) O(log n) Ω(log n) Θ(log n)
Entfernen (re- O(log n) Ω(log n) Θ(log n)
move())

1.5 Hashing
Hashing ist eine Technik, die direkten Zugriff auf die Daten ermöglicht. Sie
verwendet eine Hash-Funktion, um die Indexposition für die Speicherung von
Daten zu berechnen.

Operation Worst-Case Best-Case Durchschnitt
Suchen O(n) Ω(1) Θ(1)
Einfügen (add()) O(n) Ω(1) Θ(1)
Entfernen (re- O(n) Ω(1) Θ(1)
move())




2

, 1.6 Heaps
Ein Heap ist eine spezielle Baumstruktur, in der jeder Elternknoten kleiner
oder gleich seinen Kindknoten ist. Es wird hauptsächlich verwendet, um eine
Prioritätswarteschlange zu implementieren.

Operation Worst-Case Best-Case Durchschnitt
Suchen O(n) Ω(1) Θ(log n)
Einfügen (add()) O(log n) Ω(1) Θ(log n)
Entfernen (re- O(log n) Ω(1) Θ(log n)
move())


2 Graphalgorithmen
2.1 Dijkstra’s Algorithmus
Dijkstra’s Algorithmus ist ein Algorithmus für die Suche nach dem kürzesten
Pfad in einem Graphen mit nichtnegativen Kantengewichten.

Worst-Case Best-Case Durchschnitt
O((V + E) log V ) Ω((V + E) log V ) Θ((V + E) log V )

2.2 Bellman-Ford Algorithmus
Der Bellman-Ford Algorithmus berechnet den kürzesten Pfad in einem Graphen.
Im Gegensatz zu Dijkstra’s Algorithmus funktioniert er auch mit negativen Kan-
tengewichten, solange keine negativen Zyklen vorhanden sind.

Worst-Case Best-Case Durchschnitt
O(V E) Ω(V E) Θ(V E)

2.3 Floyd-Warshall Algorithmus
Der Floyd-Warshall Algorithmus ist ein Algorithmus zur Lösung des Problems
des kürzesten Pfades für alle Paare von Knoten in einem gewichteten Graphen.

Worst-Case Best-Case Durchschnitt
O(V 3 ) Ω(V 3 ) Θ(V 3 )

2.4 Prim’s Algorithmus
Prim’s Algorithmus ist ein Algorithmus zur Berechnung des minimalen Spannbaums
für einen zusammenhängenden gewichteten Graphen.

Worst-Case Best-Case Durchschnitt
O(V 2 ) Ω(V 2 ) Θ(V 2 )

3
$9.83
Get access to the full document:

100% satisfaction guarantee
Immediately available after payment
Both online and in PDF
No strings attached

Get to know the seller
Seller avatar
nicomann

Get to know the seller

Seller avatar
nicomann Philipps-Universität Marburg
Follow You need to be logged in order to follow users or courses
Sold
1
Member since
2 year
Number of followers
1
Documents
4
Last sold
2 year ago

0.0

0 reviews

5
0
4
0
3
0
2
0
1
0

Recently viewed by you

Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Frequently asked questions