Q:

All permutations of a tree

I need an algorithm that computes all possible permutations of a given tree structure, for example:  
4      3  
 \     |  
  \    2
   \  /  
    1  

This means, that (4) needs to be ordered before (1), (3) before (2) and (2) before (1).Thus the output should contain all of and not more than the following:
[4,3,2,1]  
[3,4,2,1]  
[3,2,4,1]

An invalid order would be for example
[4,2,3,1]

as (2) is before (3), but (2) is the successor of (3) in the graph. Simply computing all permutations and filtering invalid orderings doesn't work for reasons of efficiency.  
I don't need the exact code, an idea of how this could generally be done would already be very helpful.

A:

In case somebody is still interested in this, an algorithm to my problem has already been presented in the 70s by Varol and Rotem in their paper "An algorithm to generate all topological sorting arrangements". 
Actually searching for topological sort would have helped me to find the solution earlier, however, the article can be found here: http://comjnl.oxfordjournals.org/content/24/1/83.abstract

