\(\frac{3}{\sqrt{14}}\)
\(\frac{\sqrt{11}}{\sqrt{3}}\)
To find the shortest distance between two skew lines, we use the formula:
\[d=\frac{|\vec{d_{1}}\cdot(\vec{a_{2}}-\vec{a_{1}})|}{|\vec{d_{1}}\times\vec{d_{2}}|}.\]
where \(\vec{a_{1}}\) and \(\vec{a_{2}}\) are points on the lines, and \(\vec{d_{1}}\) and \(\vec{d_{2}}\) are direction vectors.
For the first line:
\[\vec{d_{1}} = (1, 2, 1), \quad \vec{a_{1}} = (1, 5, -1).\]
For the second line:
\[\vec{d_{2}} = (-1, 1, 1), \quad \vec{a_{2}} = (3, 5, 0).\]
Calculate \(\vec{a_{2}} - \vec{a_{1}}\):
\[\vec{a_{2}} - \vec{a_{1}} = (3 - 1, 5 - 5, 0 + 1) = (2, 0, 1).\]
Find the cross product \(\vec{d_{1}} \times \vec{d_{2}}\):
\[\vec{d_{1}} \times \vec{d_{2}} = \begin{vmatrix} \hat{i} & \hat{j} & \hat{k} \\ 1 & 2 & 1 \\ -1 & 1 & 1 \end{vmatrix} = (2 - 1)\hat{i} - (1 - (-1))\hat{j} + (1 - (-2))\hat{k} = (1, -2, 3).\]
Calculate the magnitude:
\[|\vec{d_{1}} \times \vec{d_{2}}| = \sqrt{1^2 + (-2)^2 + 3^2} = \sqrt{1 + 4 + 9} = \sqrt{14}.\]
Now, find the dot product \(\vec{d_{1}} \cdot (\vec{a_{2}} - \vec{a_{1}})\):
\[\vec{d_{1}} \cdot (\vec{a_{2}} - \vec{a_{1}}) = 1 \cdot 2 + 2 \cdot 0 + 1 \cdot 1 = 2 + 0 + 1 = 3.\]
The shortest distance is:
\[d = \frac{3}{\sqrt{14}}.\]