Define shortest path and optimal input amount for CFMM arbitrage bot

Job ID: 36237341

Budget: $30 – $250 USD

I need someone to help me on how to calculate the shortest path and the optimal input amount for a DEX triangular arbitrage bot.
I would provide a json structure of the data that includes pool addresses, liquidities and assets prices then i would need some graph method to quickly calculate the shortest path with arbitrage opportunity and define the optimal input amount for the found arbitrage. It would return the data to execute the trade (pools addresses, amounts etc)
Experience in this field would be better.