Introduction to Algorithms
Introduction to Algorithms
3rd Edition
ISBN: 9780262033848
Author: Thomas H. Cormen, Ronald L. Rivest, Charles E. Leiserson, Clifford Stein
Publisher: MIT Press
Question
Book Icon
Chapter C, Problem 1P

(a)

Program Plan Intro

To argue that numbers of ways of placing the balls in bins is bn .

(a)

Expert Solution
Check Mark

Explanation of Solution

Given information:

The n balls are distinct and their order within bin doesn’t matter.

Explanation:

There can be b different decisions made for n balls about their placement. The total number of possibilities is just bn as the number of possible decisions about the n balls placement is independent of previous choices.

(b)

Program Plan Intro

To prove that there are exactly (b+n1)!(b1)! ways to place the balls in the bins.

(b)

Expert Solution
Check Mark

Explanation of Solution

Given information:

It is assumed that balls are distinct and that balls in each bin are ordered.

Explanation:

First assume that sticks can be distinguished. This implies that there are total of n balls and b1 sticks to be arranged. This makes total things to be arranged as n+b1 and number of ways to do this is (b+n1)! . However some of these arrangements will be same and no matter how b1 sticks are arranged the answer will remain same. Thus n distinct balls and b1 indistinct sticks can be arranged in (n+b1)!(b1)! ways.

This arrangement can be related with the original statement, where sticks can be imagined as dividing lines between bins and ordered balls between them can be imagined as ordered balls in each bin.

(c)

Program Plan Intro

To show that (b+n1n) represents the numbers of ways of placing the balls in the bins.

(c)

Expert Solution
Check Mark

Explanation of Solution

Given information:

The balls are identical and their order within a bin does not matter.

Explanation:

Using results from above two parts, it can be noticed that any of the n permutation of balls will result in the similar configuration. Thus, count from the previous parts must be divided by n! . Thus number of permutations left are (n+b1)!n!(b1)!=(n+b1n) .

(d)

Program Plan Intro

To show that number of ways of placing the balls is (bn) based on condition that nb .

(d)

Expert Solution
Check Mark

Explanation of Solution

Given information:

The balls are identical and no bin may contain more than one ball.

Explanation:

Here, a set of bins to contain balls is selected,as each bin can have a ball or not. The numbers of bins selected is n since number of non-empty bins and the numbers of balls must be equal. In other words, a subset of size n of the bins is being selected from the whole set of bins. This becomes the combinatorial definition of (bn) defined in terms of selecting subsets.

(e)

Program Plan Intro

To show that number of ways of placing the balls is (n1b1) based on condition that nb .

(e)

Expert Solution
Check Mark

Explanation of Solution

Given information:

The balls are identical and no bin may be left empty.

Explanation:

The condition is to put one ball in each bin as no bin can be left empty. Thus there are nb balls left. Now since each bin has at least one ball, so balls can be put into the bins with no further restriction. This is similar to case shown in part c. The main difference being that the number of balls to be distributed is nb rather than n. Thus the answer becomes ((nb)+b1nb)=(n1nb)=(n1(n1)(nb))=(n1b1) .

Want to see more full solutions like this?

Subscribe now to access step-by-step solutions to millions of textbook problems written by subject matter experts!
Students have asked these similar questions
4.Answer the question below .
CT ser.
The rook is a chess piece that may move any number of spaces either horizontally or vertically. Consider the “rooks problem” where we try to place 8 rooks on an 8x8 chess board in such a way that no pair attacks each other. a. How many different solutions are there to this?b. Suppose we place the rooks on the board one by one, and we care about the order in which we put them on the board. We still cannot place them in ways that attack each other. How many different full sequences of placing the rooks (ending in one of the solutions from a) are there?
Knowledge Booster
Background pattern image
Similar questions
SEE MORE QUESTIONS
Recommended textbooks for you
Text book image
Database System Concepts
Computer Science
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:McGraw-Hill Education
Text book image
Starting Out with Python (4th Edition)
Computer Science
ISBN:9780134444321
Author:Tony Gaddis
Publisher:PEARSON
Text book image
Digital Fundamentals (11th Edition)
Computer Science
ISBN:9780132737968
Author:Thomas L. Floyd
Publisher:PEARSON
Text book image
C How to Program (8th Edition)
Computer Science
ISBN:9780133976892
Author:Paul J. Deitel, Harvey Deitel
Publisher:PEARSON
Text book image
Database Systems: Design, Implementation, & Manag...
Computer Science
ISBN:9781337627900
Author:Carlos Coronel, Steven Morris
Publisher:Cengage Learning
Text book image
Programmable Logic Controllers
Computer Science
ISBN:9780073373843
Author:Frank D. Petruzella
Publisher:McGraw-Hill Education