In this paper, an improved algorithm for automatic test pattern generation (ATG) for nuclear power plant digital electronic circuits-the combinational type of logic circuits is presented, For accelerating and improving the ATG process for combinational circuits the presented ATG algorithm has the new concept-the degree of freedom (DF). The DF, directly computed from the system descriptions such as types of gates and their interconnections, is the criterion to decide which among several alternate lines' logic values required along each path promises to be the most effective in order to accelerate and improve the ATG process. Based on the DF the proposed ATG algorithm offers earlier detection of the conflicts and considerable reduction of the number of backtrackings. When the ATG algorithm is implemented in the automatic fault diagnosis system (AFDS) which incorporates the advanced fault diagnosis method of artificial intelligence technique, it is shown that the AFDS using the ATG algorithm makes Universal Card (UV Card) testing much faster than the present testing practice or by using exhaustive testing sets.