How to set up smartphones and PCs. Informational portal
  • home
  • Mistakes
  • Genus c delphi ready pdf algorithms to read. Types of algorithms in computer science: examples

Genus c delphi ready pdf algorithms to read. Types of algorithms in computer science: examples

Delphi - Ready algorithms - Stevens R. - 2004.

Programming has always been quite a challenge. This book will help you easily overcome the difficulties that arise with the help of a library of powerful algorithms, fully implemented in source code Delphi. You will learn how to choose the most suitable method for solving a particular problem, and how to achieve maximum performance your application. The typical and worst cases of algorithm implementation are considered, which will allow you to recognize in time possible difficulties and, if necessary, rewrite or replace part of the program. Described in detail essential elements data storage and processing algorithms (lists, stacks, queues, trees, sorting, searching, hashing, etc.). Not only traditional solutions are given, but also methods based on the latest achievements of object-oriented programming.
The book is intended for novice Delphi programmers, but thanks to the clear structuring of the material and the rich library of ready-made algorithms, it will also be of interest to specialists.

Introduction.
Chapter 1. Basic concepts
What are algorithms.
Analysis of execution speed, algorithms
memory or time.
Estimation up to order
Definition of complexity.
Complexity recursive algorithms
Average and worst case.
General functions of complexity estimation.
Logarithms
The speed of the algorithm in real conditions
Accessing the paging file.
Summary.
Chapter 2 Lists
Basic concepts about lists.
Simple Lists.
Resizing arrays.
Variable size list
SimpleList class.
Unordered lists.
Related lists.
Adding elements.
Removing elements.
Chapter 3 Stacks and Queues
Stacks.
Stacks on linked lists.
Queues
cyclic queues.
Queues based on linked lists.
Priority Queues
Multi-threaded queues.
Summary.
Chapter 4 Arrays
triangular arrays
Diagonal elements
Irregular arrays
Linear representation with a pointer.
Irregular linked lists.
Dynamic arrays Delphi.
Sparse arrays.
Array indexing
Highly sparse arrays.
Summary.
Chapter 5 recursion
What is recursion
Recursive calculation of factorials Complexity analysis
Recursive calculation
greatest common divisor
Complexity analysis.
Recursive calculation of Fibonacci numbers
Complexity analysis.
Recursive construction of Hilbert curves
Complexity analysis.
Recursive construction of Sierpinski curves.
Complexity analysis
Disadvantages of recursion.
Infinite recursion
memory loss
Unreasonable use of recursion.
When to use recursion.
Removing tail recursion
Non-recursive calculation of Fibonacci numbers.
Eliminate recursion in general case.
Non-recursive creation of Hilbert curves.
Non-recursive construction of Sierpinski curves Summary.
Chapter 6 Trees
Definitions
tree representations.
Full knots
Lists of child nodes
Representation by numbering links.
complete trees
Tree traversal.
Ordered Trees
Adding elements.
Removing elements.
Traversal of ordered trees
Trees with links
Features of work.
Q-trees.
Changing the value of MAXQTREENODES
Octal Trees.
Summary.
Chapter 7 Balanced Trees
Balancing.
AVL trees
Adding nodes to the AVL tree.
Removing nodes from an AVL tree.
B-trees.
B-tree performance.
Removing elements from a B-tree
Adding elements to the B-tree
Varieties of the B-tree.
Improvement of B-trees.
Disk Access Issues
B+tree database
Summary.
Chapter 8 Decision Trees
Search in game trees
Minimax enumeration
Search optimization in decision trees
Search non-standard solutions
Branches and borders.
Heuristic.
Difficult tasks
The task of feasibility.
Partition problem
The problem of finding the Hamiltonian path.
The traveling salesman problem
Fire station problem.
a brief description of challenging tasks
Summary
Chapter 9 Sorting
General principles.
pointer tables.
Combining and compressing keys.
Program example
Selection sort
Mixing
Insertion sort
Inserting in linked lists
bubble sort
Quick sort
Merge sort.
pyramid sort.
Pyramids.
Priority queues.
Heap sort algorithm
Counting sort.
Block sort
Block sort using linked lists
Summary
Chapter 10 Search
Program examples
brute force
Iterating over sorted lists.
Iterating over linked lists
Binary Search.
Interpolation search.
String data.
Tracking Search
Binary tracking and searching
Interpolation tracking search.
Summary.
Chapter 11 Hashing
Binding.
Advantages and disadvantages of binding
Blocks.
Storing hash tables on disk.
Linking blocks.
Removing elements.
Advantages and Disadvantages of Using Blocks Open Addressing
Line check.
Square check
Pseudorandom check
Removing elements.
Summary.
Chapter 12 Network Algorithms
Definitions
Network views
Node and link management
Network Bypass
The smallest frame of a tree,
Shortest way
Placement of labels.
Label Correction
Options for finding the shortest path.
Application of algorithms for finding the shortest path.
Maximum flow
Application areas.
Summary
Chapter 13 Object-Oriented Methods.
Advantages of OOP.
Encapsulation.
Polymorphism
Reuse and Inheritance
OOP paradigms.,.
Control Objects
Controlling object
Iterator,.
Friendly class.
Interface
Facade
Factory.
The only object
Serialization
Paradigm Model/View/Controller Summary.
Appendix 1. Archive of examples
Contents of the archive with examples
Hardware Requirements
Running the Sample Programs
Information and user support
Appendix 2. List of Sample Programs
Subject index

