|
6528 | 6528 |
|
6529 | 6529 |
|
6530 | 6530 |
|
| 6531 | + |
| 6532 | + |
| 6533 | + |
| 6534 | + |
| 6535 | + |
| 6536 | + |
| 6537 | + |
| 6538 | + |
| 6539 | + |
| 6540 | + |
| 6541 | + |
| 6542 | + |
6531 | 6543 |
|
6532 | 6544 |
|
6533 | 6545 |
|
|
6558 | 6570 |
|
6559 | 6571 |
|
6560 | 6572 |
|
| 6573 | + |
| 6574 | + |
| 6575 | + |
| 6576 | + |
6561 | 6577 |
|
6562 | 6578 |
|
6563 | 6579 |
|
|
6570 | 6586 | <ul class="metadata page-metadata" data-bi-name="page info" lang="en-us" dir="ltr">
|
6571 | 6587 |
|
6572 | 6588 | Last update:
|
6573 |
| - <span class="git-revision-date-localized-plugin git-revision-date-localized-plugin-date" title="June 8, 2022 12:55:09">June 8, 2022</span>  |
| 6589 | + <span class="git-revision-date-localized-plugin git-revision-date-localized-plugin-date" title="May 2, 2025 18:37:17">May 2, 2025</span>  |
6574 | 6590 |
|
6575 | 6591 | <!-- Tags -->
|
6576 | 6592 |
|
@@ -6608,7 +6624,7 @@ <h2 id="number-of-paths-of-a-fixed-length">Number of paths of a fixed length<a c
|
6608 | 6624 | The following algorithm works also in the case of multiple edges:
|
6609 | 6625 | if some pair of vertices <span class="arithmatex">$(i, j)$</span> is connected with <span class="arithmatex">$m$</span> edges, then we can record this in the adjacency matrix by setting <span class="arithmatex">$G[i][j] = m$</span>.
|
6610 | 6626 | Also the algorithm works if the graph contains loops (a loop is an edge that connect a vertex with itself).</p>
|
6611 |
| -<p>It is obvious that the constructed adjacency matrix if the answer to the problem for the case <span class="arithmatex">$k = 1$</span>. |
| 6627 | +<p>It is obvious that the constructed adjacency matrix is the answer to the problem for the case <span class="arithmatex">$k = 1$</span>. |
6612 | 6628 | It contains the number of paths of length <span class="arithmatex">$1$</span> between each pair of vertices.</p>
|
6613 | 6629 | <p>We will build the solution iteratively:
|
6614 | 6630 | Let's assume we know the answer for some <span class="arithmatex">$k$</span>.
|
@@ -6656,7 +6672,7 @@ <h2 id="generalization-of-the-problems-for-paths-with-length-up-to-k">Generaliza
|
6656 | 6672 |
|
6657 | 6673 | <ul class="metadata page-metadata" data-bi-name="page info" lang="en-us" dir="ltr">
|
6658 | 6674 | <span class="contributors-text">Contributors:</span>
|
6659 |
| - <ul class="contributors" data-bi-name="contributors"><li><a href="https://github.com/jakobkogler" title="jakobkogler" data-bi-name="contributorprofile" target="_blank">jakobkogler</a> (92.47%)</li><li><a href="https://github.com/adamant-pwn" title="adamant-pwn" data-bi-name="contributorprofile" target="_blank">adamant-pwn</a> (6.45%)</li><li><a href="https://github.com/wikku" title="wikku" data-bi-name="contributorprofile" target="_blank">wikku</a> (1.08%)</li></ul> |
| 6675 | + <ul class="contributors" data-bi-name="contributors"><li><a href="https://github.com/jakobkogler" title="jakobkogler" data-bi-name="contributorprofile" target="_blank">jakobkogler</a> (91.4%)</li><li><a href="https://github.com/adamant-pwn" title="adamant-pwn" data-bi-name="contributorprofile" target="_blank">adamant-pwn</a> (6.45%)</li><li><a href="https://github.com/bit-shashank" title="bit-shashank" data-bi-name="contributorprofile" target="_blank">bit-shashank</a> (1.08%)</li><li><a href="https://github.com/wikku" title="wikku" data-bi-name="contributorprofile" target="_blank">wikku</a> (1.08%)</li></ul> |
6660 | 6676 | </ul>
|
6661 | 6677 |
|
6662 | 6678 | </article>
|
|
0 commit comments