  The interplay between the ground state energy of the generalized Bernasconi
model to multi-phase, and the minimal value of the maximal autocorrelation
function, $C_{max}=\max_K{|C_K|}$, $K=1,..N-1$, is examined analytically and
the main results are: (a) The minimal value of $\min_N{C_{max}}$ is
$0.435\sqrt{N}$ significantly smaller than the typical value for random
sequences $O(\sqrt{\log{N}}\sqrt{N})$. (b) $\min_N{C_{max}}$ over all sequences
of length N is obtained in an energy which is about 30% above the ground-state
energy of the generalized Bernasconi model, independent of the number of phases
m. (c) The maximal merit factor $F_{max}$ grows linearly with m. (d) For a
given N, $\min_N{C_{max}}\sim\sqrt{N/m}$ indicating that for m=N,
$\min_N{C_{max}}=1$, i.e. a Barker code exits. The analytical results are
confirmed by simulations.
