String Algorithms Flashcards

1
Q

Finite Automata Algorithm

A

String Matching Algorithm

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Advantage of Finite Automata Algorithm

A

Matching within a single run over the text string. It traverses the text string only once.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Why is it faster?

A
  1. Due to its preprocessing.

2. Types of string it matches. (unlike Aho Corasick)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Likely concept

A

Deterministic Finite Automata (DFA) in TOC.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Processes it goes through

A

Following is the set of processes :

  1. Construction of Finite Automata Machine for the pattern string.
  2. Once the preprocessing is completed text string will be passed through this automata and in the sequential order, it matches the states as well.
  3. The decision of being matched or not depending upon the current state after text string is finished.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Number of states in FA

A

Length of pattern + 1 (M + 1)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

How to construct the Finite Automata for the pattern.

A

It is constructed using the concept of the borders just as like in the KMP algorithm. The KMP algorithm utilizes the concept of borders in order to use the mismatches for the matching with a prefix so that mismatch may do lesser harm to the overall matching procedure.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Describe the key point about process

A

The main point about the calculation of the finite automata states and their jumping from one to the other is done using the longest length borders that is available at the moment for the matching. As it matches the longest length returns the endpoint of the prefix to jump on.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly