Theorem : The number of bitstrings with the length $x$ that begin with $1$ and/or end with $0$ is $3 \times 2^{x-2}$.
I know there are easier ways to prove this but I must figure out how to do it with induction.
Theorem : The number of bitstrings with the length $x$ that begin with $1$ and/or end with $0$ is $3 \times 2^{x-2}$.
I know there are easier ways to prove this but I must figure out how to do it with induction.
Copyright © 2021 JogjaFile Inc.
Take a way of writing an $k $ long bit string that is $a_1a_2....a_k $. Create a new $k+1$ long bitstring by sticking in a new bit in the second spot. The new string is $a_1ba_2....a_k $. $ b$ can be either 0 or 1. So there are twice as many ways to create a $k+1$ bitstring as there are to create a $k $ bitstring.
So if there are $N$ ways to do a 2 length bitstring there will be $N*2^{x-2} $ ways to do a $x $ length bit string.
How many ways are there to do a two bit string that either stars with 1 or ends with 0?