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

3452

Automata theory is a theoretical branch of computer science that studies abstract machines and the types of computations they can perform. It aims to develop methods to describe and analyze the behavior of discrete systems. Automata are abstract models of machines that have a finite number of states and transitions between those states based on their input. The most general automata is the Turing machine. Finite state machines are the simplest type of automata and form the basis for understanding more complex models like pushdown automata and Turing machines.

Uploaded by

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

3452

Automata theory is a theoretical branch of computer science that studies abstract machines and the types of computations they can perform. It aims to develop methods to describe and analyze the behavior of discrete systems. Automata are abstract models of machines that have a finite number of states and transitions between those states based on their input. The most general automata is the Turing machine. Finite state machines are the simplest type of automata and form the basis for understanding more complex models like pushdown automata and Turing machines.

Uploaded by

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

Q.1 what is automata theory?

What is the difference between theory of automata and


computation? Why there is a need to study this subject in computer science discipline?

ANSWER.

Automata theory

Automata theory is the study of abstract machines and automata, as well as the computational
problems that can be solved using them. It is a theory in theoretical computer
science and discrete mathematics (a subject of study in both mathematics and computer science).
The word automata (the plural of automaton) come from the Greek word αὐτόματα, which
means "self-making".

The figure at right illustrates a finite-state machine, which belongs to a well-known type of
automaton. This automaton consists of states (represented in the figure by circles) and transitions
(represented by arrows). As the automaton sees a symbol of input, it makes a transition (or jump)
to another state, according to its transition function, which takes the current state and the recent
symbol as its inputs.

Automata theory is closely related to formal language theory. An automaton is a finite


representation of a formal language that may be an infinite set. Automata are often classified by
the class of formal languages they can recognize, typically illustrated by the Chomsky hierarchy,
which describes the relations between various languages and kinds of formalized logics.

Automata principle may be the study about unique machines and automata, and in
addition the computational issues that camwood be tackled utilizing them. It is a hypothesis
over hypothetical PC science What's more discrete math (a subject about study to both
math and computer science). Those expressions automata (the plural for automaton) turn
starting with those Greek expressions αὐτόματα, which implies "self-making".

The figure at right illustrates An finite-state machine, which belongs to An well-known


