Solving inverse problems for random equations and applications