Free download e-book in convenient format, watch and read:
Download book Delphi - Ready-made algorithms - Stevens R. - fileskachat.com, fast and free download.

Download djvu
You can buy this book below best price at a discount with delivery throughout Russia.


Visual Basic. Ready algorithms- The book outlines important programming concepts that can be successfully applied to solve many problems. practical tasks. The proposed algorithms use powerful techniques such as recursion, chunking, dynamic memory allocation, and network data structures to help you build flexible and complex applications.
Are considered in detail the most important concepts theory of algorithms and data processing (lists, stacks, queues, trees, sorting, searching, hashing, etc.).
The book contains a large number of examples that you can use own applications either without changes at all, or by modifying them at your discretion.
Designed primarily for experienced users Visual Basic, but due to the accessibility of the presentation and the rich library of ready-made algorithms, it will also be of interest to novice programmers.

Name: Visual Basic. Ready-made algorithms (+ examples)
Stevens R.
Publisher: DKM Press
Year: 2000
Pages: 377
Format: DJVU
Size: 20.3 MB
ISBN: 5-94074-001-4
Quality: Excellent
Series or Issue: For programmers

Introduction
Chapter 1. Basic concepts
What is an algorithm
Analysis of the speed of algorithm execution
Resources and time
Estimation up to order
Finding Problematic Parts of an Algorithm
Complexity of recursive algorithms
Worst and average case
Complexity Order Evaluation Functions
Logarithms
The speed of the algorithm in real conditions
Accessing the paging file
Pseudo-pointers, references to objects and collections
Summary
Chapter 2. Lists
Main questions of the chapter
Simple Lists
Collections
Variable size list
SimpleList class
Unordered Lists
Related Lists
Adding elements
Removing elements
Destroying a linked list
Signal labels
Linked List Encapsulation
Cell access
Varieties of linked lists
Circular linked lists
Problem circular references
doubly linked lists
streams
Other related structures
Pseudo-pointers
Summary
Chapter 3 - Stacks and Queues
Stacks
Multiple stacks
Queues
Cyclic Queues
Queues Based on Linked Lists
Using Collections as Queues
Priority Queues
Multi-threaded queues
Summary
Chapter 4. Arrays
triangular arrays
Diagonal elements
Irregular arrays
Linear representation with pointers
Irregular linked lists
Sparse arrays
Array indexing
Very sparse arrays
Summary
Chapter 5. Recursion
What is recursion
Recursive calculation of factorials
Recursive calculation of the greatest common divisor
Program execution time analysis
Recursive calculation of Fibonacci numbers
Program execution time analysis
Recursive construction of Hilbert curves
Program execution time analysis
Recursive construction of Sierpinski curves
Program execution time analysis
Disadvantages of recursion
Infinite recursion
memory loss
Unreasonable use of recursion
When to Use Recursion
tail recursion
Non-recursive calculation of Fibonacci numbers
Elimination of recursion in general
Non-recursive construction of Hilbert curves
Non-recursive construction of Sierpinski curves
Summary
Chapter 6
Basic terms
Tree representations
Full knots
Lists of descendants
Relationship numbering representation
complete trees
Tree traversal
Ordered Trees
Adding elements
Removing elements
Traversal of ordered trees
Trees with links
Features of work
Q-trees
Change the number of elements in a node
Using Pseudo Pointers
Octal Trees
Summary
Chapter 7 Balanced Trees
Tree balance
AVL trees
Adding a Node
Deleting a node
B-trees
Performance of B-trees
Inserting elements
Removing elements
Varieties of B-trees
Increasing the performance of B-trees
Balancing
Disk Issues
B+tree database
Summary
Chapter 8 Decision Trees
Search in game trees
Minimax Search
Search optimization
Search for non-standard solutions
Branch and Bound Method
Heuristics
Difficult tasks
Feasibility problem
Partition problem
The problem of finding the Hamiltonian path
The traveling salesman problem
Fire station problem
Brief description of complex tasks
Summary
Chapter 9 Sorting
General principles
Pointer tables
Combining and Compressing Keys
Program examples
Selection sort
Mixing
Insertion sort
Inserting in linked lists
bubble sort
Quick sort
Merge sort
pyramid sort
pyramids
Priority Queues
Heap sort algorithm
Count sort
Block sort
Block sort using linked list
Block sort based on array
Summary
Chapter 10
Program examples
Brute force search
Search in ordered lists
Search in related lists
Binary Search
Interpolation search
String data
Tracking Search
Interpolation tracking search
Summary
Chapter 11 Hashing
Binding
Advantages and disadvantages of binding
Blocks
Storing hash tables on disk
Linking Blocks
Removing elements
Advantages and disadvantages of using blocks
open addressing
Line check
Square check
Pseudorandom check
Removing elements
Summary
Chapter 12. Network Algorithms
Basic terms
Network views
Operating nodes and connections
Network bypasses
smallest tree frame
Shortest route
Labeling
Label Correction
Options for finding the shortest route
Applications using the method of finding the shortest route
Maximum flow
Applications
Summary
Chapter 13. Object Oriented Methods
Benefits of OOP
Encapsulation
Polymorphism
Inheritance and reuse
OOP paradigms
Control Objects
Controlling object
iterator
Friendly class
Interface
Facade
parent object
The only object
Serialization
Paradigm Model/View/Controller
Summary
Annex 1. Archive with examples
Appendix 2. List of Sample Programs
Alphabetical index

