For the situations shown in figure