**2. Searching**

Searching is a method for finding certain things in given data/files which are of vital importance. There are different categories of search methods: basic and advanced, like one using trees and digital key transformations, including balanced trees, hashing binary search trees, and digital search trees, and trying different methods appropriate for different types of files. These methods in turn are related to each other and possess much resemblance with sorting methods.

### **3. Sorting**

Sorting is a method of rearranging files in the order that are covered in some depth due to their fundamental importance. A large variety of methods were developed, described, and compared. Algorithms including priority queues, selection, merging, and several related problems are created. Some of these algorithms are used as the basis for other more complex algorithms.

#### **4. String processing**

String processing algorithms include a range of methods for dealing with (long) sequences of characters. String searching basically leads to pattern matching which in turn leads to parsing. File compression techniques and cryptology are also part of advanced string processing applications.

### **5. Geometric algorithms**

Geometric algorithms encompass an assortment of procedures for resolving problems by involving points and lines along with other simple geometric objects. Moreover, it also finds application of ideas from several mathematical disciplines like algebra, combinatorics, topology, and differential geometry. During the last two decades, most of the geometric applications like CAD/CAM, computer graphics, VLSI design, molecular biology, robotics, GIS, spatial databases, sensor

networks, machine learning, and scientific computing become the motivation for computational geometry to evolve as a full-fledged discipline of theoretical computer science. Some typical high-end applications of geometric algorithms includes: optimal airspace design, air traffic controller's traffic balancing and automatic sectorization of airspace, wireless sensor networks design, analysis of 2D electrophoresis gels, prediction of resilience, and recovery of damage in neural networks.

## **6. Graph algorithms**

Graphs algorithms are the natural way to understand connection between the linked data and thus reveal the relationships in data. Exploring and tracking these interlinking connections divulge new insights and influence and facilitate to analyze each data point as part of a bigger picture. Graph algorithms are useful in a variety of complex difficult structures and reveal difficult-to-find patterns ranging from finding bottlenecks, susceptibilities to detect communities, fraud rings, improving machine learning predictions to predict the spread of disease or ideas, and thus enable us to leverage relationship within data to devise intelligent solution to enhance the effectiveness of machine learning models. Graph algorithms types such as exact or approximated, static or dynamic, distributed or centralized, deterministic or randomized, and matching and network flow, minimal spanning tree, and shortest path are some of the general approaches developed for searching in the graph.

### **7. Genetic algorithms**

A genetic algorithm (GA) is a search-based heuristic algorithm used for solving optimization problems in machine learning that is based on genetics and natural selection. GA is a subset of evolutionary algorithms which is based on behavior of chromosomes and their genetic structures which uses evolutionary generational cycle starting from initialization, fitness assignment, selection, reproduction, replacement, and termination, to yield high-quality solutions. GA makes use of various operations which enhance or replace the population to deliver a betterquality suitable solution and get inspiration from evolution and natural selection. Through the process of natural selection, organisms regulate to augment their likelihoods for endurance in a given situation. Eventually, incompetent elements perish from the population, to be replaced by successful-solution descendants. Apart from the applications in multimodal optimization, DNA analysis, design of aircraft, and genetic algorithms are found to be efficient and cost-effective plan for tricky traveling salesman problem. It does not need derivative information and possess excellent parallel capabilities which refine and optimize the solution to the multiobjective problems, and discrete and continuous functions. The idea behind genetic algorithms is extremely alluring.

#### **8. Neural networks**

Neural networks are basically inspired by the biological nervous system or neural networks in the brain and basically parallel computing devices. It is one of the most emerging areas in data science which revolutionizes and eventually leads to tremendous growth of artificial intelligence, machine learning, and deep learning and basically designed to recognize patterns and extracting features that can

#### *Introductory Chapter: Search Algorithm: Essence of Optimization DOI: http://dx.doi.org/10.5772/intechopen.104844*

be fed to other relevant algorithms for further classifications and clustering. The elementary computational unit of a neural network is a neuron also called as node, and each node or neuron is linked with certain weight. This weight is assigned as per the relative importance of that particular neuron or node. Neural networks are simply weighted digraphs with neurons acting as vertices, and weights on edges denote the connection strength of the pair. Each node or neuron collects values or weights from other neurons and accordingly computes the output.

Gradient Decent, Conjugate Gradient, Newton's Method, and Quasi-Newton Method are some of the popular optimization algorithms which find applications in context with neural network. Speed and memory footprint of all these algorithms may vary, but an ultimate objective is to accomplish various intricate computational task faster than the traditional systems.

In neural network, training of the neurons is accomplished by appropriately modifying connection strength in response to training data. Most apt application of neural networks is forecasting and classification of applications, such as gene predication, optical character recognition, and stock market time series prediction.

Having discussed about all these different types of algorithms, one thing which is most apparent that, irrespective of types of algorithms, searching lies at the heart of all. Rather, it is the intrinsic part of all algorithms as it finds application one way or other, and it is one of the first things any algorithm designer should try in the quest for efficiency. Basically, sorting is directly based on searching, wherein we use to compare, i.e., search for specific pattern of string for comparison, and then rearrange those strings based on desired sorting pattern of ascending or descending. Searching can be used to illustrate most algorithm design paradigms. Data structure techniques, divide-and-conquer, randomization, and incremental construction all lead to popular sorting algorithms. Binary search and its variants are the essential divide-and-conquer algorithms. Depth-first and breadth-first search provide mechanisms to visit each edge and vertex of the given graph. Strategy represents the pursuit for the big picture, the framework around which we construct our path to the goal. Strategies are used to win the minor skirmishes we must fight along the way. They prove the basis of most simple and efficient graph algorithms. Simulated annealing is a simple and effective technique to efficiently obtain good but not optimal solutions to combinatorial search problems. Combinatorial search, improved with tree pruning techniques, can then be used to find the more optimal solution of small optimization problems. Ingenious pruning procedures can speed up combinatorial search to a remarkable extent. Proper trimming will have a greater impact on search time than any other factor. Historically, computers have spent more time searching and sorting than doing anything else all put together. A quarter of all mainframe cycles are spent in searching and sorting data. Although it is unclear whether this remains true on smaller computers, but still searching and sorting remain the most ubiquitous combinatorial algorithm problem in practice.

An important key to algorithm design is to use searching/sorting as a basic building block, because once a set of items is sorted, many other problems become easy. Consider the few of the applications like:

• **Closest pair** – In a given a set of *n* different numbers, suppose we are interested in finding the pairs of numbers having minimum or no deviation or minimal difference between them. One way to find the desired pairs in quickest possible way is to arrange these numbers in sorted order either in ascending or descending order. Once sorted, the closet pair of numbers shall spatially reside next to each other. Thus, merely a linear scan through the sorted list will complete the job.


Thus, searching/sorting is the most thoroughly studied problem in computer science. Literally, loads of diverse algorithms are known, most of which have some advantages over all other algorithms in certain circumstances. Most of the stimulating concepts used in the design of algorithms appear in the context of searching/ sorting such as data structures, divide-and-conquer, and randomized algorithms.

#### *Introductory Chapter: Search Algorithm: Essence of Optimization DOI: http://dx.doi.org/10.5772/intechopen.104844*

Searching/sorting is a natural laboratory for studying basic algorithm design paradigms, since many useful techniques lead to interesting searching/sorting algorithms. Searching/sorting thus becomes the basic building block around which many other algorithms are built. By understanding searching thoroughly and devising effective searching techniques, we can obtain an amazing amount of power to solve other problems and thus will become the essence for optimizations.
