The problem asks for the number of ways 5 people can be seated in a row such that two specific people, A and B, are not seated next to each other. We can solve this using the principle of complementary counting in permutations.
First, find the total number of ways to arrange 5 distinct people in a row without any restrictions. This is calculated using the factorial of the number of people.
Total arrangements = $5!$
$ 5! = 5 \times 4 \times 3 \times 2 \times 1 = 120 $
There are 120 distinct ways to seat 5 people in a row.
Next, we calculate the number of arrangements where A and B *are* seated next to each other. We can treat A and B as a single combined unit or block.
Consider the block (AB). Now we have 4 items to arrange: the block (AB) and the other 3 people (C, D, E). The number of ways to arrange these 4 items is $4!$.
$ 4! = 4 \times 3 \times 2 \times 1 = 24 $
Within the block (AB), A and B can switch positions (AB or BA). There are $2!$ ways to arrange A and B within the block.
$ 2! = 2 \times 1 = 2 $
The total number of arrangements where A and B sit together is the product of these two calculations:
Arrangements (A and B together) = (Ways to arrange 4 items) $\times$ (Ways to arrange A and B within the block)
$ \text{Ways (Together)} = 4! \times 2! = 24 \times 2 = 48 $
To find the number of ways A and B are *not* together, we subtract the number of arrangements where they *are* together from the total number of arrangements.
Arrangements (A and B not together) = Total Arrangements - Arrangements (A and B together)
$ \text{Ways (Not Together)} = 120 - 48 = 72 $
The total number of ways to seat 5 people is 120. The calculation shows that there are 48 ways for A and B to sit together, and 72 ways for A and B *not* to sit together.
The value 48 corresponds to the specific scenario where A and B are adjacent in the seating arrangement.
The following figure is made with nine squares of length 1 cm each.

A student is standing at point P. The total number of shortest paths to reach point Q from point P, if the student walks along the boundaries of the squares only, is:
Consider the following statements (all the angles are measured in degrees) :
1. If two supplementary angles are $4x + 40$ and $10x$, then $x$ is;
2. The complementary angle of $\frac{4}{5} \times 45$ is :
3. If two complementary angles are in the ratio of $4 : 5$, then the smallest angle is :
Which of the following is correct?
Codes:
1 2 3
A rectangular wall is divided into four squares of equal size where there are two rows each having two squares. The top left square is coloured with green. If, including green, there are three colours available and each square is coloured using any one of these three colours such that no two adjacent squares get painted with the same colour; then how many colour combinations are possible ?