Dear Gabor, I would like your library to calculate all possible enumerations of permutations of the vertices of a graph. For each generated permutation I need to write the arc data set (2 columns: $From and $To). My graph has 7 nodes of which 3 are source nodes, it’s a directed graph. Unfortunately my knowledge of both resources (R, igraph) is not enough to compose the right R code. May I kindly ask for your help?
There are other packages that can generate permutations, for example
> library(combinat)
> permn(1:3)
[[1]]
[1] 1 2 3
[[2]]
[1] 1 3 2
[[3]]
[1] 3 1 2
[[4]]
[1] 3 2 1
[[5]]
[1] 2 3 1
[[6]]
[1] 2 1 3
Once you have a permutation, you can apply it to a graph using igraph::permute()
.