Generalized Farey tree, Transfer operators and phase transitions