On the Complexity of Program Synthesis from Examples