...
For design details and decisions, read Degree Validation with Maxflow.
Core validation uses the max-flow push-relabel algorithm provided by Google OR-Tools.
For general understanding of max-flow: https://www.youtube.com/watch?v=LdOnanfc5TM.
To get a good idea of how push-relabel works: https://www.geeksforgeeks.org/introduction-to-push-relabel-algorithm.
What max-flow looks for the "hour splitting" validation case:
...