2345_2019-Spring-HW6-Enumeration-Solutions.pdf - Math 2345 \u2013 Discrete Mathematics Homework 6 Enumeration Solutions Due Date Monday(beginning of class

# 2345_2019-Spring-HW6-Enumeration-Solutions.pdf - Math 2345...

• Homework Help
• 5

This preview shows page 1 - 3 out of 5 pages.

Math 2345 – Discrete Mathematics Homework 6: Enumeration Solutions Due Date: Monday, April 08, 2019 (beginning of class) Problem 6.1 (Dinner Choices).Suppose a charity event serves a prix fixe dinner that consists of one from eachcategory: (1) soup or salad (not both), (2) appetizer, (3) entree, (4) dessert, and (5) beverage. The restaurantis offering five kinds of soup, three kinds of salad, four kinds of appetizers, six entrees, five desserts, and fourbeverages. How many different prix fixe dinners are possible? Problem 6.2 (Combination Lock).A combination lock requires three selections of numbers, each from 1through 39.Suppose the lock is constructed in such a way that no number can be used twice in a row butthe same number may occur both first and third.For example, 20, 13, 20 would be acceptable, but 20, 20,13 would not. How many different combinations are possible? (Note the common word “combination” in thiscontext does not mean the same thing as combination does in Problem 6.6. Here order matters and repetition isallowed.) Problem 6.3 (Loop Iterations).Consider the following algorithm segment:for i :=1 to 4:for j := 1 to i:[Statements in body of inner loop. None contain branching statements that leadoutside the loop.]next jnext iHow many times will the inner loop be iterated when the algorithm is implemented and run? Answer the samequestion if the first line is replaced with “for i := 1 to n:” wherenis a positive integer. 2
Homework 6: Enumeration Solutions