# Optimal Cooking Procedure Presentation System for Multiple Recipes and Investigating Its Effect
## 4 System Overview
### Optimal Cooking Procedure Search Algorithm
#### 4.2.2 Overview of the Optimal Cooking Procedure Search Algorithm
\begin{table}
\begin{tabular}{c c c c c} \hline \hline  & **Recipe Name** & **Task** & **Estimated Total** & **Number of** \\  & & **Number** & **Cooking Time** & **Required Searches** \\ \hline  & salt-grilled mackerel & 5 & 900 & \\ menu 1 & miso soup & 5 & 990 & \(8.65\times 10^{5}\) \\  & Japanese omelet & 3 & 660 & \\ \hline  & hamburg steak & 7 & 1680 & \\ menu 2 & miso soup & 5 & 990 & \(8.82\times 10^{9}\) \\  & potato salad & 6 & 1290 & \\ \hline \hline \end{tabular}
\end{table} 
Table 2: Menu information. #### 5.1.2 Results

Table 3 shows the total cooking time for the cooking procedures obtained by the base PDF/IHS, SA, and proposed algorithms; the total cooking time for the SA is the average total cooking time obtained when 10 random initial cooking procedures are given. The optimal total cooking time for menus 1 and 2 is 2250 s and 3630 s, respectively, based on the PDF/IHS results. The proposed algorithm reaches the optimal total cooking time, while the average total cooking time of the SA is larger. Table 4 shows the execution time, convergence time, and reached time of the five methods except for the SA. Here, each combination of two preprocessing and two bounding operations that we propose is denoted as combination 1 to 4, respectively. For menu 1, the shortest execution time is 1.32 s for combination 2, the convergence time is 0.43 s for combination 4, and the reached time is 0.12 s for combination 1 or 2. In addition, the execution time is less than 2 s for all combinations. For menu 2, the shortest execution time is 1202 s for combination 4, convergence time is 221 s for combination 4, and reached time is 6.36 s for combination 2. Regarding execution time, the base PDF/IHS performed the worst, with 2141 s execution time, which is 15 min longer than the fastest (combination 4). In all methods, the reached time is within 10 s.

Figures 7 and 8 show the transition of updating the tentative solution. In each figure, the horizontal axis represents the elapsed time and the vertical axis represents the total cooking time. Each plot in the figure shows the elapsed time and the total cooking time when the tentative solution was actually updated. The light blue and purple horizontal lines in the figure represent the total cooking time of the semi-optimal and optimal cooking procedures, respectively. From Figures 7 and 8, we can confirm that the tentative solutions for both menus are rapidly updated after the start of the algorithm. \begin{table}
\begin{tabular}{c c c c c c c} \hline \hline  & \multicolumn{2}{c}{**Execution**} & \multicolumn{2}{c}{**Convergence**} & \multicolumn{2}{c}{**Reached**} \\  & \multicolumn{2}{c}{**Time [s]**} & \multicolumn{2}{c}{**Time [s]**} & \multicolumn{2}{c}{**Time [s]**} \\ \hline  & **Menu 1** & **Menu 2** & **Menu 1** & **Menu 2** & **Menu 1** & **Menu 2** \\ \hline Base PDF/IHS & 1.98 & 2141 & 1.19 & 796 & 0.68 & 7.08 \\ \hline combination 1 & 1.45 & 1645 & 0.52 & 584 & **0.12** & 7.30 \\ pre-processing 1 + bounding 1 & **1.32** & 1207 & 0.49 & 437 & **0.12** & **6.36** \\ \hline combination 2 & 1.52 & 1633 & 0.50 & 286 & 0.14 & 9.58 \\ pre-processing 2 + bounding 1 & 1.35 & **1202** & **0.43** & **221** & 0.14 & 7.48 \\ \hline combination 4 & & & & & & \\ pre-processing 2 + bounding 2 & & & & & & \\ \hline \hline \end{tabular}
\end{table} 
Table 4: Execution time, convergence time, and reached time of the algorithm. \begin{table}
\begin{tabular}{c c c} \hline \hline  & **Total Cooking Time [s]** \\ \hline  & **Menu 1** & **Menu 2** \\ \hline Base PDF/IHS & **2250** & **3630** \\ SA (10 times Avg.) & 2441 & 3786 \\ Proposed Algorithm & **2250** & **3630** \\ \hline \hline \end{tabular}
\end{table} 
Table 3: Total cooking time obtained by the algorithm. #### 5.1.3 Discussion

From Table 3, we can see that the average cooking time obtained by SA is significantly worse than the optimal total cooking time.