oIn the one-dimensional VLSI layout compaction problem, a longest-path algorithm for acyclic graphs are used. This paper shows that the problem can be solved also by shortest-path algorithms by a simple transformation. This fact can be used to the compaction problem with automatic job insertions.