AI: compute construction sequence for dependencies.