There was an error in the algorithm given for Proram 2. It has been corrected.