0

Consider the set of bitstrings $x\in\{0,1\}^{n+k}$ with $n$ zeros and $k$ ones with the additional condition that no ones are adjacent. (For $n=3$ and $k=2$, for example, the legal bitstrings are $00101$, $01001$, $01010$, $10001$, $10010$, and $10100$.) Prove by induction on $n$ that the number of such bitstrings is $\binom{n+1}k$.

I believe that the base case ends up being something like what I wrote below, and I want to use strong induction, but I am having a hard time figuring out, I suppose, what how to determine the number of valid bitstrings so that I can prove that it is equal to $\binom{n+1}k$. enter image description here

  • Consider placing $k$ tens and then enough zeroes to compensate. Then also consider what if the final bit were a $1$ without a zero following. – JMoravitz Apr 07 '20 at 23:59
  • Are you actually required to use induction? I ask because there is a much simpler argument. – Brian M. Scott Apr 07 '20 at 23:59
  • @BrianM.Scott yes, I am required to use induction, I am currently working on using n=3 and k=2 as the base case since it is provided and working from there – ccptmkvamiokzyoclp Apr 08 '20 at 00:01

1 Answers1

2

HINT: If you must do it by induction, you can do a double induction on $k$ and $n$: for each $k$ prove the result for that $k$ by induction on $n$, assuming that it’s true for all smaller values of $k$.

Note that $\binom{n+1}k=\binom{n}k+\binom{n}{k-1}$. Try to see why the number of acceptable strings with $n+1$ zeroes and $k$ ones is the number with $n$ zeroes and $k$ ones plus the number with $n$ zeroes and $k-1$ ones; considering the last bit of an acceptable string of $n+1$ zeroes and $k$ ones may help.

Added:

Let $\Bbb N$ be the set of non-negative integers, and let $a(n,k)$ be the number of allowable strings with $n$ zeroes and $k$ ones; we want to show that $a(n,k)=\binom{n+1}k$ for all $n,k\in\Bbb N$. Because two independent integer variables are involved, we’ll do this as a double induction. For $k\in\Bbb N$ let $P(k)$ be the assertion that $a(n,k)=\binom{n+1}k$ for all $n\in\Bbb N$; we’ll prove the statements $P(k)$ by induction on $k$, and the proof of each $P(k)$ (except $P(0)$) will itself be a proof by induction on $n$.

To get started, we first prove $P(0)$, i.e., that $a(n,0)=\binom{n+1}0$ for each $n\in\Bbb N$. This is easy: for any $n\ge 0$ there is only one string of $n$ zeroes and no ones, and it is allowable, so $a(n,0)=1=\binom{n+1}0$ for each $n\in\Bbb N$.

For the induction step we want to show that $P(k)$ implies $P(k+1)$. That is, we want to show that if $a(n,k)=\binom{n+1}k$ for each $n\in\Bbb N$, then $a(n,k+1)=\binom{n+1}{k+1}$ for each $n\in\Bbb N$. We’ll do this by induction on $n$. To get the induction started, what is $a(0,k+1)$? It’s the number of allowable strings with no zeroes and $k+1$ ones. If $k=0$, there is exactly one such string, the string $1$, so $a(0,1)=1=\binom11$, as desired. And if $k>0$, then $k+1\ge 2$, and there are no such strings; thus, $a(0,k+1)=0=\binom1{k+1}$, again as desired. This takes care of the base case.

For the induction step suppose that $a(n,k+1)=\binom{n+1}{k+1}$; we want to show that $a(n+1,k+1)=\binom{n+2}{k+1}$. We’ll do this by dividing the allowable strings with $n+1$ zeroes and $k+1$ ones into two categories and counting the members of those categories separately. The first category consists of the allowable strings that have $n+1$ zeroes and $k+1$ ones and end in $0$. If you remove that final $0$, what’s left? What remains is an allowable string with $n$ zeroes and $k+1$ ones. Conversely, if you start with an allowable string with $n$ zeroes and $k+1$ ones and add a $0$ at the end of the string, you get an allowable string with $n+1$ zeroes and $k+1$ ones. Thus, there is a bijection between the set of allowable strings with $n+1$ zeroes and $k+1$ ones that end in $0$ and the set of allowable strings with $n$ zeroes and $k+1$ ones. There are $a(n,k+1)$ of the latter, and by the induction hypothesis $a(n,k+1)=\binom{n+1}{k+1}$, so

  • the number of allowable strings with $n+1$ zeroes and $k+1$ ones that end in $0$ is $\binom{n+1}{k+1}$.

