灯下 登录
计算机科学 / SICP / 4.3.2 Examples of Nondeterministic Programs

Exercise 4.39 · 习题

Exercise 4.39: Does the order of the

restrictions in the multiple-dwelling procedure affect the answer? Does it

affect the time to find an answer? If you think it matters, demonstrate a

faster program obtained from the given one by reordering the restrictions. If

you think it does not matter, argue your case.

练习 4.39:多重居住过程中各限制条件的顺序会影响答案吗?会影响求解所用的时间吗?如果你认为顺序有影响,请通过重新排列限制条件的顺序,给出一个比原始程序更快的程序加以证明。如果你认为顺序无关紧要,请论证你的观点。