rhu: (Default)
[personal profile] rhu
Here's a math problem I've been struggling with. Well, I've been struggling with its practical application, and I'm going to write an Excel spreadsheet to solve it by brute force, but I wonder if it would fall to an elegant algorithm.

Given a number N and two smaller numbers a and b, find x such that x ∊ [ab] and N mod x is maximized.

(Practical application: Given 2,711 squares, each color-coded to indicate the status of one member of a sequence, arrange them in a rectangle whose width is between 70 and 90 such that there are the fewest number of unused squares in the lower right-corner. Excel tells me that the answer is width 80, which has 9 leftover squares.)
If you don't have an account you can create one now.
HTML doesn't work in the subject.
More info about formatting

Profile

rhu: (Default)
Andrew M. Greene

January 2013

S M T W T F S
  12345
6789101112
13141516171819
20212223242526
2728293031  

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags