Learning data structures-> basic concepts of data structures

Source: Internet
Author: User

Learning data structures-> basic concepts of data structures
==================================

1. data structure definition:
Data Structure is used by computers to store and organize Data. A Data Structure refers to a set of data elements with one or more specific relationships between each other.


2. Some basic terms in the data structure:
1>. data)
Data refers to all objects that computers can accept and process, such as numbers, characters, images, sounds, and animations.

2>. data element)
A data element is an object that can be considered and processed as a whole in a computer. It is the basic unit of Data composition. In the student information management system, "student" and "student achievement" can be viewed as data elements, which can be composed of several data items. In the student information management system, the student's name, age, and class are data items of the "student" data element, while the "Student's score" data element is composed of data items such as Chinese, mathematics, and English.

3>. data object)
A data object is a set of several data elements with the same nature. It is a subset of data. For example, the data object of a positive integer is a set of N * = {1, 2, 3 ,...}, the Data Objects of animals are set A = {cats, dogs, pigs, cows ,...}.
Data Objects can also be composed of other data objects. For example, the real number of data objects is {rational number, irrational number}, while the rational number is composed of integers and scores, integers and scores have their own data element sets.


3. Data Structure Research Direction:
Data structure is a discipline that studies the relationship between data and data. It mainly includes the following three aspects:
1>. The logical relationship between data elements is called the logical structure of data );
2>. The data representation in the computer is called the storage structure or physical structure of the data );
3> the operation to be performed between data is called the operation of data ).
The logical structure of data is to describe the relationship between data logically. It has nothing to do with the storage of data in the computer and is independent of the computer.
The data storage structure refers to how data is stored in computers, and it depends on computers.

4. Logical Structure of data:
The logical structure of data is divided into linear structure (linear relationship) and non-linear structure (non-linear relationship ).
1>. linear structures include linear tables, stacks and queues, strings, arrays, and generalized tables.
2>. Non-linear data structures include trees, Binary Trees, Directed Graphs, undirected graphs, and set types.
The figure is as follows:

5. Data Storage Structure:
The memory of a computer is composed of multiple storage units. Each storage unit has a unique address. There are four basic storage methods for storing data in a computer:
1>. Sequential storage method:
The sequential storage method stores the data of each node in a sequential storage unit.

2>. Chain storage method:
Store the data of each node in some storage units.

3>. Index storage method:
Use index number I of the node to determine the address of the storage unit of the node, and store the data of each node in a regular order or chain in the storage unit.

4>. Hash Storage Method:
The data of each node is determined by a preset hash function.

6. Data Structure Research Methods:
ADT (Abstract Data Type) is a commonly used method for studying Data structures. ADT is actually a mathematical model and a set of operations defined on this mathematical model. ABSTRACT Data Types make it easier for us to describe the real world. For example, a linear table is used to describe the Student Relationship table, and a tree or graph is used to describe the genetic relationship. The key to abstract data types is that users who use them only care about their logical features and do not need to understand their storage methods. People who define it do not need to care about how it is stored.
ABSTRACT Data Type features:
1>. concealment of information
2>. Modularization
3>. Description Accuracy
4>. Simplicity
5>. Integrity
6>. Implementation independence
The Research of Data Structure has nothing to do with its description language. Various computer languages, such as C, C ++, JAVA, C #, and Python, can be used to describe the data structure, although the language they describe is different, the ideas they describe are the same.
Language-related definitions of abstract data types and their implementation methods.

An abstract data type consists of three parts: definition, representation, and implementation:
It is defined as a public attribute and has nothing to do with the programming language. It is visible to programmers;
It is a private attribute related to the implementation and is invisible to other programmers.

7. Representation of abstract data types:
Abstract data types can be represented by the following three ancestor: (D, S, P ):
D indicates the data object, S indicates the relationship on D, and P indicates the basic operation set on D.

ADT abstract data type name {Data Object: (definition of data object) Relation: (definition of data relationship) basic operation: (Definition of basic operation)} ADT abstract data type name

 

The definition of the Data Relationship of the data object can be described by pseudocode. The basic operation Definition Format is:

Basic operation name (parameter list) initial condition: (initial condition description) operation structure: (Operation structure description)

 

 

We need to learn these terms and other terms in the future.

 

--------------------

Wid, 2012.11.16

 

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.