Burning Ropes
Table of Contents
A Practical Guide To Quantitative Finance Interviews 收录了一些量化面试中的经典题目. 本文介绍的是来自第二章的「Burning Ropes」.
Burning Ropes #
Problem #
You have two ropes, each of which takes I hour to burn. But either rope has different densities at different points, so there’s no guarantee of consistency in the time it takes different sections within the rope to burn. How do you use these two ropes to measure 45 minutes?
Solution #
同时点燃第一根绳子的两端与第二根绳子的一段, 在第一根绳子燃尽时, 点燃第二根绳子的另一端. 这样第二根绳子燃尽时刚好过去 $45$ 分钟.