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
Threaded Binary Tree:- By changing the NULL lines in a binary tree to special links known as threads, it is possible to perform traversal, insertion and deletion without using

Program segment for deletion of any element from the queue delete() { int delvalue = 0; if (front == NULL) printf("Queue Empty"); { delvalue = front->value;

It is a useful tool for indicating the logical properties of data type. It is a collection of values & a set of operations on those values. Methodically, "a TYPE is a set, & elemen

Q. Write down an algorithm to merge the two sorted arrays into the third array. Do  not perform the sort function in the third array.                           Ans: void m

If a Dequeue is implemented via arrays, then this will suffer with the similar problems which a linear queue had suffered. Program 8 gives the array implementation of Dequeue.

A set s is conveniently shown in a computer store by its characteristic function C(s). This is an array of logical numbers whose ith element has the meaning "i is present in s". As

A company is carrying out a survey by observing traffic at a road junction. Every time a car, bus or lorry passed by road junction it was noted down. 10 000 vehicles were counted d

Tree is a widely used data structure employed for representing several problems. We studied tree like a special case of acyclic graph. Though, rooted trees are most prominent of al

implement multiple stacks in an array and write different algorithms to perform operations on it

What is algorithm's Optimality? Optimality  is  about  the  complexity  of  the  problem  that  algorithm  solves.  What  is  the  minimum amount  of  effort  any  algorithm  w