Open In App

Puzzle – Arranging Balls in a row

Last Updated : 22 Feb, 2023
Improve
Improve
Like Article
Like
Save
Share
Report

We have a bag currently with 4 Red, 4 Blue, and 4 Green Balls. Now a game wants us to arrange 12 balls in a row, such that it follows the below two conditions:

  • No two balls of the same color can be adjacent to each other.
  • The first and last balls in the row must be of different colors. 

Can you find a solution to this puzzle?

4 Red, 4 Blue, and 4 Green Balls we have.

4 Red, 4 Blue, and 4 Green Balls we have.

Solution:

First, we must determine the possible combinations of the first and last balls in the row that meet the condition that they must be of different colors. There are three possible combinations: Red-Green, Green-Blue, and Blue-Red.

Now, we can approach the problem by first arranging the 4 red balls, 4 blue balls, and 4 green balls in separate groups. Then, we can arrange the groups of balls such that no two balls of the same color are adjacent to each other.

Here’s a possible arrangement of the balls:

Red – Green – Blue – Green – Red – Blue – Red – Green – Blue – Green – Red – Blue

One of the possible solutions - "RGBGRBRGBGRB"

One of the possible solutions – “RGBGRBRGBGRB”

In this arrangement, the first and last balls are Red and Blue, respectively, which is one of the possible combinations that meet the condition.

We can verify that this arrangement meets the condition that no two balls of the same color are adjacent to each other:

  • There are no two adjacent Red balls, Green balls, or Blue balls. 
  • The first ball is Red and the second ball is Green, so the first and second balls are of different colors.
  • The eleventh ball is Red and the twelfth ball is Blue, so the eleventh and twelfth balls are of different colors.
  • Therefore, the arrangement meets both conditions.

There may be other possible arrangements that meet the conditions of the puzzle, but this is one example of a solution.


Like Article
Suggest improvement
Share your thoughts in the comments

Similar Reads