0
$\begingroup$

There are 3 types of balls black, white and green. Find the number of ways of arranging $n$ such balls such that

  • black, white adjacent pairs occur $a$ times,
  • black, green adjacent pairs occur $b$ times,
  • green, black adjacent pairs occur $c$ times,
  • green, white adjacent pairs occur $d$ times,
  • white, green adjacent pairs occur $e$ times,
  • white, black adjacent pairs occur $f$ times,
  • $0\le a,b,c,d,e,f\le 10$, and
  • $n \le 100000$.

Is there a better approach to this problem than what I have already done?

My approach:

Suppose $n = 10$; I am going for $1$ condition at a time.

  1. All are zero, so we left with $3$ permutations i.e. $BBB\dotso$ $n$ times, $WWW\dotso$ $n$, and $GGG\dotso$ $n$.

  2. All are $1$. Then we can have $6(n-1)$ permutations, e.g. if there are only black ($B$) and white ($W$) balls, then permutations will be like $BBBBBWWWWW$ or $BWWWWW$, or something like $\dotso BW\dotso$, so $(n-1)$.

  3. Some of my observations are that there will not be any permutations which contain (ONLY) any of these following pairs: $BW$ and $BG$ not possible because $BW\dotso BG$ should also contain some other pairs to coexist like $WB$ or $BWWWBG$. So in this way only 2 pairs available are: $$ BW\dotso WG \\ BG\dotso GW \\ GW\dotso WG \\ GB\dotso BG \\ WB\dotso BW \\ WG\dotso GB \\ $$ for a total of $6$ pairs and they can only exist only $1$ time. So this type of permutations will be $x(n-1)$ where $x$ is the number of pairs that can be formed, since there are different values for each of them.

In this way I trying to figure out all other possibilities. I need a better solution which gives me permutations when $a,b,c,d,e,f$ are given.

$\endgroup$
6
  • $\begingroup$ please show your effort $\endgroup$
    – Lee
    Commented Jul 7, 2020 at 5:35
  • $\begingroup$ I tried it checking one condition at a time. 1. If all the limits are zero then number of possible arrangements will be 3 either BBBBB , GGGGGG, or WWWWW. 2. one more thing BG cannot coexist only with BW there will be at least 1 G-B or 1 G-B and 1BW and 1GW I was trying to solve it in this way but thought there must be some easier way to do this. $\endgroup$ Commented Jul 7, 2020 at 6:51
  • $\begingroup$ @Lee I have updated with my approach $\endgroup$ Commented Jul 7, 2020 at 7:53
  • $\begingroup$ Is the arrangement linear or circular? $\endgroup$
    – user
    Commented Jul 8, 2020 at 13:49
  • $\begingroup$ @user Arrangement is linear $\endgroup$ Commented Jul 8, 2020 at 14:09

0

You must log in to answer this question.