0% found this document useful (0 votes)
4 views19 pages

To Ooooooooo c

The document covers topics related to Deterministic Finite Automata (DFA) and Regular Expressions (RE), including their definitions, notations, and applications. It explains the transition function of DFA and provides examples of regular expressions used in UNIX for text manipulation. Additionally, it discusses the closure properties of regular languages under various operations.

Uploaded by

s98751007
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views19 pages

To Ooooooooo c

The document covers topics related to Deterministic Finite Automata (DFA) and Regular Expressions (RE), including their definitions, notations, and applications. It explains the transition function of DFA and provides examples of regular expressions used in UNIX for text manipulation. Additionally, it discusses the closure properties of regular languages under various operations.

Uploaded by

s98751007
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 19

Toc

MODULE -1
Define Deterministic Finite Automata. Explain the two
preferred
notations for describing the Transition Function with an
example.
Draw a DFA to accept decimal strings divisible by 3
Module-2
Pumping lemma
Applications of Regular Expressions (RE):
1.Text Searching and Matching: Used to search specific patterns in
text files.
2.Input Validation: Validate inputs like email addresses, phone
numbers, and passwords.
3.Syntax Highlighting: Enable editors to identify and colorize
programming syntax.
4.Data Extraction: Extract data like URLs, dates, or other patterns
from text files.
5.String Replacement: Modify or replace text in files (e.g., sed, awk in
UNIX).
6.Log Analysis: Analyze log files for specific patterns (e.g., error
codes).
7.Compiler Design: Token recognition in lexical analysis.
8.Configuration Parsing: Recognize and extract configuration
directives from files.
Notations Used in UNIX for Regular Expressions:
1.^: Matches the start of a line.
2.$: Matches the end of a line.
3..: Matches any single character except a newline.
4.*: Matches zero or more occurrences of the preceding character.
5.[]: Denotes a set of characters; matches any one character within the brackets.
6.[^]: Matches any character not in the set.
7.\: Escape character for special characters.
8.|: Alternation; acts like an OR operator.
9.(): Groups expressions for capturing or precedence.
+:
10. Matches one or more occurrences of the preceding character.
?: Matches zero or one occurrence of the preceding character
11.
Examples of Regular Expressions with UNIX Notations:
These expressions are widely used in UNIX commands like grep, sed, and awk to manipulate and analyze text data effectively.

Regular Expression Description


^abc Matches lines starting with "abc".
xyz$ Matches lines ending with "xyz".
a.c Matches "abc", "a_c", "a-c", etc.
ab* Matches "a", "ab", "abb", "abbb", etc.
[aeiou] Matches any single vowel.
[^0-9] Matches any non-digit character.
\. Matches a literal period character.
`cat dog`
(ab)+ Matches "ab", "abab", "ababab", etc.
colou?r Matches "color" or "colour".
b Show that regular languages are closed under
i.Union,concatenation and Kleens star
ii.Intersection and Difference
MODULE -4
GNF
pda
[16-01-2025 10:48 PM] Sanjay Patil: (0*10*1)0*10
[16-01-2025 10:48 PM] Sanjay Patil: (0|1)00(0|1)
[16-01-2025 10:48 PM] Sanjay Patil: (1|01)*0?

You might also like