Compare commits
5 Commits
0c61a29375
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
| 32ef695c87 | |||
| 1ee5e7415b | |||
| b1a467b2e4 | |||
| 9f807d2a21 | |||
| de4bd64e77 |
@@ -1,4 +1,4 @@
|
||||
set shell := [ "bash", "-uc" ]
|
||||
# set shell := [ "bash", "-uc" ]
|
||||
_default:
|
||||
@- just --unsorted --choose
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
@@ -44,4 +44,6 @@ def enter(*args: str):
|
||||
|
||||
if __name__ == '__main__':
|
||||
sys.tracebacklimit = 0;
|
||||
# NOTE: necessary for Windows, to ensure that console output is rendered correctly:
|
||||
os.system('');
|
||||
enter(*sys.argv[1:]);
|
||||
|
||||
1
notes/.gitignore
vendored
1
notes/.gitignore
vendored
@@ -16,6 +16,7 @@
|
||||
!/notes.tex
|
||||
!/notes.pdf
|
||||
!/woche*.pdf
|
||||
!/*.csv
|
||||
|
||||
################################################################
|
||||
# Git Keep
|
||||
|
||||
34
notes/merfachesrucksack.csv
Normal file
34
notes/merfachesrucksack.csv
Normal file
@@ -0,0 +1,34 @@
|
||||
;;;i (Kosten);;;;;;;;;;;;;;;;;
|
||||
j;Objekt[j];;0;1;2;3;4;5;6;7;8;9;10;11;12;13;14;15;16;17
|
||||
;;value;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0
|
||||
;;cost;-;-;-;-;-;-;-;-;-;-;-;-;-;-;-;-;-;-
|
||||
;;;;;;;;;;;;;;;;;;;;
|
||||
1;A;value[i – cost[j]];;;;0;1;2;3;4;5;6;7;8;9;10;11;12;13;14
|
||||
cost[j];3;… + value[j];;;;4;4;4;8;8;8;12;12;12;16;16;16;20;20;20
|
||||
value[j];4;besser?;;;;WAHR;WAHR;WAHR;WAHR;WAHR;WAHR;WAHR;WAHR;WAHR;WAHR;WAHR;WAHR;WAHR;WAHR;WAHR
|
||||
;;best-value;0;0;0;4;4;4;8;8;8;12;12;12;16;16;16;20;20;20
|
||||
;;best-object;-;-;-;A;A;A;A;A;A;A;A;A;A;A;A;A;A;A
|
||||
;;;;;;;;;;;;;;;;;;;;
|
||||
2;B;value[i – cost[j]];;;;;0;1;2;3;4;5;6;7;8;9;10;11;12;13
|
||||
cost[j];4;… + value[j];;;;;5;5;5;9;10;10;13;14;15;17;18;19;21;22
|
||||
value[j];5;besser?;;;;;WAHR;WAHR;;WAHR;WAHR;;WAHR;WAHR;;WAHR;WAHR;;WAHR;WAHR
|
||||
;;value;0;0;0;4;5;5;8;9;10;12;13;14;16;17;18;20;21;22
|
||||
;;cost;-;-;-;A;B;B;A;B;B;A;B;B;A;B;B;A;B;B
|
||||
;;;;;;;;;;;;;;;;;;;;
|
||||
3;C;value[i – cost[j]];;;;;;;;0;1;2;3;4;5;6;7;8;9;10
|
||||
cost[j];7;… + value[j];;;;;;;;10;10;10;14;15;15;18;20;20;22;24
|
||||
value[j];10;besser?;;;;;;;;WAHR;;;WAHR;WAHR;;WAHR;WAHR;;WAHR;WAHR
|
||||
;;value;0;0;0;4;5;5;8;10;10;12;14;15;16;18;20;20;22;24
|
||||
;;cost;-;-;-;A;B;B;A;C;B;A;C;C;A;C;C;A;C;C
|
||||
;;;;;;;;;;;;;;;;;;;;
|
||||
4;D;value[i – cost[j]];;;;;;;;;0;1;2;3;4;5;6;7;8;9
|
||||
cost[j];8;… + value[j];;;;;;;;;11;11;11;15;16;16;19;21;22;23
|
||||
value[j];11;besser?;;;;;;;;;WAHR;;;;;;;WAHR;;
|
||||
;;value;0;0;0;4;5;5;8;10;11;12;14;15;16;18;20;21;22;24
|
||||
;;cost;-;-;-;A;B;B;A;C;D;A;C;C;A;C;C;D;C;C
|
||||
;;;;;;;;;;;;;;;;;;;;
|
||||
5;E;value[i – cost[j]];;;;;;;;;;0;1;2;3;4;5;6;7;8
|
||||
cost[j];9;… + value[j];;;;;;;;;;13;13;13;17;18;18;21;23;24
|
||||
value[j];13;besser?;;;;;;;;;;WAHR;;;WAHR;;;;WAHR;
|
||||
;;value;0;0;0;4;5;5;8;10;11;13;14;15;17;18;20;21;23;24
|
||||
;;cost;-;-;-;A;B;B;A;C;D;E;C;C;E;C;C;D;E;C
|
||||
|
@@ -17,6 +17,5 @@ Inhaltsverzeichnis
|
||||
- [Vorlesungswoche 11](./woche11.md)
|
||||
- [Vorlesungswoche 12](./woche12.md)
|
||||
- [Vorlesungswoche 13](./woche13.md)
|
||||
<!--
|
||||
- [Vorlesungswoche 14](./woche14.md)
|
||||
-->
|
||||
- [Vorlesungswoche 15](./woche15.md)
|
||||
|
||||
15
protocol/woche14.md
Normal file
15
protocol/woche14.md
Normal file
@@ -0,0 +1,15 @@
|
||||
# Vorlesungswoche 14 (4.–10. Juli 2022) #
|
||||
|
||||
## Agenda ##
|
||||
|
||||
- Wiederholung
|
||||
- Netze/Flüsse: Restgraphen, Push, Relabel.
|
||||
- Gomory-Hu
|
||||
- Branch & Bound: Rucksack, TSP.
|
||||
- Matrixmultkiplikation
|
||||
- Matroiden, Greedy
|
||||
- Genetischer Algorithmus
|
||||
|
||||
### Nächste Woche/n ###
|
||||
|
||||
- Wiederholung zur Klausurvorbereitung
|
||||
83
protocol/woche15.md
Normal file
83
protocol/woche15.md
Normal file
@@ -0,0 +1,83 @@
|
||||
# Vorlesungswoche 15 (11.–17. Juli 2022) #
|
||||
|
||||
## Agenda ##
|
||||
|
||||
- Wiederholung
|
||||
- Alle genetischen Algorithmen im Kurs, inkl. letzter VL, Bsp. aus freiwilligen Übungsblättern.
|
||||
- Branch & Bound: Rucksack, TSP.
|
||||
- Dynamisches Programmieren.
|
||||
- Matroiden: Versprecher letzte Woche
|
||||
</br>
|
||||
```
|
||||
Ich sagte:
|
||||
|A| < |B| ==> es gibt x ∈ E s.d. A u {x} ∈ M
|
||||
|
||||
Das ist zwar nicht falsch, aber nicht die ganze Aussage.
|
||||
Es hätte so lauten sollen:
|
||||
|A| < |B| ==> es gibt x ∈ B\A s.d. A u {x} ∈ M
|
||||
```
|
||||
- Pollard-Rho: Die Rolle der Primzahlen und die Funktion `φ(n)`.
|
||||
|
||||
### Anmerkung ###
|
||||
|
||||
Wir haben mal kurz über Editoren für Notizen geredet. Einerseits gibt es Word (iiiiii) und **LaTeX** (schönes Rendering, nicht so schöne Syntax).
|
||||
Dann gibt es immer plaintext. Aber eine Stufe besser ist **Markdown**. Markdown hat die folgenden Vorteile:
|
||||
|
||||
- Nur plaintext Dateien (d.h. keine riesige XML-Objekte im Hintergrund).
|
||||
- Sehr simple Syntax (bspw. `**fett**`, `_kursiv_`, usw.).
|
||||
- **Keine Kompilation** nötig—nur ein guter Renderer.
|
||||
- Komplexe Textformats mit sehr intuitiver Syntax möglich:
|
||||
- Überschriften
|
||||
- Listen
|
||||
- Tabellen. Z. B. man gibt
|
||||
```
|
||||
| Objekt | Kosten | Wert |
|
||||
| :----: | -----: | ---: |
|
||||
| Apfel | 1,30€ | 301 |
|
||||
| Orange | 2€ | 440 |
|
||||
```
|
||||
ein und bekommt
|
||||
|
||||
| Objekt | Kosten | Wert |
|
||||
| :----: | -----: | ---: |
|
||||
| Apfel | 1,30€ | 301 |
|
||||
| Orange | 2€ | 440 |
|
||||
|
||||
raus.
|
||||
- Code Blocks (in diversen Sprachen). Z. B. man gibt
|
||||
```
|
||||
'''java
|
||||
public class HelloWorld {
|
||||
public static void main (String[] args) {
|
||||
System.out.println("Hello World!");
|
||||
}
|
||||
}
|
||||
'''
|
||||
```
|
||||
(mit Backticks statt `'''`) und bekommt
|
||||
```java
|
||||
public class HelloWorld {
|
||||
public static void main (String[] args) {
|
||||
System.out.println("Hello World!");
|
||||
}
|
||||
}
|
||||
```
|
||||
raus.
|
||||
|
||||
- URIs
|
||||
- interne Verlinkungen!
|
||||
- sogar Mathe-Formeln mit (simplem) LaTeX-Code
|
||||
|
||||
Man braucht lediglich einen Renderer für Vorschau-Zwecken.
|
||||
Hier ein paar Empfehlungen:
|
||||
|
||||
- VSCode + passende markdown Extensions (alles gratis)
|
||||
- Typora (nicht gratis, aber für mich hat es sich gelohnt). Siehe bspw. <https://support.typora.io/Math>. Der Editor rendert sogar LaTeX-Formeln, und hat einen WYSIWYG-Modus.
|
||||
- online Editoren wie
|
||||
- https://cryptpad.linxx.net -> Markdown-Folien
|
||||
- https://dillinger.io
|
||||
- In Git-Repos (wie dieser hier!) werden **md**-Dateien automatisch gerendert!
|
||||
|
||||
### Nächste Woche/n ###
|
||||
|
||||
- Keine Übung, sondern die Klausur! Viel Erfolg!
|
||||
Reference in New Issue
Block a user