Professional Documents
Culture Documents
- It is one of the most important issues in computer science 1. Stores number of character to shift by depending on first
character compared.
- Computation time can be reduce at the cost of increased memory 2. Construct by scanning pattern before searching starts.
employed. 3. Indexed by the alphabet of text and pattern.
4. All entries are initialized to pattern length.
- Input Enhancement the idea to preprocess the problem’s input in
whole or just simple part of the whole, and store the additional BOYER-MOORE ALGORITHM
information obtained to accelerate solving problem. - This is when the comparison of the rightmost character in the pattern
with the corresponding character c in the text fails.
INPUT ENHANCEMENT IN STRING MANIPUALATION
HASHING ALGORITHM
- Input enhancement can be applied in different string manipulation - This is the different approach to searching on the value of the key.
problems. - It is based on the idea of distributing keys among a one-dimensional
array, which is referred to as the hash table.
- Pattern matching problems - It is considered as a very efficient way to implement dictionaries.
- Hashing is based on the idea of distributing keys among a one-
- Input enhancement using Brute force algorithm: dimensional array H[0…m-1] called hash table.
- The distribution is done by computing for each key, the value of
1. Align pattern at beginning of text some predefined function h called the hash function.
3. While pattern is not found and the text is not yet exhausted,
realign pattern one position to the right and repeat step 2.
Open Hashing
- Each cell is a header of linked list of all keys hashed to it.
- Generally, the effectiveness of searching depends on the lengths of – is an algorithm in graph theory that finds a minimum spanning tree
the linked list, which, in turn, depend on the dictionary and table size for a connected weighted graph.
s, as well as the quality of the hash function. o Spanning Tree of a connected graph is its connected acyclic
- If hash function distribute keys uniformly, average length of linked sub graph like a tree that contain all the vertices of the graph
list will be: [LEV07].
o a=ry’m o A Minimum spanning tree (MST) of a weighted connected
- this ration is called load factor. graph is its spanning tree of the smallest weight, where the
weight of a tree is defined as the sum of the weights on all its
edges [LEV07].
o The Minimum spanning tree problem is the problem of
finding a minimum spanning tree for a given weighted
ABOUT GREEDY ALGORITHM DESIGN TECHNIQUE connected graph [LEV07].
DIJKTRA’S ALGORITHM