Omniadisce

Computational physics 18.5: Counting walkers

Lesson Beginner

Join free to take this lesson

Anyone can look around, but taking a lesson needs a free account. With one, your answers are checked step by step and your progress is saved, so you can stop and pick up where you left off on any device.

9 steps ยท about 25 min

By the end you can

  • Count how many walkers are at a position with np.sum(x == k)
  • Draw a histogram of the crowd: the count at every position
  • Explain the gaps at odd positions
  • Simulate a walker who stays put half the time, and find its spread, โˆš(N/2)

Who it is for: Anyone who has done lesson 18.4.

The steps

  1. Counting with ==
  2. How many are back?
  3. A count for every position
  4. The crowd's shape
  5. Every other dot
  6. Sometimes staying put
  7. A lazy hundred
  8. The lazy crowd
  9. Reading a histogram

Discussion 0 comments

Log in to join the discussion.

× Enlarged view