Re: Select a subset of paths
From: Robert Israel (israel_at_math.ubc.ca)
Date: 03/23/05
- Next message: Lester Zick: "Re: Epistemology 201: The Science of Science"
- Previous message: Lester Zick: "Re: Epistemology 201: The Science of Science"
- In reply to: vipin.v.deep_at_gmail.com: "Select a subset of paths"
- Messages sorted by: [ date ] [ thread ]
Date: 23 Mar 2005 22:35:37 GMT
In article <1111559908.326958.35210@z14g2000cwz.googlegroups.com>,
<vipin.v.deep@gmail.com> wrote:
>Hello:
>
>In a graph, one node is labeled as "start", and some of the nodes as
>"end". Among all possible paths from start to any of the end node, I
>have to select only a few fration of paths randomly (say 20%). Other
>than brute force, how can I do this.
20% is a lot. You might as well enumerate all the paths and then
randomly choose 20% of them. But for a smaller sample of "random"
paths, you could repeatedly "grow" paths at random, i.e. start at
"start" and at each stage choose a new node that is a neighbour of
the last node and isn't already part of the path, giving equal
probabilities to each of those. When you get to an end node you
can stop. If you get stuck (with no, start again.
Of course this will result in a different probability distribution
on the space of paths than the first method (which gives all paths
equal probability).
Robert Israel israel@math.ubc.ca
Department of Mathematics http://www.math.ubc.ca/~israel
University of British Columbia Vancouver, BC, Canada
- Next message: Lester Zick: "Re: Epistemology 201: The Science of Science"
- Previous message: Lester Zick: "Re: Epistemology 201: The Science of Science"
- In reply to: vipin.v.deep_at_gmail.com: "Select a subset of paths"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|