-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
77 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
# DAG Shortest path | ||
# DAG-Shortest-Path | ||
<!-- [J9] Forstå DAG-Shortest-Path --> | ||
|
||
<!-- | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
# Transitive-Closure | ||
<!-- [K3] Forstå Transitive-Closure --> | ||
|
||
<!-- | ||
1. Kjenne den formelle definisjonen av det generelle problemet den løser | ||
2. Kjenne til eventuelle tilleggskrav den stiller for å være korrekt | ||
3. Vite hvordan den oppfører seg; kunne utføre algoritmen, trinn for trinn! | ||
4. Forstå korrekthetsbeviset; hvordan og hvorfor virker algoritmen egentlig? | ||
5. Kjenne til eventuelle styrker eller svakheter, sammenlignet med andre | ||
6. Kjenne kjøretidene under ulike omstendigheter, og forstå utregningen | ||
--> | ||
|
||
Transitive-Closure er lik som Floyd-Warshall, men sjekker kun om det finnes en sti eller ikke, og ignorerer kantvekter. | ||
|
||
## Den formelle definisjonen av det generelle problemet | ||
<!-- Et problem er relasjonen mellom input og output --> | ||
|
||
Input: En rettet graf $G=(V,E)$ | ||
Output: En rettet graf $G*=(V,E*)$ der $(i,j)\in E*$ hvis og bare hvis det finnes en sti fra $i$ til $j$ i $G$ | ||
|
||
## Tilleggskrav for korrekthet | ||
<!-- Korrekhet: algoritmer virker, gir det svaret den skal --> | ||
<!-- Eks: Binary search må ha en sortert liste --> | ||
|
||
## Trinn for trinn | ||
<!-- Pseudokode med forklaring --> | ||
|
||
## Korrekthetsbevis | ||
|
||
## Styrker og svakheter sammenlignet med andre | ||
|
||
## Kjøretid og utregning | ||
<!-- Under ulike omstendigheter --> | ||
|
||
Best case | Average case | Worst case | Minne | ||
---------|----------|---------|--------- | ||
TODO | TODO | TODO | TODO | ||
|
||
## Python kodeeksempel |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters