0 ratings0% found this document useful (0 votes) 154 views11 pagesCSC 304
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content,
claim it here.
Available Formats
Download as PDF or read online on Scribd
AMBROSE ALL) uypyERSITY, EKPOMA
FACULTY OF yyURAL SCIENCES
DEPARTMENT O14 COMPUTER SCIENCE
2OIS2N16 FIRST SEMESTH 1g 43.5¢ DEGREN EXAMINATIONS
CSC NE: Automata, Theory, Formal Languae aug Computability ‘Time: May Bates 2-08-2014
Inssructions: Answer ut
ONE and ane aitey THREE qetian
fe Automat (ii) Computational Tbsory Gi} phabet OWS Proof
une (vidhargwage (7
b. Urielly explain the major areas ate
mputational theory that is central (0 toc pputers (5 marks)
nd jaca
knowled Y exposed computer scientist to different comp
feats, Payal any bve of these models and their pea at application in eompater science
L'What i a bunlesl fice pus? Stale is applications in computer svienve (5 ars) .
dently oid explain any algonlyn used 0 recognized content free anguaye in automata theory (5/
hs) i SL
Briefly explain four of the operations that can be used foe kung ification formalism (4 meeks: j
A facnal Ioecrtgye theory’ yoes separate Tormalisin fo describe a kanguage recogni ou tee
ce rausgs J yor azar CF marks)
Coamsideh the ex, wun (VELDOL*, Briefly describe iis expression based on the set of all its bi
Pijvieny compare the easuphcsity of a grammar with tak OF We abiguare (3 migeks
yet chink thot a yeanintar bs alway thesis a aor? (baths) Ce
nares of Hen Rang ns hearer Wat),
te, Aletify any dhree teva
State five vfitfevent
Briefly esplain parsin smspastationsll sem oF pursing
What is a ieputar exprewion( RE}? Given an expres ea oF te form (UL? HOT UL)*. Show
KI (7 arwiksy ¢
Assuuning tha! only foscr ease lellers with al Least (wo Hellers are being useddin a word. Write a RE hist
hes the woud that sos's and endvin vowel bimvuksys— (AR \Ca-r]* Ca&evod ( ~
dentify the propertics of primitive regotar expression and state the-algorithrs| ased. tw composed
fiesnal reputar espression fiom itsprionitive (6 naatks) \
ven thitt § ura? y describe the kinase {xy}: Analyze the operational precedence that ean
Feemuing sor were piven a kayuage fade}. Using ke. show thal all stings gontain at feast ae
Avice of cach synobot in the piven language (9 marks)
anil thers? Wil the help of a diapruot explain the features of antunnata (5 anarks)
4 CX uiupte shaw the closure pro Sera «Gh marks) |
: perce fa nanan some piven ye OF String, of inputs im dbserety thane steps
Yemncrale these steps te moaths)AMBROSE ALY
FACULTY oy
DePAR
) \6
ang (91 O1SOIG NIK:
TVUNIVERSTEY, PRVOMA
Puy sical SCUNCES
ENT OF COMPUTER SCIENCE
SPMES TR DRGREN RNAMINATION
AComNEA Thoory, Born
Answer ques
Langu
P ARE anal Compuads
ONE and any other THE
The
Date: 18-88.2017
B questions
FZ eine fttowing terms 4p Patndrome
“Gb folly exptain the major areas of computational * BAAS
& ve knowledge and idea of automata theory © ae
n xplain any two of these models and their arc
algorithm used to recog
® Ai refly explain four of the operations that can be used {SF language specification form
sear: form li
uur ifferent applica
1 riefly explain sae Sonate semantics,
ve 198 (S marks)Me . Se Vru
| Machine(TM) Which «
¢) sa Tuite JS? (4 mi
ested memory 2 TUNE Ts define an :
vanvatieted at ty what isa TMC a ae Benet by Cy, s
$4. Similar to a FA but will a vor a 1 mar (CEG). HE BEN is Me
Leaps cortain problems thal 2A ext PS Yeggions Show thal yan Ys) we
a eee aston oF 8 Co eguat YF asin computer see C
wl w
i
f p /
iat is the root of H? (1 mark)
ify the parent of the node w (1 mark) |
identify the children of the node x (1 mark)
+ // Idemify the children of node w (1 mark)
*/ What is the level of each node? (1 mark) ~ |
7 Which nodes core in the sub-tree rooted at z (1. mark) i ’
and Lz are regular languages, show that ly +L2 and Gils
When js a language said to be regular? If Ly
lar Languages.(Smarks} $
istan irregular language? Is the language
arks)
Purping Lemma. The Pumping lemina relates t!
'a OF A; Briefly states what the Pumping lemma says about the above a:
dd we say that @ problem is effectively solvable? Consider the probl
tic spnons of the form Y=ax? 4by ec, justify that itis effectively solvable.(3 mai ks).
\
{0°1": n>0) regular or inreguiar? Justify- your
he sizo of strinyy bceepted with the number of
ertign.(S marks)
lem of finding roots of 2f AMBROSE ALLI UNIVERSITY, EKPOMA
j FACULTY OF PHYSICAL SCIENCES
DEPARTMENT OF COMPUTER SCIENCE
2019/2020 FIRST SEMESTER DEGREE EXAMINATIONS
CSC 304: Automata Theory, Formal Language and Computabi
y Date: 06/03/2021
Instructions: Answer Question one and any other three Questions.
me: 2 Hours
1a" Define the following terms (i) Symbol (ii) Alphabet (iii) Language (iv) Theorem (v) String (5 marks)
b. What is a string? Determine the set of all strings over the alphabet ¥ = {0.1} that start with 0 and design its
state machine (5 marks)
¢. Using the state machine in 1b, practically show if the following strings are accepted of not and explain why
(i) O111 (ii) O11 (itd) 10011101 (iv) 00111010110 (v) 010001 (5 marks)
d. What are finite automata? Given that m= (Q, , d, qo, F), L~ {w/w start and end with
b}. You are required to design its transition diagram. (3 marks)
¢. Given that L= (w/w start and end with “x”. WE {x
state and undesired state of the machine (5 marks)
f. Given that m= (Q, 5, d, go, F), L = {w/w start and end with
NFA. (6 marks)
a WEED fa
y}*}. Design the finite automata that show the desired
WEE*}, Y= {n,m}, Design the DFA and the
2A. What is formal Grammar? How is it different from formal lange
b. Design a formal grammar and language of your choice and chee!
language. (7 marks)
¢. Using relevant example describe any five different operations on formal languages (5 marks)
marks)
for any syntactic error when parsing the
3a
vant example explain the properties of RE (6 marks)
at is Regular Expression (RE)? With rel
b. Consider the regular expression (Oul}O!*. Briefly is expression based on the set of all its b
strings (5 marks) .
© Identify’ the properties of primitive regular expression and state the algorithm used to compose additions!
regular expression from its primitive (6 marks)
4a’ Briefly describe the following: (i) Complexity theory (ii) Computability theory (iii) Automata theory (6
marks)
bb. Design an ambiguous grammar and briefly show its ambiguity using any language of your choice. (6 marks)
«¢. Design an algorithm that can be used to describe a language from a grammar. (5 marks)
Saf Given that m= (Q, 2. qo, F), L = {w/w start with “4” and end with “5
DFA. (5 marks)
b. What is a context free grammar? With relevant ‘example differentiate between terminals and non terminals of
a grammar. (5 marks)
Design a grammar that can be used to parse the language xyyaab and show its parsing. (7 marks)
Ga, What is a syntax tree” Given that M+M+M | M*M [ id, generate the syntax tree for the strings s+ (Note
M-Expression and id~identifier). (6 marks)
. Practically show if ambiguity exist in the production in question 6a or not. (6 marks)
c Given that m= (Q. 2, d, go, F), L= {whv start with “y” and end with “2”. wEE*}. E> fy, 24, Design its NEN
(5 marks)
1 |eine (7) ania
Y Cuiti
O) Whar
wits (ICS)? Outling the
aii + Saye
(ey What isa econo? Statetite >. Dean the uth
Gla) ries exptain the apera "Of registers,
aN OW Of a roy rster
()" Define a mricraprocescei, Stare its charneteristic
& til
(YA tihetorconputce comprises of 3
syste:
b-sy
oe ko
a
my lcanationad
ble andl the diage
nel Identify she va
id explain how it
ies (iv) ipo
iv Bipotar teehnologi
S
of Ic
identity and explain brie!
Weehiiblogics,
‘un Tora 3tor$ line decor
arious ways to trans
cules cich instractio
nul the passible
i infornation
i nives
ich of these suibeAMBROSE ALL UNIVERSITY, EKPOMA
FACULTY OF PHYSICAL SCIENCES
DEPARTMENT OF COMPUTER SCIENCE
2017/2018 FIRST SEMESTER DEGREE EXAMINATION
Time: 2hrs Date: 19-04-2018
CSC 304: Automata Theory, Formal Language and’ Computability
Instructions: Answer question ONE and any other THREE questions
age (ili) Formal language (iv) Pistia:
1. {a}. Define the following concepts (i) Concatenation (i) Regular Lang
Graph {v) Theorgm (vi) Syntax
{b). Automata theory deal with definitions and prep
three examples of tnese models.(3 marks)
{€}:Isittrue that actual computer is differe
(B marks)
{@). State Kleene’s theory. Why is it important in automata theory?(4 m
{ell What do you understand by automata theon ? (jt) State any thre® classes of automate. (5 mark)
{fy The theory of computation can be subdivide into differént areas. Explain any-threé of these areas and
‘ee (vil) Palindcome (7 marks)
asap
.ypes of computational models. Explair:
from jnite automata? Justify your claim with superior argument
Se i
marks)
{c). State the pumping lemma theorem. Explain b
fanguage is not regular. (6 marks)
0
ta ae ae ee
ase i i a
1 3,{a). What is grammar? How is it different from @ language? Outline briefly how you can use grammar to
describe a language by generating each string of that language (7 marks) “4
(iin Matt ss contenree \anguage {CFU}, and l; is tfe language generated by the regular expressiont| |
fart show that 14-1; marks} “ Py
{c). What is context free grammar (CG)? identify 4 areas where itis applied in computer science.{6 marks)
fly now you can use’a pumping temma_to prove that a,
4.{a). What is Pushdown Automata? How fit different from Non-Deterministic Finite Auteinata? State some
of it equivalence with CFG (7 macks)
that L: and L; are regular fanguage, show that the concatenatien and star operations of this
‘are also regular (5 marks) ‘
‘we say a problem is effectively solvable? Given that xfvyrt2=0, jDeslts BL pons epost elas)
& AMBROSE ALLIUNIVERSITY, EKPomA YS°
. FACULTY OF PHYSICAL SCIENCES
ON)
wl DEPARTMENT OF COMPUTER S xc
e UTER SCIENCE
_ 2018/2019 FIRST SEMESTYR DEGR BON HON
CSC 304: Automata Theory, Formal
nd Computability
Instructions: Answer Question ome av
(
to fine the following terms (i) Symbol (ii) Alph
(Smarks) ~ :
}. What is a string? Determine the set of ail sities overihe 42 (017 th rh
design its state machine (5 marks)
¢. Using the state machine in 1b, practically
explain why. (i) 111 (i) 011 (ii) 100! 1101 (iv)
a d. What are finite ae Given that m= (Q, ©
DFy, D> {a,b}. You to design its wansition diagr
fe. What is a for
_ of formal lai
£. Given that
the desired state and undes
marks)
¢ frequently used in the study”
x different opera
‘ages (5 marks)
L= (wiw start and end witha". W Faia, BV)
}. Design the finite automata that show
od state of the machine (5 marks) :
7
show that all strings contain at least
a language {3
in the given language
h the help of a diagram explain
rigs oF
2a. Assuming you were giv
‘one-occurrence of each symbol
b. What is automata theory ? Wit
~¢, With rele wy the elosure prop
a, An automat
ken Briefly
3A. Briefly describe the Chomsky Hierarehy aid explaiit ti
}. What are the two major extension and variztions on
Features of automata (5 marks} }
|
marks) |
‘tring of inpuls in disereie tine} |
ed to run on Some given seq
grammar? (4 marks) . ;
¢. Using computational theor en x=0 (4 mariss) t
d. Will relevant exampl bine two sets to form a
third one (6 marks) ea a
mimar with that of a language @
ja gee:
‘always thought of as a language generator? (4 marks)
nal language theorem (5 marks) ;
| semantics. Identify any :
avis tal,
vy in automata systems, proye that if yx“0, the
scribe any thrce set operations that can coml
ig. grammar? Briefly compare the complexity of 2 garue being used i
L two I
b. Assuming that only lower case letters with at
3 that, Matches the word that starts and e
©: Identity the properties of primitive regular ex
Additional regular expression from its primitive (6 ni
4. Given that x+y; x/y oF x* y de ‘
an occur in the lan;
rm
sion and stae the algorithi
(i) Graph (ii) Plannar Gray 7
6 mark
b. Draw a complete graph with five ver
©. What is a rooted tree? Brief
d. Briefly explain the thre
(6 marks)oe AMBROSE ALLI UNIVERSITY, EKPOMA
a FACULTY OF PHYSICAL SCIENCES
% » DEPARTMENT OF COMPUTER SCIENCE
2020/2021 FIRST SEMESTER DEGREE EXAMINATIONS
(sc 404: Automata Theory, Formal Language and Computability Date: 20/12/2021
jnsiructions: Answer Question one and any other three Questions ‘Time: 2 Hours
tu, Detine the following terms (i) Symbol (ii) Alphabet (ii) |-anguage (iv) Theorem (v) String (5 mark
1 eiwemine the set of all strings over the alphabet Y {0.1} that start with 0 anc! design its state machine
it iaing the state Ona@hinesiw Uh plelically show gf the following strings are aeccpied or not. (i) 1100111 Gt
O11 Git) OOLOOT 104 Givy HOLOTTL 4 marks)
4. What are Finite Automata (1A)? Given that m. (Q.¥. i yo, F). 1. {wlw starband end with a",
¥ {a,b}. You are required to design its transition diagram. (3 marks)
© What is a Turing Machine (1M)? Construct a TM that accept the langu
tvansition diagram ($ marks)
{; Design a°TM for the language [. {0°1"2"} where n >1 (5 marks)
Whur}
ge ofab over & {a,b} and show tl
A*A | id, generate the syntax tree for the ste
Ju, What is a syntax tree? Given that A—A-A | At
and atbie, (Note: A. Expression and id- identifier). (8 marks
Practically show if ambiguity exist in the productions in question 28 or not, (6 marks)
F Ghoat that pr (Q,2, 6.0. !), 1» whw start with "y" and end with “2 wT 24), 2-49 2) Design its NFA
(marks)
Ah Whats formal Grammar’ How is it different from formal language? (6 marks)
b Design formal grammar and linguage of your choice and cheek-lor any sy
Jansnase, (7 marks)
celevant example describe any five different op
actie error when parsing the
ets erations on formal languages (5 marks)
“gn. What is Regular Expression (RI)? With relevant example explain the properties of RE (7 marks)
b, Design the transition diagrun for the TM in question If (5 marks)
e Given that m (Q.%.d-qo. 1, > (whwstart and end with "x". WEZ*}, 2 {3.y}. Design the DEA aind the
(NEA, (6 marks) ‘
iu. Brieily describe the follow
) 5
sigs an ambiguous grammar and briefly show its ambiguity using any string of your choice. (6 marks)
‘computing system expert, design a FA for a computing machine at Lekki toll gate that can Xe ope
river that successfully paid 70. fi i
—ce Similar to « FA but with an unlimite:
olve certain Problems
and unrestricted
b. Give a formal dein
memory is a Turing Machine(TM) which cannot
Jats real computer can do. What i'w TM and how ait be defined? (4 marks)
ition of a Context Free Grammar (CFG). If L; be the lan; ye generated by CPG,
er Wig bs the language gencrated by replar exprewion (cho) Et )
. that LjmL; (4 marks) ian i
8. Given 1 f00ted tree? Briefly explain the roles of tree in computes acon ce (9 rocks)
“ven n rooted tree Has shown BeIW—S\C c Aree wribey as woe fn ww
What is the root of H? (1 mark)
Identify the parent of the node w (1 mark)
Identify the children of the node x (1 mark)
‘What is the Tevet of each node? (1 mark)
‘Which nodes core in the sub-tree rooted at z (1 mark)
© (a). When is a language said to be regular? If L; and La are regular languages, show that l; +L and Lily
<7 regular languages.(Smarks)
What is: an. irregular language? Is the language {0
= aim.(4marks) E
() State the Pumping Lemma. The Pumping lemma relates the size of string accepted with the number of
‘tes In a DFA. Briefly states what the Pumping lemma says about the aBove assertion. (5 marks)
(d)\When do we say that a problem is effectively solvable? Consider the problem of finding roots of 9
at adratic equations of the form Y=ax? +bx +c, justify that itis effectively solvable,(3 marks).
i Wa SESS & Slane '
20) regular or irregular? Justify your
2 py : = i“
© i