A regular language is k-piecewise testable (k-PT) if it is a Boolean combination of languages of the form L a 1 a , where a i ∈ Σ and 0 ≤ n ≤ k. Given a finite automaton A , if the language L(A ) is piecewise testable, we want to express it as a Boolean combination of languages of the above form. The idea is as follows. If the language is k-PT, then there exists a congruence ∼ k of finite index such that L(A ) is a finite union of ∼ k -classes. Every such class is characterized by an intersection of languages of the from L u , for |u| ≤ k, and their complements. To represent the ∼ k -classes, we make use of the ∼ k -canonical DFA. We identify the states of the ∼ k -canonical DFA whose union forms the language L(A ) and use them to construct the required Boolean combination. We study the computational and descriptional complexity of related problems.1. Check whether the regular language L is piecewise testable. 2. If so, compute the minimal k ≥ 0 for which L is k-piecewise testable. 3. Compute the finite number of representatives of the equivalence classes that form the union of the language L, express them as above and form their union.We study the computational and descriptional complexity of this approach, provide an overview of related results, and formulate several open problems.The complexity of the first step has been studied in the literature. Simon [26] proved that PT languages are exactly those regular languages whose syntactic monoid is J -trivial, which gives decidability. Stern [28] showed that the problem is decidable in polynomial time for languages represented by DFAs and Cho and Huynh [5] proved NLcompleteness for DFAs. Later, Trahtman [31] showed that the problem is solvable in time quadratic with respect to the number of states of the DFA and linear with respect to the size of the alphabet, and Klíma and Polák [19] gave an algorithm that is quadratic in the size of the input alphabet and linear in the number of states of the DFA. For languages represented by NFAs, the problem is PSPACE-complete [11].The second step gives rise to the k-piecewise testability problem formulated as follows:The problem is trivially decidable for any k because there are only finitely many k-PT languages over the alphabet of A . We investigate and overview the computational complexity of this problem. The upper bound complexity for DFAs has been independently solved in [10,18,23]. The co-NP upper bound on the k-piecewise testability problem for DFAs first appeared in [10] without proof, formulated in terms of separability. 3 In this paper, we recall (without proof) the result of [18] showing that the problem is co-NP-complete for DFAs if k ≥ 4. We then focus on the complexity of the problem for k < 4. In particular, for the input given as the minimal DFA, the problem is trivial for k = 0, belongs to AC 0 for k = 1 (Theorem 6), and is NL-complete for k = 2, 3 (Theorems 13 and 18). For NFAs, we show that the problem is PSPACE-complete for any k ≥ 0 (Theorem 20).There is an interesting observation by Klíma and Polák [19] ...