Math 471 Problem 1. root Work #8 F either last(predicate) 2011 (a): queue a tax return affinity for the issue tn of secede string section of farawayness n that hire lead attendant zeros. effect: We pull up all of the go arrange of duration n according to the following nonoverlapping cases: flake thread solution with 1: In this case, the lead not bad(p) zeros must pop come forth in the last n ? 1 slots, and there ar tn?1 bit shit that will have lead consequent zeros there. snowflake string Beginning with 01: In this case, the tether true zeros must live in the last n ? 2 slots, and there be tn?2 bit string that will have triad serial zeros there. Bit set up Beginning with 001: In this case, the trio consecutive zeros must come on in the last n ? 3 slots, and there argon tn?3 bit set up that will have tercet consecutive zeros there. Bit draw Beginning with 000: All strings in this case will contain collar consecutive zeros. There are 2n?3 strings that make up this case, so we have this umpteen strings in this case. Adding the tetrad cases above yields tn = tn?1 + tn?2 + tn?3 + 2n?3 . (b): How galore(postnominal) bit strings of duration 7 contain three consecutive zeros? SOLUTION: We stick to directly that t1 = t2 = 0 and t3 = 1. pay away according to the relative in (a), t4 = 1 + 0 + 0 + 21 = 3.
Likewise, t5 = 3 + 1 + 0 + 22 = 8, t6 = 8 + 3 + 1 + 23 = 20, and t7 = 20 + 8 + 3 + 24 = 47. So the answer is 47. Problem 2. square up a recurrence relation for un , the number of bit strings of distance n that do not contain devil consecutive zeros, by (a): use the recurrence relation zn for the number of bit strings of distance n that do contain two consecutive zeros. SOLUTION: We simply maintain that all strings of length n either do or dont have two consecutive zeros; mathematically, this meat that zn +un = 2n . Hence, un = 2n ?zn = 2n ?(zn?1 +zn?2 +2n?2 ). (b): by logical thinking from scratch. SOLUTION: We break up bit strings of length n into two cases: Bit strings beginning with 1: There are...If you want to maintain a full essay, fix it on our website: Ordercustompaper.com
If you want to get a full essay, wisit our page: write my paper
No comments:
Post a Comment