If we choosen node A then there are Three way to select next node either node C , node E , node B ie 3! . next when we choose node A as well as any of node C , E , B the there are two way for select next node either node E , node B ie 2!.
Hence After select node A no of way is = 3! + 2!
= 8
( A--B--C--E--D--F
A--B--C--D--E--F
A--B--E--C--D--F
A--C--E--B--D--F
A--C--B--E--D--F
A--C--B--D--E--F
A--E--C--B--D--F
A--E--B--C--D--F)
If we choosen node E then there are Two way to select next node either node A , node C ie 2! . next when we choose node E as well as any of node A , C the there are one way for select next node either node A , node C ie 1!.
Hence After select node A no of way is = 2! + 1!
= 3
(E--A--C--B--D--F
E--A--B--C--D--F
E--C--A--B--D--F)
but when select node C there are only two way to select next node , either node A , node E ie 2! . next when we choose node C as well as any of node A , E the there are two way for select next node ie 2! .
Hence After select node C no of way is = 2! + 2!
= 4
(C--A--B--D--E--F
C--A--B--E--D--F
C--A--E--B--D--F
C--E--A--B--D--F)
so , Total topological sort = 8 + 3 + 4 = 15