mirror of
https://github.com/mfocko/blog.git
synced 2024-11-24 22:11:54 +01:00
algorithms(bf-to-astar): fix typos
Signed-off-by: Matej Focko <me@mfocko.xyz>
This commit is contained in:
parent
39213f1536
commit
6a857d8ccd
2 changed files with 4 additions and 3 deletions
|
@ -283,7 +283,7 @@ y = i / width
|
|||
## Bellman-Ford
|
||||
|
||||
If you have ever attended any Algorithms course that had path-finding in its
|
||||
sylabus, you probably feel like you've seen the algorithm above before[^3]… And
|
||||
syllabus, you probably feel like you've seen the algorithm above before[^3]… And
|
||||
yes, the first algorithm I have proposed is a very dumb version of the
|
||||
_Bellman-Ford_ algorithm, it's dumb, because it loops :wink: After our “looping”
|
||||
prevention we got to the point that is almost the _Bellman-Ford_ with the one
|
||||
|
@ -406,12 +406,12 @@ Let's have a short look at the time complexities of the presented algorithms:
|
|||
2. our naïve approach with the fixed count of iterations instead of the
|
||||
`do-while` loop results in the same worst-case time complexity:
|
||||
$$
|
||||
\mathcal{O}(\vert V \vert \cdot \vert E \vert)
|
||||
\Theta(\vert V \vert \cdot \vert E \vert)
|
||||
$$
|
||||
|
||||
3. and finally the well-known Bellman-Ford's algorithm time complexity:
|
||||
$$
|
||||
\mathcal{O}(\vert V \vert \cdot \vert E \vert)
|
||||
\Theta(\vert V \vert \cdot \vert E \vert)
|
||||
$$
|
||||
|
||||
## Small refactor
|
||||
|
|
|
@ -10,6 +10,7 @@ tags:
|
|||
- bellman ford
|
||||
- dynamic programming
|
||||
- dijkstra
|
||||
- greedy
|
||||
- a star
|
||||
last_update:
|
||||
date: 2024-01-01
|
||||
|
|
Loading…
Reference in a new issue