Question

How many binary sequences of length 20 are there that (a) Start with a run of 0s—that is, a consecutive sequence of (at least) one 0—then a run of 1s, then a run of 0s, then a run of 1s, and finally finish with a run of 0s? (b) Repeat part (a) with the co

How many binary sequences of length 20 are there that

(a) Start with a run of 0s—that is, a consecutive sequence of (at least) one 0—then a run of 1s, then a run of 0s, then a run of 1s, and finally finish with a run of 0s?

(b) Repeat part (a) with the constraint that each run is of length at least 2.


0 0
Add a comment Improve this question Transcribed image text
Answer #1

How many binary sequences of length 20 is there that:

a) Start with a run of 0 's, then a run of 1 's, then a run of 0 's, then a run of 1 's, and finish with a run of 0 's? A "run" is a consecutive sequence with at least one of the indicated characters.

b) Repeat part (a) with the constraint that each run is of length at least 2

Solution:

a) The binary sequence has a length of 20 with 0 's and 1 's in the following pattern


0_1_0_1_0_


So we have to fill the gaps with 0 's and 1 's. It is sure that the characters following 0 will be 0 s and the characters following 1 will be 1 s. So we will consider them as the same type or indistinguishable or identical objects.


We have 5 places to be filled with either \(0 \mathrm{s}\) or \(1 \mathrm{s}\). These 5 places are to be filled with 15 objects which are indistinguishable.

The number of ways of distributing \(n\) identical objects to r groups is

$$C(n+r-1, r-1)=\frac{(n+r-1) !}{n !(r-1) !}$$

\(\therefore\) The number of ways of filling 15 identical objects into 5 different groups will be

\(=C(15+5-1,5-1)\)

$$=\frac{19 !}{15 ! 4 !}$$

\(=3876\)

b) Repeat part (a) with the constraint that each run is of length at least 2

So we will have the pattern as follows

$$00_{-} 11_{-} 00_{-} 11_{-} 00_{-}$$

So here we have 100 s and 1 s to be filled into 5 groups. So just like above the number of ways of filling 10 identical objects into 5 different groups will be

\(=C(10+5-1,5-1)\)

\(=\frac{14 !}{10 ! 4 !}=1001\)


answered by: sunny.sun
Add a comment
Know the answer?
Add Answer to:
How many binary sequences of length 20 are there that (a) Start with a run of 0s—that is, a consecutive sequence of (at least) one 0—then a run of 1s, then a run of 0s, then a run of 1s, and finally finish with a run of 0s? (b) Repeat part (a) with the co
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • 2. A binary string s a finite sequence u = ala2 . . . an, where each ai įs either 0 or 1. In this case n is the length...

    2. A binary string s a finite sequence u = ala2 . . . an, where each ai įs either 0 or 1. In this case n is the length of the string v. The strings ai,aia2,...,ai...an-1,aan are all prefixes of v. On the set X of all binary strings consider the relations Ri and R2 defined as follows R, = {(u, u) | w and u have the same length } {(w, u) | w is a prefix of...

  • PLEASE ANSWER FROM WHERE IT SAYS "Continuing from Part 1" Consider a sequence of n Bernoulli...

    PLEASE ANSWER FROM WHERE IT SAYS "Continuing from Part 1" Consider a sequence of n Bernoulli trials with success probabilty p per trial. A string of consecutive successes is known as a success run. Write a function that returns the counts for runs of length k for each k observed in a dictionary. For example: if the trials were [0, 1, 0, 1, 1, 0, 0, 0, 0, 1), the function should return {1:2, 2: 1)) What is the return...

  • Roadmap To start, use the provided template file (on Blackboard): project_01_template.py. Replace the pass statements with...

    Roadmap To start, use the provided template file (on Blackboard): project_01_template.py. Replace the pass statements with your code. Notice that we included test cases under every function. If you run the project_01_template.py file at this point it should print False for each test. After you write the correct code for each function, and then run the file, it should print True for each test. 1. Write a function named gc_content that takes one argument sed and performs the following tasks:...

  • Assignment 5: Introduction to MATLAB Calculations & Plotting 1. The surface to volume ratio of the...

    Assignment 5: Introduction to MATLAB Calculations & Plotting 1. The surface to volume ratio of the earth is 7.5753 x 10 diameter for the earth. miles. Determine an approximate 2. The length L of a belt that traverses two pulley wheels, one of radius R and one of radius r and whose centers are distance S apart is given by L 2Scose+ T(R + r) + 20(R-r) where 0 = sin (R-r)/S) Determine L when R 30 cm, r -12...

  • Part 1: Goal Seek Pampa Parts produces a single product, the NF-9. The product has a...

    Part 1: Goal Seek Pampa Parts produces a single product, the NF-9. The product has a unit variable cost of $70 and annual fixed costs of $343,200. Pampa is subject to a 20 percent tax rate. Suppose the NF-0 sells for $110 per unit. Using the Goal Seek function in Microsoft Excel, how many units of NF-9 must Pampa sell to earn an annual operating profit after taxes of $38,400? Now, suppose Pampa expects to sell 8,150 units of NF-9...

  • Question I This question carries 20% of the marks for this assignment. You are asked to...

    Question I This question carries 20% of the marks for this assignment. You are asked to develop a set of bash shell script: Write a script that asks for the user's salary per month. If it is less or equals to 800, print a message saying that you need to get another job to increase your income, what you earn is the Minim living cost. If the user's salary is higher than 800 and below 2000, print a message telling...

  • specifically on finite i pmu r the number of objøcts or ways. Leave your answers in fornsiala form, such as C(3, 2) nporkan?(2) Are repeats poasib Two points each imal digits will have at le...

    specifically on finite i pmu r the number of objøcts or ways. Leave your answers in fornsiala form, such as C(3, 2) nporkan?(2) Are repeats poasib Two points each imal digits will have at least one xpeated digin? I. This is the oounting problem Al ancmher so ask yourelr (1) ls onder ipo n How many strings of four bexadeci ) A Compuir Science indtructor has a stack of blue can this i For parts c, d. and e, suppose...

  • 1 Overview and Background Many of the assignments in this course will introduce you to topics in ...

    1 Overview and Background Many of the assignments in this course will introduce you to topics in computational biology. You do not need to know anything about biology to do these assignments other than what is contained in the description itself. The objective of each assignment is for you to acquire certain particular skills or knowledge, and the choice of topic is independent of that objective. Sometimes the topics will be related to computational problems in biology, chemistry, or physics,...

  • You need not run Python programs on a computer in solving the following problems. Place your...

    You need not run Python programs on a computer in solving the following problems. Place your answers into separate "text" files using the names indicated on each problem. Please create your text files using the same text editor that you use for your .py files. Answer submitted in another file format such as .doc, .pages, .rtf, or.pdf will lose least one point per problem! [1] 3 points Use file math.txt What is the precise output from the following code? bar...

  • 18.1 Lab Lesson 11 (Part 1 of 1) Part of lab lesson 11 There in one...

    18.1 Lab Lesson 11 (Part 1 of 1) Part of lab lesson 11 There in one part to lab lesson 11. The entire lab will be worth 100 points. Lab lesson 11 part 1 is worth 100 points For part 1 you will have 80 points if you enter the program and successfully run the program tests. An additional 20 points will be based on the style and formatting of your C++ code. Style points The 20 points for coding...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT