-
-
Couldn't load subscription status.
- Fork 342
Page rank #271
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Page rank #271
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You have changed 216 files, check your changes
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