Path: utzoo!attcan!uunet!lll-winken!ncis.llnl.gov!helios.ee.lbl.gov!pasteur!ames!xanth!ukma!tut.cis.ohio-state.edu!osu-cis!att!oucsace!thollowe From: thollowe@oucsace.cs.OHIOU.EDU (Tom Hollowell) Newsgroups: comp.lang.pascal Subject: Code needed to find stack permutations Summary: need help with stack permutations Message-ID: <423@oucsace.cs.OHIOU.EDU> Date: 25 Jan 89 16:07:52 GMT References: <468@loligo.cc.fsu.edu> Distribution: na Organization: Ohio University CS Dept., Athens Lines: 7 I don't know if there is a simple way to do it, but does anybody have a procedure that prints out the possible permutaions of set of numbers, say 1 to n, using a stack. I need something like this for a train simulation I am working on, as it is a simple way to devise which trains come and go through certain gates. Turbo or regular pascal would be great, or just the algorithim if you have one laying around. Please e-mail as I doubt anyone would be interested in such a thing .