Curr How we get newinfo from v + info is problem specific Here, we concatenate info with the symbol on the edge “” Repeat until goal is met curr, info = dequeue from queue if curr is not in visited add curr to visited for each v where curr->v enqueue v, newinfo
Curr “” Repeat until goal is met curr, info = dequeue from queue if curr is not in visited add curr to visited for each v where curr->v enqueue v, newinfo
Curr 1 2 3 0 “” “a” “b” “c” Repeat until goal is met curr, info = dequeue from queue if curr is not in visited add curr to visited for each v where curr->v enqueue v, newinfo
1 2 3 0 “b” “c” “a” Repeat until goal is met curr, info = dequeue from queue if curr is not in visited add curr to visited for each v where curr->v enqueue v, newinfo
1 2 3 0 1 2 1 1 “a” “b” “c” “aa” “ab” “ac” Repeat until goal is met curr, info = dequeue from queue if curr is not in visited add curr to visited for each v where curr->v enqueue v, newinfo
2 3 0 1 2 1 1 “b” “c” “aa” “ab” “ac” Repeat until goal is met curr, info = dequeue from queue if curr is not in visited add curr to visited for each v where curr->v enqueue v, newinfo
2 3 0 1 2 1 1 2 1 4 3 “b” “c” “aa” “ab” “ac” “bb” “ba” “bc” Repeat until goal is met curr, info = dequeue from queue if curr is not in visited add curr to visited for each v where curr->v enqueue v, newinfo
3 0 1 2 1 1 2 1 4 3 “c” “aa” “ab” “ac” “bb” “ba” “bc” Repeat until goal is met curr, info = dequeue from queue if curr is not in visited add curr to visited for each v where curr->v enqueue v, newinfo
3 0 1 2 1 1 2 1 4 3 0 2 3 3 “c” “aa” “ab” “ac” “bb” “ba” “bc” “ca” “cb” “cc” Repeat until goal is met curr, info = dequeue from queue if curr is not in visited add curr to visited for each v where curr->v enqueue v, newinfo
0 1 2 1 1 2 1 4 3 0 2 3 3 “aa” “ab” “ac” “bb” “ba” “bc” “ca” “cb” “cc” Repeat until goal is met curr, info = dequeue from queue if curr is not in visited add curr to visited for each v where curr->v enqueue v, newinfo
0 1 1 1 2 1 4 3 0 2 3 3 “ab” “ac” “bb” “ba” “bc” “ca” “cb” “cc” Repeat until goal is met curr, info = dequeue from queue if curr is not in visited add curr to visited for each v where curr->v enqueue v, newinfo
0 1 1 2 1 4 3 0 2 3 3 “ac” “bb” “ba” “bc” “ca” “cb” “cc” Repeat until goal is met curr, info = dequeue from queue if curr is not in visited add curr to visited for each v where curr->v enqueue v, newinfo
0 1 1 2 4 3 0 2 3 3 “bb” “ba” “bc” “ca” “cb” “cc” Repeat until goal is met curr, info = dequeue from queue if curr is not in visited add curr to visited for each v where curr->v enqueue v, newinfo
0 1 2 4 3 0 2 3 3 For this problem, goal = accepting state, The info is the string to get us there. “bb” “bc” “ca” “cb” “cc” Repeat until goal is met curr, info = dequeue from queue if curr is not in visited add curr to visited for each v where curr->v enqueue v, newinfo
2 3 3 BFS will get us the shortest string to get To the accepting state. More generally, it gives a result with the fewest Edges along the path “bb” “bc” “ca” “cb” “cc” BFS to find any string accepted