2

In the book titled 'Combinatorics- A Guided Tour' by David Majur', there is stated on pg. #18, #19 regarding a case of misapplication of product principle, for the problem of counting number of $4$ lists from $[9]$ having at least one pair of adjacent elements equal.

The $3$ steps are :
1. Which of the $3$ possible adjacent elements are equal. It may be :
(i) the first two,
(ii) the second & third,
(iii) the last two.
Any number of adjacent elements can be equal from min. of $2$ to max. of $4$.
The maximum number of adjacent locations can be : $3$.

2 . Specify the value of those equal elements, from the set of values $[1-9]$.

3 . Specify the value of other elements, i.e. again from the set of values $[1- 9]$.

The product of these gives : $3*9*9^2 = 2187$ (denoted by let, $a$) is wrong as fails to account for the common cases generated again as shown by the below examples.

(i) $aabc$ generates $aa11$ to $aa99$, i.e. a total of $9*9=81$ lists.
This is shown with $a=4$ for $aabc$ list type as below: $$4411, 4412, 4413, 4414, 4415, \cdots, 4497, 4498, 4499$$

(ii) Common cases between lists of form $aabc$ & $abbc$:
This is shown for $abbc$ list type as below: $$1441, 1442, 1443, 1444, 1445, \cdots, 9447, 9448, 9449$$

(ii) Common cases between lists of form $aabc$ & $abcc$:
This is shown for $c=9$ for $abcc$ list type as below: $$1199, 1299, 1399, 1499, 1599, \cdots, 9799, 9899, 9999$$

The correct solution approach is by subtracting the case of :'No adjacent equal equal elements in $4$ lists taken from $[9]$ = $9.8^3$', from the case of 'all possible $4$ lists from $[9] = 9^4$'.
This leads to : $9^4 - 9.8^3$ leading to correct count $(let, b=)1953$.


I tried the detailed analysis for the reason for incorrect count ($a=2187$), & the difference ($c = a-b = 2187-1953 = 234$) below:
The wrong approach takes three possible positions of adjacent equal elements, & ignores the common permutations generated by other pairs of adjacent equal elements, as say :
$aabc$ ignores many common elements as below for the particular case of $a=1, b,c = [1-9]$

Let us take $a=1$ case, for sample case below:

  1. $a=b$: These cases are common to those generated by the cases when first three positions have equal elements.
    $1112, 1113, 1114, 1115, 1116, 1117, 1118, 1119,$ i.e. a total of $8$ cases;
  2. $a=b=c$: These cases are common to those generated by the cases when all four positions have equal elements.
    $1111,$ i.e. a total of $1$ case;
  3. $b=c$ : $1122, 1133, 1144, 1155, 1155, 1166, 1177, 1188, 1199,$ i.e. a total of $8$ cases.

The sum of the $3$ cases above = $8+1+8=17$.
For the $9$ values possible for $a$, have $17*9 = 153$ values.

Still need $81 = (234 - 153)$ values more.

Next consider that similar error occurs for $abbc, abcc$ list types.
Also, have only $9$ possible numbers for $aabc$, with $a=b=c$ & they have been all accounted in case $2$ above.

For the rest $81$ values by the analysis of common extra cases generated by $abbc, abcc$ list types, see as below:

1 . There are $9$ cases given by the lists of type $abbc$ with $b=c$.

2 . There are $72$ lists of the type given by $abcc$ with $a=b\ne c$, as there are $8$ such cases for each of the $9$ values of $c$.

Siong Thye Goh
  • 149,520
  • 20
  • 88
  • 149
jiten
  • 4,524
  • I'm downvoting and flagging because of the links to outside sources and general uncomprehensibility of the question. – Matt Sep 03 '18 at 10:30
  • @Matt I constructed the question's wording in half an hour plus, after had attempted on paper. It required many re-framing of the words used. So, request you to reconsider your downvote. – jiten Sep 03 '18 at 10:33
  • 2
    I understand. My reasoning for the downvote is that without visitting your outside links, the question is incomprehensible. I stand by that, because I think that you should include those things from your link in the body of the question itself. – Matt Sep 03 '18 at 10:54
  • @Matt Unable to modify, please see the (now incomprehensible) edit at: https://i.stack.imgur.com/21SkU.png – jiten Sep 03 '18 at 12:46

1 Answers1

1

We shouldn't be looking for $234$ objects that are counted multiple times, because there are only $225$ of them.

Define $A$, $B$, $C$ those sets of elements where their first two, second two, and the last two positions are to be the same respectively.

We have $|A|+|B|+|C|=2187$.

but actually, the quantity of interest is

$$|A|+|B|+|C|- [|A \cap B| + |B \cap C| + |A \cap C| -|A \cap B \cap C| ]=1953$$

We have

$$|A \cap B| + |B \cap C| + |A \cap C| -|A \cap B \cap C| = 234$$

