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 11:30
Hassan is writing his master’s thesis, which is a thirty-page document. he received some feedback from his professor in the form of comments, but does not see where the comments are. what is the fastest way for hassan to find the feedback?
Answers: 3
question
Computers and Technology, 22.06.2019 15:30
Whats are the different parts of no verbal comunication, especially body language?
Answers: 3
question
Computers and Technology, 22.06.2019 18:30
Technician a says that a shop towel should never be used to clean around the flange area before replacing an automatic transmission filter. technician b says that a dimpled transmission fluid pan can be repaired. who is right
Answers: 3
question
Computers and Technology, 23.06.2019 00:00
Donna and her team of five have invented a new gadget for the science exhibition in their college. which intellectual property right will protect their invention?
Answers: 1
You know the right answer?
Use the message passing technique to simulate a random walk of n objects on a "periodic" or "circula...
Questions
question
Mathematics, 06.06.2020 05:02
question
English, 06.06.2020 05:02
question
Mathematics, 06.06.2020 05:02
question
Mathematics, 06.06.2020 05:02
question
Mathematics, 06.06.2020 05:02
Questions on the website: 13722367