SolHW10f07 - HW10F07 CS336 Page 458 23 24 29 Page 471 4a 4d...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
HW10F07 CS336 Page 458: 23, 24, 29 Page 471: 4a, 4d, 4f Page 542: 1a, 23, 24, 25 Page 458: 23a. Notice that the number of bit strings of length n that contain a pair of consecutive 0s is the sum of the following: The number of such strings of length n ending with 1. These strings are precisely such strings of length n - 1 with 1 added in the end. So the number of such strings is a n - 1 . The number of such strings of length n ending with 10. These strings are precisely such strings of length n - 2 with 10 added in the end. So the number of such strings is a n - 2 . The number of such strings of length n ending with 00, which is 2 n - 2 because we can have anything in the first n - 2 positions. So the recurrence relation for the number of such bit strings is a n = a n - 1 + a n - 2 + 2 n - 2 , for n 2 23b. The initial conditions are a 0 = 0 and a 1 = 0, since strings of length 0 or 1 cannot contain a pair of consecutive 0s. 23c.
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 09/20/2008 for the course CS 336 taught by Professor Myers during the Spring '08 term at University of Texas.

Page1 / 2

SolHW10f07 - HW10F07 CS336 Page 458 23 24 29 Page 471 4a 4d...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online