M4maths
Maths Puzzle
Programming
Program
In a company there are 2/6 java programmer, 1/2 programmers knows c++ and 1/5 programmer doesn't know anything. Then find the fraction of programmers who knows java and c++ both.
Read Solution (Total 5)
-
- 1/30 is the answer.
Suppose X number of programers are there in the Company then,
No. of Programers knows JAVA=x/3
No. of Programers knows C++=x/2
Using, n(A Union B)=n(A)+n(B)-n(A intersection B)
We have,
n(A Union B)x/3+x/2-n(A intersection B)
Therefore No. of Person who don't know any language are ,
x-{x/3+x/2-n(A intersection B)}=1/5..........(1)
on solving (1),We Have
n(A intersection B)=x/30 - 10 years agoHelpfull: Yes(0) No(1)
- let us consider 'A' for java programmers
'B' for c++ programmers
p(A)=2/6
p(B)=1/2
p('A'intersection'B')=1/5
p(AUB)=2/6+1/2-1/5
=4/5 - 10 years agoHelpfull: Yes(0) No(0)
- there is another possibility for this question
the common factor for 6,2,5 is 30
so,just we assume that 'company have 30 programmers'
then::::::- java programmers are:10(1/3 form 30=10)
C++ programmers are:15(1/2 from 30=15)
don't know programmers:6(1/5 from 30=6)
so,
30-6=24
know both programs=24/30
=4/5
- 10 years agoHelpfull: Yes(0) No(0)
- oh know! they are just confusing........
P(A)=1-P(A`)
P(both)=1-P(none)
=1-(1/5)
=4/5
- 10 years agoHelpfull: Yes(0) No(0)
- 1-(1/5)=4/5 know something.(2/6+1/2)=5/6 know java or c++ or both.5/6-4/5=1/30
ans is 1/30.
- 10 years agoHelpfull: Yes(0) No(0)
M4maths Other Question