Directional information flow and applications