FET Forum

FET Support (English) => Programming Help => Topic started by: ahmedzaalan on May 16, 2011, 05:10:45 AM

Title: please tell me about the difference between this
Post by: ahmedzaalan on May 16, 2011, 05:10:45 AM
please tell me about the difference between
The maximum depth (level) of recursion is 14.
and
The maximum number of recursive calls is 2*nInternalActivities

and what dose you mean by nInternalActivities
thank you
Title: Re: please tell me about the difference between this
Post by: Liviu Lalescu on May 16, 2011, 05:27:35 AM
Please see http://lalescu.ro/liviu/fet/doc/en/generation-algorithm-description.html , step 2 d), and come back here if things are still unclear.

nInternalActivities is the number of active activities, which must be scheduled.
Title: Re: please tell me about the difference between this
Post by: ahmedzaalan on May 16, 2011, 08:25:22 AM
do you mean by The maximum depth (level) of recursion like this:
{swap(x,y)
   swap(x,y)
      swap(x,y)
         swap(x,y)
            swap(x,y)
              ....
               ........14 times}
and do you mean by The maximum number of recursive calls {calls to the function that lead to recursion}???
Title: Re: please tell me about the difference between this
Post by: Liviu Lalescu on May 16, 2011, 11:50:58 AM
Quotedo you mean by The maximum depth (level) of recursion like this:
{swap(x,y)
   swap(x,y)
      swap(x,y)
         swap(x,y)
            swap(x,y)
              ....
               ........14 times}

Yes.

Quote
and do you mean by The maximum number of recursive calls {calls to the function that lead to recursion}???

At level 0, you have to place an activity, A_i. (This is done more times, at least nInternalActivities times). When you start for A_i, at level 0, make count=0. Each call to swap(x,y) will increment count.

Is it clear now?
Title: Re: please tell me about the difference between this
Post by: ahmedzaalan on May 16, 2011, 12:35:36 PM
yes thanks a lot