Flows on rooted trees and the Narayana idempotents