maths.free › Combinatorics & Graph Theory › Generating Functions › Another look at distributing apples or folders

Another look at distributing apples or folders

A recurring problem so far in this book has been to consider problems that ask about distributing indistinguishable objects (say apples) to distinct entities (say children).

Another look at distributing apples or folders

A recurring problem so far in this book has been to consider problems that ask about distributing indistinguishable objects (say apples) to distinct entities (say children). We started in by asking how many ways there were to distribute \(40\) apples to \(5\) children so that each child is guaranteed to get at least one apple and saw that the answer was \(C(39,4)\). We even saw how to restrict the situation so that one of the children was limited and could receive at most \(10\) apples. In , we learned how to extend the restrictions so that more than one child had restrictions on the number of apples allowed by taking advantage of the . Before moving on to see how generating functions can allow us to get even more creative with our restrictions, let's take a moment to see how generating functions would allow us to solve the most basic problem at hand.

We could revisit an example from to see that if we wanted to limit a child to receive at most \(4\) apples, we would use \((x+x^2+x^3+x^4)\) as its generating function instead of \(x/(1-x)\), but rather than belabor that here, let's try something a bit more exotic.

The compact form of the solution to suggests that perhaps there is a way to come up with this answer without the use of generating functions. Thinking about such an approach would be a good way to solidify your understanding of a variety of the enumerative topics we have already covered.

The invocation of partial fractions in is powerful, but solving the necessary system of equations and then hoping that the resulting formal power series have expansions we immediately recognize can be a challenge. If had not asked about the general case with \(n\) on the right-hand side of the equation but instead asked specifically about \(n=30\), you might be wondering if it would just be faster to write some Python code to generate all the solutions or more interesting to huddle up and devise some clever strategy to count them. Fortunately, technology can help us out when working with generating functions. In SageMath, we can use the series() method to get the power series expansion of a given function. The two arguments to series are the variable and the degree of the terms you want to truncate. In the cell below, we ask SageMath to expand the generating function from by giving us all the terms of degree at most 30 and then collapsing the rest of the series into its form of big-Oh notation, which we discard by storing the output from series() in a polynomial f(x).

Let's see that the answer agrees with what our formula in the solution to gives us for \(n=30\):

Condensed: the full section is in Keller & Trotter, Applied Combinatorics.

이제 너 계산기는 이것을 해결하지 않지만, 그 조각은 계산 가능합니다. 아래의 하나를 시도하거나 자신의 것을 입력하십시오.

연습 (2)

먼저 종이에 각각을 시도해 보세요. 확인하기 위해 답을 드러내세요. 확인된 답은 각 단계의 솔버에서 열 수 있습니다.

  1. Suppose you are making a generating function for the number of ways to distribute some type of objects, as in the examples of this section. When a recipient can get no objects, what is the constant term in the factor of the generating function that corresponds to that recipient? What is the constant term when a recipient must get at least one object? Briefly explain your reasoning.

  2. Suppose in the country Combinatoria, they use coins with values \(1\), \(2\), \(5\), \(10\), \(20\), \(50\), and \(100\). If you would like to write a generating function in which the coefficient on \(x^n\) is the number of ways to form a collection of coins worth \(n\) subject to the restriction that the number of coins of value \(5\) is one, three, four, or five, what factor would you introduce into your generating function? Briefly explain your reasoning.

자신의 작업을 유지

무료 계정은 모든 수업에 노트를 추가, 당신이 완료 한 기록, 당신이 해결 한 문제를 한 곳에, 그리고 당신이이 페이지에 대해 물어 수업 지도자. 수학 자체는 모두에게 열려 있습니다, 로그인 여부.

가입하기 로그인

여기서 사용된 기호

기호를 탭하면 전체 정의, 이미지 및 각 문자의 의미를 확인할 수 있습니다.

사람들이 묻는 질문

Permutation or combination?

Ask whether order matters. A lock code is a permutation (order matters); a hand of cards is a combination (it does not).

What is a graph in this sense?

Dots (vertices) joined by lines (edges), not a plot. Road maps, social networks and molecules are graphs; questions like "is there a route" and "how few colours" are graph theory.

이 페이지의 일부는 다음에서 변경되었습니다. Keller & Trotter, Applied Combinatorics (CC BY-SA 4.0). 여기서 압축하고 다시 설명; 오류는 우리의.

에 더 Combinatorics & Graph Theory