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

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

View Full Document Right Arrow Icon
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 ±ve extra-long-life light bulbs that can be
Background image of page 1
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

This lab report was uploaded on 02/15/2008 for the course CS 100 taught by Professor Fan/vanloan during the Fall '07 term at Cornell.

Ask a homework question - tutors are online