D e a t h of a M o n s t e r * Fabrizio Luccio and Linda Pagli Dipartimento di Informatica, UniversitY.di Pisa luccioGdi.unipi.it,pagliGdi.unipi.it The Hydra was a monster with many heads, living in a marsh of Lerna. Hercules fought it in a formidable struggle, chopping off its heads with a club. However, as Hercules chopped a head, two new heads grew forth from the monster's body. According to the official records Hercules won. W h a t the Greek did not reveal is that, no matter in which order Hercules had decided to attack the heads, he would have annihilated the Hydra. Although less charming and botanically incorrect, we treat the Hydra as a rooted tree and the heads as leaves (figure 1). For a leaf z the predecessor y is the neck, and the predecessor's predecessor z is the trunk. When z is cut off two new subtrees, rooted in the new necks u and v, grow from the trunk z. These subtrees are identical to the one rooted in y (deprived of x). The first relevant fact is that, independently of the order in which the leaves are cut, the tree eventually reduces
/lp/association-for-computing-machinery/death-of-a-monster-mIhrrmMXAK