Design and Implementation of an Efficient Algorithm Using Data Structures: A Recipe for the Structured Process Called Top Down Programming (original) (raw)

Data structures & their algorithms

1991

I. INTRODUCTION PROGRAMMING AS AN ENGINEERING ACTIVITY. Computer Science Background. Memory and Data in Von Neuman Computers. Notation for Programs Locatives. Abstract Data Types. Mathematical Background. Finite and Infinite Series. Logarithms, Powers, and Exponentials. Order Notation. Recurrence Relations. Naive Probability Theory. II. ALGORITHM ANALYSIS. Properties of an Algorithm. Effectiveness Correctness. Termination Efficiency. Program Complexity. Exact vs. Growth-Rate Analysis. Principles of Mathematical Analysis. Expected Case and Amortized Analysis. Algorithm Paradigms. Brute-Force and Exhaustive Search. Greedy Algorithms. Dynamic Programming. NP Completeness. III. LISTS. List Operations. Basic List Representations. Stack Representation in Contiguous Memory. Queue Representation in Contiguous Memory. Stack Representation in Linked Memory. Queue Representation in Linked Memory. Stacks and Recursions. List Representations for Traversals. Doubly Linked Lists. IV. TREES BASIC D...

Data Structures and Algorithms

users.utcluj.ro

A collection of values that share a common set of operations is called a data type. Structured or composite data types are collections of individual data items of the same or different data types. Data structures are collections of variables, possibly of different data types, connected in various ways. High-level languages prior to Pascal usually limited their concepts of data types to those provided directly by hardware (integers, reals, double precision integers and reals, and blocks of contiguous locations). Two objects had different types if it was necessary to generate different code to manipulate them. Pascal and later languages have taken a rather different approach, based on the concept of abstract data types. An abstract data type is a programming language facility for organizing programs into modules using criteria that are based on the data structures of the program. Also, an abstract data type can be defines as a set of values and a set of procedures that manipulate those values. The specification of the module should provide all information required for using the type, including the allowable values of the data and the effects of the operations. However, details about the implementation, such as data representations and algorithms for implementing the operations, are hidden within the module. This separation of specification from implementation is a key idea of abstract data types.

Fundamental of data structure

The field of computer science is so new that one feels obliged to furnish a definition before proceeding with this book. One often quoted definition views computer science as the study of algorithms. This study encompasses four distinct areas: (i) machines for executing algorithms--this area includes everything from the smallest pocket calculator to the largest general purpose digital computer. The goal is to study various forms of machine fabrication and organization so that algorithms can be effectively carried out. (ii) languages for describing algorithms--these languages can be placed on a continuum. At one end are the languages which are closest to the physical machine and at the other end are languages designed for sophisticated problem solving. One often distinguishes between two phases of this area: language design and translation. The first calls for methods for specifying the syntax and semantics of a language. The second requires a means for translation into a more basic set of commands. (iii) foundations of algorithms--here people ask and try to answer such questions as: is a particular task accomplish able by a computing device; or what is the minimum number of operations necessary for any algorithm which performs a certain function? Abstract models of computers are devised so that these properties can be studied. (iv) analysis of algorithms--whenever an algorithm can be specified it makes sense to wonder about its behavior. This was realized as far back as 1830 by Charles Babbage, the father of computers. An algorithm's behavior pattern or performance profile is measured in terms of the computing time and space that are consumed while the algorithm is processing. Questions such as the worst and average time and how often they occur are typical. We see that in this definition of computer science, "algoalgorithm" is a fundamental notion. Thus it deserves a precise definition. The dictionary's definition "any mechanical or recursive computational procedure" is not entirely satisfying since these terms are not basic enough. Definition: An algorithm is a finite set of instructions which, if followed, accomplish a particular task.

Data structures and algorithm analysis

2011

We study data structures so that we can learn to write more efficient programs. But why must programs be efficient when new computers are faster every year? The reason is that our ambitions grow with our capabilities. Instead of rendering efficiency needs obsolete, the modern revolution in computing power and storage capability merely raises the efficiency stakes as we attempt more complex tasks. The quest for program efficiency need not and should not conflict with sound design and clear coding.