Monday, April 14, 2008

2.control abstraction for ordering

2. Write Control abstraction for greedy method by using ordering paradigm?
Ans .
The general rule is that program i is stored on tape Ti mod m .on any given tape the programs are stored in nondecreasing order of their lengths

Greedy method control abstraction for the ordering paradigm

Algorithm store(n,m)
{
J=0;
For i=1 to n do
{
Write(“append program”,I,”to permutation for tape”,j);
J=(j+1) mod m;
}
}

2 comments:

kurdush said...

it is very nice but can you please explain the terms J, I in the program or algorithm. it seems somewhat difficult to understand

kurdush said...

your website also pretty cool because in other websites if want to see answer first we should login... but you sorted that problem.. 🤗🤗👍👍
good luck bro