Rod Cutting Problem Algorithm Definition