You are to simulate the motion of a really tired student. The student is standing on one side of a field and his residence is on the other side. The residence is 50m wide and the field 100m across (distance from road to the residence).  Assume the student is opposite the middle of the residence.  Due to his state he cannot walk in a straight path.  Each second the student attempts to take a step. There is a 25% chance that the student will go left, a 20% chance the student will go right, a 10% chance the student will stand still, and a 45% chance the student will go forward. Assume the student does not go backwards. If the student’s position exceeds the width of the field on either side he stumbles into the road and does not make it home. If he makes it across he is safe. Write a VPython program to simulate this motion. Plot a graph showing the student’s path for a large number of trials.  What is

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question

 

You are to simulate the motion of a really tired student. The student is standing on one side of a field and his residence is on the other side. The residence is 50m wide and the field 100m across (distance from road to the residence).  Assume the student is opposite the middle of the residence.  Due to his state he cannot walk in a straight path.  Each second the student attempts to take a step. There is a 25% chance that the student will go left, a 20% chance the student will go right, a 10% chance the student will stand still, and a 45% chance the student will go forward. Assume the student does not go backwards. If the student’s position exceeds the width of the field on either side he stumbles into the road and does not make it home. If he makes it across he is safe. Write a VPython program to simulate this motion. Plot a graph showing the student’s path for a large number of trials.  What is his probability of success? For 100, 500 and 1000 steps what are the success probabilities? 

  • Consider how you will determine the probability of success i.e. what is missing from the question.
  • How will you decide which way the student has moved? 
  • How will you decide if the students gets into the road on the left and the right?
  • How will you decide if the student wonders around on the field before collapsing?
  • How does this modelling approach relate to physical processes such as diffusion?
Expert Solution
steps

Step by step

Solved in 2 steps with 3 images

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY