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:
parent
7efd5e294b
commit
9f9dc39a31
17 changed files with 31 additions and 746 deletions
ib002/10-graphs
|
@ -17,56 +17,10 @@ Consider the following graph:
|
|||
|
||||

|
||||
|
||||
<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:
|
||||
|
||||

|
||||
|
||||
<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
|
|||
|
||||

|
||||
|
||||
<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?
|
|||
|
||||

|
||||
|
||||
<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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue