 Welcome to this course on data structures and algorithms. We will continue our discussion on graphs. In the last few sessions, we saw the depth first search traversal. In this session and the next, we will look at the breadth first search traversal of a graph. In the breadth first search, the algorithm for traversing through graphs or tree can be done. We had seen the depth first search earlier. We can also use the breadth first search for traversing the graph. This traverses breadth words as the word name implies. Instead of stack, we will use queue to implement breadth first search. What are the applications of breadth first search? Well, a simple application is to find the shortest path in any network of transportation or movement. Let us look at the BFS algorithm. Again, the reference is from a Wikipedia article which is given here. Let us look at the procedure for breadth first search for a given graph and a starting node. Here, we now treat S as a queue. Remember, for depth first search, we have treated it as a stack. Since it is a queue, the queue push will always happen at the back of that queue. So, I will push the node here. Now, while S is not empty, we will do the following. We will pop the node and if the node is not visited, we mark node as visited and for all edges from the node adjacent in G, we do the push adjacent nodes onto this. It is a very simple algorithm but note a very fundamental difference. The difference is that while I may push at the back, the popping will always happen from the front. That is the property of the queue. So, just by using S as a queue rather than a stack, what gets implemented using exactly similar logic that we had seen earlier becomes the breadth first search. Let us look at a demonstration. Here is the same graph that we had seen earlier with five nodes. We start with a. This a is now followed by b because b will be coming first in the depth first search. We shall see that when we look at the formation of the list and how things are popped out and pushed in. So, the breadth first search will be a followed by b followed by c followed by d followed by e. This will be the complete sequence. In this session, we looked at the basics of the breadth first search. We found that fundamentally the algorithm is very similar to depth first search but we can implement breadth first search by using a queue instead of a stack. In the next session, we will look at a computer program to implement breadth first search. Thank you.