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
Write a recursive function the computes the number of digits in a positive integer n. For example if n = 6598, the function should return 4. Find a variant expression and a thresho

Question 1 Explain how the shuttle sort algorithm works by making use of the following list of integers:11, 4, 2, 8, 5, 33, 7, 3, 1, 6. Show all the steps. Question 2

One of the main problems with the linear queue is the lack of appropriate utilization of space. Assume that the queue can store 100 elements & the complete queue is full. Thus, it

Q. The given values are to be stored in a hash table 25, 42, 96, 101, 102, 162, 197 Explain how the values are hashed by using division technique of hashing with a table

B Tree Unlike a binary-tree, every node of a B-tree may have a variable number of keys and children. The keys are stored in non-decreasing order. Every key has an associated ch

DEPTH FIRST SEARCH (DFS) The approach adopted into depth first search is to search deeper whenever possible. This algorithm frequently searches deeper through visiting unvisite

Difference between array and abstract data types Arrays aren't abstract data types since their arrangement in the physical memory of a computer is an essential feature of their

Suppose you are given the results of 5 games of rock-paper-scissors. The results are given to you on separate pieces of paper; each piece says either 'A' if the first person won, o

Ordinary variable An ordinary variable of a easy data type can store a one element only

The time required to delete a node x from a doubly linked list having n nodes is O (1)