- All the possible ultimate slices respecting all the constraints (dimensions and minimun number of ham cells) are computed;
- Obtained slices are sorted by a descending order based on their area;
- Slices are added one by one in such an order checking that they do not overlap;
- Slices are added until (i) no more suitable slices can be added or, eventually, (ii) if the entire pizza area has been covered.