0% found this document useful (0 votes)
3 views

Strings_Automata and Formal Languages

Lessons on Strings.

Uploaded by

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

Strings_Automata and Formal Languages

Lessons on Strings.

Uploaded by

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

Languages and string operations

• Basic understanding of Set Theory (Union,


Intersection, Complements)
• Introduction to Formal Languages (Alphabets,
Strings, and Languages)
• Familiarity with Finite Automata and Regular
Expressions
Basic building block of a string. We can compare this
as letters in an alphabet. It is a user-defined entity.

example:

σ(𝒏)
A finite, non empty set of symbols.

example:

Σ 𝑖𝑠 𝑡ℎ𝑒 𝑢𝑝𝑝𝑒𝑟𝑐𝑎𝑠𝑒 𝑙𝑒𝑡𝑡𝑒𝑟 𝑜𝑓 𝑆𝑖𝑔𝑚𝑎


A sequence of symbols chosen form some set of
alphabet or ∑ of finite length.

𝜔
example:

𝜔 𝑖𝑠 𝑙𝑜𝑤𝑒𝑟𝑐𝑎𝑠𝑒 𝑙𝑒𝑡𝑡𝑒𝑟 𝑜𝑓 𝑂𝑚𝑒𝑔𝑎


Each string in the language
must be formed using the
symbols from the
A set of strings that are chosen from ∑ automaton’s alphabet and
must satisfy the conditions
defined by the automaton's
states and transitions.

𝜔 𝑖𝑠 𝑙𝑜𝑤𝑒𝑟𝑐𝑎𝑠𝑒 𝑙𝑒𝑡𝑡𝑒𝑟 𝑜𝑓 𝑂𝑚𝑒𝑔𝑎


• In automata theory, it doesn't involve complex string
manipulations like in daily tasks or programming.
Instead, it focuses on how strings are built and
recognized.
The number of letters or valid symbols that
are present in a string.

A string has a specific length, meaning it


consists of a limited number of characters.

Multiple strings must follow a specific order.


For example, to check a palindrome starting
with string w, the order wwᴿ (where wᴿ is the
reverse) must be followed.

We can combine multiple strings together


through concatenation operations like "ab" is
concatenated with "cd" will make "abcd".
The empty set in formal languages
represents a language that contains no
strings. That means there are no valid words
in this language—nothing is included.

The idea of empty string or ε is unique in


automata theory since it acts as a

𝜀 placeholder which contains nothing, not a


single symbol.

𝜀 𝑖𝑠 𝑙𝑜𝑤𝑒𝑟𝑐𝑎𝑠𝑒 𝑙𝑒𝑡𝑡𝑒𝑟 𝑜𝑓 𝐸𝑝𝑠𝑖𝑙𝑜𝑛


Prefixes, suffixes, and substrings are classifications
of a string component. They are the tools that help
us define languages and describe patterns

Some examples
R RIENDS

RA IENDS

RAI ENDS

RAIN NDS
This represent every possible initial
segment of a string = 2ⁿ

”“

ab

abc

abcd

abcde
”“

ba

ban ⁿ⁻¹

bana

banan
This is very useful when it comes to problems
like pattern matching, where we want to see
if the end of a string fits a certain pattern.

abcde

bcde

cde

de

de

““
a

na

ana

nana

anana

““
This is any smaller string you can get by
chopping out a continuous part of the
original string

bcde

ab

de

and so on. . .
Understanding how automata apply these concepts
allows us to design more efficient systems, whether in
text processing, pattern recognition, or error detection.
Thank you!

You might also like