Packing Icons Onto A screen - MathOverflow most recent 30 from http://mathoverflow.net 2013-05-24T17:08:32Z http://mathoverflow.net/feeds/question/39162 http://www.creativecommons.org/licenses/by-nc/2.5/rdf http://mathoverflow.net/questions/39162/packing-icons-onto-a-screen Packing Icons Onto A screen Joseph Soulbringer 2010-09-17T23:12:57Z 2010-09-17T23:40:49Z <p>You are trying to pack icons onto a screen that is divided into n horizontal rows of uniformly varying size. The rows narrow by a fixed ratio as one goes up the screen from the bottom. Since the icons get smaller to match the row size, the capacity of each row gets proportionately larger as its height gets smaller. </p> <p>The height and width of the screen are assumed to be 1 unit. The capacity of each row is c = [1/h], where h is the height of the row and [] is the round-off operator ( 0 &lt; h &lt; 1).</p> <p>The height of the ith row from the bottom is h = P*r^i, where r a constant (0 &lt; r &lt;= 1) and P is a value which assures that the sum of row heights equals 1 (P=sum r^i, i=0 to n). So the capacity of each row is also [1/P*r^i] and overall capacity of the screen is something like the sum of a geometricy series. </p> <p>So, with a given T = total icons desired, the first goal is to find all those n and r such that the total capacity of the screen exactly equals T (this can always be done for n=2 but I don't know about n > 2 ). </p> <p>The second, overall, goal is to find a "best" packing. This "best" packing is, roughly speaking one in the number of rows grows with the number of items while 1/r, the capacity of the first row, stays relatively large and the total capacity of the screen equals T. The condition could be minimize r such that n > T*c or Maximize n given that r &lt; c, where c in both cases is a constant less than 1. You could also propose a different constraint in a similar spirit that gives a tractable solution. The constraint that capacity be exactly equal could also be relaxed. </p>