1
0
Fork 0
mirror of https://github.com/mfocko/blog.git synced 2025-05-09 04:42:57 +02:00

chore: do not keep SVGs in the repository

• Do not keep the SVG files in the repository, generate them just for
  the builds
• Also generate ZIP files with sources for downloading

Signed-off-by: Matej Focko <mfocko@redhat.com>
This commit is contained in:
Matej Focko 2022-11-24 17:24:21 +01:00
parent 7efd5e294b
commit 9f9dc39a31
Signed by: mfocko
GPG key ID: 7C47D46246790496
17 changed files with 31 additions and 746 deletions
ib002/10-graphs

View file

@ -17,56 +17,10 @@ Consider the following graph:
![BFS graph](/files/ib002/bfs-tree/bfs_graph.svg)
<details>
<summary>Source for the rendered graph</summary>
```dot showLineNumbers
graph {
a -- c
a -- e
c -- i
c -- b
e -- j
i -- d
b -- h
d -- h
h -- j
}
```
</details>
We run BFS from the vertex $a$ and obtain the following BFS tree:
![BFS tree](/files/ib002/bfs-tree/bfs_tree.svg)
<details>
<summary>Source for the BFS tree</summary>
```dot showLineNumbers
digraph {
a -> c
a -> e
c -> b
c -> i
e -> j
b -> h
i -> d
}
```
</details>
Let's consider pair of vertices $e$ and $h$. For them we can safely lay, from the BFS tree, following properties:
- lower bound: $2$
@ -82,32 +36,6 @@ Now the more important question, is there a shorter path in that graph? The answ
![BFS tree](/files/ib002/bfs-tree/bfs_graph_with_additional_edge.svg)
<details>
<summary>Source for the BFS graph with an additional edge</summary>
```dot showLineNumbers
graph {
a -- c
a -- e
c -- i
c -- b
e -- j
e -- h
i -- d
b -- h
d -- h
h -- j
}
```
</details>
Okay, so we have a graph that breaks the rule we have laid. However, we need to run BFS to obtain the new BFS tree, since we have changed the graph.
:::tip
@ -120,26 +48,6 @@ Do we need to run BFS after **every** change?
![BFS tree](/files/ib002/bfs-tree/bfs_tree_with_additional_edge.svg)
<details>
<summary>Source for the BFS tree</summary>
```dot showLineNumbers
digraph {
a -> c
a -> e
c -> b
c -> i
e -> h
e -> j
i -> d
}
```
</details>
Oops, we have gotten a new BFS tree, that has a height difference of 1.
:::tip