Unique Input/Output (UIO) sequence is an efficient method to perform functional test of Finite State Machine (FSM),which arises in many applications,such as VLSI designs and communication protocols,etc.A heuristic algorithm based on Distinguished State Group (DSG) is described to generate UIO sequences.The optimizing methods include a hellristic strategy based on a specific 'less’ relation,several pruning strategies,and a novel access mechanism of multiple OPEN/CLOSED lists,and these methods eliminate ono-sense nodes and branches to a great extent.According to the experimental results,the practicability of all the measures is analyzed.Compared with brute algorithms,the optimized one is improved in terms of time and space complexities.