Discrete Mathematics with Applications 4th Edition

Published by Cengage Learning
ISBN 10: 0-49539-132-8
ISBN 13: 978-0-49539-132-6

Chapter 4 - Elementary Number Theory and Methods of Proof - Exercise Set 4.4 - Page 190: 47

Answer

a. $7614$ b. $n=4(i-1)+(j-1)=4i+j-5$ c. $r=(n\div 4)+1$ and $s=(n \mod 4)+1$

Work Step by Step

a. We count to see that $a_{22}$ is the sixth entry. Intuitively, we use the sum $7609+0$ to get the first entry, $7609+1$ to get the second, and, in general, $7609+(n-1)$ to get the memory location of the "nth" entry. Therefore, we have the place of $a_{22}$ as $7609+(6-1)=7609+5=7614$. b. We let $L(a_{ij})$ designate the memory location of entry $a_{ij}$. We add one memory place for every column to the left and four memory places for every row above a given entry, beginning at $7609$. This yields the formula $L(a_{ij})=7609+n$$=7609+4(i-1)+(j-1)-5$, so we have $n=4(i-1)+(j-1)-5=4i+j-5$. c. If $a_{rs}$ is stored in memory location $7609+n$, then by the quotient-remainder theorem, $n=$$4(n\div\ 4) + (n\ mod\ 4)$$=4m+n$ for some unique values $m$ and $n$. However, $m$ and $n$ begin at zero, not one, so we let $r=m+1$ and $s=n+1$ to get the correct formulas. Note that we let $4$ be our divisor since each row has $4$ entries.
Update this answer!

You can help us out by revising, improving and updating this answer.

Update this answer

After you claim an answer you’ll have 24 hours to send in a draft. An editor will review the submission and either publish your submission or provide feedback.