Graph Theory Applied to Workforce Systems

From WFM Labs

Graph theory provides the mathematical language for systems defined by connections — agents linked to skills, teams linked to schedules, career paths linking current competencies to future ones. Wherever WFM involves matching, assignment, coverage, or connectivity, graph theory offers both the vocabulary to describe the problem precisely and the algorithms to solve it efficiently.

Most WFM practitioners encounter graph theory without recognizing it. The skill-agent assignment matrix is a bipartite graph. The cross-training plan is a network design problem. The question "what happens if the billing team all call out sick?" is a graph connectivity problem. Making the graph theory explicit unlocks algorithms — some with polynomial-time guarantees — that replace ad hoc heuristics.

Overview

Bipartite matching for agent-skill assignment

A graph G=(V,E) consists of vertices (nodes) V and edges EV×V. In WFM:

  • Vertices represent agents, skills, teams, shifts, or career milestones
  • Edges represent assignments, competencies, interactions, or transitions
  • Weights on edges represent proficiency levels, costs, capacities, or frequencies

The power of graph theory is that algorithms developed for abstract graphs — matching, coloring, shortest paths, connectivity analysis — apply directly to any WFM problem that can be modeled as a graph. And most can.

Mathematical Foundation

Bipartite Graphs and Matching

A bipartite graph G=(U,V,E) has two disjoint vertex sets where edges only connect vertices in different sets. The skill-agent assignment is the canonical WFM bipartite graph: agents on one side, skills on the other, edges indicating competency.

A matching ME is a set of edges with no shared vertices — each agent matched to at most one task, each task to at most one agent. A maximum matching has the largest possible |M|.

The Hungarian Algorithm finds a maximum-weight matching in a bipartite graph in O(n3) time. For the assignment problem:

max(i,j)Mwijsubject to|M| is a matching

where wij is the value of assigning agent i to task j (e.g., proficiency score, expected FCR, inverse of expected handle time).

The algorithm works by maintaining a set of potentials (dual variables) for each vertex and iteratively augmenting the matching along shortest alternating paths — a connection to duality theory.

Maximum Matching for Rostering

Rostering can be modeled as matching agents to shift slots. Given:

  • n agents, each with a set of acceptable shifts
  • m shift slots, each requiring exactly one agent
  • Preferences or proficiency weights

The roster is a maximum-weight matching in the bipartite graph (agents × shifts). If the matching is not perfect (some shifts uncovered), the maximum matching identifies the minimum number of uncovered shifts — the deficiency of the roster.

Hall's Theorem gives a necessary and sufficient condition for a perfect matching to exist: for every subset S of shift slots, the number of agents who can fill at least one shift in S must be at least |S|. This is the mathematical formulation of "do we have enough cross-trained agents to fill every shift?"

Graph Coloring

A proper coloring of a graph assigns colors to vertices such that no two adjacent vertices share a color. The chromatic number χ(G) is the minimum number of colors needed.

In WFM, graph coloring applies to:

  • Team composition: If agents who have worked together recently are connected by an edge, coloring ensures each team has diverse members (no two agents of the same "color" on the same team)
  • Schedule conflict avoidance: If two shifts conflict (same agent cannot work both), connect them by an edge. A proper coloring assigns shifts to time slots without conflicts.
  • Training group assignment: Connect agents who must be in different training cohorts (e.g., cannot both be absent from the floor simultaneously). Coloring assigns cohorts.

Graph coloring is NP-hard in general, but greedy heuristics and constraint propagation produce good solutions for WFM-scale instances (hundreds to low thousands of vertices).

Minimum Spanning Tree

A spanning tree of a connected graph is a subgraph that connects all vertices with the minimum number of edges (exactly |V|1). A minimum spanning tree (MST) minimizes the total edge weight.

For cross-training network design: vertices are skill groups, edge weights are the cost of cross-training between skill pairs. The MST gives the minimum-cost set of cross-training links that ensures every skill group is connected to every other through some chain of cross-training — the cheapest "insurance policy" against skill-group isolation.

