thanx...it was very helpful :)

On Mon, Sep 12, 2011 at 8:46 PM, Piyush Grover <piyush4u.iit...@gmail.com>wrote:

> A can remain same in following cases:
> -> If m, n are equal in all the N iterations
> -> if m, n are equal in N-2 iterations but in 1 iteration m and n both are
> different in that case there should be one iteration where m and n should be
> same as the previous
> iteration so that they are swapped again to the same position.
>
> In the similar fashion if you think, the pairwise similar iteration should
> be there.
> Now, if in all N iterations probability that m = n is: (N/N*N) *
> (1/N)*...(1/N) = (1/N)^N
> two of the iterations have different m and n then probability is: NC2 *
> (1/N)^(N-2) * {(1 - 1/N)* 1/NC2} = NC2 * (1/N)^N * 2
> similarly, four of the iterations have different m and n then probability
> NC4 * (1/N)^(N-4) *{(1 - 1/N) * 1/NC2}^2 = NC4 * (1/N)^N * 2^2
>
> -Piyush
>
>
> On Mon, Sep 12, 2011 at 10:24 PM, payal gupta <gpt.pa...@gmail.com> wrote:
>
>> @piyush..
>> cud u plzz..xplain...n elaborate
>>
>> Regards,
>>
>> Payal Gupta
>>
>>
>> On Mon, Sep 12, 2011 at 10:15 PM, Piyush Grover <
>> piyush4u.iit...@gmail.com> wrote:
>>
>>> Sry i was little wrong:
>>>
>>> nC0*(1/n)^n + nC2 *2*(1/n)^n + nC4*2^2*(1/n)^n+....+nCn*2^(n/2)*(1/n)^n
>>> when n is even
>>>
>>> nC0*(1/n)^n + nC2 *2*(1/n)^n +
>>> nC4*2^2*(1/n)^n+....+nCn-1*2^(n-1/2)*(1/n)^n   when n is odd
>>>
>>>
>>> On Mon, Sep 12, 2011 at 10:08 PM, Piyush Grover <
>>> piyush4u.iit...@gmail.com> wrote:
>>>
>>>> it should be:
>>>>
>>>> (1/n)^n * (1 + 2 + 2^2 + 2^3 +....(n/2)+1 terms) = {2^(1 + n/2) -
>>>> 1}*(1/n)^n   when n even
>>>>
>>>> (1/n)^n * (1 + 2 + 2^2 + 2^3 +....(n-1/2)+1 terms) = {2^(1 + (n-1)/2)  -
>>>> 1}*(1/n)^n   when n is odd
>>>>
>>>>
>>>> -Piyush
>>>>
>>>>
>>>> On Mon, Sep 12, 2011 at 8:01 PM, sandeep nagamalli <
>>>> nsandee...@gmail.com> wrote:
>>>>
>>>>> I think it is 1 / (2N)
>>>>>
>>>>> (1/N) * (1/N)*(N/2) = 1/(2N)
>>>>>
>>>>>
>>>>> On Mon, Sep 12, 2011 at 6:33 PM, Akash Mukherjee 
>>>>> <akash...@gmail.com>wrote:
>>>>>
>>>>>> this is a case, but isnt der a case of circular permutation 2??
>>>>>> what say abt dis
>>>>>> 0,1
>>>>>> 2,3
>>>>>> 4,5
>>>>>> 0,1
>>>>>> 2,3
>>>>>> 4,5
>>>>>>
>>>>>> it wrks i gues??
>>>>>>
>>>>>>
>>>>>> On Mon, Sep 12, 2011 at 12:56 PM, teja bala <
>>>>>> pawanjalsa.t...@gmail.com> wrote:
>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> I think it is 1/N
>>>>>>>
>>>>>>>  let N=6 that means rand(6)= takes values 0-5 i.e 6 values.
>>>>>>> rand(m)=6 values
>>>>>>> rand(n)=6 values
>>>>>>> total combinations 6*6=36 values set but among dem array will change
>>>>>>> only for
>>>>>>> (0,0)(1,1)(2,2)(3,3)(4,4)(5,5)(6,6)=6values of N
>>>>>>>
>>>>>>> So 6/36=1/6
>>>>>>>
>>>>>>> If we generalize it 1/N
>>>>>>>
>>>>>>> correct me if i'm wrong?
>>>>>>>
>>>>>>> --
>>>>>>> You received this message because you are subscribed to the Google
>>>>>>> Groups "Algorithm Geeks" group.
>>>>>>> To post to this group, send email to algogeeks@googlegroups.com.
>>>>>>> To unsubscribe from this group, send email to
>>>>>>> algogeeks+unsubscr...@googlegroups.com.
>>>>>>> For more options, visit this group at
>>>>>>> http://groups.google.com/group/algogeeks?hl=en.
>>>>>>>
>>>>>>
>>>>>>  --
>>>>>> You received this message because you are subscribed to the Google
>>>>>> Groups "Algorithm Geeks" group.
>>>>>> To post to this group, send email to algogeeks@googlegroups.com.
>>>>>> To unsubscribe from this group, send email to
>>>>>> algogeeks+unsubscr...@googlegroups.com.
>>>>>> For more options, visit this group at
>>>>>> http://groups.google.com/group/algogeeks?hl=en.
>>>>>>
>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> Thanks&Regards:
>>>>> -sandeep
>>>>>
>>>>>
>>>>>  --
>>>>> You received this message because you are subscribed to the Google
>>>>> Groups "Algorithm Geeks" group.
>>>>> To post to this group, send email to algogeeks@googlegroups.com.
>>>>> To unsubscribe from this group, send email to
>>>>> algogeeks+unsubscr...@googlegroups.com.
>>>>> For more options, visit this group at
>>>>> http://groups.google.com/group/algogeeks?hl=en.
>>>>>
>>>>
>>>>
>>>  --
>>> You received this message because you are subscribed to the Google Groups
>>> "Algorithm Geeks" group.
>>> To post to this group, send email to algogeeks@googlegroups.com.
>>> To unsubscribe from this group, send email to
>>> algogeeks+unsubscr...@googlegroups.com.
>>> For more options, visit this group at
>>> http://groups.google.com/group/algogeeks?hl=en.
>>>
>>
>>  --
>> You received this message because you are subscribed to the Google Groups
>> "Algorithm Geeks" group.
>> To post to this group, send email to algogeeks@googlegroups.com.
>> To unsubscribe from this group, send email to
>> algogeeks+unsubscr...@googlegroups.com.
>> For more options, visit this group at
>> http://groups.google.com/group/algogeeks?hl=en.
>>
>
>  --
> You received this message because you are subscribed to the Google Groups
> "Algorithm Geeks" group.
> To post to this group, send email to algogeeks@googlegroups.com.
> To unsubscribe from this group, send email to
> algogeeks+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/algogeeks?hl=en.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.

Reply via email to