calcpi function for problem 3

Calculates the pi vector given a transition matrix