Figure: Map division in matrix cells having the defects border as a reference
Then, a matrix will be generated in which each element will be representing a cell resulting from the cutout made on the coil. In the case of figure , the matrix will have 9 lines and 9 columns. This matrix will store the necessary calculation for identifying which cells will be able to receive the bottom right corner of the requisition. Once these cells have been identified, they should be expanded as much as possible to the left, then to the right, after that upwards and next downwards. This expansion will be made until the edge of the coil or some area that hasn't been made available for allocation is found. This will result in the largest area as possible that can be used from the identified cell. This process is repeated until there is no more area that can be reported. These areas are then put in a decedent order of size and returned as result.
I developed a tinny executable that I did to demonstrate the algorithm to search for valid areas by using matrix: Valid area by matrix