University of TehranJournal of Algorithms and Computation2476-2776Articles in Press20220116$P_3$-Rainbow Edge Colouring of Digraphs1118551710.22059/jac.2022.85517ENJournal Article20220116An edge coloring of a digraph $D$ is called a $P_3$-rainbow edge coloring if the edges of any directed path of $D$ with length 2 are colored with different colors. It is proved that for a $P_3$-rainbow edge coloring of a digraph $D$, at least $\left\lceil{log_2{\chi(D)}} \right\rceil$ colors are necessary and $ 2\left\lceil{log_2{\chi(D)}}\right\rceil\}$ colors are enough. One can determine in linear time if a digraph has a $P_3$-rainbow edge coloring with 1 or 2 colors. In this paper, it is proved that determining that a digraph has a $P_3$-rainbow edge coloring with 3 colors is an NP-complete problem even for planar digraphs. Moreover, it is shown that $\left\lceil{log_2{\chi(D)}}\right\rceil$ colors is necessary and sufficient for a $P_3$-rainbow edge coloring<br />of a transitive orientation digraph $D$. https://jac.ut.ac.ir/article_85517_65d76780f65db1c817b88f0d5705fed7.pdf