  The state complexity of a regular language is the number of states in a
minimal deterministic finite automaton accepting the language. The syntactic
complexity of a regular language is the cardinality of its syntactic semigroup.
The syntactic complexity of a subclass of regular languages is the worst-case
syntactic complexity taken as a function of the state complexity $n$ of
languages in that class. We prove that $n^{n-1}$, $n^{n-1}+n-1$, and
$n^{n-2}+(n-2)2^{n-2}+1$ are tight upper bounds on the syntactic complexities
of right ideals and prefix-closed languages, left ideals and suffix-closed
languages, and two-sided ideals and factor-closed languages, respectively.
Moreover, we show that the transition semigroups meeting the upper bounds for
all three types of ideals are unique, and the numbers of generators (4, 5, and
6, respectively) cannot be reduced.
