3. MACHINE
A device that receive a set of input signals
and produce a set of output signals is
called information processing device.
Input
signals
Input
processing
machine
Output
signals
4. Examples of machines
A Table lamp is an information processing
machine with the i/p signals being either up
or down position of switch and o/p signals
being either on or off.
An Adder is an information processing
machine with the input signals being to
decimal number and output signal being their
sum.
An automobile is an information processing
machine with depression of accelerator and
angular position of steering wheel is an input
signal and output signals are speed and
direction.
Digital computer take input and displays
5. STATE MACHINE
a state machine is any device that stores the status of
something at a given time and can operate on input to
change the status and/or cause an action or output to
take place for any given change. A computer is
basically a state machine and each machine instruction
is input that changes one or more states and may
cause other actions to take place. Each computer's data
register stores a state. The read-only memory from
which a boot program is loaded stores a state (the boot
program itself is an initial state). The operating system
is itself a state and each application that runs begins
with some initial state that may change as it begins to
handle input. Thus, at any moment in time, a computer
system can be seen as a very complex set of states
and each program in it as a state machine. In practice,
however, state machines are used to develop and
describe specific device or program interactions.
6. a state machine can be
described as:
An initial state or record of something
stored someplace .
A set of possible input events .
A set of new states that may result
from the input .
A set of possible actions or output
events that result from a new state .
7. FINITE STATE MACHINE
A finite state machine is one that has a
limited or finite number of possible
states. (An infinite state machine can be
conceived but is not practical.) A finite
state machine can be used both as a
development tool for approaching and
solving problems and as a formal way of
describing the solution for later
developers and system maintainers.
There are a number of ways to show
state machines, from simple tables
through graphically animated
illustrations.
8. Finite state machine is specified by six tuples
(S,I,O,F,G,So)
Where,
S=finite sets of states (S0,S1,S2,S3….) whose
elements are called state of machine.
So= So is special element of S referred to as
the initial state of machine.
I=(I1,I2,….) is finite set of input letters.
O=(O1,O2,….) is finite set of output letters.
F= is a function from S*I to S called the
transition function.
G=is a function from S to O called the output
function.
9. At any instant a finite state machine is one
of its state. On receiving an input symbol
the machine will go to the another state
according to the transition function at each
state machine produces an output function.
At every beginning the machine is in initial
state as 0.
11. Introduction
the Chomsky hierarchy (occasionally
referred to as Chomsky-Schützenberger
hierarchy) is a containment hierarchy of
classes of formal grammars. This hierarchy of
grammars was described by Noam Chomsky
in 1956. It is also named after Marcel-Paul
Schützenberger, who played a crucial role in
the development of the theory of formal
languages. The Chomsky Hierarchy, in
essence, allows the possibility for the
understanding and use of a computer science
model which enables a programmer to
accomplish meaningful linguistic goals
systematically.
12. Chomsky hierarchy
• Grammars are classified by the form
of their productions.
• Each category represents a class of
languages
that can be recognized by a different
automaton.
• The classes are nested, with type 0
being
the largest and most general, and
type 3 being the smallest and most
restricted.
13.
14. To define certain types of
grammar we require a definition
– in a production of the form -
aAb → a α b
Where,
a is called left context
b is right context
a α b is the replacement string
For example: in a production aA → abA
the left context is a , the right context
is A .
17. Type 3 :
A grammar is said to be type 3 grammar
or regular grammar if all production in
grammar are of the form A → a then A →
aB or equivalent of the form A→a or
A→Ba.
in other words in any production (set of
rules) the left hand string is single non-terminal
and the right hand string is
either a terminal or a terminal followed
by non-terminal.
18. Type 2 :
A grammar is said to be type 2
grammar or context free grammar if
every production in grammar is of the
form A → α .
In other words in any production left
hand string is always a non-terminal
and a right hand string is any string on
T U N .
Example : A → aBc
19. Type 1 :
A grammar is said to type 1 grammar or
context sensitive grammar if for every
production α→ß . The length of ß is
larger than or equal to the length of α .
for example:
A→ab
A→aA
aAb→aBCb
20. Type 0 :
A grammar with no restriction is referred
to as type 0 grammar . They generate
exactly all languages that can be
recognized by a Turing machine. These
languages are also known as the
recursively enumerable languages. Note
that this is different from the recursive
languages which can be decided by an
always-halting Turing machine.
Class 0 grammars are too general to
describe the syntax of programming
languages and natural languages .