Note that there are some explanatory texts on larger screens.

plurals
  1. POComputer logic problem
    primarykey
    data
    text
    <p>Consider a multilevel computer in which all the levels are different. Each level has instructions that are m times as powerful as those of the level below it; that is, one level r instruction can do the work of m level r – 1 instructions, If a level 1 program requires k seconds to run, how long would equivalent programs take at levels 2, 3, and 4, assuming n level r instructions are required to interpret a single r+1 instruction?</p> <p>This is the solution I came up with. Can anyone confirm or comment?</p> <p>This is the solution I wound up coming up with. Can anyone verify or comment?</p> <pre><code>Level (r) Level-1 Instructions (m) Time 4 m^3 t(q) ==(m^3q+n+nm+nm^2) (k/q) 3 m^2 t(q) =(m^2q+n+nm)(k/q) 2 m t(q) = (mq+n)(k/q) 1 1 t(q) = k </code></pre> <p>In order to calculate runtime t(q) for a given program containing q level-1 instructions, we must take into account both the exponentially-increasing number of level-1 instructions each level r instruction represents (shown as m^(r-1)) and the additional number of level-1 instructions required for interpretation for each layer on which the program is executed (shown as nm^(r-1)). The additional level-1 instructions used for interpretation by the lower levels must also be added into the final equations for r>2. Finally, for each equation we can determine the number of seconds the program takes to run by multiplying the total number of level-1 instructions used by the execution time of one level-1 cycle, as calculated by (k/q).</p> <p>Disclaimer: This IS homework, the assignment has already been handed in. I simply cannot get the semantics of this problem, and I would really like to understand it.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload