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 4: 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 B(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 C, the next stegs can be in two directions only.
Figure 1 illustrates the random walk in a grid see of 5x5.
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 N,
a specific target cell within the bousded area, (its x and y coodinates are prowided
separately)
a spocific number of stepo, t(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 x-coocimates of the trajectory for the muber of stepe (t) dotermind
by the user
A figure that shows y-coodimates of the trajectary for the muber of steps (t) 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 x-
coocdinate trajectory asd y-coordinate trajectory until the total number of steps taben.
not the spreific step number.
Question 4 : Bounded Random Walk In a bounded

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Accounting Questions!