Commit caa1068
Release Manager
gh-36584: implemented power of graph function under basic methods
### Description
This PR introduces a new function, `power_of_graph`, to compute the kth
power of an undirected, unweighted graph efficiently using the shortest
distances method. The proposed function leverages Breadth-First Search
(BFS) to calculate the power graph, providing a practical and scalable
solution.
### Why is this change required?
The change is required to address the need for efficiently calculating
the kth power of a graph, a fundamental operation in graph theory. The
PR aims to incorporate this feature into the SageMath library.
Fixes #36582
### Checklist
- [x] The title is concise, informative, and self-explanatory.
- [x] The description explains in detail what this PR is about.
- [x] I have linked a relevant issue or discussion (if applicable).
- [x] I have created tests covering the changes.
- [x] I have updated the documentation accordingly.
### ⌛ Dependencies
#36582 : To implement power of graph
URL: #36584
Reported by: saatvikraoIITGN
Reviewer(s): David Coudert, saatvikraoIITGN
1 file changed
+89
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15785 | 15785 | | |
15786 | 15786 | | |
15787 | 15787 | | |
| 15788 | + | |
| 15789 | + | |
| 15790 | + | |
| 15791 | + | |
| 15792 | + | |
| 15793 | + | |
| 15794 | + | |
| 15795 | + | |
| 15796 | + | |
| 15797 | + | |
| 15798 | + | |
| 15799 | + | |
| 15800 | + | |
| 15801 | + | |
| 15802 | + | |
| 15803 | + | |
| 15804 | + | |
| 15805 | + | |
| 15806 | + | |
| 15807 | + | |
| 15808 | + | |
| 15809 | + | |
| 15810 | + | |
| 15811 | + | |
| 15812 | + | |
| 15813 | + | |
| 15814 | + | |
| 15815 | + | |
| 15816 | + | |
| 15817 | + | |
| 15818 | + | |
| 15819 | + | |
| 15820 | + | |
| 15821 | + | |
| 15822 | + | |
| 15823 | + | |
| 15824 | + | |
| 15825 | + | |
| 15826 | + | |
| 15827 | + | |
| 15828 | + | |
| 15829 | + | |
| 15830 | + | |
| 15831 | + | |
| 15832 | + | |
| 15833 | + | |
| 15834 | + | |
| 15835 | + | |
| 15836 | + | |
| 15837 | + | |
| 15838 | + | |
| 15839 | + | |
| 15840 | + | |
| 15841 | + | |
| 15842 | + | |
| 15843 | + | |
| 15844 | + | |
| 15845 | + | |
| 15846 | + | |
| 15847 | + | |
| 15848 | + | |
| 15849 | + | |
| 15850 | + | |
| 15851 | + | |
| 15852 | + | |
| 15853 | + | |
| 15854 | + | |
| 15855 | + | |
| 15856 | + | |
| 15857 | + | |
| 15858 | + | |
| 15859 | + | |
| 15860 | + | |
| 15861 | + | |
| 15862 | + | |
| 15863 | + | |
| 15864 | + | |
| 15865 | + | |
| 15866 | + | |
| 15867 | + | |
| 15868 | + | |
| 15869 | + | |
| 15870 | + | |
| 15871 | + | |
| 15872 | + | |
| 15873 | + | |
| 15874 | + | |
| 15875 | + | |
| 15876 | + | |
15788 | 15877 | | |
15789 | 15878 | | |
15790 | 15879 | | |
| |||
0 commit comments