Functions for resolving dependencies.
Get number of prerequisite names for each name in dependencies.
Remove known names from dependencies.
Resolve dependencies among equations so that smaller blocks are solved first.
The dependencies are given in terms of variable names.
The dependencies as a dictionary with names as keys and sets of prerequisite names as values.
The list of blocks in the order of solving. Each block is a list of names.
Return True if names form a solvable block, i.e. the set of names equals to the set of their prerequisites.
Return generator of lists of solvable blocks of the length num.