Note that

  • $(A \cap B) \setminus (A \cap B \cap C), $
  • $(B \cap C) \setminus (A \cap B \cap C)$
  • $(A \cap C) \setminus (A \cap B \cap C), $
  • $A \cap B \cap C$

are disjoint and computing the sum of their cardinality is just computing the quantity of those elements that are counted for more than once.

The quantity that are over counted is

$$|A \cap B| + |B \cap C| + |A \cap C| -2|A \cap B \cap C| = 234- |A \cap B \cap C|$$

$$81+81+81 - 2(9)=234-9=225$$

Those $225$ elements consists of the form of $aaab, aabb, abbb$ where $ a \ne b$ each of them have $72$ elements and $9$ copies of the form of $aaaa$.

$$72 \times 3 + 9 =225$$

Edit:

enter image description here

Let $R_i$ denotes region $i$.

$|A|= \sum_{i \in \{ 1,2,4,5\}}|R_i|$, do the same thing for $|B|$ and $|C|$ and we can see how many times region $5$ is counted.

Siong Thye Goh
  • 149,520
  • 20
  • 88
  • 149
  • Thanks for showing such a nice way to approach the problem. Inclusion-exclusion principle (as also in chap. 3 of the concerned book) is a nice way to show the cases when more than two adjacent elements are equal, i.e. $A∩B = 1,2,3$, $B∩C = 2,3,4$ & $A∩B∩C =1,2,3,4$. But, have confusions as to why $A∩B∩C$ is subtracted twice. May be a simple Venn diagram is needed, or can modify one at: https://i.stack.imgur.com/0U2BK.png – jiten Sep 04 '18 at 03:31
  • 1
    included a venn diagram. – Siong Thye Goh Sep 04 '18 at 03:47
  • By inclusion-exclusion (IE, for short) prin., the common region for sets $A,B,C,$ are given. Each adds the common region of $4$ adj. elements, i.e $A∩B∩C$ (shown by $R_i=5$), in each of $3$ circles. So, this region is added thrice, but subtracted also thrice by $-((A∩B)+(B∩C)+(A∩C))$; so need add $A∩B∩C$ one time more to get $234$. I hope the only alternate way is to take a smaller example, say $[3]$ lists of $5$ elements. I am working on it now. – jiten Sep 04 '18 at 04:03
  • Kindly see the image at : https://i.stack.imgur.com/pnsX0.png for the case of $3$ lists taken from $[5]$ elements. – jiten Sep 04 '18 at 04:51
  • Please help with non-closure of this post, if you feel it is a good one; as there $4$ votes to close it. I feel only $1$ more vote is needed to close it. – jiten Sep 04 '18 at 04:53
  • you have to edit your post to make it such that we don't have to click on a link to read the question. – Siong Thye Goh Sep 04 '18 at 04:57
  • I am re-framing the post for that, although too difficult as increases incomprehensibility too much, as can be seen at : https://i.stack.imgur.com/LQa3d.png. If you feel that is better, will edit the post; else not. But, do you agree by the smaller case taken, that there need not be double subtraction of the common (to all) cases. Hence, $235$ rather than $225$ is the answer for the post. – jiten Sep 04 '18 at 05:16
  • The comprehensible stuff perhaps could be made comprehensible by more formatting? I haven't clicked on the new link yet. Have to do somet stuff. – Siong Thye Goh Sep 04 '18 at 05:18
  • Ok with you $3$ list working. no idea what you are talking about for $235$. – Siong Thye Goh Sep 04 '18 at 06:31
  • Sorry, it is $234$; it ($235$) was an erratum. $234$ is for difference of $9^4 - 9.8^3$, for the question in post. Thanks for editing the post. – jiten Sep 04 '18 at 06:36
  • Please help with my today latest post at : https://math.stackexchange.com/q/2904812/424260. It is about computing the passwords by working through each case. – jiten Sep 04 '18 at 09:13
  • 1
    maybe later tonight if no one answers it. – Siong Thye Goh Sep 04 '18 at 09:20
  • Thanks, but I hope it is morning (if you are in Massachusetts); then might be need wait a long. – jiten Sep 04 '18 at 09:27
  • I still feel need (in-spite of 3 answers) a need for your answer, as am unable to venture into finding all the permutations, as per the selected answer. It may happen that in absence of some more inputs (as expected in your answer), would leave the calculation & take the safe path of Inclusion-exclusion principle, or EGFs; & hence effectively no benefit of placing the post. – jiten Sep 04 '18 at 18:50
  • oh, i didn't think much last night. not sure if i have a different solution for now. – Siong Thye Goh Sep 05 '18 at 01:07
  • I want to know (as given in my comment to the selected answer) why multisets are chosen for case (a), & why combinations for case (b). – jiten Sep 05 '18 at 01:37
  • Please help me with the earlier comment, and am still confused with the doubt raised by using multisets by the selected answer. In fact, the books on combinatorics are so wildly (not widely) different in approach that the book (Combinatorics - A Guided Tour, by David Mazur) is the only one I refer to even when all of them are freely available. – jiten Sep 05 '18 at 08:02