What about the allowable strings with $n+1$ zeroes and $k+1$ ones that end in $1$? Each of those strings must actually end in $01$, since an allowable string cannot end in $11$. What is left if we remove that final $01$? It must be an allowable string with $n$ zeroes and $k$ ones. Conversely, if we start with an allowable string with $n$ zeroes and $k$ ones, we can always add $01$ at the end to get an allowable string with $n+1$ zeroes and $k+1$ ones that ends in $1$. This means that there is a bijection between the set of allowable strings with $n+1$ zeroes and $k+1$ ones that end in $1$ and the set of allowable strings of $n$ zeroes and $k$ ones. There are $a(n,k)$ of the latter, and we’re assuming $P(k)$, so we know that $a(n,k)=\binom{n+1}k$. That is,

  • the number of allowable strings with $n+1$ zeroes and $k+1$ ones that end in $1$ is $a(n,k)=\binom{n+1}k$.

Every allowable string of $n+1$ zeroes and $k+1$ ones ends in either $0$ or $1$, and there is no overlap between these two categories, so

$$\begin{align*} a(n+1,k+1)&=a(n,k+1)+a(n,k)\\ &=\binom{n+1}{k+1}+\binom{n+1}k\\ &=\binom{n+2}{k+1}\;, \end{align*}$$

which is exactly what we wanted. It follows by induction that $a(n,k+1)=\binom{n+1}{k+1}$ for each $n\in\Bbb N$, and we have now proved $P(k+1)$, completing the induction step for the induction on $k$. Thus, we can now conclude that $P(k)$ holds for each $k\in\Bbb N$ and hence that $a(n,k)=\binom{n+1}k$ for all $k,n\in\Bbb N$.

Brian M. Scott
  • 616,228
  • So I understand that I can break up $\binom{n+1}k$ into $\binom{n}k$ and $\binom{n}{k-1}$. The first part is the case right before the one I am proving, so I know that it must be the number of valid bitstrings of n-1 and b. I guess I am struggling with the algebra portion of simplifying.. – ccptmkvamiokzyoclp Apr 08 '20 at 00:36
  • @ccptmkvamiokzyoclp: If you know that $\binom{n+1}k=\binom{n}k+\binom{n}{k-1}$, there’s no algebra involved. All that’s needed is to divide the acceptable strings of $n+1$ zeroes and $k$ ones into two sets, one of which has exactly as many members as there are acceptable strings with $n$ zeroes and $k$ ones, while the other has exactly as many members as there are acceptable strings with $n$ zeroes and $k-1$ ones. As a further hint, the two sets are determined by the last bit of the string: those that end in $1$ go into one of the sets, and those that end in $0$ go into the other. – Brian M. Scott Apr 08 '20 at 00:42
  • I'm sorry, I am still getting confused. I know that $\binom{n}k$ is the number of valid bitstrings with n-1 zeros and k ones, something that is assumed in the inductive hypothesis, but I don't understand the second part, or am I looking at this completely wrong, but this is how I was generally taught to prove with induction, break down the current case into a prior one, which is assumed, $plus$ a new one, which can be combined back to form the function or equation that we are trying to prove. – ccptmkvamiokzyoclp Apr 08 '20 at 00:54
  • @ccptmkvamiokzyoclp: I suspect that the problem is that you’re working with too limited a notion of how proofs by induction can work and are trying to fit this one to an inappropriate model. I’ll be more specific. Show that the number of acceptable strings with $n+1$ zeroes and $k$ ones that end in $0$ is the same as the number of acceptable strings with $n$ zeroes and $k$ ones. Then show that the number of acceptable strings with $n+1$ zeroes and $k$ ones that end in $1$ is the same as the number of acceptable strings with $n$ zeroes and $k-1$ ones. Conclude that there are ... – Brian M. Scott Apr 08 '20 at 01:02
  • @ccptmkvamiokzyoclp: ... $\binom{n}k+\binom{n}{k-1}$ acceptable strings of $n+1$ zeroes and $k$ ones. – Brian M. Scott Apr 08 '20 at 01:02
  • I'm sorry again, I just don't know how I would show that. I just would need to show how both of those equalities stand because added together they are what I am trying to prove, but I have no clue how I can do the other part. – ccptmkvamiokzyoclp Apr 08 '20 at 01:19
  • @ccptmkvamiokzyoclp: I have to stop for a while now to fix and eat dinner. I think that it might be best if I simply turn my answer into a complete solution, because I’m coming to suspect that you may never have seen the kind of argument that’s needed here. If you check back in an hour or two, I should have got to it by then. – Brian M. Scott Apr 08 '20 at 01:25
  • Thanks for all of your help and I'm sorry that I still don't understand it. I feel that I learn best if I can walk through a problem or two before having to do them on my own, but my professor seems to think we know these concepts without going over them in class and working through some problems together. – ccptmkvamiokzyoclp Apr 08 '20 at 01:32
  • @ccptmkvamiokzyoclp: I’ll try to write it up as a fairly complete walk-through. – Brian M. Scott Apr 08 '20 at 01:33