lab10

# lab10 - used in a 7 × 5 board for displaying a digit(0 to...

This preview shows page 1. Sign up to view the full content.

CS100M Lab Exercise 10 1 Random walk, revisited A random walk that starts from the center of a 21 × 21 grid ends when a boundary is reached. Which “square” or grid point is visited most often? 2 Bounded random walk In a bounded random walk, a set number of steps are taken within a bounded area. For example, when the right boundary (excluding the corners) is reached, the next step can go left, up, or down only. Similarly, when a corner is reached, the next steps can be in two directions only. For a 100-step bounded random walk in a 21 × 21 grid, which “square” is visited most often? 3 Where to put your long-burning light bulbs? Refer to the dot-matrix examples from Lecture 18. Suppose you have five extra-long-life light bulbs that can be
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: used in a 7 × 5 board for displaying a digit (0 to 9; all are equally likely to be displayed). In which positions of the 7 × 5 board would you put these special long-life light bulbs? Assume that a bulb ( i , j ) that is in a lit part of the board simply stays on—instead of ±rst turning o² and then back on—when the display changes to another digit that requires bulb ( i , j ) to be on. Consider the following cases: 1. The longer that a bulb is on, the more it degrades. 2. Switching a bulb on (and o²) frequently causes it to degrade. (Take the extreme case—assume that continuous burning doesn’t degrade the bulb.) Please delete your fles From the computer beFore you leave the lab. 1...
View Full Document

{[ snackBarMessage ]}

### What students are saying

• As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

Kiran Temple University Fox School of Business ‘17, Course Hero Intern

• I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

Dana University of Pennsylvania ‘17, Course Hero Intern

• The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

Jill Tulane University ‘16, Course Hero Intern