Since this is a Breadth first search I would say that the answer would be S-B-E-F-G since it is the first path to get searched and the goal is in that path.
Would that be correct? I am a little confused since bidirectional edges also are used in this.
Consider the search space with this graph, where S is the start state and G is the goal. All edges are bidirectional.
What is the path according to Breadth-first search as a sequence of nodes starting at S and ending at G? Assume the successor functions work so that nodes are explored in alphabetical order whenever possible.
Possible answers:
- S-B-E-G
- S-B-E-F-G
- S-C-G

Breadth first will
So the path it will find is $S - C - G$
It is tempting to think that when it checks $E$ it will go on down to $E$'s children, but that is depth first, not breadth first.