# A Tour Recommendation System Considering Implicit and Dynamic Information
## 4 Implementation
### Query and Results  
Let us take user id 100421505@N05 in cluster 1 as the target user to show the process of the proposed personalized itinerary algorithm. Assume the target user plans to travel in Tokyo starting at 9 a.m. and take 8 h for the whole trip. The itinerary that the target user visited previously is \(<\)_poi\({}_{26}\)_, _poi\({}_{15}\)_, _poi\({}_{12}\)_, _poi\({}_{1}\)_, _poi\({}_{22}\)_, _poi\({}_{4}\)_, _poi\({}_{5}\)_, _poi\({}_{2}\)_, _poi\({}_{23}\)_, _poi\({}_{27}\)_, _poi\({}_{36}\)_, _poi\({}_{6}\)_\(>\)_. In this case, the input to the personalized itinerary algorithm will be \(\textit{seq}_{u}=<\textit{poi}_{26}\), \(\textit{poi}_{15}\), \(\textit{poi}_{12}\), \(\textit{poi}_{1}\), \(\textit{poi}_{22}\), \(\textit{poi}_{4}\), \(\textit{poi}_{5}\), \(\textit{poi}_{23}\), \(\textit{poi}_{27}\), \(\textit{poi}_{36}\), \(\textit{poi}_{6}\)\(>\)_; request time _rs_ = 9; time limitation _tl_ = 8.  
During the execution of the proposed personalized itinerary algorithm, 26 unvisited POIs were derived as candidate POIs since 12 POIs had been visited previously. Since the staying time of the POI will be different due to different time slots that the user arrives at, the travel time of the target user will also be different. For example, as shown in Table 2, candidate itineraries \(\textit{Seq}_{27378}\) and \(\textit{Seq}_{31112}\) contain the same POIs but in a different order. As shown in \(\textit{Seq}_{27378}\)- the staying time in POi\({}_{9}\) is 0.86 h if the arrival time is 10:21, while the staying time is 0.91 h in \(\textit{Seq}_{31112}\) if the user arrived at 14:33. This makes the traveling time of \(\textit{Seq}_{27378}\) (7.86 h) and \(\textit{Seq}_{31112}\) (7.98 h) different.  
Finally, the proposed personalized itinerary algorithm finds 21 sequences with the same highest score (4.90). Table 3 shows part of the 21 candidate itineraries having the same highest core but different remaining times (RTIs). Based on the rule of the algorithm, the itinerary with the highest score and longest remaining time, \(\textit{Seq}_{27378}=<\textit{poi}_{24}\), \(\textit{poi}_{9}\), \(\textit{poi}_{20}\), \(\textit{poi}_{8}\), \(\textit{poi}_{7}\), \(\textit{poi}_{10}\), \(\textit{poi}_{18}\), \(\textit{poi}_{13}>\), will be returned to the target user.  
\begin{table}
\begin{tabular}{l c c} \hline \hline
**Seq\_id** & **Candidate itinerary** & **Travel Time** \\ \hline \(\textit{Seq}_{27378}\) & \(<\textit{poi}_{24}\)\(\rightarrow\)\(\textit{poi}_{9}\)\(\rightarrow\)\(\textit{poi}_{8}\)\(\rightarrow\)\(\textit{poi}_{7}\)\(\rightarrow\)\(\textit{poi}_{10}\)\(\rightarrow\)\(\textit{poi}_{13}\)\(>\) & 7.86 h \\ (arrive\_time, & \(<\)(9:19, 10:18) \(\rightarrow\)(10:21, 11:13) \(\rightarrow\)(11:25, 12:41) \(\rightarrow\)(12:58, 13:46) \(\rightarrow\)(13:55, 14:46) \(\rightarrow\)(14:59, 15:09) \(\rightarrow\)(15:16, 16:01) & 7.86 h \\ leave\_time & \(\rightarrow\)(16:03, 16:51) \(\rightarrow\)(14:59, 16:01) \(\rightarrow\)(17:03, 16:51) \(\rightarrow\)(18:01, 16:01) & 7.86 h \\ \(\textit{Seq}_{3112}\) & \(<\textit{poi}_{34}\)\(\rightarrow\)\(\textit{poi}_{8}\)\(\rightarrow\)\(\textit{poi}_{13}\)\(>\)\(\rightarrow\)\(\textit{