subject

Use the message passing technique to simulate a random walk of n objects on a "periodic" or "circular" integer lattice. The rules are described as the following: 1. The lattice can be discretized as N grid points with a location at 1, 2, ..., N.
2. Initially, the n objects can be placed anywhere randomly in the lattice. One or more objects can occupy the same grid point at any given time.
3. Each object must flip a coin before moving a step: Move 1 step to the right (Head) or Move 1 step to the left (Tail).
4. If an object located at grid point N moves 1 step to the right, it should land in grid point 1. If an object located at grid point 1 moves 1 step to the left, it should land in grid point N.
The lattice should be distributed into np partitions where np is the number of workers (cpus/cores). For example, for the case where N=10 and np=2, worker 1 is taking care of grid 1, ..., 5, and worker 2 is taking care of grid 6, ..., 10.
Utilize the commands labSend, labProbe, labReceive, and labBarrier to deal with objects crossing partitions. Stop the simulation when all objects achieve M steps. Plot the initial and final positions of all objects.

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 04:30
Ryan is working on the layout of her web page. she needs to figure out where her header, navigation bar, text, and images should go. what technique can her?
Answers: 1
question
Computers and Technology, 22.06.2019 11:30
To hide gridline when you display or print a worksheet
Answers: 1
question
Computers and Technology, 22.06.2019 22:30
Who needs to approve a change before it is initiated? (select two.) -change board -client or end user -ceo -personnel manager -project manager
Answers: 1
question
Computers and Technology, 23.06.2019 08:00
Michael has written an e-mail to his employees that describes a new product special that will be introduced to the customers next week. by taking time to make sure the e-mail is well written, logical, and organized, michael has made sure his message has the characteristics of a) effective communicationb) ineffective communicationc) barriers to communicationd) workplace communication
Answers: 2
You know the right answer?
Use the message passing technique to simulate a random walk of n objects on a "periodic" or "circula...
Questions
Questions on the website: 13722361