当前位置:网站首页>Course paper + code and executable EXE file of library information management system based on C language

Course paper + code and executable EXE file of library information management system based on C language

2022-06-25 11:14:00 biyezuopinvip

Catalog
One 、 Purpose and requirements of the experiment 0
Two 、 Overview of algorithm principle 0

  1. In order to find 1
  2. Two points search 1
  3. Tree table search 3
  4. Hash lookup 4
    3、 ... and 、 Software development environment and tools 11
    Four 、 Experimental content 11
    5、 ... and 、 Summary of the experiment 25
    6、 ... and 、 reference : 26
  5. else   37
    
  6. else   38
    
  7. else   39
    
  8. else   39
    
  9.     else   40
    
  10. else   40
    
  11.     else   46
    
  12.     else   50
    

One 、 Purpose and requirements of the experiment
(1) Representation and implementation of set structure .
(2) Implementation of search and sorting algorithm .
(3) File access operation
(4) system function : Book collection and editing 、 Book Search 、 Functions such as book circulation and personal information
(5) The program can check the fault tolerance of input data , Guarantee the validity of data .
(6) User interface friendliness : The program can provide menus for users to choose and corresponding interactive information .
Two 、 Overview of algorithm principle
( One ) lookup
1. Search algorithm categories :
(1) Static search and dynamic search ;
Both static and dynamic are for lookup tables .
Dynamic table refers to the table with delete and insert operations in the lookup table .
(2) Unordered search and ordered search .
Unordered search : The sequence to be searched is in order and disorder ;
Search in order : The searched sequence must be an ordered sequence .
2. The basic concept of search
(1) lookup : In the data set , The process of finding data elements that meet certain conditions is called finding .
(2) Lookup table ( Find structure ); The set of data used for lookup is called a lookup table .
(3) A keyword is the value of a data item in a data element , It can be used to identify a data element , If this keyword can uniquely identify a record , Keywords used as primary keywords .
(4) The average search length is the average number of keyword comparisons in all search processes .
about n A table of elements , Given value key Same as... In the table i The elements are equal , To be carried out n-i+1 Sub keyword comparison .
Average search length (Average Search Length,ASL): Need and specify key Expected number of keywords to compare , It is called the average search length when the search algorithm is successful .
For containing n Look up table of data elements , The average length of successful search is :ASL = Pi*Ci And .
Pi: Look up the... In the table i Probability of data elements .
Ci: Find No i The number of times that data elements have been compared .
3、 Common search algorithms

  1. In order to find
    Premise : Sequential search is suitable for linear tables whose storage structure is sequential storage or linked storage .
    The basic idea : Sequential search is also called linear search , It belongs to the unordered search algorithm . Start at one end of the data structure linear table , Sequential scanning , Scan the node keyword and the given value in turn k Comparison , If equal, the search is successful ; If no keyword is found at the end of the scan k The node of , Indicates that the search failed .
    Complexity analysis :
    The average search length when the search is successful is :( Suppose that the probability of each data element is equal ) ASL = 1/n(1+2+3+…+n) = (n+1)/2 ;
    When the search fails , need n+1 Compare it to , The time complexity is O(n);
    therefore , The time complexity of sequential lookup is O(n).
     Insert picture description here
     Insert picture description here
     Insert picture description here
     Insert picture description here
     Insert picture description here
     Insert picture description here
     Insert picture description here
     Insert picture description here
     Insert picture description here
     Insert picture description here
     Insert picture description here
     Insert picture description here
     Insert picture description here
     Insert picture description here
     Insert picture description here
原网站

版权声明
本文为[biyezuopinvip]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/176/202206251057176821.html