yes there is oneonce it was given as a home work in sharif university to students, some of them has put their solution on web.if you search for it, it may still be available.