### Basics Concepts and Formulas in Permutations and Combinations

Hemant

2015-10-25 09:58:31

How do I generate Permutation dynamically where number of position are dynamic and per position possible option is again dynamic?

e.g. I want to pick up 4 number (here 4 number is dynamic) n1n2n3n4

and again for each number position i.e. 1 to 6 possible option will be dynamic.

1 st number could be = 1,2,3

2nd number could be = 1

3rd number could be = 1,2

4th number could be = 5,6,7

any algorithm get all those permutation?

e.g. I want to pick up 4 number (here 4 number is dynamic) n1n2n3n4

and again for each number position i.e. 1 to 6 possible option will be dynamic.

1 st number could be = 1,2,3

2nd number could be = 1

3rd number could be = 1,2

4th number could be = 5,6,7

any algorithm get all those permutation?

Shiksha

2015-01-12 18:17:16

Hi,

I have a question, if we have 6 white balls, 3 blue balls and 2 Red balls and we have to pick a selection 4?

a) how many combinations it will be?

b) if always 2 white have to be selected from 4 then how many combinations possible?

I have a question, if we have 6 white balls, 3 blue balls and 2 Red balls and we have to pick a selection 4?

a) how many combinations it will be?

b) if always 2 white have to be selected from 4 then how many combinations possible?

Shraya

2015-08-17 17:09:13

a). Your head question and part a both depict the same. Picking any four irrespective of the color.

So, 6 + 3 + 2 = 11.

11C4 = @@\dfrac{11!}{4!×(11-4)!}=11×10×3=330@@

b) The 2nd part i think you didn't give a clarity. Out of 4 if at least two must be white.

then,

picking 4 whites out of 6 whites = 6C4

picking 3 whites with 1 blue or red = 6C3 × 3C1 × 2C1

picking 2 whites with 2 blue = 6C2 × 3C2

picking 2 whites with 2 red = 6C2 × 2C2

picking 2 whites with 1 red 1 blue = 6C2 × 3C1 × 2C1

Now multiply all.

So, 6 + 3 + 2 = 11.

11C4 = @@\dfrac{11!}{4!×(11-4)!}=11×10×3=330@@

b) The 2nd part i think you didn't give a clarity. Out of 4 if at least two must be white.

then,

picking 4 whites out of 6 whites = 6C4

picking 3 whites with 1 blue or red = 6C3 × 3C1 × 2C1

picking 2 whites with 2 blue = 6C2 × 3C2

picking 2 whites with 2 red = 6C2 × 2C2

picking 2 whites with 1 red 1 blue = 6C2 × 3C1 × 2C1

Now multiply all.

Support, careerbless.com

2015-08-17 16:47:51

This question has been moved to Discussion Board. Click here to view.

Pankaj Sharma

2015-08-07 11:52:03

as coming to your que 1

1) we can select any 4 balls out of (6B,3B,2R) so total combinations are 11C4

2)now in the second part exactly 2 balls are white so combinations are 6C2*5C2

1) we can select any 4 balls out of (6B,3B,2R) so total combinations are 11C4

2)now in the second part exactly 2 balls are white so combinations are 6C2*5C2

Guglani

2015-08-17 15:53:00

i got the point i.e 6C2, here you select 2 balls from all six white balls,

but u can have all the white balls also, i.e 4.

i think there would be 6C2*9C2 ??

isn't it !!!

but u can have all the white balls also, i.e 4.

i think there would be 6C2*9C2 ??

isn't it !!!

Asif

2015-08-23 06:47:38

when we select 6C2, for the next selection we will not consider those 6 white balls...therefore next selection will be from remaining 5 balls out of 11 balls..ie 5C2..ans might be 6C2*5C2

Gaurav Dobriyal

2015-01-23 15:40:35

6 3 2

w b r

2 1 1 = No. of ways arrangement is done.

1 2 1

1 1 2

Thus 6c2+3c1+2c1+6c1+3c2+2c1+6c1+3c1+2c2 = 15+3+2+6+3+2+6+3+1=41

if always 2 white then

6c2+3c1+2c1 = 15+3+2=20

Rajesh

2015-01-25 04:45:07

But shouldn't it be 11c4 for (a).

the combinations could also be

6 3 2

w b r

0 3 1

4 0 0

2 2 0

and so on.. Nowhere it is mentioned that all colours need to be picked.So it can be done by 11C4 rite..?11c4=330

and for (b) shouldn't it be 6c2*3c1*2c1 + 6c2* 3c2 + 6c2*2c2

Kindly correct me if I am wrong...

the combinations could also be

6 3 2

w b r

0 3 1

4 0 0

2 2 0

and so on.. Nowhere it is mentioned that all colours need to be picked.So it can be done by 11C4 rite..?11c4=330

and for (b) shouldn't it be 6c2*3c1*2c1 + 6c2* 3c2 + 6c2*2c2

Kindly correct me if I am wrong...

Gaurav Dobriyal

2015-01-24 17:18:52

sorry the signs went wrong this one is correct

6c2*3c1*2c1+6c1*3c2*2c1+6c1*3c1*2c2 = 90+36+18 = 144

and

if always 2 white then

6c2*3c1*2c1=15*3*2=90

Add a new comment... (Use Discussion Board for posting new aptitude questions.)

Name:

Email: (optional)

2 + 4 =
(please answer the simple math question)

Post Your Comment