string match | computer science

8
STRING MATCH

Upload: transweb-global-inc

Post on 07-Apr-2017

9 views

Category:

Education


0 download

TRANSCRIPT

Page 1: String Match | Computer Science

STRING MATCH

Page 2: String Match | Computer Science

DEFINITION AND CLASSIFICATION OF STRING MATCHING

A string is given to be matched with a long text (or a string) and at this point of string matching, either a single string or multiple strings can be asked to match

Based on number of strings to be matched, Pattern (nothing but a string) matching algorithms are classified as 1. Single pattern matching algorithms

and 2. Multiple pattern matching algorithms

Page 3: String Match | Computer Science

SOME REAL WORLD PROBLEMS THAT NEED STRING MATCHFinger prints and Retinal scans in

high security systems like banking security

DNA analysis and Bio Informatics

Computer password matching

Cyber Forensics department

Page 4: String Match | Computer Science

HOW DOES A PROBLEM LOOK LIKE!TEXT: A B A C B A B C A C A B

Pattern:A C B (NOT Matched initially)

_ A C B (Not matched on first shift)

_ _ A C B (matched on second shift)

In real world, when you enter your password while you sign in your twitter account, password entered by you is matched with string in their database

Page 5: String Match | Computer Science

DIFFERENT ALGORITHMS WITH DIFFERENT APPROACHESThere are many algorithms in order to solve the problems facing in String matching.

Each algorithm has its own way of matching the strings. Some match in an optimal time with minimum number of comparisons while some take very long time.

Page 6: String Match | Computer Science

SOME WELL KNOWN ALGORITHMS Rabin-Karp String matching algorithms

Naïve string matching algorithm

Knuth-Morris-Pratt algorithm also better known as “KMP”

Brute force comparison technique is used by Rabin-Karp and

makes comparisons only if hash values in both the text and

string are same.

Page 7: String Match | Computer Science

SUMMARY

• String match and its types

• Some well known algorithms to do string matching

• Application of string matching in real world problems

• Scenario of string matching

Page 8: String Match | Computer Science

Hey Friends,This was just a summary on String Match. For more detailed information on this topic, please type the link given below or copy it from the description of this PPT and open it in a new browser window.

www.transtutors.com/homework-help/computer-science/string-match.aspx