# Efficient Strategies Algorithms for Resource Allocation Problems
## 4 Comparison of Strategies
### Proposed Strategies Based on Distribution Rules  
Here, a number of resources have been taken into account with a finite number of battlefields. The first thing to do is to generate all the strategies, then make a simulation by comparing these different strategies, and finally highlight the most optimal. For this we have studied several proposals, each with its own rules. Each proposal resulted in the implementation of algorithms for the generation and simulation of strategies. The algorithms were coded with the JAVA programming language. The tests were done on an HP machine with the following specifications:  
* Model: ENVY Notebook;
* Operating system: Windows 10 Family 64 bit (10.0, version 17134)
* Processor: Intel\({}^{\circled{0}}\) Core\({}^{\circled{1}}\) i7-7500U CPU @ 2.70 GHz (4 CPUs), 2.9 GHz;  
Figure 1: Transformation of strategies with homogeneous resources into strategies with heterogeneous resources. * Memory: 12,288 MB RAM or 12 Gb of RAM memory. The following variables were used: _nb_soldats_, _nb_ and _nbs_ will mean the number of resources, the number of fields and the number of strategies generated respectively. They are used in complexities analysis in Appendix A. There are mainly two (2) algorithms implemented in the different propositions (strategy generation algorithm and strategy simulation algorithm). 1. Generate all possible strategies: The first strategy proposed was to be able to generate all the possible tuples with the number of resources. A model was made in order to set up algorithms to be able to generate strategies and make simulations. The results obtained after the simulation are as follows: 1. The generation of the strategies was appreciable because it did not take too long, with an acceptable algorithmic complexity in \(\theta(\textit{nb\_soldats})\). However, the number of strategies was very high. The algorithm was very simple and fast but limited because it only took into account a number of fields less than four. Beyond three fields, the algorithm could not generate the strategies because we were faced with a problem of generalization of the algorithm, in order to take into account any given integer as a number of fields. 2. The simulation consisted of making a comparison between the strategies. This comparison had a very high complexity because it depends on the number of strategies generated, and therefore, the execution time was very long. The growth in the complexities of generation and simulation, despite having different complexities, is related to the number of resources and also the number of battlefields. That is to say that the complexity of the algorithms depends on the number of resources and that of the battlefields. 2. Proposition 2: Generate strategies using the partition of an integer. To drop the limit for generating strategies from the first proposal while ensuring a reduction in the execution time of the simulation, we have made modifications to obtain a new strategy that will be able to overcome the shortcomings of the first proposal. Before detailing this proposition, we will discuss a concept that was used to establish the strategies: the partition of an integer. The partition of an integer \(n\) is any increasing or decreasing sequence of non-zero integers whose sum is equal to \(n\). It is a \(p\)-tuplet \((n_{1},...,n_{p})\), where \(1\leq n_{1}\leq n_{2}\leq...n_{p-1}\leq n_{p}\) such as: \(n_{1}+n_{2}+...+n_{p}=n\). The number \(x\) is the order of a partition of an integer \(n\) if the number of elements of this partition is \(x\). In the rest of this paper, we will focus on increasing sequences and whose elements respect the following properties for each given increasing sequence \(S\) (according to the definition of the partition of an integer): * Reflexivity: for any element \(x\in S,x\leq x\) ; * Transitivity: for all the elements \(x,y\) and \(z\in S\), if \(x\leq y\) and \(y\leq z\) then \(x\leq z\); * Antisymmetry: for all the elements \(x\) and \(y\in S\), if \(x\leq y\) and \(y\leq x\) then \(x=y\).