  Cyclic codes are an important subclass of linear codes and have wide
applications in data storage systems, communication systems and consumer
electronics. In this paper, two families of optimal ternary cyclic codes are
presented. The first family of cyclic codes has parameters $[3^m-1, 3^m-1-2m,
4]$ and contains a class of conjectured cyclic codes and several new classes of
optimal cyclic codes. The second family of cyclic codes has parameters $[3^m-1,
3^m-2-2m, 5]$ and contains a number of classes of cyclic codes that are
obtained from perfect nonlinear functions over $\fthreem$, where $m>1$ and is a
positive integer.
