This article introduces the function based on the stack in solving actual problems and the importance of learning stack.Through proposing the problem to generate the pop sequences ,it shows the problem is very com-plex.Having analyzed the rules to form a pop sequence ,it gives a generation algorithms to form a pop sequence . Because the algorithm allows the limited number of elements to enter the stack ,it has improved the algorithm and made the improved algorithm apply to arbitrary long elements .The test results show that the a...