Kruskal's Algorithm: Sort edges by weight, add edges in order unless they create a cycle. Runtime: O(|E|log|E|).

Prim's Algorithm: Grow the tree from a starting vertex, always adding the cheapest edge to an unconnected vertex. Runtime: O(|E|+|V|log|V|) with a Fibonacci heap.

Network Connectivity and Resilience

Vertex connectivity κ(G) is the minimum number of vertices whose removal disconnects the graph. Edge connectivity λ(G) is the minimum number of edges whose removal disconnects it.

For a WFM skill network:

  • κ=1 means a single agent's absence can disconnect two skill groups — a critical vulnerability
  • κ2 means the network survives any single absence — basic resilience
  • Higher connectivity provides stronger guarantees

Menger's Theorem: The maximum number of vertex-disjoint paths between two vertices equals the minimum vertex cut between them. In WFM: the number of independent cross-trained agents connecting two skill groups equals the minimum number of agents whose absence would sever the connection.

Shortest Path

Dijkstra's Algorithm finds the shortest path from a source vertex to all other vertices in a weighted graph with non-negative weights. Runtime: O(|E|+|V|log|V|).

WFM application: career development routing. Vertices are competency milestones (e.g., "Billing Level 1", "Technical Level 2", "Team Lead"). Edge weights are the training cost or time to move between milestones. The shortest path from an agent's current competencies to a target role is the optimal development plan — minimum total training investment.

Social Network Analysis

When agents interact (team assignments, collaboration, mentoring), the interaction graph reveals:

  • Degree centrality: Agents connected to many others are potential influencers or information hubs
  • Betweenness centrality: Agents who lie on many shortest paths between others serve as bridges — their departure fragments the network
  • Clustering coefficient: Measures how tightly connected an agent's neighbors are — high clustering indicates cohesive subgroups (cliques)
  • Community detection: Algorithms (Louvain, spectral clustering) identify natural team structures from interaction data

WFM Applications

Skill-Agent Assignment

Problem: 50 agents, 8 skill groups, varying proficiency levels. Assign agents to incoming interactions to maximize total proficiency-weighted throughput.

Model: Bipartite graph with agents on one side, active interactions on the other. Edge weight = proficiency score. Real-time maximum-weight matching assigns each interaction to the best available agent.

This runs at sub-millisecond speed for WFM-scale instances. The Hungarian algorithm (or more practically, the auction algorithm for parallel implementations) provides the globally optimal assignment — provably better than any greedy rule like "most skilled available agent."

Cross-Training Network Design

Problem: Design a cross-training program that connects all 8 skill groups with minimum total training cost.

Model: Complete graph on 8 vertices. Edge weight = cost to cross-train agents between two skill groups (based on skill similarity, training duration, proficiency gap).

Cross-Training Pair Cost ($K) In MST?
Billing ↔ General 8 Yes
Technical ↔ General 12 Yes
Sales ↔ Billing 10 Yes
Retention ↔ Sales 6 Yes
Support ↔ Technical 9 Yes
Premium ↔ Billing 15 Yes
Escalation ↔ Technical 11 Yes
Premium ↔ Escalation 18 No (would create cycle)
Billing ↔ Technical 14 No (already connected via General)

MST cost: $71K — the minimum investment to ensure every skill group is reachable from every other through cross-trained agents. Adding the Premium ↔ Escalation edge ($18K) would increase connectivity (κ from 1 to 2) but at additional cost — a resilience-vs-cost trade-off.

Resilience Analysis

Question: What happens if the entire billing team (12 agents) is unavailable (illness, weather event, system outage)?

Graph analysis:

  1. Remove billing-only agents from the skill graph
  2. Check connectivity: are all remaining skill groups still reachable?
  3. Identify the remaining capacity for billing-adjacent skills
  4. Compute the maximum matching with reduced agent set — quantifies the service impact

