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;
}
}
Subscribe to:
Post Comments (Atom)
2 comments:
it is very nice but can you please explain the terms J, I in the program or algorithm. it seems somewhat difficult to understand
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
Post a Comment