Academic Journal of Mathematical Sciences, 2023, 4(4); doi: 10.25236/AJMS.2023.040406.

## A modified method based on the K-nearest neighbor approach for solving PDE global solutions using the Feynman-Kac formula

Author(s)

Shirui Zheng1, Xin Gui2

Corresponding Author:
Shirui Zheng
Affiliation(s)

1Zhizhen College, Beihang University, Beijing, 100191, China

2School of Civil Engineering, Shandong Jianzhu University, Jinan, 250101, China

### Abstract

Inspired by the classification idea of the K-nearest neighbors (KNN) algorithm, this paper proposes a new method for numerically solving partial differential equations (PDE) using the Feynman-Kac formula. The method involves establishing a connection between PDE and stochastic differential equations through the Feynman-Kac formula. Random points are selected within the domain of the equation, and the KNN algorithm is used to partition these points into different regions. Then, Monte Carlo simulation is performed on the random points within each region to obtain a series of simulated values. These simulated values are substituted into the corresponding Feynman-Kac formula for each random point to obtain the solution. Finally, within each region, the average of the solutions for all random points belonging to that region is calculated, resulting in the corresponding approximate solution. By selecting an appropriate partitioning approach, a higher-precision global solution to the PDE can be constructed. Through a series of numerical simulations, the results show that the PDE global solution constructed by the new method achieves higher accuracy compared to traditional interpolation methods.

### Keywords

Monte Carlo Simulation, Feynman-Kac formula, Numerical method of PDE, KNN

### Cite This Paper

Shirui Zheng, Xin Gui. A modified method based on the K-nearest neighbor approach for solving PDE global solutions using the Feynman-Kac formula. Academic Journal of Mathematical Sciences (2023) Vol. 4, Issue 4: 36-44. https://doi.org/10.25236/AJMS.2023.040406.