## 2 Improved Symmetric Algorithm
### Improved Symmetrical Arrangement Algorithm
#### 2.3.1 Solution to Overlap  
When an algorithm is performing a combination operation, sometimes it will encounter only one permutation and combination, and it will cause overlap. Thus, it is necessary to deal with the overlapping and remove the overlapping objects. The concept of removal is also removed symmetrically. That is, if the two areas of Block 1 and Block 3 overlapped, the object removal action will start. Each removal will remove an object in Block 1 and Block 3 at the same time. This object is placed on the diagonal of the pallet. The different overlapping problems are divided into three categories, namely, horizontal multi-object overlap, vertical multi-object overlap, and single object overlap, as shown in Figures 4-7. The following are the solutions to these three problems:  
Figure 4: Symmetrical arrangement results. (**a**) Blocks 1 and 3 are bigger than blocks 2 and 4 respectively, and no overlap occurs. (**b**) Blocks 1 and 3 are bigger than blocks 2 and 4 respectively, and overlap occurs. (**c**) Blocks 2 and 4 are bigger than blocks 1 and 3 respectively, and no overlap occurs. (**d**) Blocks 2 and 4 are bigger than blocks 1 and 3 and overlap occurs. 1. Horizontal multi-object overlap The horizontal multi-object overlap is as shown in Figure 8. When Block 1 and Block 3 are overlapped horizontally, the number of overlaps in a single block will be calculated first. As shown in Equations (1) and (2), \(\text{n}^{\prime}\times\text{m}^{\prime}\) can know the number of overlaps. According to the symmetry, Block 1 and Block 3 will remove objects at the same time. Block 1 will start to remove the overlapping objects in the upper right corner in a vertical manner. On the contrary, Block 3 will start to remove the overlapping objects in the lower left corner in a vertical manner. Because of the symmetry, the number of rows removed is \(\frac{\text{n}^{\prime}}{2}\) (Round up). It can be obtained from Equation (3) that R is the number of objects that need to be removed for a single block to eliminate overlap. \[\text{n}^{\prime} =\left|\ \frac{(2\text{L}_{1}-\text{P}_{\text{x}})}{\text{B}_{\text{x}}} \right|\ (\text{Round up})\] (1) \[\text{m}^{\prime} =\left|\ \frac{(2\text{W}_{1}-\text{P}_{\text{y}})}{\text{B}_{\text{y}}} \right|\ (\text{Round up})\] (2) \[\text{R} =\left|\ \left(\frac{\text{n}^{\prime}}{2}\right)\times\text{m}^{ \prime}\right|\ (\text{Round up})\] (3)  
Figure 5: Horizontal multi-object overlap. Figure 6: Vertical multi-object overlap. Figure 7: Single object overlap. 2. Vertical multi-object overlap The vertical multi-object overlap is as shown in Figure 9. When Block 2 and Block 4 are overlapped vertically, the number of overlaps in a single Block will be calculated first as Equations (4) and (5). n\({}^{\prime}\) and m\({}^{\prime}\) are the same to indicate the amount of overlap. Block 2 will be removed horizontally from the upper left corner of the overlap; otherwise, Block 4 will be removed horizontally from the bottom right corner of the overlap. Additionally, due to the symmetry, the number of rows removed is \(\frac{\text{m}^{\prime}}{2}\) (round up). It can be obtained from Equation (6) that R is the number of objects that need to be removed for a single block to eliminate overlap. \[\text{n}^{\prime}=\left|\ \frac{(2\text{L}_{2}-\text{P}_{\text{x}})}{\text{B}_{ \text{x}}}\ \right|\ (\text{Round up})\] (4) Figure 8.0 (5) Figure 8.1 (6)
3. Single object overlap Single object overlap will occur in horizontal overlap and vertical overlap. Additionally, this situation does not have to be removed in a symmetrical way. An independent method was developed to solve the problem. The feature of a single object overlap is that both n\({}^{\prime}\) and m\({}^{\prime}\) are 1. However, it still needs to be brought into the corresponding equation according to the classification. If the horizontal overlap occurs, Equations (1) and (2) are used to calculate n\({}^{\prime}\) and m\({}^{\prime}\); if the vertical overlap occurs, Equations (4) and (5) are used.