Discovery algorithms for hierarchical relations