The algorithm "A" according to Antoni Diller looks fairly simple:
http://www.cantab.net/users/antoni.diller/brackets/intro.html
Can we do thi