kind from claiming machine. This machine comprises about states (represented in the
figure Eventually Tom's perusing circles) Also moves (represented Toward arrows).
Similarly as the machine sees an image from claiming input, it makes An move (or jump)
with an alternate state, as stated by its move function, which takes those present state and
the late image Concerning illustration its inputs.

Automata principle will be nearly identified with formal dialect hypothesis. An machine
will be a limited representational of a formal dialect that might a chance to be a limitless
set. Automata need aid frequently all the arranged Eventually Tom's perusing those
population for formal dialects they might recognize, commonly illustrated Toward the
chomsky hierarchy, which depicts those relations the middle of Different dialects What's
more sorts of formalized logics.

Theory of Automata

Theory of automata is a theoretical branch of computer science and mathematical. It is the study
of abstract machines and the computation problems that can be solved using these machines. The
abstract machine is called the automata. The main motivation behind developing the automata
theory was to develop methods to describe and analyze the dynamic behavior of discrete
systems.

This automaton consists of states and transitions. The State is represented by circles, and
the Transitions is represented by arrows.

Automata is the kind of machine which takes some string as input and this input goes through a
finite number of states and may enter in the final state.

There are the basic terminologies that are important and frequently used in automata:

Symbols:

Symbols are an entity or individual objects, which can be any letter, alphabet or any picture.

Example:

1, a, b, #

Alphabets:

Alphabets are a finite set of symbols. It is denoted by ∑.

Examples:
1. ∑ = {a, b}
2.
3. ∑ = {A, B, C, D}
4.
5. ∑ = {0, 1, 2}
6.
7. ∑ = {0, 1, ....., 5]
8.
9. ∑ = {#, β, Δ}

String:

It is a finite collection of symbols from the alphabet. The string is denoted by w.

Example 1:

If ∑ = {a, b}, various string that can be generated from ∑ are {ab, aa, aaa, bb, bbb, ba, aba.....}.

o A string with zero occurrences of symbols is known as an empty string. It is represented


by ε.
o The number of symbols in a string w is called the length of a string. It is denoted by |w|.

Example 2:

1. w = 010
2.
3. Number of Sting |w| = 3

Language:

A language is a collection of appropriate string. A language which is formed over Σ can


be Finite or Infinite.

Example: 1

L1 = {Set of string of length 2}

= {aa, bb, ba, bb} Finite Language

Example: 2

L2 = {Set of all strings starts with 'a'}


= {a, aa, aaa, abb, abbb, ababb} Infinite Language

Hypothesis of automata will be An hypothetical extension about PC science Furthermore


scientific. It will be those investigation about conceptual machines and the calculation
issues that could make illuminated utilizing these machines. The unique machine will be
known as those automata. The primary inspiration behind Creating the automata principle
might have been with create strategies should depict Furthermore examine those dynamic
conduct of discrete frameworks.

This machine comprises from claiming states Furthermore moves. Those state is quell by
circles, and the moves will be spoke to Eventually Tom's perusing arrows.

Automata will be the sort of machine which takes some string as information What's more
this information dives through a limited number of states What's more might enter in the
last state.

There would the fundamental terminologies that are imperative and habitually utilized
within automata:. Symbols:. Images would a substance or single person objects, which
camwood a chance to be whatever letter, letter set or whatever picture.

Example:. 1, a, b, #. Alphabets:. Alphabets would a limited set for images. It may be


indicated Eventually Tom's perusing ∑.

Examples:.

1. ∑ = {a, b}. 2.

3. ∑ = {A, B, C, D}.

4.

5. ∑ = {0, 1, 2}. 6.

7. ∑ = {0, 1,. , 5].

8.
9. ∑ = {#, β, Δ}. String:. It will be An limited accumulation from claiming images starting
with those letter set. Those string will be indicated Toward w.

Illustration 1:. On ∑ = {a, b}, Different string that could make produced starting with ∑
are {ab, aa, aaa, bb, bbb, ba, aba.

}.

O a string for zero occurrences from claiming images may be known as an void string. It
may be quell by ε.

O those number of images in a string w will be called the length of a string. It is indicated
by |w|.

Illustration 2:. 1. W = 010. 2.

3. Number for sting |w| = 3. Language:. An dialect may be an accumulation about proper
string. A dialect which will be structured through Σ camwood be limited or limitless.

Example: 1. L1 = {Set of string for period 2}.

= {aa, bb, ba, bb} limited dialect. Example: 2. L2 = {Set for constantly on strings begins
with 'a'}.

= {a, aa, aaa, abb, abbb, ababb} limitless dialect.

Introduction

Automata Theory is an exciting, theoretical branch of computer science. It established its roots
during the 20th Century, as mathematicians began developing - both theoretically and literally -
machines which imitated certain features of man, completing calculations more quickly and
reliably. The word automaton itself, closely related to the word "automation", denotes automatic
processes carrying out the production of specific processes. Simply stated, automata theory deals
with the logic of computation with respect to simple machines, referred to as automata. Through
automata, computer scientists are able to understand how machines compute functions and solve
problems and more importantly, what it means for a function to be defined as computable or for
a question to be described as decidable.

Automatons are abstract models of machines that perform computations on an input by moving
through a series of states or configurations. At each state of the computation, a transition
function determines the next configuration on the basis of a finite portion of the present
configuration. As a result, once the computation reaches an accepting configuration, it accepts
that input. The most general and powerful automata is the Turing machine.

The major objective of automata theory is to develop methods by which computer scientists can
describe and analyze the dynamic behavior of discrete systems, in which signals are sampled
periodically. The behavior of these discrete systems is determined by the way that the system is
constructed from storage and combinational elements. Characteristics of such machines include:

 Inputs: assumed to be sequences of symbols selected from a finite set I of input signals.
Namely, set I is the set {x1, x,2, x3... xk} where k is the number of inputs.
 Outputs: sequences of symbols selected from a finite set Z. Namely, set Z is the set {y1,
y2, y3 ... ym} where m is the number of outputs.
 States: finite set Q, whose definition depends on the type of automaton.

There are four major families of automaton :

 Finite-state machine
 Pushdown automata
 Linear-bounded automata
 Turing machine

The families of automata above can be interpreted in a hierarchal form, where the finite-state
machine is the simplest automata and the Turing machine is the most complex. The focus of this
project is on the finite-state machine and the Turing machine. A Turing machine is a finite-state
machine yet the inverse is not true.

Finite State Machines

The exciting history of how finite automata became a branch of computer science illustrates its
wide range of applications. The first people to consider the concept of a finite-state machine
included a team of biologists, psychologists, mathematicians, engineers and some of the first
computer scientists. They all shared a common interest: to model the human thought process,
whether in the brain or in a computer. Warren McCulloch and Walter Pitts, two
neurophysiologists, were the first to present a description of finite automata in 1943. Their paper,
entitled, "A Logical Calculus Immanent in Nervous Activity", made significant contributions to
the study of neural network theory, theory of automata, the theory of computation and
cybernetics. Later, two computer scientists, G.H. Mealy and E.F. Moore, generalized the theory
to much more powerful machines in separate papers, published in 1955-56. The finite-state
machines, the Mealy machine and the Moore machine, are named in recognition of their work.
While the Mealy machine determines its outputs through the current state and the input, the
Moore machine's output is based upon the current state alone.

An automaton in which the state set Q contains only a finite number of elements is called
a finite-state machine (FSM). FSMs are abstract machines, consisting of a set of states (set Q),
set of input events (set I), a set of output events (set Z) and a state transition function. The state
transition function takes the current state and an input event and returns the new set of output
events and the next state. Therefore, it can be seen as a function which maps an ordered sequence
of input events into a corresponding sequence, or set, of output events.

State transition function: I → Z

Finite-state machines are ideal computation models for a small amount of memory, and do not
maintain memory. This mathematical model of a machine can only reach a finite number of
states and transitions between these states. Its main application is in mathematical problem
analysis. Finite-machines are also used for purposes aside from general computations, such as to
recognize regular languages.

In order to fully understand conceptually a finite-state machine, consider an analogy to an


elevator:

An elevator is a mechanism that does not remember all previous requests for service but the
current floor, the direction of motion (up or down) and the collection of not-yet satisfied requests
for services. Therefore, at any given moment in time, an elevator in operated would be defined
by the following mathematical terms:

 States: finite set of states to reflect the past history of the customers' requests.
 Inputs: finite set of input, depending on the number of floors the elevator is able to
access. We can use the set I, whose size is the number of floors in the building.
 Outputs: finite set of output, depending on the need for the elevator to go up or down,
according to customers' needs.

A finite-state machine is formally defined as a 5-tuple (Q, I, Z, ∂, W) such that:

 Q = finite set of states


 I = finite set of input symbols
 Z = finite set of output symbols
 ∂ = mapping of I x Q into Q called the state transition function, i.e. I x Q → Q
 W = mapping W of I x Q onto Z, called the output function
 A = set of accept states where F is a subset of Q

From the mathematical interpretation above, it can be said that a finite-state machine contains a
finite number of states. Each state accepts a finite number of inputs, and each state has rules that
describe the action of the machine for ever input, represented in the state transition mapping
function. At the same time, an input may cause the machine to change states. For every input
symbol, there is exactly one transition out of each state. In addition, any 5-tuple set that is
accepted by nondeterministic finite automata is also accepted by deterministic finite automata.

There exist several types of finite-state machines, which can be divided into three main
categories:

 acceptors: either accept the input or do not


 recognizers: either recognize the input or do not
 transducers: generate output from given input

Applications of finite-state machines are found in a variety of subjects. They can operate on
languages with a finite number of words (standard case), an infinite number of words (Rabin
automata, Bïrche automata), various types of trees, and in hardware circuits, where the input, the
state and the output are bit vectors of a fixed size.

Finite State vs. Turing Machines

The simplest automata used for computation is a finite automaton. It can compute only very
primitive functions; therefore, it is not an adequate computation model. In addition, a finite-state
machine's inability to generalize computations hinders its power.

The following is an example to illustrate the difference between a finite-state machine and a
Turing machine:

Imagine a Modern CPU. Every bit in a machine can only be in two states (0 or 1). Therefore,
there are a finite number of possible states. In addition, when considering the parts of a computer
a CPU interacts with, there are a finite number of possible inputs from the computer's mouse,
keyboard, hard disk, different slot cards, etc. As a result, one can conclude that a CPU can be
modeled as a finite-state machine.

Now, consider a computer. Although every bit in a machine can only be in two different states (0
or 1), there are an infinite number of interactions within the computer as a whole. It becomes
exceeding difficult to model the workings of a computer within the constraints of a finite-state
machine. However, higher-level, infinite and more powerful automata would be capable of
carrying out this task.

World-renowned computer scientist Alan Turing conceived the first "infinite" (or unbounded)
model of computation: the Turing machine, in 1936, to solve the Entscheindungsproblem. The
Turing machine can be thought of as a finite automaton or control unit equipped with an infinite
storage (memory). Its "memory" consists of an infinite number of one-dimensional array of cells.
Turing's machine is essentially an abstract model of modern-day computer execution and
storage, developed in order to provide a precise mathematical definition of an algorithm or
mechanical procedure.
While an automaton is called finite if its model consists of a finite number of states and functions
with finite strings of input and output, infinite automata have an "accessory" - either a stack or a
tape that can be moved to the right or left, and can meet the same demands made on a machine.

A Turing machine is formally defined by the set [Q, Σ, Γ, δ, q0, B, F] where

 Q = finite set of states, of which one state q0 is the initial state


 Σ = a subset of Γ not including B, is the set of input symbols
 Γ = finite set of allowable tape symbols
 δ = the next move function , a mapping function from Q x Γ to Q x Γ x {L,R}, where L
and R denote the directions left and right respectively
 q0 = in set Q as the start state
 B = a symbol of Γ, as the blank
 F ⊆ Q the set of final states

Therefore, the major difference between a Turing machine and two-way finite automata (FSM)
lies in the fact that the Turing machine is capable of changing symbols on its tape and simulating
computer execution and storage. For this reason, it can be said that the Turing Machine has the
power to model all computations that can be calculated today through modern computers.

Q.2 Consider the language S* where S = {xx xxx}. In how many ways can x 19 be written
as the product of words in S? This means: How many different factorizations are there of
x19 into xx and xxx?

ANSWER.

x19 camwood include of 8 pairs (xx) What's more 1 triple (xxx) → 8*2 + 1*3 = 19.
x19 camwood include of 5 pairs (xx) and 3 triples (xxx) → 5*2 + 3*3 = 19.
x19 camwood include for 2 pairs (xx) what’s more 5 triples (xxx) → 2*2 + 5*3 = 19.
3 pairs camwood a chance to be swapped by 2 triples: (xx)(xx)(xx) = (xxx)(xxx).
Let xx = d also xxx = t.
Individuals amount of methods of factoring 19 x’s under d’s and. T’s is rise toward to.
Individuals amount from claiming routes from claiming orchestrating 8d’s and1t
+ Those amount from claiming routes of orchestrating 5 d’s Furthermore 3 t’s
+ those amount from claiming routes for orchestrating 2 d’s What's more 5 t’s.
Distinguishable permutations:
In a situated of n Queries comprises from claiming k diverse sorts from claiming Queries (with
n1 Queries of the to start with kind, n2. Queries of the second sort. The place n1 + n2 +. nk = n)
the number about recognizable.
Permutation is:
n! / (n1!*n2!*…. nk!).
Organize 8 d’s What's more 1 t: 9! / (8! 1!) = 9.
Organize 5 d’s and 3 t’s: 8! / (5! 3!) = 56.
Organize 2 d’s Furthermore 5 t’s: 7! / (2! 5!) = 21.
9 + 56 + 21 = 86 routes for calculating x19 on aggregations about xx Still xxx.

Q.3 Give a recursive definition for the language S* where S = {aa, b}?

ANSWER.

RECURSIVE DEFINITION

a. Give recursive definition of language defined over alphabet Σ = {a, b}, having all strings
STARTING

WITH aa OR ENDING WITH bb

1. aa and bb belong to this Language


2. (aa)s and s(bb) also belong to this language such that s belongs to (a+b)*
3. No other strings except describe above are part of the this language

b. Give recursive definition of language defined over alphabet Σ = {a, b}, having all strings with
length

MULTIPLE OF 2

a. ^,aa,ab,ba and bb belong to this Language


b. If s belong to this language then so is ss
c. No other strings except describe above are part of the this language

c. Give recursive definition of language defined over alphabet Σ = {a, b}, having all strings NOT
ENDING with aa or bb

1. ^, a, b belong to this Language


2. s(ab) and s(ba) also belong to this language where s belongs to (a+b)*
3. No other strings except describe above are part of the this language

d. Give recursive definition of language defined over alphabet Σ = {a, b}, NOT HAVING ab at
any place.

1. ^,a,b belong to this Language


2. s1s2 are also part of this language where, where s1 belongs to b* and s2 belongs to a*
3. No other strings except describe above are part of the this language

e. Give recursive definition of ODD PALINDROME (PALINDROME WITH ODD STRINGS


ONLY) defined over

alphabet Σ = {a, b}

1. a,b belong to this Language


2. If s belong to this language then so is, (s)(s)(Rev(s)) [parentheses have been added just
for clarity]
3. No other strings except describe above are part of the this language

Q. 4 Construct a regular expression defining the following languages over the

alphabet  = {a, b}. All words that contain exactly two b’s or exactly three b’s,

not more.

ANSWER.

REGULAR EXPRESSIONS

Give Regular Expression for each of the following language defined over alphabet Σ = {a, b}

a. Language having all strings STARTING AND ENDING WITH ab

RE: ab (a+b)*ab
b. Language of strings NOT having bb OR aa at any place

RE: (^+a+b) + (^+b) (ab)*(^+a) + (^+a) (ba)*(^+b)

[You can try to simply it further]

c. Language of all strings NOT HAVING aab in start

RE: ^ + (a+b) + (a+b) (a+b) + (aaa+aba+abb+baa+bab+bba+bbb) (a+b)* [Making all


strings of length 3 except aab]

d. Language of all strings NOT HAVING aab in end

RE: ^ + (a+b) + (a+b) (a+b) + (a+b)* (aaa+aba+abb+baa+bab+bba+bbb)

e. Language of all strings HAVING count of b’s multiple of 2 [No restriction on count of a]

RE: (a*(ba*b)*a*)*

Q. 5 Build an FA over the alphabet  = {a, b} that accepts the language of all

words with only a’s or only b’s in them. Give a regular expression for this

language.

ANSWER.

You might also like