Extra Credit Problem for PS4

Please turn this in along with your solutions for PS4, as usual, on a separate sheet of paper.

Division in NC^2:

Construct a polynomial size, O(log^2 n) depth circuit for dividing a 2n-bit integer X by an n-bit integer Y. If X is not divisible by Y, your circuit should say so. Keep the description as simple as possible, and avoid gory details, if any. (I was able to teach a 6-year old how to divide using this algorithm, so there should be no gory details.)

Hint: Reduce division to several additions.

Building on the work of Beame, Cook, and Hoover from 1984, it was recently shown that division can, in fact, be done in highly-uniform NC^1. See the article by Eric Allender in the Complexity Theory Column of the Bulletin of the European Assoc. for TCS for details.