Method 1:
There are 5! = 120 ways for 5 people to line up, without restrictions.
For 5 people to line up with 2 specific people standing next to each other, consider these 2 people as a "block" and the other 3 people as single units. There are 4! = 24 ways of arranging the "block" and 3 single units, and 2! = 2 ways of arranging the 2 people within the "block". So there are 24*2 = 48 ways for 5 people to line up with 2 specific people standing next to each other.
Therefore, there are 120 - 48 = 72 ways for 5 people to line up with 2 specific people *not* standing next to each other.
Method 2:
We first choose the positions of the 2 people who won't stand next each other. There are 6 possibilities: 1st & 3rd positions, 1st & 4th positions, 1st & 5th positions, 2nd & 4th positions, 2nd & 5th positions, and 3rd & 5th positions.
Once the positions of these 2 people are chosen, then there are 2! = 2 ways of arranging these 2 people in the chosen positions.
Then, there are 3! = 6 ways of arranging the other 3 people in the remaining 3 positions.
Therefore, there are 6*2*6 = 72 ways for 5 people to line up with 2 specific people *not* standing next to each other.
Lord bless you today!
There are 5! = 120 ways for 5 people to line up, without restrictions.
For 5 people to line up with 2 specific people standing next to each other, consider these 2 people as a "block" and the other 3 people as single units. There are 4! = 24 ways of arranging the "block" and 3 single units, and 2! = 2 ways of arranging the 2 people within the "block". So there are 24*2 = 48 ways for 5 people to line up with 2 specific people standing next to each other.
Therefore, there are 120 - 48 = 72 ways for 5 people to line up with 2 specific people *not* standing next to each other.
Method 2:
We first choose the positions of the 2 people who won't stand next each other. There are 6 possibilities: 1st & 3rd positions, 1st & 4th positions, 1st & 5th positions, 2nd & 4th positions, 2nd & 5th positions, and 3rd & 5th positions.
Once the positions of these 2 people are chosen, then there are 2! = 2 ways of arranging these 2 people in the chosen positions.
Then, there are 3! = 6 ways of arranging the other 3 people in the remaining 3 positions.
Therefore, there are 6*2*6 = 72 ways for 5 people to line up with 2 specific people *not* standing next to each other.
Lord bless you today!
-
5!/3!