Page rank#271
Closed
ArpitaHanjagi wants to merge 8 commits intoTheAlgorithms:masterfrom
Closed
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR implements the PageRank algorithm along with several other graph and dynamic programming algorithms, machine learning implementations, and mathematics utilities for the R repository.
Key changes:
- Addition of PageRank algorithm for measuring vertex importance in directed graphs
- Implementation of multiple graph algorithms (Kruskal's MST, Prim's MST, topological sort, DFS/BFS, etc.)
- Addition of dynamic programming solutions (knapsack, LCS, LIS, coin change, etc.)
- Machine learning implementations (gradient boosting)
- Mathematics utilities (Armstrong numbers, amicable numbers)
Reviewed Changes
Copilot reviewed 139 out of 216 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| graph_algorithms/page_rank.r | Implements PageRank algorithm with iterative computation and damping factor |
| graph_algorithms/kruskal_mst.r | Kruskal's MST algorithm using Union-Find for cycle detection |
| graph_algorithms/prim_mst.r | Prim's MST algorithm for finding minimum spanning trees |
| graph_algorithms/dijkstra_shortest_path.r | Dijkstra's algorithm with priority queue implementation |
| graph_algorithms/bellman_ford_shortest_path.r | Bellman-Ford for shortest paths with negative weights |
| graph_algorithms/floyd_warshall.r | All-pairs shortest paths with negative cycle detection |
| dynamic_programming/coin_change.r | Coin change problem using dynamic programming |
| dynamic_programming/longest_increasing_subsequence.r | LIS with O(n²) and O(n log n) implementations |
| dynamic_programming/longest_common_subsequence.r | LCS for string/array comparison |
| machine_learning/gradient_boosting.r | Gradient boosting regressor with decision trees |
| mathematics/armstrong_number.r | Armstrong number validation function |
| mathematics/amicable_numbers.r | Amicable numbers checker with divisor sum calculation |
siriak
requested changes
Oct 26, 2025
Member
siriak
left a comment
There was a problem hiding this comment.
You have changed 216 files, check your changes
|
This PR is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 7 days. |
|
This PR was closed because it has been stalled for 7 days with no activity. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Algorithm: PageRank
Purpose: Measures the importance of vertices (pages) in a directed graph based on incoming links.
Theory: Pages linked by important pages receive higher rank. Iterative computation with damping factor models random surfing behavior.
Time Complexity: O(V^2) for dense graphs (or O(E) for sparse graphs with adjacency lists)
Space Complexity: O(V)
Input: Directed graph as an adjacency list, damping factor, max iterations, tolerance
Output: PageRank scores for each vertex