Let $A = \{1, 2, 3\}$. Write down all the permutations of $A$. Suppose $B = \{1, 2, 3, 4\}$. How many permutations of B are there?

629 Views Asked by At

Let $A = \{1, 2, 3\}$. Write down all the permutations of $A$. Suppose $B = \{1, 2, 3, 4\}$. How many permutations of B are there? How would you generate all permutations of $B$ in a systematic way, given all the permutations of A?


Solution:

All permutations of A: $(a) \{(1,2,3), (1,3,2), (2,1,3), (2,3,1), (3,1,2), (3,2,1)\}$.

If $B = \{1,2,3,4\}$, then $4!$ would give you total permutations totaling too $4 \cdot 3 \cdot 2 \cdot 1 = 24$

"How would you generate all permutations of $B$ in a systematic way, given all the permutations of A?"

Given a particular permutation from A, say $(a_1, a_2, a_3)$ you would generate $4$ permutations by list $(4, a_1, a_2, a_3), (a_1, 4, a_2, a_3), (a_1, a_2, 4, a_3), (a_1, a_2, a_3, 4)$

2

There are 2 best solutions below

0
On

Your solution is fine so far. For the last part, take any permutation of $A$, say $(2,3,1)$. In how many spots can you put the $4$?

2
On

When you are given a particular permutation of $A$, say $(1,2,3)$.

View it as $$\square 1 \square 2 \square3 \square$$

You can place $4$ in one of the empty space and remove the unused space.

Also, note that by doing so won't cause any repetition over different permutation of $A$ since the order of that permutation is fixed.