Show that using a single bit to store each vertex color suffices by arguing that the BFS procedure would produce the same result if line 18 were removed.
The algorithm uses 3 different colors to denote different stages of the vertices during BFS.
Each color has a specific meaning, given below:
The algorithm checks for the color of the vertex before proceeding further i.e. it checks whether the vertex is discovered by the algorithm or not.
This is to avoid repeating the same vertex as we go.
Leaving off line 18, would clearly have no effect on the algorithm because nothing in the algorithm checks for the color BLACK. At the point of line 18, u has color GRAY i.e. it’s not fully explored but its discovered by BFS.
Hence, BFS procedure would produce the same result if line 18 were removed.

Show that using a single bit to store each vertex color suffices by arguing that the...