Introduction of Finite AutomataFinite automata are abstract machines used to recognize patterns in input sequences, forming the basis for understanding regular languages in computer science. They consist of states, transitions, and input symbols, processing each symbol step-by-step. If the machine ends in an accepting state after
4 min read
Solving Automata Using Arden's TheoremArden's Theorem states that, if P & Q are two regular expressions over âââ, and if P does not contain âââ, then the following equation R given by R = Q + RP has a unique solution ; R = QP* For certain examples provided below, itâs fairly simple to derive them. But for the following example, it'
6 min read
Regular Expressions, Regular Grammar and Regular LanguagesTo work with formal languages and string patterns, it is essential to understand regular expressions, regular grammar, and regular languages. These concepts form the foundation of automata theory, compiler design, and text processing.Regular ExpressionsRegular expressions are symbolic notations used
7 min read
How to identify if a language is regular or notPrerequisite - Regular Expressions, Regular Grammar and Regular Languages, Pumping Lemma There is a well established theorem to identify if a language is regular or not, based on Pigeon Hole Principle, called as Pumping Lemma. But pumping lemma is a negativity test, i.e. if a language doesn't satisf
8 min read
DFA for Strings not ending with "THE"Problem - Accept Strings that not ending with substring "THE". Check if a given string is ending with "the" or not. The different forms of "the" which are avoided in the end of the string are: "THE", "ThE", "THe", "tHE", "thE", "The", "tHe" and "the" All those strings that are ending with any of the
12 min read
DFA for accepting the language L = { anbm | n+m =even }ProblemDesign a deterministic finite automata(DFA) for accepting the language L = {an bm | n+m = even}Examples:Input: a a b b , n = 2, m = 2 2 + 2 = 4 (even)Output: ACCEPTEDInput: a a a b b b b ,n = 3, m = 43 + 4 = 7 (odd) Output: NOT ACCEPTEDInput: a a a b b b , n = 3, m = 33 + 3 = 6 (even)Output:
14 min read
DFA of a string in which 2nd symbol from RHS is 'a'Draw deterministic finite automata (DFA) of the language containing the set of all strings over {a, b} in which 2nd symbol from RHS is 'a'. The strings in which 2nd last symbol is "a" are: aa, ab, aab, aaa, aabbaa, bbbab etc Input/Output INPUT : baba OUTPUT: NOT ACCEPTED INPUT: aaab OUTPUT: ACCEPTED
10 min read
Complementation process in DFAPrerequisite â Design a Finite automata Suppose we have a DFA that is defined by ( Q, \Sigma  , \delta  , q0, F ) and it accepts the language L1. Then, the DFA which accepts the language L2 where L2 = Ì
L1', will be defined as below:Â Â ( Q, \Sigma, \delta, q0, Q-F )The complement of a DFA can be obtai
2 min read