260
Sets, Combinatorics, and Probability
21. In one state, automobile license plates must have two digits (no leading zeros) followed by one letter
followed by a string of two to four digits (leading zeros are allowed). How many different plates are
possible?
22. A Hawaiian favorite fast food is the “loco moco,” invented at a Hilo restaurant. It consists of a bed of rice
under a meat patty with egg on top, the whole thing smothered in brown gravy. The rice can be white or
brown, the egg can be fried, scrambled, or poached, and the meat can be hamburger, Spam, Portuguese sausage, bacon, turkey, hot dog, salmon, or mahi. How many different loco mocos can be ordered?
23. A customer at a fast-food restaurant can order a hamburger with or without mustard, ketchup, pickle,
or onion; a fish sandwich with or without lettuce, tomato, or tartar sauce; and a choice of 3 kinds of soft
drinks or 2 kinds of milk shakes. How many different orders are possible if a customer can order at most
1 hamburger, 1 fish sandwich, and 1 beverage but can order less?
24. How many unique ways are there to stack two 2 × 4 Lego bricks of the same color? Two stacks that look
the same if you merely rotate them are considered to be the same arrangement. Here is one such stack, the
original on top and the same stack after rotating 180°.
25. What is the value of Count after the following pseudocode has been executed?
Count = 0
for i = 1 to 5 do
for Letter = ‘A’ to ‘C’ do
Count = Count + 1
end for
end for
26. What is the value of Result after the following pseudocode has been executed?
Result = 0
for Index = 20 down to 10 do
for Inner = 5 to 10 do
Result = Result + 2
end for
end for
Exercises 27–32 concern the set of three-digit integers (numbers between 100 and 999 inclusive).
27. How many are divisible by 5?
28. How many are divisible by 4?
29. How many are not divisible by 5?
30. How many are divisible by 4 or 5?
31. How many are divisible by 4 and 5?
32. How many are divisible by neither 4 nor 5?
Précédent

- 277/986

Suivant