04 Try it yourself Interactive

Compute a closure, one dependency at a time

Same relation, same five arrows, two different starting sets. Each press of Next moves one step. Most steps apply a dependency whose entire left side is already inside X+, add its right side and name the rule that fired; the remaining steps are the stopping check and the verdict. The table underneath shows why every other rule is waiting. When a whole pass adds nothing the closure is finished, and the last steps turn it into a verdict: superkey, then candidate key. Nothing plays on its own. Next, Back and Reset, or the arrow keys.

Is { H, S } a key?
X+ = { H, S }
Green means the attribute is inside X+. Amber marks a rule that is ready to fire right now. Rose marks an attribute the closure can never reach, and the rule that is blocking it.
Press Next to begin. Each press moves one step.


      
Starting set
Rules fired
Inside X+
Still missing
step 0 / 0