Question: Question 4 : Bounded Random Walk In a bounded rankom walk, a ball starts its journey from the widdle ovtl. It can move is four
Question : Bounded Random Walk
In a bounded rankom walk, a ball starts its journey from the widdle ovtl. It can move is
four diesction up down, right, left with squal probabalities within a bounded arta. Sisce it
is a bousded awa, the ball casnot mowe in all four directions if certain cases. Foe example.
when the bottom boundary as Point excluting the comers is roarbod, the nest step call
go left, up if right ouly as cas be: swen from the figure below again with squal probabilitiss
Similarly, wben a comes is racherd as Point the next stegs can be in two directions only.
Figure illustrates the random walk in a grid see of
Figure a: Inatration of the perblitm
To simalate bousdod randow walk problem, write a MNTLAB script that tales these: inputs
from the toer ulich afe,
grid size
a specific target cell within the bousded area, its and y coodinates are prowided
separately
a spocific number of stepo, for plotting purposes
Part I: Your script should output
number of steps ropuirod for the first passage: from the specific cell giwte by the wore,
A figure that shous coocimates of the trajectory for the muber of stepe dotermind
by the user
A figure that shows ycoodimates of the trajectary for the muber of steps dotermind
by the user.
Pleace note that initial location of the ball is the ovater of the grid its coordisate is
costimue untal the: specific ofll detwanined by the user is reached.
Be careful that the specific step number that is taben as user input may be greater
than the total number of stegs the ball has tabue. In such a case, you nosd to plat
coocdinate trajectory asd ycoordinate trajectory until the total number of steps taben.
not the spreific step number.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
