Abstract
The competing effect of a periodic pinning potential and random point disorder is studied for ensembles of elastic lines or directed polymers. The ground states are investigated by exact combinatorial optimization. In both two and three dimensions a phase diagram is found with two or three distinct phases: a strictly flat phase if the disorder is bounded and weak, a weakly fluctuating phase for intermediate valley depths, where the lines roughen individually on a scale smaller than the line-line distance, and a rough phase for strong disorder, where the roughness follows the scaling with pure point disorder. In the three-dimensional, rough phase the line wandering in the transverse direction leads to an entangled state with a complicated topology.