Suppose we are to count bit sequences of length $n$ s.t the sequence doesn't contain 3 consecutive 1's
If $P(n)$ is the number of such sequences, is the equality $P(n) = P(n-1) + P(n-2) + P(n-3)$ valid?
If not how do you formulate it recursively?
Suppose we are to count bit sequences of length $n$ s.t the sequence doesn't contain 3 consecutive 1's
If $P(n)$ is the number of such sequences, is the equality $P(n) = P(n-1) + P(n-2) + P(n-3)$ valid?
If not how do you formulate it recursively?
Copyright © 2021 JogjaFile Inc.