sidebar
There is a vast literature on this problem, which we will not attempt to review here.