ℹ️ Skipped - page is already crawled
| Filter | Status | Condition | Details |
|---|---|---|---|
| HTTP status | PASS | download_http_code = 200 | HTTP 200 |
| Age cutoff | PASS | download_stamp > now() - 6 MONTH | 0.1 months ago |
| History drop | PASS | isNull(history_drop_reason) | No drop reason |
| Spam/ban | PASS | fh_dont_index != 1 AND ml_spam_score = 0 | ml_spam_score=0 |
| Canonical | PASS | meta_canonical IS NULL OR = '' OR = src_unparsed | Not set |
| Property | Value |
|---|---|
| URL | https://www.egison.org/demonstrations/bellman-ford.html |
| Last Crawled | 2026-04-10 11:38:13 (3 days ago) |
| First Indexed | 2017-05-23 19:08:47 (8 years ago) |
| HTTP Status Code | 200 |
| Meta Title | Egison - Bellman-Ford Algorithm |
| Meta Description | null |
| Meta Canonical | null |
| Boilerpipe Text | You can edit and run the following code. Enjoy Egison programming!
What to do next...
Next Demonstration
Back to Home |
| Markdown | Toggle navigation
[Egison](https://www.egison.org/)
- [Documentations](https://www.egison.org/download/egi-thesis.pdf)
- [Try It Out](https://www.egison.org/demonstrations/bellman-ford.html)
- Online Tools
- [Online Egison Interpreter](https://www.egison.org/console.html)
- [Online Egison Tutorial](https://www.egison.org/try.html)
- Online Demonstrations
- [Poker Hands](https://www.egison.org/demonstrations/poker-hands.html)
- [Mahjong](https://www.egison.org/demonstrations/mahjong.html)
- [Prime Numbers](https://www.egison.org/demonstrations/primes.html)
- [Trees](https://www.egison.org/demonstrations/tree.html)
- [Graph (Bellman-Ford Algorithm)](https://www.egison.org/demonstrations/bellman-ford.html)
- [Randomized 3-SAT](https://www.egison.org/demonstrations/randomized-3sat.html)
- [Time-Series Data](https://www.egison.org/demonstrations/life-expectancy/)
- [Math](https://www.egison.org/math)
- [Blog](https://www.egison.org/blog)
- [Community](https://www.egison.org/community.html)
# Bellman-Ford Algorithm
You can edit and run the following code. Enjoy Egison programming\!
\-- Bellman-Ford algorithm for shortest paths -- initiate a distance graph def A : Matrix Integer := \[\|\[\|0, 19, 36, 66, 99, 65\|\] , \[\|19, 0, 25, 59, 64, 31\|\] , \[\|36, 25, 0, 84, 48, 28\|\] , \[\|66, 59, 84, 0, 59, 29\|\] , \[\|99, 64, 48, 59, 0, 9\|\] , \[\|65, 31, 28, 29, 9, 0\|\]\|\] def G.\* {Ord a} (t1: Matrix a) (t2: Matrix a) : Matrix a := withSymbols \[i\] reduce min (contract (t1~\#\_i + t2~i\_\#)) assertEqual "all-pairs shortest paths" (match iterate (\\P -\> G.\* P A) A as list something with \| \_ ++ \$P :: \#P :: \_ -\> P) \[\|\[\| 0, 19, 36, 66, 59, 50 \|\] , \[\| 19, 0, 25, 59, 40, 31 \|\] , \[\| 36, 25, 0, 57, 37, 28 \|\] , \[\| 66, 59, 57, 0, 38, 29 \|\] , \[\| 59, 40, 37, 38, 0, 9 \|\] , \[\| 50, 31, 28, 29, 9, 0 \|\]\|\]
Run
```
```
## What to do next...
[Next Demonstration](https://www.egison.org/demonstrations/randomized-3sat.html) [Back to Home](https://www.egison.org/)
***
This website in other langauge: [English](https://www.egison.org/), [日本語](https://www.egison.org/ja/)
© 2011-2020 [Satoshi Egi](https://www.egison.org/~egi/) All Rights Reserved. Sponsored by [Rakuten, Inc.](http://global.rakuten.com/corp/) and [Rakuten Institute of Technology](http://rit.rakuten.co.jp/). |
| Readable Markdown | You can edit and run the following code. Enjoy Egison programming\!
```
```
## What to do next...
[Next Demonstration](https://www.egison.org/demonstrations/randomized-3sat.html) [Back to Home](https://www.egison.org/) |
| Shard | 193 (laksa) |
| Root Hash | 15307363405567251593 |
| Unparsed URL | org,egison!www,/demonstrations/bellman-ford.html s443 |