I was asked this question in an interview and though I was able to answer a part or few parts I'm not really sure if what I gave was the optimal answer. So here goes the puzzle:
A restaurant owner asked a Carpenter to make tables for him out of certain number of wooden blocks and boards. There are only a limited number of boards. He was asked to make a rectangular hole right in the middle of the table so that the owner would be able to embed the restaurant logo in it. The Carpenter was a drunk and while working on the last table (and last wooden board) he had to make, be made a blunder. He made the rectangular hole way off the center.
The restaurant owner fired him on the spot.
He then goes ahead and hires you, an inexperienced Carpenter, with a promise that if you could fix the blunder caused by the last Carpenter, you would get a huge contract for all the wood work needed for the rest of his establishments. This would be huge for you are completely broke right now.
- How would you solve the problem?
- How would you solve the problem if the hole made was made at a 45 degree angle and needs to be corrected as well?
- How would you solve the problem if both the table and the hole were oval in shape?
Since you are inexperienced and an amateur and you only have a hacksaw, you can only start cutting along the outside edges of the table.
For 1. You can only make two cuts as otherwise it would ruin the look of the table.
The table has to be the same size as the rest of the tables. The size of the table is specified by the owner.
Need to give the most optimal solution and if possible prove it's optimality. Optimal solution will have the minimal cumulative length of the cuts