Блог пользователя Ram_Negative

Автор Ram_Negative, история, 7 лет назад, По-английски

Today i tried to solve this problem

the simplified version of the problem is no ways of assigning 2 different objects in n different places. so in this problem 2 different objects are carrot and baby carrot. we are given no of places

we have to print no ways of plant this two different carrots in n places .

how to solve this ?

  • Проголосовать: нравится
  • +3
  • Проголосовать: не нравится

»
7 лет назад, # |
Rev. 5   Проголосовать: нравится 0 Проголосовать: не нравится

Number of spanning trees in complete bipartite graph GX, Y is : XY - 1 × YX - 1

X : is the number of nodes in the first set.

Y : is the number of nodes in the second set.

Reference

Now you should sum the answer of every (X,Y)

x = 1, y=n-1

x = 2, y=n-2

...

then multiply it by the number of permutations which is equal to n! because you have n item and all of then are distinguishable.