Links are unidirectional.
You have a link from 3 to 5 and from 3 to 6.
If you use (3,5) then the only link from 5 is (5,8) so you have to take that. Once you are at 8, the only link is (8,9) so you take that. There are no links from 9 so the path is a dead end.
So you need to instead use (3,6). Once you are at 6 the only link is (6,7) so you have to take that. Once you are at 7, the only link is (7,9) so you take that. There are no links from 9 so the path is a dead end.
Therefor with the data matrix you have, there is no route from 3 to 5.
If you want the routes to be symmetric then you need to add in the symmetric entries.
Y = y + y';
Now if you ask for the path on Y you will get a result.