\(\frac{3}{\sqrt{14}}\)
\(\frac{\sqrt{11}}{\sqrt{3}}\)
The shortest distance between two skew lines is determined by the formula:
\[d=\frac{|\vec{d_{1}}\cdot(\vec{a_{2}}-\vec{a_{1}})|}{|\vec{d_{1}}\times\vec{d_{2}}|}.\]
In this formula, \(\vec{a_{1}}\) and \(\vec{a_{2}}\) represent points on the respective lines, and \(\vec{d_{1}}\) and \(\vec{d_{2}}\) are their direction vectors.
For the first line, the parameters are:
\[\vec{d_{1}} = (1, 2, 1), \quad \vec{a_{1}} = (1, 5, -1).\]
For the second line, the parameters are:
\[\vec{d_{2}} = (-1, 1, 1), \quad \vec{a_{2}} = (3, 5, 0).\]
First, we compute the vector difference \(\vec{a_{2}} - \vec{a_{1}}\):
\[\vec{a_{2}} - \vec{a_{1}} = (3 - 1, 5 - 5, 0 + 1) = (2, 0, 1).\]
Next, we calculate the cross product of the direction vectors, \(\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).\]
The magnitude of this cross product is then found:
\[|\vec{d_{1}} \times \vec{d_{2}}| = \sqrt{1^2 + (-2)^2 + 3^2} = \sqrt{1 + 4 + 9} = \sqrt{14}.\]
Subsequently, we compute 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.\]
Finally, the shortest distance \(d\) is:
\[d = \frac{3}{\sqrt{14}}.\]