www.nskinfo.com && www.nsksofttch.comDepartment of nskinfo-i education
CS2303-THEORY OF COMPUTATION
•Chapter: RECENT DEVOLOPMENTS IN LANGUAGE THEORY
1
Mathematics
Mechanics,(Fluid Dynamics, etc)Algebra
Pure applied
Analysis Statistics
Discrete Mathematics
Graph TheoryFormal Languages
& AutomataLogic Fuzzy Sets
Formal Languages & Automata
Cornerstone of Theoretical Computer Science
Origin & Motivation from different sources
New Applications:
1. Cryptography
2. Graphics and Artificial Intelligence
3. Pattern Recognition
4. DNA computing.
Formal Languages
An abstraction of general characteristics of programming languages.
Automaton
A construct which possesses all the indispensablefeatures of a digital computer.
Language
• A system suitable for the expression of certain ideas, facts or concepts, including a set of symbols and rules for their manipulation.
• To study language mathematically we need a mechanism to describe them.
6
X – Finite Alphabet
X* - Set of finite words
ExampleX = {a, b}
X* = {λ, a, b, aa, ab, bb, . . . }
Preliminaries
7
Let L X* – language
a a . . . a (n times) = an;
If X = {a, b} thenL = {anbn : n ≥ 1} is a language
Characterizing L by finite set of rules, called Grammars, is Formal Languages.
8
• DNA – Deoxyribonucleotide• DNA – molecules are made up of
Adenine CytocineThymine Guanine
nitrgen bounded bases• DNA exists in double stranded linear or circular
form.• DNA molecules are strings (words) over
A T C GX
T A G C
DNA Sequence
A T C G A T G C G C A G TT A G C T A C G C G T C A
• Protein – String over twenty amino acids
• RNA – String over four ribonucleotide
Different variants of words
• Word
• Circular words
• Infinite words, Bi-infinite words
• Two dimensional words (arrays)
• Infinite arrays
• Chain code pictures
Circular words
- Motivated by the structure of DNA sequences
A circular word c is
We denote it by a1a2 … an.
ie… a1a2 … an is one linearlized form of C.
3
2
1
. .
. .
.
n
a
a a
a
Example:
= aabbaa = bbaaaa = baaaab = …..
In other words circular word c is an equivalence class in X* under the relation defined as x y if y is a cyclic permutation of x.
Collection of all circular words is denoted as X .
aa
ba
ba
Infinite words
Infinite word is a function u : N
We represent infinite word as u = u1u2 …
(a sequence of elements of )
Example: = {a, b}u = abaabb…
- Set of all infinite words over - Set of all finite and infinite words over
L - -language
Bi-infinte words are functions from integers Z to .
Array over is of the form
** - collection of all arrays over
If = { o, x}, then
Collection of arrays is called picture languages.
11 12 1
21 22 2
1 2
n
n
m m mn
a a a
a a a
a a a
**
x x x
o x o
o x o
x x x
Kolam is a traditional art practiced extensively
in the southern part of India,
for decorating courtyards of dwellings.
Chain code picture languages
Position Vector or generalized Parikh Vector
u ; = (a1, a2, . . . , an)
P(u) = (p1, p2, . . . , pn) where
where Ai gives all the positions of the letter ai in the word u.
Example: = {a, b}u = abaa
u = ababab… = (ab) ,
1
2i
i ij A
p
3 4 2
1 1 1 1( ) ,
2 2 2 2p u
3 2 4
1 1 1 1( ) ,
2 2 2 2
2 1,3 3
p u
Results
• If u and if p(u) = (p1, p2, . . . pn) then
(i) p1 + p2 + . . . + pn = 1 and
If u * (ii) p1 + p2 + . . . + pn = 1 – (1 / 2n )
.
a
b2
b
a2 a
b
abba
DefinitionL - line language if there exists a line l in R2 such that L = { x : p(x) l }.l – language line of L.
Examples1. L = (anbn) (anbn) line language lies on
y = x/(2n)2. L = (a* b) a - line language lies on x + 2y = 1
Grammar for English language tells us whether a particular sentence is well formed or not.
Typical rule of English grammar<sentence> <noun phrase> <verb pharse> < noun phrase> <article > <noun>< verb phrase > < verb > < article > A / The < noun > boy / dog <verb> runs
The boy runs27
<sentences>
< noun phrase > < verb phrase >
< article > < noun > <verb>
The boy runs
28
S aSb, S ab
Replace S by aSb or abS – variable; a, b – constants
S abS aSb aabb = a2b2
S aSb aaSbb aaabbb = a3b3
L = {anbn : n ≥ 1}
29
L-Systems
DNA Computing
Membrane Computing
L-Systems
32V R Dare, MCC
33V R Dare, MCC
Aristid Lindenmayer (1925-1989) was a biologist who studied the growth patterns of various types of Algae.
He devised L-systems in 1968 to provide a formal description of such simple multi-cellular organisms.
Later, this system was extended to describe higher plants and complex structures.
• He found some very many interesting properties in the geometry
of a tree, the blood vessels, a cauliflower, the roots of a plant, or
a fern.
• One interesting property is the property of self similarity.
• He also found that several mathematicians like Cantor, Sierpinski,
Koch, Hilbert etc. had already studied this property, and have
defined several interesting mathematical objects. We will discuss
about a few
L-systems are used in:
• generating realistic plant like images like trees, bushes and flowers.
• for producing generative art
• for producing music using algorithmic composition techniques
• to produce fractal images
• to produce antennas and integrated circuits to hold enormous amount of memory
• to build robust buildings with minimum weight and maximum strength
36V R Dare, MCC
• The distinguishing feature of an L System over the formal language is that in an L- system the production rules are applied in parallel
Definition: A DOL system is a triple
G=(S, h,w), where S is an alphabet, h is an
endomorphism (homomorphism to itself)
defined on S* and w, called an axiom, is an
element of S* The word sequence E(G)
generated by G consists of the words h0(w),
h1(w), h2(w)… and the language of G is
L(G) = {hi(w)/ i >=0}
Examples:
G=({a,b},h, ab) where h(a)=a, h(b)=ab
Then, E(G) = ab, aab, aaab, ...,
and the language of G is
L(G) = {an b / n >0}
Cantor Dust
variables : { A, B } start : A {starting character string} rules : (A → ABA), (B → BBB) Let A mean "draw forward" and B mean "move forward".This produces the famous Cantor’s fractal set on a real
Fibonnacci sequenceIf we define the following simple grammar:
variables : { A, B }
rules : (A → B), (B → AB) then this L-system produces the following sequence of strings:
n = 0 : A n = 1 : B n = 2 : AB n = 3 : BAB n = 4 : ABBAB n = 5 : BABABBAB n = 6 : ABBABBABABBAB n = 7 : BABABBABABBABBABABBAB
Sierpinski Trianglevariables : { A, B }
start : A
rules : (A → B−A−B), (B → A+B+A)
angle : 60 �Here, A and B both mean "draw forward", +
means "turn left by angle", and − means "turn
right by angle"
Sierpinski Triangle
Koch Island
Start: F+F+F+F p: F -> F+F-F-FF+F+F-F
F: draw +: move right -: move left
Plant images
Start: F rule: F -> F[-F]F[+F][F]
Other visually appealing shapes produced by L systems
plant-like objects produced by L systems
angle 22.5START -> FF -> FF-[-F+F+F]+[+F-F-F]
DNA Computing
• DNA – Deoxyribonucleotide• DNA – molecules are made up of
Adenine CytocineThymine Guanine
nitrgen bounded bases• DNA exists in double stranded linear or circular
form.• DNA molecules are strings (words) over
A T C GX
T A G C
• Model the action of restriction enzymes on DNA – sequences
• Define an algebraic structure on the set of all DNA-Sequences.
Splicing Operation on DNA sequences occurs in 2-steps
Step – 1: Cutting DNA modules by restriction enzymes.
Step – 2: Ligase enzyme binds them together.
Restriction enzymes added (i) DpnI, (ii) Bal IDpn I GA TCActs on CT AG
A A A G A T C A A A Ax
T T T C T A G T T T T
x1 x2
A A A A A A AG A T C
C T A GxT T T T T T T
Step - 1
Bal I T G G C C Aacts on A C C G G T
C C C C C C C
yG G G G
T G G C C A
A C C G G T G G G
C C C C T G G C C A C C Cy
G G G G A C C G G T G G G
C C C C C
xG G
T C G A
AG GG C T G
A A A A AyT T
C G C
C
G
T TG C G T
T T T T TZ
A A
G C G C
CA AG C G A
Taq I
Sc1nI
Hha I
Restricted Enzymes added are Toq I, Sc1NI, HhaI.
Consider the DNA-sequences
= … …
where N is any arbitrary deoxyribonucleotide.Apply the enzyme EcoRI on
• EcoRI operates at six term sequence• The cut takes place at x.• The cut is a staggered one.
N N G A A T T C NN
N N C T T A A G NN
N N C T T A A
N N C A A T T G NN
G NN…
…
Step 2:• The staggered strands of DNA reassociate if the ends are in
the neighbourhood of each other by a chemical called “ligase”.
• Consider two DNA sequences, and .
Apply restricted enzyme and it cuts and .
After reassociation original modules are formed.
Two new hybrid molecules are formed by the left half of the first of the original molecule reassociated with the right half of the second and the right half of the first with the left half of the second.
Questions to be analyzed
Suppose we are given a finite set M of DNA sequences and a finite set of
restriction enzymes and ligase enzymes.
What is the nature of the language consisting of all DNA modules that can
arise through the action of restriction enzymes and ligase enzymes.
Splicing rule over an alphabet V isu1 u2 $ u3 u4
where u1, u2, u3, u4 V*, $ , are special symbols not in V.
For the splicing rule r = u1 u2 $ u3 u4, and for x, y, w, z V* ,
(x, y) {w, z} if x = x1u1u2x2, y = y1u3u4y2,
z = x1u1u4y2, w = y1u3u2x2
for x1, x2, y1, y2 V*.
A Splicing scheme – (V, R) V – finite alphabetR – a set of splicing rule over V.
r
For a splicing scheme h = (V, R) and L V*,n (L) = { w, w : (w1, w2) {w, w } for
some w1, w2 L and r R}
A Splicing system or H-system is H = (V, A, R)V – AlphabetA V* - initial languageR – set of splicing rules
Language accepted by H is L(H) = *(A)
r
1( ) ( ) ( )) : 0i i ih h h hL L L i
*
0
( ) ( )ih h
i
L L
An extended H-system H = (V, T, A, R)V – variables, T – terminal alphabetA V* - initial language R – set of splicing rules
L(H) = *(A) T
H – system is finite if A, R are finite
Results Every finite H system generates only regular languages.
The inclusion is strict. A language is regular iff it is generated by a extended
finite H- system.
Generation of words
uaxbv, wcxdz I(a, x, b), (c, x, d) – patterns
The new words formed are u a x d z and w c x b vu a x b v
w c x d zThe language generated by H is the minimal subset of A* which contains I and closed under the operation of splicing.L(H) – languages generated by the splicing system H.
Recognizable languages are also morphic images of languages generated by splicing system H.
MEMBRANE COMPUTING
66
Cell has a complex structure with several compartments called Organelles.
Eg: Nucleus, Golgi apparatus, Ribosomes ,...
Cell and these compartments are covered by cell membrane called Plasma Membrane.
Membrane is a phospholipid bilayer (2 layers of phospholipid molecules) in which protein,
cholestrol, steriods and other molecules are embedded
67
68
69
Plasma membrane is only partially Plasma membrane is only partially permeablepermeable
– some non changed molecules cross the membrane almost freely
– Larger molecules can cross a membrane if they are assisted
– Charged ions pass selectively from a region to
another one
70
Basic functions of a biological membrane is to define compartments and to relate
compartments to their environment.
• Ensures some molecules to stay in the Cell.• Blocks some substance like toxic molecules to
stay out of Cell.• Allows some molecule (waste products) to leave
the Cell.• Allows nutrients to enter the Cell.
71
Membrane StructureMembrane Structure
Hierarachical arrangement of membranes - all of them placed in a main membrane called Skin Membrane.
A Membrane without Membrane inside is
called Elementary Membrane.
72
ExampleExampleSkin membrane
region
Elementary membrane
1
3
25
7
4
6
8 9
1
2 3 4
5 7
6
98Tree associated with Tree associated with
the membranethe membrane
73
Region of a Membrane
Multiset of Objects Evolution rules (molecules inside (transformation of
the membrane) molecules)
74
Each region r contains evolution rulesEach region r contains evolution rules
Rule is of the form
a (bc, in)
or
a (bc, out)
or
a (bc, here)
a (bc, in)
a (bc, here)
a (bc, out)
a
bc
a
a
bc
bc
76
Re- writing P- systemRe- writing P- system
= (V, T, μ, M1, M2, R1, R2)
• V = {a, b, c, d, d’ ,e, e’} ; T = {a, b, c}
M1 = {de} ; M2 = Φ =
• R1 = {(d ad’b, here), (e ce’, in), (d ab, here) (e c, out)} ; P1 = Φ
• R2 = { (d’ d, out), (e’ e, here) } ; P2 = Φ
12
77
ComputationsComputations
de abeabc
ad'be
ad'bce' ad'bce
adbceaabbce
a2b2c2
{a{annbbnnccnn : n : n1}1}
Top Related