Specify the length of a random subgraph