Trying to actually explain how FMD-index works. Not sure anyone will understand this, but it's better than just writing out the formal algorithm and moving on.