Most of the density-to-potential inversion methods developed over the years
follow a general algorithm $ v_{xc}^{i+1}(r) = v_{xc}^{i}(r)
- \Delta v_{xc}(r),where\Delta v_{xc}(r) = \frac{\delta
S[\rho]}{\delta \rho(r)} \Big |{ \rho_i(r)} - \frac{\delta
S[\rho]}{\delta \rho(r)}\Big|{ \rho_0(r)}andS[\rho]$ is
an appropriately chosen density functional. In this work we show that this
algorithm can be used with random numbers to obtain the exchange-correlation
potential for a given density. This obviates the need to evaluate the
functional S[ρ] in each iterative step. The method is demonstrated by
calculating exchange-correlation potential of atoms, clusters and the Hookium.