New version to support output for the maximum size of the closed set.