Showing posts with label Counting. Show all posts
Showing posts with label Counting. Show all posts

Monday, January 12, 2009

Problem Solving - 56

A certain stock exchange designates each stock with a one- , two-,or three-letter code ,where each letter is selected from the 26 letters of the alphabet. If the letter may be repeated and if the same letters used in a different order constitute a different code, how many different stocks is it possible to uniquely designate with these codes?

A) 2951

B) 8125

C) 15600

D) 15302

E) 18278


Answer: E

Total ways to pick a 3 letter code = 26*26*26 = 26^3
Total ways to pick a 2 letter code = 26*26 = 26^2
Total ways to pick a 1 letter code = 26

Thus total stocks: 26^3 + 26^2 + 26 = 26(26^2 + 26 + 1) = 18278

Wednesday, April 11, 2007

Problem Solving - 19

How many 5 digit numbers can be created if the following terms apply: the leftmost digit is even, the second is odd, the third is a non even prime and the fourth and fifth are two random digits not used before in the number?

a) 2520
b) 3150
c) 3360
d) 6000
e) 7500



Answer: Given OA - A is incorrect ... ans is 2688 which is not an option in the choices...

When 2nd and 3rd digit gets repeated:

The first digit will be a non zero even (2, 4, 6, 8) = 4 ways
3rd digit is a non even prime = (3, 5, 7) = 3 ways
2nd digit is a REPEAT of that prime: 1 way
the fourth digit has not been used: 8 ways
the fifth digit has not been used: 7 ways

Hence 4*3*8*7 = 672 ways

Now, the non repeating case:

1st digit will be a non zero even (2, 4, 6, 8) = 4 ways
3rd digit (3, 5, 7) = 3 ways
2nd (no repeat and odd) = 4 ways
4th digit = 7
5th digit = 6

Hence 4*3*4*7*6 = 2016

Total number of ways = 2016 + 672 = 2688 ways


Note:
1).
1 is neither a prime nor a composite number.
2).
2 is the only even prime number.

Thursday, March 22, 2007

Problem Solving - 16

Six mobsters have arrived at the theater for the premiere of the film “Goodbuddies.” One of the mobsters, Frankie, is an informer, and he's afraid that another member of his crew, Joey, is on to him. Frankie, wanting to keep Joey in his sights, insists upon standing behind Joey in line at the concession stand. How many ways can the six arrange themselves in line such that Frankie’s requirement is satisfied?

(A) 6
(B) 24
(C) 120
(D) 360
(e) 720

Answer : D

Frankie wants to keep Joe in his sights, therefore Joe will always be ahead of F in the queue. (take care this doesnot implies that Joe and Frankie will be together)

1. Frankie is in last position in the queue, then Joe can be in any position from 1 to 5 = 5!

2. Frankie is in the 5th position in the queue then Joe can be in any of the positions 1 to 4 (positions ahead of Frankie) i.e 4 ways and rest of mobsters will be positioned in rest 4 places (4!) ways. = 4*4!

3. Frankie is in the 4th position then Joe can be take any place between 1 to 3 (positions ahead of Frankie) 3 ways and rest of the mobsters will be positioned in rest of 4 places i.e 4!ways. = 3*4!

4. Frankie is in the 3rd position then Joe can be in 1 or 2 places (i.e positions ahead of Frankie) 2 ways and rest of mobsters will be positioned in rest of the 4 places (4!) ways. = 2*4!

5. Frankie is in placed in the 2nd position then Joe can only be in 1st position i.e only position ahead him i.e 1 way and rest of mobsters will be placed in the rest of the 4 places (4!) ways. = 1*4!

Thus total no of ways = 5! + ( 4 * 4! ) + ( 3 * 4! ) + ( 2 * 4! ) + ( 1 * 4! ) = 360



Monday, February 26, 2007

Problem solving - 14

Larry, Michael, and Doug have five donuts to share. If any one of the men can be given any whole number of donuts from 0 to 5, in how many different ways can the donuts be distributed?

(A) 21
(B) 42
(C) 120
(D) 504
(E) 5040


Answer - A -- generally answer for such questions is the sum of the series of integers from 1 to n+1 where n = number of items to be distributed.
In this ques n = 5, thus the answer is 21.
For n = 6 it will be 28. For n = 7 it will be 36.....


However here is the explanation based on the counting method...

1) 1 person gets all 5 donuts -
Possibility: 3.

2). 2 persons get all 5 donuts -
The one without donuts - possibility - 3.
The other 2 persons have 4 ways.
Hence in total -- 3*4 = 12.

3). All have donuts -
The way to divide can only be - 1, 2, 2; 1, 3, 1
But this arrangement can get interchanged midst 3 persons, hence it becomes --
(3!)/ (2) + (3!)/ (2) = 6.

(3!)/ (2) is needed because donuts are all same without difference.
3! is counting the same arrangement twice.

Hence the answer - 3 + 12 + 6 = 21.