these logical operations are available on all digital computersand moreover they operate concurrently on all corresponding elements (bitsof word it therefore appears that in order to be able to implement the basic set operations in an efficient mannersets must be represented in smallfixed number of words upon which not only the basic logical operationsbut also those of shifting are available testing for membership is then implemented by single shift and subsequent (signbit test operation as consequencea test of the form in { ncan be implemented considerably more efficiently than the equivalent boolean expression ( or ( or or ( na corollary is that the set structure should be used only for small integers as elementsthe largest one being the wordlength of the underlying computer (minus the file or sequence another elementary structuring method is the sequence sequence is typically homogeneous structure like the array that isall its elements are of the same typethe base type of the sequence we shall denote sequence with elements by is called the length of the sequence this structure looks exactly like the array the essential difference is that in the case of the array the number of elements is fixed by the array' declarationwhereas for the sequence it is left open this implies that it may vary during execution of the program although every sequence has at any time specificfinite lengthwe must consider the cardinality of sequence type as infinitebecause there is no fixed limit to the potential length of sequence variables direct consequence of the variable length of sequences is the impossibility to allocate fixed amount of storage to sequence variables insteadstorage has to be allocated during program executionnamely whenever the sequence grows perhaps storage can be reclaimed when the sequence shrinks in any casea dynamic storage allocation scheme must be employed all structures with variable size share this propertywhich is so essential that we classify them as advanced structures in contrast to the fundamental structures discussed so far whatthencauses us to place the discussion of sequences in this on fundamental structuresthe primary reason is that the storage management strategy is sufficiently simple for sequences (in contrast to other advanced structures)if we enforce certain discipline in the use of sequences in factunder this proviso the handling of storage can safely be delegated to machanism that can be guaranteed to be reasonably effective the secondary reason is that sequences are indeed ubiquitous in all computer applications this structure is prevalent in all cases where different kinds of storage media are involvedi where data are to be moved from one medium to anothersuch as from disk or tape to primary store or vice-versa the discipline mentioned is the restraint to use sequential access only by this we mean that sequence is inspected by strictly proceeding from one element to its immediate successorand that it is generated by repeatedly appending an element at its end the immediate consequence is that elements are not directly accessiblewith the exception of the one element which currently is up for inspection it is this accessing discipline which fundamentally distinguishes sequences from arrays as we shall see in the influence of an access discipline on programs is profound the advantage of adhering to sequential access whichafter allis serious restrictionis the relative simplicity of needed storage management but even more important is the possibility to use effective buffering techniques when moving data to or from secondary storage devices sequential access allows us to feed streams of data through pipes between the different media buffering implies the collection of sections of stream in bufferand the subsequent shipment of the whole buffer content once the buffer is