# How Much Is an Edge Worth? Points and Penalties in Graph Modularity

Pretend that I'm a customer hanging out in my graph, and I want to know who belongs in a community with me.

How about that lady who's connected to me by an edge? Maybe. Probably. We are connected after all.

How about the guy on the other side of the graph who shares no edge with me? Hmmm, it's much less likely.

Graph modularity quantifies this gut feeling that *communities are defined by connections*. The technique assigns scores to each pair of nodes. If two nodes aren't connected, I need to be penalized for putting them in a community. If two nodes are connected, I need to be rewarded. Whatever community assignment I make, the modularity of the graph is driven by the sum of those scores for each pair of nodes that ends up in a community together.

Using an optimization algorithm (you knew Solver was coming!), you can “try out” different community assignments on the graph and see which...