Assume that we have arrays that hold eight binary elements e

Assume that we have arrays that hold eight binary elements (each element holds 0 or 1)
and by concatenating the elements of the array we produce an eight-bit string. How
many eight-bit strings can be generated by using arrays that either have 1 0 1 as the first
three elements or have 1 1 0 1 as the first four elements?

Note: You must answer the below counting questions using principle/formula(s). In addition, you
must indicate the principle/formula(s) you use and must show the steps of your calculations. You
must also provide a final number by doing these calculations.

Solution

Total number of possible permutations can be calculated by following principle:

Consider you have 5 positions empty. and you can fill first position by x different ways, second by y,third by z, fourth by u and fifth by v different ways. If we want to find out total number of possiblities for filling these five positions, then it can be calculated as : X x Y x Z x U x V different ways.

As per the question,

there can be two types of strings,

1. 1 1 0 1                  

2. 1 0 1                         

we\'ll find the number of strings of each type seperately and then add it.

1. Since the first four spaces are fixed, their possiblity is 1.

Hence, number of strings that are possible :

1 x 1 x 1 x 1 x 2 x 2 x 2 x 2 = 16 strings.

2.

Since the first three spaces are fixed, their possiblity is 1.

Hence, number of strings that are possible :

1 x 1 x 1 x 2 x  2 x 2 x 2 x 2 = 32 strings.

Now, the total number of strings that are possible are: (type 1) + (type 2)

=> 16 + 32

=> 48 strings.

All the Best. :)

Assume that we have arrays that hold eight binary elements (each element holds 0 or 1) and by concatenating the elements of the array we produce an eight-bit st

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site