A firm prices houses with appraisers, each of whom knows one area of town. For every house the firm knows match, how well the house fits each appraiser’s area (adding up to 1), and quotes, the price each would give, in $k. But every call to an appraiser costs money, and the budget pays for k calls. Write estimate(match, quotes, k): the firm’s price for the house, as good as the team can make it, without going over budget. The firm will keep hiring, so it has to work for a team of any size.
Eight appraisers, each knows one area. The bars show how well this house matches each one’s area. The obvious idea calls them all and blends every quote, and the budget pays for 2 calls. The firm then hires 64 appraisers to know more of town, and calling everyone gets dearer still. Your estimate(match, quotes, k) prices the house within the budget.
estimate(match, quotes, k)| match | how well this house fits each appraiser's area (a numpy array, adding up to 1) | e.g. [0.3, 0.05, 0.22, 0.08, 0.12, 0.04, 0.1, 0… |
| quotes | the price each appraiser would give, in $k (a numpy array) | e.g. [440, 390, 500, 350, 420, 310, 460, 380] |
| k | how many appraisers the budget lets you call | e.g. 2 |
| returns | the firm's price for the house, in $k | |