Download Visual Basic. Ready-made algorithms (+ examples)

When studying computer science, a lot of attention is paid to the study of algorithms and their types. Without knowing the basic information about them, you can not write a program or analyze its work. The study of algorithms begins in school course informatics. Today we will consider the concept of an algorithm, the properties of an algorithm, and its types.

concept

An algorithm is a specific sequence of actions that leads to the achievement of a particular result. When compiling the algorithm, each action of the performer is prescribed in detail, which in the future will lead him to the solution of the task.

Quite often, algorithms are used in mathematics to solve certain problems. So, many people know the algorithm for solving quadratic equations with the search for a discriminant.

Properties

Before considering in computer science, it is necessary to find out their basic properties.

Among the main properties of the algorithms, it is necessary to highlight the following:

  • Determinacy, that is, certainty. It lies in the fact that any algorithm involves obtaining certain result for given initial.
  • Efficiency. It means that in the presence of a number of initial data, after performing a number of steps, a certain, expected result will be achieved.
  • Mass character. An algorithm written once can be used to solve all problems of a given type.
  • discreteness. It implies that any algorithm can be divided into several stages, each of which has its own purpose.

Recording methods

No matter what kinds of computer science algorithms you consider, there are several ways to write them.

  1. verbal.
  2. Formulaic verbal.
  3. Graphic.
  4. Algorithm language.

The most commonly depicted algorithm is in the form of a flowchart, using special designations fixed by GOSTs.

Main types

There are three main schemes:

  1. Linear algorithm.
  2. Branching algorithm, or branched.
  3. Cyclical.

Linear

It is considered the simplest in computer science. It assumes a sequence of actions. Let us give the simplest example of an algorithm of this kind. Let's call it "Getting to school".

1. We get up when the alarm rings.

2. We wash ourselves.

3. Brush your teeth.

4. We do exercises.

5. Dress up.

6. We eat.

7. Put on shoes and go to school.

8. End of the algorithm.

Branching Algorithm

Considering the types of algorithms in computer science, one cannot help but recall the branching structure. This type implies the presence of a condition under which, if it is performed, the actions are performed in one order, and in the case of non-execution, in another order.

For example, let's take the following situation - a pedestrian crossing the road.

1. We approach the traffic light.

2. We look at the traffic light.

3. It must be green (this is a condition).

4. If the condition is met, we cross the road.

4.1 If not, wait until the green light turns on.

4.2 We cross the road.

5. End of the algorithm.

Cyclic algorithm

When studying the types of algorithms in computer science, one should dwell in detail on This algorithm implies a section of calculations or actions that is performed until a certain condition is met.

Let's take a simple example. If the series of numbers is from 1 to 100. We need to find everything, that is, those that are divisible by one and themselves. Let's call the algorithm "Prime Numbers".

1. Take the number 1.

2. Check if it is less than 100.

3. If yes, check whether this number is prime.

4. If the condition is met, write it down.

5. Take the number 2.

6. Check if it is less than 100.

7. Check if it is simple.

…. We take the number 8.

Check if it is less than 100.

Checking if the number is prime.

No, we skip it.

We take the number 9.

Thus, iterate over all numbers up to 100.

As you can see, steps 1 - 4 will be repeated a number of times.

Among the cyclic algorithms, there are algorithms with a precondition, when the condition is checked at the beginning of the cycle, or with a postcondition, when the check is at the end of the cycle.

Other options

The algorithm can be mixed. So, it can be cyclic and branched at the same time. At the same time, they use different conditions at different parts of the algorithm. Such complex structures are used when writing complex programs and games.

Symbols in the block diagram

We have considered what types of algorithms are in computer science. But we did not talk about what designations are used in their graphic recording.

  1. The beginning and end of the algorithm are written in an oval frame.
  2. Each command is fixed in a rectangle.
  3. The condition is written in a diamond.
  4. All parts of the algorithm are connected using arrows.

conclusions

We have considered the topic "Algorithms, types, properties". Computer science devotes a lot of time to the study of algorithms. They are used when writing various programs how to solve math problems, and for creating games and various applications.

Top Related Articles