A new job for the well known Prince of Persia! Not surprisingly, Jafar, the treacherous vizier of the king has put the daughter of the king in a cellar while he is away to visit a neighboring country. The prince fights bravely with the guards on his way down to the cellar. Just one step to the cellar, the prince enters a dark room containing the information to unlock the door of the cellar. The information is carved on several stone plates installed in the walls of the room. Luckily, there is a ray of light emanating through a tiny hole in one of the walls. There are a number of mirrors in the room that the prince may use to direct the ray of light to illuminate a stone plate. Each mirror may be placed in certain locations in the room without any change in its directions (i.e., angles with the walls). The question is, if the prince can illuminate every plate on the wall using the mirrors.
To simplify the problem, we consider the room when viewed from above as a grid with n rows and m columns. The bounding cells are walls of the room and the mirrors can be put in the interior cells. No two mirrors can be placed in one cell. We have a number of mirrors available, each allowed to be put in certain positions inside the room. The direction of each mirror is known in advance and cannot be changed. To illuminate one plate, the prince must place a subset of mirrors in their allowed positions such that the ray of light reaches the plate after reflections made by the mirrors. The mirrors are opaque, meaning that the back-side of the mirrors absorbs the light. The problem is to find whether he can illuminate all and each plate on the wall. Obviously, the plates must be illuminated in turn since there is no way to fork the ray of light into multiple rays. When illuminating a plate, he may use a different subset of mirrors in possibly different positions.