In this paper, we investigate the complexity of computing the detector, constructor and lexicographic constructor functions for a given language. The following classes of languages will be considered: (1) context-free languages, (2) regular sets, (3) languages accepted by one-way nondeterministic auxiliary pushdown automata, (4) languages accepted by one-way nondeterministic logspace-bounded Turing machines, (5) two-way deterministic pushdown automaton languages, (6) languages accepted by uniform families of constant-depth polynomial-size Boolean circuits, and (7) languages accepted by multihead finite automata. We show that for the classes (1)–(4), efficient detectors, constructors and lexicographic constructors exist, whereas for (5)– (7) polynomial-time computable detectors, constructors and lexicographic constructors exist iff there are no sparse sets in NP−P (or equivalently, E=NE). Our results provide sharp boundaries between classes of languages which have efficient detectors, constructors and classes of languages for which efficient detectors and constructors do not appear to exist.