A polynomial time algorithm to find the star chromatic index of trees