3

How many 20-digit numbers can be formed from {${1,2,3,4,5,6,7,8,9}$} such that no 2 consecutive digit is both odd. (Repetition allowed)

I've noticed that the number of odd digit in the number must be less than 11. But i can't progress more than that.

Any help is appreciated. Thanks in advance.

RAPTOR
  • 33
  • 1
    What did you tried? – MH.Lee Nov 04 '21 at 07:44
  • 1
    Try answering these questions. 1.) How many odd numbers can you have at most? 2.) Assume you have $k$ odd numbers, to how many positions can you distribute them? 3.) How many possible values for odd digits and even digits do you have in this case? – Andreas Lenz Nov 04 '21 at 07:45
  • I've tried the method used in here https://math.stackexchange.com/questions/2425493/how-many-6-digit-numbers-have-distinct-digits-but-no-consecutive-digits-both-odd but it doesn't seem to work – RAPTOR Nov 04 '21 at 07:48
  • I've also tried @AndreasLenz method. I tried to work with the case where the number of odd digits is 1,2,3... but the number of cases is too much – RAPTOR Nov 04 '21 at 07:50
  • The comment of @AndreasLenz may well be a better approach than what I am going to suggest. I suggest using Inclusion-Exclusion. See also the first part only of this answer for guidance in setting up an Inclusion-Exclusion framework. ...see next comment – user2661923 Nov 04 '21 at 07:51
  • I would create variables $A_1, A_2, \cdots, A_{19}$, where $A_k$ represents the set of all possible $20$ digit numbers that have two consecutive odd digits, starting in position $k$. Then, the problem reduces to enumerating $\left|A_1 \cup A_2 \cup \cdots \cup A_{19}\right|.$ – user2661923 Nov 04 '21 at 07:52
  • An alternative approach that may or may not be workable, and might be easier is recursion. That is, how many $2$ digit numbers are there such that there is no occurrence of $2$ consecutive odd digits? Then, how many such $3$ digit numbers are there? Then, if $f(n)$ is the number of such $n$ digit numbers, what is the relationship between $f(n)$ and $f(n+1)$. This approach might allow you to manually enumerate $f(2), f(3), \cdots, f(19), f(20)$. Note that it is not uncommon for a problem such as the one that you posted to yield to either Inclusion-Exclusion or recursion. – user2661923 Nov 04 '21 at 07:58
  • @RAPTOR Counting 2.) is not possible by hand. Are you aware of the method of stars and bars? In particular the case, where the bins are not allowed to be empty is of interest to you (see https://en.wikipedia.org/wiki/Stars_and_bars_(combinatorics)#Theorem_one_2) – Andreas Lenz Nov 04 '21 at 08:04
  • Thanks for the help, i will let you know if i need anything else – RAPTOR Nov 04 '21 at 08:07

1 Answers1

2

Hint. Let $x_n$ be the number of $n$-digit numbers which can be formed from $\{1,2,3,4,5,6,7,8,9\}$ such that no two consecutive digits are both odd.

We split $x_n$ into two parts: $a_n$ counts the numbers where the last digit is odd and $b_n$ counts the ones where the last digit is even. Then $x_n=a_n+b_n$.

Moreover we can easily check that $a_1=5$, $b_1=4$, $a_2=4\cdot 5=20$, $b_2=9\cdot4=36$.

Is there any recurrences which involve $a_n$, $b_n$, $a_{n+1}$ and $b_{n+1}$? Can you take it from here?

Robert Z
  • 145,942