4. Given that the bases of two congruent regular pyramids are glued together, resulting in a hexahedron where all dihedral angles are equal, and the shortest edge of this hexahedron is 2, then the distance between the farthest two vertices is
3
4.【Analysis and Solution】As shown in the figure:
$\angle A E D$ is the plane angle corresponding to the dihedral angle $A-B C-D$, $\angle B F D$ is the plane angle corresponding to the dihedral angle $B-A C-D$. Then $2 \angle A E D=\angle B F D$, obviously $A B<B C$ so $A B=2$.
Let $B C=2 x, A E=\sqrt{4-x^{2}}, E D=\sqrt{3} x$,
thus $\cos \angle A E D=\frac{4-x^{2}+3 x^{2}-4}{2 \sqrt{4-x^{2}} \sqrt{3 x}}$.
Also, $B F=\sqrt{4-x^{2}} \times \frac{2 x}{2}=x \sqrt{4-x^{2}}$, so $\sin \frac{\angle B F D}{2}=\frac{\frac{1}{2} B D}{B F}=\frac{x}{x \sqrt{4-x^{2}}}$,
Given $2 \angle A E D=\angle B F D$, therefore
$\cos ^{2} \angle A E D+\sin ^{2} \frac{\angle B F D}{2}=1$,
which means $\left(\frac{4-x^{2}+3 x^{2}-4}{2 \sqrt{4-x^{2}} \sqrt{3} x}\right)+\left(\frac{x}{x \sqrt{4-x^{2}}}\right)^{2}=1$,
Solving this, we get $x=\frac{3}{2}, B C=3$.