Introduction to Data Structure and ADT - Abstract Data Types

Introduction to Data Structure and ADT - Abstract Data Types, Rational Number Non primitive data type, Primitive data type

Data is the basic fact or entity that is utilized in calculation or manipulation. There are two different type of data numerical and alpha-numerical data and these two data type defines that the nature of data item under that goes some operations, like integer floating point data character constant and such other data items or data type.

The study of data structure therefore involves two complementary goals. The first goal is to identify and develop the useful mathematical entities and operations. The second goal is to determine representation for those abstract entities and to implement the abstract operations.

In data structure that exit in c the array and structure we are describe the facilitate that are available in c for utilizing these structures of these also focus on the abstract definitions of these data structures how they can be useful in problem solving. 

Data may be single value or it may be set of values weather it is a single value or group of values to be processed must be organized in a particular fashion this organizing in particular fashion. This organization leads the structuring of data.

The data structure is required for organized the data in mathematically way to solve the problems in efficient and effectively manner. The data structure is the building block of program or it is a systematic way of organizing a collection of data in mathematically structure.
A data structure is a specialized format for organizing and storing data. General data structure types include the array, the file, the record, the table, the tree, and so on. Anydata structure is designed to organize data to suit a specific purpose so that it can be accessed and worked with in appropriate ways.
 To develop a program of an algorithm, we should select an appropriate data structure for that algorithm. Therefore algorithm and it's associated data structure from a program will be
Algorithm + Data Structure = Program

 Abstract Data Types

A useful tool for specifying the logical properties of a data type is the abstract data type or simply known as ADT. 

A data type is the collection of data values and set of operations on those values. In defining an abstract data type as a mathematical concept, we are not concerned with space or time efficiency. Those are implementation problems in data structure. 

An abstract data type is a data type whose representation is hidden from, and of no concern to the application code. For example, when writing application code, we don't care how strings are represented; We just declare and manipulate them by using. 

There are two type of fundamental data types which are,

Abstract Data Types 
  • Primitive data type
  • Non primitive data type

Primitive data type

A primitive data type is one that fits the base architecture of the underlying computer such as int, float, and pointer, and all of the variations, thereof such as char short long unsigned float double and etc, are primitive data type.
  1. Integer
  2. Float
  3. Character
  4. Pointer

Non primitive data type

A non-primitive data type is something else such as an array structure or class is known as the non-primitive data type.

The data type that are derived from primary data types are known as non-primitive data type. The non-primitive data types are used to store the group of values.
  1. Array
  2. List
    1. Linear List 
      1. Stack
      2. Queue
    2. Non-linear list
      1. Trees
      2. Graphs 
  3. File

Rational Number

Rational number is any number that can be expressed as the quotient of two integers. 1/2, 3/4, 2/3 and 2 that is 2/1 are all rational number. 

Where sqr(2) and pie are not the rational numbers. A computer usually represent a rational number by it's decimal approximation. 

methods of defining rational number, 


struct rational {

  int n;
  int d;

}

typedef struct {

  int n;
  int d;

} RATIONAL; 

You May Also Like...

Socialize with Us