Skip to content

Conversation

@ArpitaHanjagi
Copy link
Contributor

Algorithm: Louvain Method for Community Detection

Purpose: Detects communities or clusters in an undirected graph by optimizing modularity.

Theory:

Each node starts in its own community.

Iteratively moves nodes to neighboring communities to maximize modularity gain.

Aggregates nodes into super-nodes and repeats until modularity converges.

Time Complexity: Roughly O(V log V) for sparse graphs.

Space Complexity: O(V + E).

Input: Undirected graph as an adjacency list.

Output: Community assignment for each vertex.

@Copilot Copilot AI review requested due to automatic review settings October 20, 2025 19:06
Copy link

Copilot AI left a 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 pull request introduces the Louvain Method for Community Detection algorithm, along with numerous supporting graph algorithms, dynamic programming implementations, and machine learning documentation. The PR significantly expands the repository's algorithm implementations with a focus on graph theory and dynamic programming.

Key Changes

  • Adds Louvain community detection algorithm for identifying clusters in undirected graphs
  • Implements 13 additional graph algorithms including MST, shortest path, and traversal algorithms
  • Adds 6 dynamic programming algorithms for classic optimization problems
  • Includes machine learning tutorials and documentation files

Reviewed Changes

Copilot reviewed 139 out of 219 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
graph_algorithms/louvain_community_detection.r Implements Louvain method for community detection via modularity optimization
graph_algorithms/kruskal_mst.r Adds Kruskal's MST algorithm with union-find data structure
graph_algorithms/prim_mst.r Implements Prim's MST algorithm
graph_algorithms/dijkstra_shortest_path.r Adds Dijkstra's shortest path with priority queue
graph_algorithms/bellman_ford_shortest_path.r Implements Bellman-Ford for graphs with negative weights
graph_algorithms/floyd_warshall.r Adds all-pairs shortest path using R6 class structure
graph_algorithms/topological_sort.r Implements Kahn's algorithm for topological ordering
graph_algorithms/kosaraju_scc.r Adds strongly connected components detection
graph_algorithms/page_rank.r Implements PageRank algorithm
graph_algorithms/breadth_first_search.r Adds BFS with shortest path functionality
graph_algorithms/depth_first_search.r Implements recursive and iterative DFS
graph_algorithms/hopcroft_karp_max_matching.r Adds maximum bipartite matching
graph_algorithms/hierholzer_eulerian.r Implements Eulerian circuit detection
graph_algorithms/hamilitonian_cycle.r Adds Hamiltonian cycle detection via backtracking
graph_algorithms/stoer_wagner_min_cut.r Implements minimum cut algorithm
graph_algorithms/bron_kerbosch_max_cliques.r Adds maximal clique detection
graph_algorithms/bridge_detector.r Implements Tarjan's bridge detection with R6 class
dynamic_programming/0/1_knapsack_problem.r Adds 0/1 knapsack with backtracking
dynamic_programming/coin_change.r Implements coin change minimum problem
dynamic_programming/longest_common_subsequence.r Adds LCS with full DP implementation
dynamic_programming/longest_increasing_subsequence.r Implements LIS with O(n log n) optimization
dynamic_programming/matrix_chain_multiplication.r Adds matrix chain multiplication
dynamic_programming/minimum_path_sum.r Implements minimum path sum in grids
dynamic_programming/subset_sum.r Adds subset sum problem solution
machine_learning/README.md Adds ML tutorials and references
documentation/* Adds ML algorithm documentation files
kruskal_mst.r Duplicate file in root directory
dynamic_programming/0/0/1_knapsack_problem.r Duplicate knapsack implementation

Copy link
Member

@siriak siriak left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You have changed 219 files, check your changes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants