Synthesis of Solutions in Distributed Expert Systems