Questions tagged [random-walk]

A random walk is a mathematical formalization of a path that consists in a succession of random steps. A random walk can be a Markov chain or process; it can be on a graph or a group. Random walks can model randomized processes, in fields such as: ecology, economics, psychology, computer science, physics, chemistry, and biology.

248 questions
0
votes
0 answers

Markov chains and Random walks on top of biological data

I'm coming from biology's field and thus I have some difficulties in understanding (intuitively?) some of the ideas of that paper. I really tried my best to decipher it step by step by using a lot of google and youtube, but now I feel, it's the time…
J. Doe
  • 619
  • 4
  • 16
0
votes
1 answer

MatLab Why won't my random walker break in a capture zone?

Hi I programmed a 1d random walker and I am trying to implement a capture zone, where the program will stop if the walker remains in a specific range of values for a certain amount of time. The code I have looks like this: steps = 1000; %sets the…
0
votes
0 answers

Count number of intersections of many random walks in a graph

I want to run k random walks from each node of a connected un-directed graph with length lambda. When two or more walks visit one node at a same time, they combine into one walk and continue as a single random walk until lambda steps finish. I want…
0
votes
1 answer

Random Walker not running amount of times it should python

The code is supposed to be a random walker that runs for how ever many times the user inputs and if the walker manages to reach the edge of the game board, he wins or if the walker ever returns to his starting location, he loses. Right now my code…
0
votes
1 answer

Planar loop erasing random walk (matlab)

In this matlab post, one can find solution of "Loop erasing random walk" vector problem. This problem consists in "erasing loops" which means: removing integers between any integer repetition. Example: v=[3 1 4 6 7 9 1 22 87 33 35 36 37 35 34]…
sapienz
  • 152
  • 5
0
votes
1 answer

Large graph processing on Hadoop

I am working on a project that involves a RandomWalk on a large graph(too big to fit in memory). I coded it in Python using networkx but soon, the graph became too big to fit in memory, and so I realised that I needed to switch to a distributed…
Aneesh Makala
  • 341
  • 2
  • 9
0
votes
1 answer

For loop writing over part, but not all, of previous entry in array

I'm writing a pretty simple random walk function. Whole code is below. I'm using an array to keep track of the parameter values when the current cost function is less than the previous. But for some reason, the array that's tracking the output is…
E. Case
  • 67
  • 1
  • 2
  • 11
0
votes
1 answer

How to plot a dashed "cone" of constant slope around a set of points in matplotlib?

I have some python code I'm using to create plots of a random walk. The walk will reflect at the barriers of [-a,a]. The subsequent value in the sequence is generated by r[n] = r[n-1] + Uni[-R, R] which is then reflected as necessary. What I want…
ijustlovemath
  • 703
  • 10
  • 21
0
votes
1 answer

Random Walk, simplifying the code

I am currently practicing modelling "random walks" and population modelling. I have a working code that works for a 1D random walk, in the future I'd like to add extra dimensions and I think the code I have at the moment would make it more…
0
votes
0 answers

Simulating random walk on the n-cycle in R

I have been trying to implement a random walk on the n-cycle algorithm in R. By n-cycle I mean the set of integers Zn, or modulo n. Basically, it’s example 5.3.1 from the book “Markov chains and mixing time”, by Levin, Peres and Wilmer. The…
KirkLand
  • 11
  • 1
  • 1
  • 2
0
votes
1 answer

How to generate a RandomWalk with n dimensions

How do i generate a RandomWalk with n dimensions? I already have some examples for a 1 or 2 dimensional random walk but now i have to code a random walk with n dimensions and i seriously don't know how. here are 2 examples for 2 dimensions: …
0
votes
2 answers

Mean squared displacement

I am investigating the motion of a single micrometer sized particle in a low density plasma. With a so called long distance microscope I have recorded the motion of a particle (2726 images, fps=60 Hz). The x,y data in mm are available here:…
len
  • 749
  • 1
  • 8
  • 23
0
votes
2 answers

How to create a fenced field for the drunken walk

I bought an Introduction to Python book by John V. Guttag and I am trying to teach myself python. It is going decent for the most part, but I have a question that is not talked about in the book. The latest part talked about the druken walk…
programmer 20
  • 59
  • 1
  • 6
0
votes
1 answer

Plotting 3D random walk in Python

I want to plot 3-D random walk in Python. Something that is similar to picture given below. Can you suggest me a tool for that. I am trying to use matplotlib for it but getting confused on how to do it. For now I have a lattice array of zeros which…
jkhadka
  • 2,443
  • 8
  • 34
  • 56
0
votes
1 answer

MATLAB: plotting a random walk

so I need to create a function that plots location versus time for an individual who makes successive random jumps. Each jump is one unit to the right with probability R, and otherwise its one unit to the left. The arguments need to be R = probably…
Sofia June
  • 169
  • 2
  • 8