Hi everybody,

I have this matrix.

- X Y Z Q

X 0 5 3 2

Y 5 0 4 1

Z 3 4 0 6

Q 2 1 6 0

X,Y,Z,Q are citys, numbers are miles. example: X-Y: 5 mile

My code must generate 3 random route (ex: XQZY, XYZQ, QZYX) and find min route.

X-Q-Z-Y =2+6+4=12mile

Y-Q-Z-X =1+6+3=10mile

Q-Z-Y-X =6+4+5=15mile

Min route is Y-Q-Z-X =10mile

Can you help me?