Task 1
Graph Quiz
c) For there is always a simple cycle. Because there cannot be a tree as .
DFS
I am stupid, once again fucked up a simple DFS because I can’t read.
Task 2
d)
DFS pseudo-code error: Make sure to have the DFS start from every still unmarked vertex:
DFS(g):
all vertices unmarked:
for u unmarked:
visit(u)
visit(u):
mark u
for v adjacent to u:
....
Task 3 (DP)
Don’t fuck up the extraction. If we do is true for all, we need to make sure to put not like me.
Task 4
a)
DFS runtime is in general. If we know the graph is connected, we can say that the runtime is as we know and thus we can simplify out the .