Cut a silicon wafer into dies
Python 2.7, 317

Here is my solution. Could be golfed a bit more, I think - but I like the solving better than the golfing. Suggestions are welcome. 

I solve it using brute force, iterating over all dx and dy and then counting by column. It all runs pretty fast (&lt;0,05 sec. on my Mac).

Code:

import math as m
def D(d,w,h):
 r=d/2
 s=[0,0,0]
 for dx in range(0,w):
  for dy in range(0,h):
   t=0
   for c in range(1,int(d/w)+1):
    l=r-dx-(c-1)*w
    if l&lt;w/2:
     l-=w
    if abs(l)&lt;=r:
     f=r*m.sin(m.acos(1.0*l/r));t+=int((2.0*f-(dy+m.ceil((r-dy-f)/h)*h+f-r))/h)
   if t&gt;s[0]:
    s=[t,dx,dy]
 return s


A main to test and profile the given cases:

def runTestcases():
    for d,w,h in [[8,2,2],[20,5,4],[100,12,12],[300,11,11],[340,15,8],[300,36,24]]:
        S=D(d,w,h)
        print "Wafer diameter {}, die size {} x {} =&gt; dx = {}, dy = {} ({} dies)".format(d,w,h,S[1],S[2],S[0])

def main():
    import cProfile
    cProfile.run("runTestcases()")

if __name__ == "__main__":
    main()


And its output:

Wafer diameter 8, die size 2 x 2 =&gt; dx = 0, dy = 1 (6 dies)
Wafer diameter 20, die size 5 x 4 =&gt; dx = 1, dy = 2 (10 dies)
Wafer diameter 100, die size 12 x 12 =&gt; dx = 0, dy = 8 (41 dies)
Wafer diameter 300, die size 11 x 11 =&gt; dx = 7, dy = 7 (540 dies)
Wafer diameter 340, die size 15 x 8 =&gt; dx = 5, dy = 2 (700 dies)
Wafer diameter 300, die size 36 x 24 =&gt; dx = 2, dy = 6 (66 dies)
         55354 function calls in 0.049 seconds