Generating Boolean expression from logic circuit

If a logic circuit is given, we can generate Boolean expression directly from it. Consider the Figure 13.18. The Boolean expression for the logic circuit is

Example

Write the Boolean expression for the logic diagram given in Figure 13.20 and simplify it and draw the logic diagram to implement the simplified expression.