Infection is an essential character of computer viruses. In addition, computer viruses can also imitate the behavior of infected programs in some ways in order to hide themselves. In this paper we define infection and imitation mathematically, and classify computer viruses into 3 types according to their different imitation behaviors. Furthermore, we give some results about the degree of unsolvability of each type of computer viruses. We show that the set of type 0 and type 1 computer viruses is II2-complete, while the set of type 2 computer viruses is II3-complete. (C) 2006 Elsevier Ltd. All rights reserved.