Solving equations for available expressions problem