# Competitive Analysis of Algorithms for an Online Distribution Problem
## 6 Computational Results
### Randomly Generated Instances  
We now show the results obtained when the transportation prices are randomly generated in the interval \([p,P]\) on the basis of the following probability distributions: \begin{table}
\begin{tabular}{l l} \hline \hline \(\text{ALG}_{1}^{0}\) & Best algorithm with a given time of acceptance \\ \(\text{ALG}_{3}^{p_{5}^{5}}\) & Best algorithm with a given threshold price \\ \(\text{ALG}_{4}^{p_{4}^{5}}\) & Best algorithm with a given threshold price when the minimum price offered from \\  & 0 to \(H\) is accepted at time period \(H\) if every prior price has been rejected \\ \(\text{ALG}_{5}^{k}\) & Secretary problem algorithm \\ \hline \hline \end{tabular}
\end{table} 
Table 2: Glossary of algorithms. Figure 1: Offered transportation prices. \begin{table}
\begin{tabular}{c c c c c c} \hline \hline \(h\) & \(\text{ALG}_{1}^{0}\) & \(\text{ALG}_{3}^{p_{5}^{5}}\) & \(\text{ALG}_{4}^{p_{4}^{5}}\) & \(\text{ALG}_{1}^{1}\) & \(\text{ALG}_{5}^{3}\) \\ \hline
0.01 & 1.3161 & 1.0249 & 1.0000 & 1.0597 & 1.0249 \\
0.1 & 1.3159 & 1.0248 & 1.0000 & 1.0596 & 1.0248 \\
1 & 1.3138 & 1.0239 & 1.0002 & 1.0581 & 1.0239 \\
10 & 1.2939 & 1.0149 & 1.0024 & 1.0442 & 1.0149 \\
100 & 1.2138 & 1.0000 & 1.1033 & 1.0000 & 1.0132 \\ Av. & 1.2907 & 1.0177 & 1.0212 & 1.0443 & 1.0203 \\ \hline \hline \end{tabular}
\end{table} 
Table 3: Performance of the online algorithms on the real-world data. uniform, exponential with \(\lambda=0.01\), normal with mean 150 and standard deviation 5, normal with mean 150 and standard deviation 15, triangular with mode 150, and beta with \(\alpha=\beta=2\). We consider the discretized and truncated version of these distributions in the support \([100,200]\). These probability distributions have been selected to capture different market conditions with low and high volatilities. We generate 100, 500, and 1000 scenarios to check the convergence of the expected costs of the online algorithms. Since convergence is computationally guaranteed with 1000 scenarios, we only show the results obtained with 1000 scenarios. The values of the parameters \(p\), \(P\), \(H\), and \(h\) are defined as in Section 5. Note that \(H\) is equal to 5 and 15 time periods and the penalty cost \(h\) ranges from 0.01 to 100 to cover very \begin{table}
\begin{tabular}{c c c c c c c c c c c} \hline  & & & \multicolumn{3}{c}{**Uniform**} & & & & & & **Exponential** & \\ \(h\) & **ALG\({}_{1}^{0}\)** & **ALG\({}_{3}^{P_{3}^{5}}\)** & **ALG\({}_{4}^{P_{4}^{2}}\)** & **ALG\({}_{5}^{1}\)** & **ALG\({}_{5}^{2}\)** & **ALG\({}_{1}^{0}\)** & **ALG\({}_{3}^{P_{3}^{5}}\)** & **ALG\({}_{4}^{P_{4}^{2}}\)** & **ALG\({}_{5}^{1}\)** & **ALG\({}_{5}^{2}\)** \\ \hline  
Av. & 1.1351 & 1.0354 & 1.0163 & 1.4416 & 1.6217 & 1.1594 & 1.0404 & 1.0134 & 1.4395 & 1.6189 \\ \hline \end{tabular}
\end{table} 
Table 6: Maximum ratios when \(H=5\). \begin{table}
\begin{tabular}{c c c c c c c c c c} \hline  & & & \multicolumn{3}{c}{**Uniform**} & & & & & **Exponential** & \\ \(h\) & **ALG\({}_{1}^{0}\)** & **ALG\({}_{3}^{P_{3}^{5}}\)** & **ALG\({}_{4}^{P_{4}^{2}}\)** & **ALG\({}_{5}^{1}\)** &  
\begin{table}
\begin{tabular}{c c c c c c c c c c c} \hline \hline  & & \multicolumn{3}{c}{**Uniform**} & \multicolumn{5}{c}{**Exponential**} \\ \(h\) & **ALG\({}_{1}^{0}\)** & **ALG\({}_{3}^{P_{5}^{1}}\)** & **ALG\({}_{4}^{P_{4}^{1}}\)** & **ALG\({}_{5}^{1}\)** & **ALG\({}_{5}^{5}\)** & **ALG\({}_{1}^{0}\)** & **ALG\({}_{3}^{P_{5}^{1}}\)** & **ALG\({}_{4}^{P_{4}^{1}}\)** & **ALG\({}_{5}^{1}\)** \\ \hline  
Av. & 1.2614 & 1.1004 & 1.0218 & 1.7089 & 2.6707 & 1.2323 & 1.1047 & 1.0230 & 1.7153 & 2.7521 \\ \hline  & & \multicolumn{3}{c}{Normal(150,5)} & \multicolumn{5}{c}{Normal(150,15)} & \multicolumn{5}{c}{} \\ \(h\) & ALG\({}_{1}^{0}\) & ALG\({}_{3}^{P_{5}^{1}}\) & ALG\({}_{4}^{P_{4}^{1}}\) & ALG\({}_{5}^{1}\) & ALG\({}_{5}^{5 The computational results show that, for both \(H=5\) and \(H=15\), the average ratios are significantly lower than the corresponding maximum ratios.