If the cross-training MST includes Billing ↔ General and Sales ↔ Billing edges, then billing work can flow through cross-trained agents in General and Sales — degraded but not severed. If those cross-training links don't exist, billing callers face queue closure.

This analysis converts vague "what if" scenarios into precise graph-theoretic calculations with quantified service impact.

Career Development Routing

Problem: Agent currently has Billing Level 2 and General Level 1. Target: Team Lead (requires Technical Level 2, Billing Level 3, and Leadership certification).

Shortest path in the competency graph:

[Billing L2, General L1]
  → General L2 (3 months, $2K)
  → Technical L1 (4 months, $5K)
  → Technical L2 (6 months, $4K)
  → Billing L3 (3 months, $2K)
  → Leadership Cert (2 months, $3K)
  → [Team Lead]

Total: 18 months, $16K

Alternative path through Sales:

[Billing L2, General L1]
  → Sales L1 (2 months, $3K)
  → Sales L2 (4 months, $4K)
  → Technical L1 (5 months, $6K)
  → Technical L2 (6 months, $4K)
  → Billing L3 (3 months, $2K)
  → Leadership Cert (2 months, $3K)
  → [Team Lead]

Total: 22 months, $22K

Dijkstra's algorithm identifies the first path as optimal on both time and cost. The career development plan is the shortest path in a weighted competency graph.

Worked Example

Problem: A contact center with 6 skill groups needs to determine the minimum cross-training investment to survive any single skill-group outage.

Requirement: Vertex connectivity κ2 — the skill network remains connected even if one skill group's dedicated agents are entirely unavailable.

Step 1 — Current state: Only 3 cross-training links exist (Billing↔General, Technical↔Support, Sales↔Retention). κ=1 — removing the General node disconnects Billing from the Technical-Support cluster.

Step 2 — Find minimum augmentation for κ=2: This is the minimum edge augmentation problem. Add the cheapest edges until no single vertex removal disconnects the graph.

Step 3 — Solution: Add 2 edges: Billing↔Technical ($14K) and Sales↔Support ($11K).

Verification: After augmentation, every vertex has degree ≥ 2, and no single vertex removal disconnects the graph. Total augmentation cost: $25K.

Step 4 — Validate via Menger's Theorem: Between every pair of skill groups, there now exist at least 2 vertex-disjoint paths. Example: Billing → General → Retention → Sales and Billing → Technical → Support → Sales. If General is removed, the second path still connects Billing to Sales.

ROI: If a single skill-group outage (probability ~5%/year) costs $200K in lost service and overtime, the expected annual benefit of κ=2 connectivity is $10K — payback in 2.5 years on the $25K training investment, ignoring secondary benefits (agent versatility, reduced monotony, career development).

Maturity Model Position

  • Level 2 (Developing): Skill-agent assignments made by manager judgment; no formal network analysis
  • Level 3 (Advanced): Bipartite matching used in routing engines; basic skill matrix maintained; awareness of cross-training as network property
  • Level 4 (Leading): Formal graph analysis of skill networks; MST-based cross-training design; connectivity-based resilience assessment; shortest-path career development plans
  • Level 5 (Innovating): Real-time maximum-weight matching for routing; dynamic graph algorithms that update as agents log in/out; social network analysis of team dynamics; graph neural networks for predictive agent-interaction matching

See Also

References

  • Diestel, R. (2017). Graph Theory. 5th ed. Springer.
  • Kuhn, H.W. (1955). "The Hungarian method for the assignment problem." Naval Research Logistics Quarterly, 2(1-2), 83-97.
  • West, D.B. (2001). Introduction to Graph Theory. 2nd ed. Prentice Hall.
  • Bondy, J.A. & Murty, U.S.R. (2008). Graph Theory. Springer.
  • Newman, M.E.J. (2018). Networks. 2nd ed. Oxford University Press.
  • Ahuja, R.K., Magnanti, T.L. & Orlin, J.B. (1993). Network Flows: Theory, Algorithms, and Applications. Prentice Hall.