Modified mt_bfs.h to limit the frontier edge q size max to 500,000