This paper is divided into two parts. In formal language theory, a well known result is that the language with two elements{x, y} is a code if and only if xy ≠ yx. What is the necessary and sufficient condition for the language with three elements is a code? In the first part of this paper, a necessary and sufficient condition for a kind of three-element language is a code is given, this kind of three-element language contained two words have the same length and the third one is longer. In the second part of this paper, we define a kind of language — f-congruence language, which generalize the concept c-simple languages(c.f. [12]). This kind of language contained regular languages, and some context-free languages. This paper gives some properties of f-congruence languages and constructs some f-congruence languages from some common languages. |