Computational Complexity of Alignments

This paper investigates the computational complexity of alignment problems in process mining, establishing that the task is PSPACE-complete for safe Petri nets, NP-complete for various subclasses including process trees and T-systems, and solvable in polynomial time specifically for live, safe S-systems.

Christopher T. Schwanen, Wied Pakusa, Wil M. P. van der Aalst

Published 2026-03-06
📖 5 min read🧠 Deep dive

Imagine you are a detective trying to solve a mystery. You have two pieces of evidence:

  1. The "Script" (The Model): A perfect, theoretical plan of how a business process should work (like a recipe for baking a cake).
  2. The "Footage" (The Trace): A video recording of what actually happened in the real world (someone trying to bake the cake but maybe burning the toast or forgetting the sugar).

Process Mining is the field of comparing these two. Alignments are the specific technique used to line them up perfectly, step-by-step, to see exactly where the real footage deviated from the script.

This paper is essentially a mathematical investigation into how hard it is for a computer to do this detective work. The authors ask: "Is this task easy, moderately difficult, or impossibly hard?"

Here is the breakdown of their findings using simple analogies:

1. The General Rule: It's a Nightmare (PSPACE-Complete)

For most complex business processes (represented as "Safe Petri Nets"), finding the perfect alignment is PSPACE-complete.

  • The Analogy: Imagine trying to find the shortest path through a maze that is constantly changing shape, where the walls move as you walk. The number of possible paths is so vast that even the most powerful supercomputers would run out of memory trying to check every single possibility.
  • The Result: If you have a complex, general business model, there is no "magic button" to instantly find the perfect alignment. It is computationally expensive and slow.

2. The "Sound" Workflow: Still a Nightmare

The authors checked if making the models "well-behaved" (called Sound Workflow Nets, which means the process always finishes correctly without getting stuck) would make it easier.

  • The Analogy: It's like checking if the maze has a guaranteed exit. Even though we know the maze has an exit, finding the shortest path through the shifting walls is still just as hard as before.
  • The Result: Adding "soundness" doesn't help. It's still PSPACE-complete.

3. The "Free-Choice" Loophole: It Gets Easier (NP-Complete)

The researchers then looked at a specific type of model called Live, Bounded, Free-Choice Systems. These are models where choices are simple and don't get tangled in complex dependencies.

  • The Analogy: Imagine the maze is now static (walls don't move) and you are allowed to make a "guess" about the path. If you guess right, you can quickly verify it. You can't solve it instantly, but you can solve it much faster than the shifting maze.
  • The Result: The problem drops from "impossible" to NP-complete. This means it's still hard, but it's solvable within a reasonable timeframe for many practical cases. The computer can "guess" a solution and check it quickly.

4. The "Simple" Traps: Still Harder Than You Think

The paper reveals some surprising traps. Even very simple-looking models can be hard to align.

  • Process Trees (The "Shuffle" Problem): These are models that look like simple family trees. However, if they have a "Parallel" operator (doing two things at once), it becomes NP-complete.
    • The Analogy: Imagine you have two lists of chores (A and B). You need to interleave them into one schedule. If the lists are long, the number of ways to mix them together is astronomical. Even though the tree looks simple, the "mixing" part makes it hard.
  • T-Systems (No Choices, Just Flow): These are models with no branching, just a straight line or a loop. Surprisingly, aligning these is also NP-complete.
    • The Analogy: It's like trying to match two long strings of beads where you can only delete or add beads. Even without choices, the sheer length and the need to find the perfect match make it computationally heavy.

5. The One Exception: The "Single Token" S-System

Finally, the authors found one specific scenario where the problem becomes easy (Polynomial Time / P).

  • The Scenario: Live, Safe S-Systems. These are models where there is only one token (one "worker" or "item") moving through the system, and no two things can happen at the same time (no concurrency).
  • The Analogy: Imagine a single person walking down a single hallway. There are no forks in the road, no other people, and no moving walls. You just watch them walk from start to finish. Comparing their path to the plan is trivial.
  • The Catch: If you add a second token (two people) or allow them to move simultaneously, the complexity jumps back up to NP-complete. The "single worker" constraint is the key to making it easy.

Summary Table (The "Difficulty Meter")

Model Type Difficulty Level Everyday Meaning
General Safe Nets PSPACE-Complete Impossible/Very Hard. Like solving a maze that changes shape.
Sound Workflow Nets PSPACE-Complete Very Hard. Even if the process is "well-behaved," it's still a nightmare.
Process Trees / T-Systems NP-Complete Hard but Doable. Like a puzzle where you can guess and check.
Live, Safe S-Systems P (Polynomial) Easy. Like a single person walking down a straight hall.

The Big Takeaway

The authors conclude that complexity is unavoidable for general business processes. You cannot have a fast, perfect alignment algorithm for every type of model.

However, if you restrict your models to be simpler (like ensuring only one "token" moves at a time, or avoiding complex parallel structures), you can make the computer's job much easier. This helps software developers know which types of business processes they can analyze quickly and which ones will require heavy computing power.