I am trying to solve the following problem in preparation for an exam I'm taking. Here it is: "Suppose that a self-organizing vector has 7 elements , ABCDEFG initially in this order (A is the front element), and suppose that the vector is organized by the move-to-front reordering algorithm. Determine the order of elements after the lookup sequence GGDED." Any help would be great. Thanks, Roger
Joe Pluta
Ranch Hand
Joined: Jun 23, 2003
Posts: 1376
posted
0
I don't have a clue what all the terms mean, but my common sense approach tells me that it means that every time you look something up, it ends up in the front. So: ABCDEFG Lookup (G), put (G) in the front: GABCDEF G again: GABCDEF (already in front) Lookup D: DGABCEF Lookup E: EDGABCF Lookup D: DEGABCF Not sure, but that looks right to me. Joe
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to
run our stuff on 16 servers instead of 3.