Lahore Garrison University
Lahore Garrison University
String:
A string over an alphabet is a finite sequence of symbols from that alphabet. Strings are often
called words or sentences. Example: Strings over {0,1}: ε, 0, 1, 111010.
Word:
String that is permissible in language
Language:
A set of strings with rules. Every language has its own rule.
Terms of strings:
There are different terms of strings.
Empty string: String that has no letter, also known as Null string. Its length is zero.
Length of string: Number of letters in a string.
Reverse of string: Obtained by writing letters of string in reverse order. Denoted by
Rev(s) or Reverse(s).
Power of string: Determines the length of string.
Regular expression:
Regular expression is an important notation for specifying patterns. Each pattern matches a set
of strings, so regular expressions serve as names for a set of strings. Programming language
tokens can be described by regular languages.
And also define as Sequence of characters that define a search pattern, mainly for use in pattern
matching with strings, or string matching, i.e. “find and replace” like operations. Regular
expressions are a generalized way to match patterns with sequences of characters.
Automata:
Automata Theory is a branch of computer science that deals with designing abstract self-
propelled computing devices that follow a predetermined sequence of operations automatically.
Finite automata:
An automaton with a finite number of states is called a Finite Automata.
Transition Diagrams:
Transition diagram is a special kind of flowchart for language analysis. In transition diagram, the
boxes of flowchart are drawn as circle and called as states. States are connected by arrows called
as edges connect states. The label or weight on edge indicates the input character that can appear
after that state.
Deterministic:
There is exactly one outgoing transition for every input alphabet from one state. There should not
be more than one transition from one state for one letter.
Nondeterministic:
A Nondeterministic Finite Automata (NFA) is a Transition Graph (TG) with a unique start and a
property of having single letter as label of transitions.
Regular language:
A regular language satisfies the following equivalent properties: it is the language of
a regular expression (by the above definition) it is the language accepted by a nondeterministic
finite automaton (NFA) it is the language accepted by a deterministic finite automaton (DFA) it
can be generated by a regular grammar.