{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

# s1 - Data Structures and Algorithms Solutions to Homework 1...

This preview shows pages 1–3. Sign up to view the full content.

Data Structures and Algorithms Solutions to Homework 1 January 25, 2011 1. Answer each of the following questions. You don’t need to show your work. Questions a-e are based on the scenario that a president, treasurer, and secretary, all different, are to be chosen from a club consisting of 10 people. Calculate the number of different choices of officers possible if a. there are no restrictions. b. A and B will not serve together. c. C and D will serve together or not at all. d. E must be an officer. e. F will serve only if he is president. f. Five separate awards are to be presented to selected students from a class of 30. How many different outcomes are possible if a student can receive any number of awards? g In the above scenario, how many outcomes are possible if each student can receive at most one award? h. True or False ? Ten dogs encounter 8 biscuits. Dogs do not share biscuits! Then assuming that the dogs are distinguishable, but the biscuits are not, there are ( 17 8 ) different ways that the biscuits can be consumed. i. True or False ? In the above question if the dogs and the biscuits both are distin- guishable then the answer is 10 8 . j. True or False ? In the above question if neither the dogs nor the biscuits are distin- guishable then there is only 1 way in which the biscuits can be consumed. k. How many non-empty subsets are there of the set { 1 , 2 ,... ,n } ? Give your answer in closed form. l. How many ways are there to place 8 nonattacking identical rooks on a 8 × 8 chessboard? (In chess two rooks can attack one another if and only if they lie in the same row or the same column of the chess board.) m. Answer the above question if the rooks are distinguishable. n. Answer the above question if there is 1 red, 3 blue, and 4 yellow rooks.

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
2 Solutions to Homework 1 January 25, 2011 o. Consider a group of 50 people. If everyone shakes hand with everyone else, how many handshakes take place? Your answer must be in a closed form. p. A committee of 7, consisting of 2 Republicans, 2 Democrats, and 3 Independents, is to be chosen from a group of 5 Republicans, 6 Democrats, and 4 Independents. How many committees are possible? q. A student has 3 mangoes, 2 papayas, and 2 kiwi fruits. If the student eats one piece of fruit each day, and only the type of fruit matters, in how many different ways can these fruits be consumed? r. How many different strings can be made from the letters AARDVARK , using all the letters, if all three A ’s must be consecutive? s. How many strings of 10 ternary digits (0 , 1 , 2) are there that contain exactly two 0s, three 1s, and five 2s? t. We roll two dice. How many different outcomes are possible if the two dice are distinct? u. How many different outcomes are possible if the two dice are identical? Solution. a. P (10 , 3) = 10! 7! = 720. b. 2 × 3 × P (8 , 2) + P (8 , 3) = 336 + 336 = 672.
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

### Page1 / 9

s1 - Data Structures and Algorithms Solutions to Homework 1...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online