120k views
0 votes
6.1 1 a) and b) Let x be a string of length n, and let y be a string of length n − k, for 1 ≤ k < n. We wish to line up the symbols in x with the symbols in y by adding k blanks to y. a) Suppose that we decide to add the k blanks in one continuous block. How many ways are there to do this? b) Suppose that we add two separate blocks of blanks, one of size i and one of size k − i, for 1 ≤ i < k. How many ways are there to do this?

User Luan Nico
by
3.4k points

1 Answer

2 votes

Answer:

A) N-k+1 possible ways

B) 8 ways ( different outcomes )

Explanation:

A) length of X = n

length of Y = n - k

number of ways to add k blanks in one continuous block

that would be n - k +1 and this because since we already have n-k blanks in y already

B ) how many ways to add two separate blocks of blanks

one size is ; i

one size ; k - i

The number of ways will be 8 since the block of blanks are separated into two blocks

User Ahmed Bermawy
by
4.0k points