3.3 KiB
title | updated | created | latitude | longitude | altitude |
---|---|---|---|---|---|
Graph Theory | 2022-07-18 09:46:19Z | 2021-10-02 17:39:39Z | 52.09370000 | 6.72510000 | 0.0000 |
Euler Path
uses every single egde once; no repeats No need to have start en end vertex the same. 0 or 2 odd degree vertices, the rest even
Euler Circuit
Every edge once; no repeats Start and end vertex are the same All vertices must have an even degree Multiple Euler Circuits are possible and depends on the starting direction.
Fleury's Algorithme
Find an Euler Circuit, starting at vertex A Remove the edge take to go the next vertex, but a disconnected graph is not allowed. Deleting an edge prevents backtracking.
Eulerization
Duplicate egdes so a Euler cirquit is in the graph, from and to vertices with odd degree. No new edges. Minimize duplication of edges. Multiple solutions possible.
Hamiltonian Circuit
Visit every vertex once, with no repeats, Minimun cost Hamiltonian Circuit == (Traveling Salesman Problem) Possible method: Brute Force Optimal, bit not efficient
Complete Graph
All vertices are connected with all the others. If n vertices then (n-1)!/2 different hamiltonian circuits
Better then Brute Force the get the shortest circuit are heuristic methods;
- Nearest Neighbor Algorithm (not optimal) Start at A and take at every vertex the edge with the lowest weight. (Greedy, doesn't look ahead)
- Repeated Nearest Algorithm Same as Nearest Neighbor Algorithm but repeat for every vertex and select the lowest cost.
- Sorted Edge Algorithm (not optimal)
Add cheapest up, unless:
- a mini circuit (a curcuit that doesn't include all vertices)
- no vertex with a degree 3
AD = 1 AC = 2 AB = 4 (not because of degree 3 rule) CD = 8 (not because creates mini circuit) BD = 9 BC = 13 Most optimal is ADBCA = 25
Hamiltonian Path
Visit every vertex once, with no repeats,
Kruskal's Algoritme (optimal and efficient)
Similar to Sorted Edge Algorithm, but no circuit. Minimim cost spanning tree == every vertex is connected to an other vertex Add cheapest up, unless it creates a circuit.