The states shown with dotted lines are determined by the expansion
algorithm to already be on a solution path and so they are discarded.
However, a full search of the state space still puts two copies of
B and C on the priority queue.
When a new state is created at expansion time, it is possible that:
- Scenario 1: It is already on the priority queue, or
- Scenario 2: It was on the priority queue already and removed.
If we can detect these situations, we can save time and/or space.