[algogeeks] Re: amazon questions

2011-01-13 Thread Jammy
@snehal 1. Both are valid. 2. see taocp's sol. The probability of selecting AB to shoot is 1/3, so is BC,AC If AB were selected, the probability of hitting the target is (1- probability of both of them missed) = (1-(1-P(A)(1-P(B)), similar with case BC and AC. On Jan 11, 11:58 am, snehal jain wro

[algogeeks] Re: amazon questions

2011-01-12 Thread awesomeandroid
@snehal i think for first question both statement are correct.when you declare const char * cpp then you can not change the value pointed by this pointer(using this variable),however you can change where it was pointing. Thanks and Regards Priyaranjan code-forum.blogspot.com On Jan 11, 9:58 pm, s

[algogeeks] Re: amazon questions

2011-01-12 Thread awesomeandroid
@snehal i think for first question both statement are correct.when you declare const char * cpp then you can not change the value pointed by this pointer(using this variable),however you can change where it was pointing. On Jan 11, 9:58 pm, snehal jain wrote: > 1. what is valid in cpp > char *cp;

[algogeeks] Re: amazon questions

2011-01-11 Thread taocp
(1-(1-p(a))(1-p(b)) + 1-(1-p(b))(1-p(c)) + 1- (1-p(a))(1-p(c)))/3 On 1月12日, 上午9时36分, ankit agarwal wrote: > it is (p(a)p(b)+p(b)p(c)+p(c)p(a))/3 > > On Jan 12, 1:51 am, SVIX wrote: > > > > > anuragh > > > assume each can shoot the target everytime... > > P(A) = 1 > > P(B) = 1 > > P(C) = 1 >

[algogeeks] Re: amazon questions

2011-01-11 Thread ankit agarwal
it is (p(a)p(b)+p(b)p(c)+p(c)p(a))/3 On Jan 12, 1:51 am, SVIX wrote: > anuragh > > assume each can shoot the target everytime... > P(A) = 1 > P(B) = 1 > P(C) = 1 > > per your logic, the probability that the target will be hit is 3 > actually, it should have only been 2 as we're going to p

[algogeeks] Re: amazon questions

2011-01-11 Thread SVIX
anuragh assume each can shoot the target everytime... P(A) = 1 P(B) = 1 P(C) = 1 per your logic, the probability that the target will be hit is 3 actually, it should have only been 2 as we're going to pick only 2 people out of 3 to shoot... I think you should factor in the probability th

[algogeeks] Re: amazon questions

2011-01-11 Thread anurag.singh
For 2nd question (probability): Looks like one data is missing for C. If I assume C can shoot 8 out of 10. times then: P(A) = 4/5 P(B)=6/7 P(C)=8/10 Required Probability should be = P(A) * P(B) + P(B) * P(C) + P(A) * P(C) On Jan 11, 9:58 pm, snehal jain wrote: > 1. what is valid in cpp > char *