The final sequence should be (0,0),(1,1),(2,3),(3,5),(5,8)...

 (0,0) and (0,1) both finishes in 0 iteration.
 (1,2)->(0,1) and (1,1)->(0,1) both finishes in 1 iteration.
So (0,1) and (1,2) is discarded.

For the rest: (0,1) <- (1,2) <- (2,3) <- (3,5) <- (5,8) <- ...
finishes in:                               2           3          4
     ... iterations respectively.

2011/5/23 Akshata Sharma <akshatasharm...@gmail.com>:
> @tec: the sequence should be like (0,1),(1,1),(1,2),(2,3),(3,5),(5,8)... or
> m i wrong?
>
> On Mon, May 23, 2011 at 11:08 AM, Aakash Johari <aakashj....@gmail.com>
> wrote:
>>
>> Matrix exponentiation can help i think
>>
>> On Sun, May 22, 2011 at 10:36 PM, Akshata Sharma
>> <akshatasharm...@gmail.com> wrote:
>>>
>>> It appers that the problem is just to find the (N+3)th fibonacci number
>>> for given N. Since N is very large, how to find nth fibonaci number for such
>>> a large n??
>>>
>>> On Mon, May 23, 2011 at 7:51 AM, tec <technic....@gmail.com> wrote:
>>>>
>>>> Try thinking backwards.
>>>> (0,1),(1,2),(2,3),(3,5),(5,8),(8,13),...
>>>>
>>>> 2011/5/22 shady <sinv...@gmail.com>:
>>>> > Hey,
>>>> > Can anyone tell how to solve this problem in Spoj ? I went through
>>>> > some material but there all they were discussing was on complexity and
>>>> > not on actual number of iterations.
>>>> > http://www.spoj.pl/problems/MAIN74/
>>>> >
>>>> > Thanks.
>>>> >
>>>> > --
>>>> > 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.
>>
>>
>>
>> --
>> -Aakash Johari
>> (IIIT Allahabad)
>>
>>
>>
>>
>> --
>> 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