In the arrangement shown in the figure, the rod of mass
m held by two smooth walls, remains always perpendicular to the surface of the wedge of mass
M. Assuming all the surfaces are friction-less, find the acceleration of the rod and that of the wedge.