Representation of arrays?, Data Structure & Algorithms

A representation of an array structure is a mapping of the (abstract) array with elements of type T onto the store which is an array with elements of type BYTE. The array could be mapped in such a way that the computation of addresses of array elements is as simple as possible. The address i of the j-th array elements is computed by the linear mapping function

i = i0 + j*s

where i is the address of the first element, and s is the number of words that a element occupies. Assuming that the word is the smallest personally transferable unit of store, it is evidently highly needed that s be a whole number value, the simplest case being s = 1. If s is not a whole number, then s is generally rounded up to the next larger integer S. Each array component then accepts S words, whereby S-s words are left unused. Rounding up of the number of words required to the next whole number is called padding. The storage utilization factor u is the quotient of the minimal amounts of storage required to represent a structure and of the value actually used:

 

684_Representation of Array.png

Posted Date: 7/27/2012 6:18:24 AM | Location : United States







Related Discussions:- Representation of arrays?, Assignment Help, Ask Question on Representation of arrays?, Get Answer, Expert's Help, Representation of arrays? Discussions

Write discussion on Representation of arrays?
Your posts are moderated
Related Questions
Colouring The use of colours in CAD/CAM has two main objectives : facilitate creating geometry and display images. Colours can be used in geometric construction. In this case,

Q. Write down any four applications or implementation of the stack.                                     Ans. (i)       The Conversion of infix to postfix form (ii)

What do you mean by hash clash? Hashing is not perfect. Occasionally, a collision occurs when two different keys hash into the same hash value and are assigned to the same arra

Explain how two dimensional arrays are represented in memory. Representation of two-dimensional arrays in memory:- Let grades be a 2-D array as grades [3][4]. The array will

Regis lives in Brazil and frequently travels to USA, Japan and Europe. He wants to be able to convert Brazilian Reais into US dollars, European euros and Japanese yen. Conversion f

compare two functions n and 2n for various values of n. determine when second becomes larger than first

Question: (a) Discuss the importance of game theory to decisions. (b) Explain the following: (i) saddle point, (ii) two-person zero-sum game. (c) Two leading ?rms, ABC Ltd a

Link list representation of a circular queue is more efficient as it employs space more competently, of course with the added cost of storing the pointers. Program 7 gives the link

Board coloring , C/C++ Programming

Write an algorithm to test whether a Binary Tree is a Binary Search Tree. The algorithm to test whether a Binary tree is as Binary Search tree is as follows: bstree(*tree) {