Petri nets has been proved to be a tool with strong abilities to describe discrete dynamic event systems (DEDS) such as flexible manufacturing systems (FMS) for their excellent properties over most of other tools. Siphons arising in Petri nets can be used to illustrate, analyze and control deadlock phenomena in FMS. Due to the deficiency of siphons, which is well known, elementary siphons come to be an important concept in Petri net theory, which is of great significance in designing structurally simple supervisors for plant net models. Our previous work has demonstrated that different sets of elementary siphons may lead to different effects in terms of the reachable states or the behaviors of controlled net systems, and the one leads to the maximal number of reachable states is denoted as an optimal set of elementary siphons. In this paper, algorithms to generate the optimal set of elementary siphons with high computational efficiency are well discussed and developed. Experimental results show that the optimal set of elementary siphons may produce more permissive behaviors in the controlled net system when the same deadlock control policies are applied