## 3 Materials and Methods
### Proposed Algorithms
#### 3.4.1 L-BFGS Proposed Segmentation Optimization Procedure  
The limited-memory Brayden-Fletcher-Goldfarb-Shannon algorithm (L-BFGS) is selected as the optimization procedure for the proposed model in VANET machine learning. The L-BFGS is a derivation of the Brayden-Fletcher-Goldfarb-Shannon algorithm (BFGS) used for the larger datasets. To explain the proposed method's main operations, we design two main algorithms, i.e., Algorithms 1 and 2. Algorithm 1 determines the values of \(H_{k}\
abla f_{k}\)., where \(H_{k}\) is the inverse Hessian approximation function value, and the gradient is determined using \(f_{k}\)[34]. The main reason to use an approximation Hessian instead of a true Hessian is that it uses L-BFGS as a quasi-Newton method, not a true Newton Method. The values of \(H_{k}\
abla f_{k}\) obtained from Algorithm 1 is used to find the directions for \(p_{k}\) in Algorithm 2.  
Figure 7: Multi-layer perceptron and its operations.  
```
1.Input:\(q\), \(\
abla f_{k}\), \(H_{k}^{0}\), \(\rho_{k}\), \(H_{k}\), \(\beta\), \(\alpha_{i}\)
2.Output:\(H_{k}\
abla f_{k}\) values as recursive algorithmic approach
3.Steps:
4.Start
5.\(q\leftarrow\
abla f_{k}\)
6.for\(i\gets k-1\), \(k-2\) to \(k-m\) Do
7.\(\alpha_{i}\leftarrow\rho_{i}S_{i}^{T}q\)
8.\(q\gets q-a_{i}y_{i}\)
9.Endfor
10.\(r\gets H_{k}^{0}q\)
11.for\(i\gets k-m\), \(k-m+1\),...., \(k-1\)do
12.\(\beta\leftarrow\rho_{i}y_{i}^{T}r\)
13.\(r\gets r+s_{i}(a_{i}-\beta)\)
14.Endfor
15.stop process when \(H_{k}\
abla f_{k}\ \gets r\)
```  
**Algorithm 1**L-BFGS Recursion to Calculate \(H_{k}\
abla f_{k}\)  
In terms of Algorithm 1, \(s_{k}\) is described as displacement, and \(y_{k}\) is the gradient change. Algorithm 1 contains two loops that are used to update the Hessian matrix. At the start of the initial loop, the current gradient \(q\) is determined and steps in length to determine the \(\alpha_{i}\). The variable, which is used to determine the values of \(\alpha_{i}\), is \(\rho_{k}\). The \(\rho_{k}\) is computed by using the below-mentioned Equation (5).  
\[\rho_{k}=\frac{1}{y_{k}^{T}\times S_{k}} \tag{5}\]  
Before the second loop in Algorithm 1, the new value of \(q\) is obtained by multiplying the inverse Hessian matrix. Initially, the inverse Hessian is calculated using Equation (6), where \(I\) is the initial level Hessian approximation value.  
\[H_{k}^{0}=\left(\frac{S_{k}^{T}\times y_{k-1}}{y_{k}^{T}\times y_{k-1}}\right) \times I \tag{6}\]  
The final matrices are found by multiplying the \(H_{k}^{0}\), and \(q\) is referred to as \(R\). The value of \(R\) is updated through \(\beta\) values in the algorithm, and the values of \(\alpha_{i}\) in Algorithm 1. In the last steps, when the value of \(R\) becomes equivalent to \(H_{k}\
abla f_{k}\), the algorithm steps and values are determined with the required output.  
The time complexity of algorithm 1 is computed by the time required to execute each task of the computational algorithm. The complexity, according to the instruction and number of steps to perform in the algorithms, is O(log n). O(n) is the specified space complexity of the algorithm. The algorithm's performance denotes it.