Open navigation menu
Close suggestions
Search
Search
en
Change Language
Upload
Sign in
Sign in
Download free for days
0 ratings
0% found this document useful (0 votes)
23 views
17 pages
COS2601 Oct 2017 Memo
Ghhhh
Uploaded by
rebecca malebje
AI-enhanced title
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
Download
Save
Save COS2601-oct-2017-memo For Later
0%
0% found this document useful, undefined
0%
, undefined
Embed
Share
Print
Report
0 ratings
0% found this document useful (0 votes)
23 views
17 pages
COS2601 Oct 2017 Memo
Ghhhh
Uploaded by
rebecca malebje
AI-enhanced title
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
Carousel Previous
Carousel Next
Download
Save
Save COS2601-oct-2017-memo For Later
0%
0% found this document useful, undefined
0%
, undefined
Embed
Share
Print
Report
Download now
Download
You are on page 1
/ 17
Search
Fullscreen
UNIVERSITY EXAMINATIONS. UNIVERSITEITSEKSAMENS UNISA|E= COS2601 OctoberiNovember 2017 THEORETICAL COMPUTER SCIENCE II Duraton 2 Hours 100 Marks EXAMINERS. FIRST MR CL PILKINGTON ‘SECOND DR WIC VAN STADEN Closed book examination ‘This exammation question paper remains the property ofthe Unwversity of South Affica and may not be removed from the examination venue This examination question paper consists of 20 pages Instructions 1 Answer all questions in the spaces provided on this exam paper 2 Extra pages are provided at the end of the exam paper for all rough work 3 The mark for each question 1s given in brackets next to the question 4 Unless othenmse specttied, all languages in the questions are defined over the alphabet E = (a 6} ALL THE BEST!! [TURN OVER]2 cos2601 October/November 2017 QUESTION 1: Languages [10] (a) Let S = (ab bb} and let T = {ab bb bbb} () Is S* a subset of T*? Motivate your answer (i) Is S* = 7°? Motivate your answer (4) "VS ee elo of 7 aN Neb iSecdley te Bond Yul s0Ne. Wades “14 ase nA wy ay VF lob exusle in 1” (‘i Se cap ep ed a ortcastcosen Idee = oS (b) Gwen S = {ab abe cc}, give all the words in S* that have length less than or equal to4 (3) ab jabe, cc, doce, ceals, abel) itis (c)_ Given $ = {ab bab baab} Are the following words in S*? Indicate why or why not Wa (u) abbabaabab (3) ee et me Sane hE] Dose i, (ab) (eal) _saboate etalon ae a erd clacalonaldals wo nck iq 6 : NSAAS “euler De ue Ee sy ie a) 0 \eene (TURN OVER}3 c0s2601 October/November 2017 QUESTION 2: Regular expressions [10] (a) Give a regular expression that generates the language that consists of all words that start with a double letter (that 1s, two a's or two b's), end in a b, and have at least 4 characters @) Tes Ae GRY Gwe (0) Can abbaabaaabba be generated by the regular expression (a + b)(abb + baa)*aa"? Explain fully why you say so by showing how the word 1s, or is not, generated by the regular expression 2 abloeebaaalska ccuweh lee aproded | ei a os Rei no 4 0 opi (c) Does the regular expression alaa + bb + ab + ba + aaa + abb + aab + aba + aab + bbb + baa + bab)” define the language consisting of all words starting with an a and in which words of length 2 do not occur? If yes, explain why you say so, ifno, give acounterexample (3) \ Sel dees nek eume aleba Ie 19 tle Craaag leuk comnak Le gorerabdl Ly Reveqlar expresion @ the simplest terms possible, the language generated by the regular Provide another regular expression that generates the same language (2) (a th y> ; | Ae A all cg Hob ns a al | L \ mcdidwe We aul Mee I [TURN OVER]4 cos2601 October/November 2017 QUESTION 3: Recursive definitions [10] A recursive definition for the language ODDA defined over the alphabet ¥ = {2 b} should be compiled ODDA consists of all words of odd length that contain the @-substnng Provide (a) an appropnate universal set, 1) (b) the generator(s) of ODDA, (1) (c) an appropnate function on the universal set, and then (1) (4) use these concepts to wnte down a recursive definition for the language ODDA @ NOTE Marks will be Subtracted for words that are introduced into the language that are not in ODDA (a) SF i Sx Ly (b) ey (c) ConcAr ® ononc S~ cE OPO A ION se CONN. We, Gncrt(w,0a), COncaTCos, ab) , CONCAT (, bbe )) Conca Tay bq Canmeat Coa, wy), BNar bw CONG (a 4) OD) costla oo) & ONOA S {TURN OVER}5 cos2601 October/November 2017 QUESTION 4: Mathematical induction [10] (a) Provide a recursive definition for the set P of all integers greater than or equal to.0, (1) (b) formulate the associated induction principle, and then (1) (c) apply this induction principle to prove that n? + 2n is divisible by 3 for alln 2 0 (8) Remember that to prove x 1s divisible by 3 you need to show that x = 3y for some ye Z ° rs EP, Man Beanrye @ Sedlesalimane ge Peel bal dy iS a errienl 7A. 1f ea tic arn i a os\eth carey eee ee ene (o) pre aes BS ee en P suc, KLed 246 = 0420) 2 Emallgle & 2) Mmm CER te LP t2y < sy where — equredto pole VE A te (er 0 act ‘aid eee GJS Qe? ater) =e =e Ce ee) y Gia bul WEYL - ay, 2, = (44) 4 ay rane = Die Wop nO ee arom eel s Se NereQce Nee sume algo hushe Ra? queen gti beth ger and the al NSO be {TURN OVER] a arpze' OV lager speaker Wan O gacl, ML) ba be beebokt4 med meaning Lek CUS 's durshle ‘| Neal Lys ce sible. PAES 46 cos2601 October/November 2017 QUESTION 5: Finite automata [10] (a) Provide an example of a finite automaton (FA) that does not accept any words @) 4b [TURN OVER]7 cosz2601 October/November 2017 (b) Consider the language L, defined over the alphabet 5 = (a 6}, consisting of all words that * are of even length, and * donot contain the ab-substring Build an FA (finite automaton) that accepts L_Note that it you provide a nondeterministic {inte automata (NFA) or transition graph (TG), the maximum mark you may be awarded 182 Ensure that you build a deterministic FA (8) (TURN OVER}8 cos2601 October/November 2017 QUESTION 6: Regular language acceptors [10] Consider the following Mealy machine of Cy b/0 PG area (@) What isthe output f the mput stnnig aabab is run on the above Mealy machine? (1) AAO) (b) Convert the given Mealy machine to a Moore machine 6 [TURN OVER}9 cos2601 October/November 2017 (©) Whats the output if the input string aabab is run on the Moore machine from (b)?__ (1) US (d) Ge a transition graph (TG) with two states that accepts the same language as the language accepted by the following finite automaton (FA) 3) [TURN OVER]10 cos2601 October/November 2017 QUESTION 7: Kleene’s theorem (TG to RE) [10] By applying Kleene’s theorem, find a TG with 2 states that generates the language accepted by the following TG (10) [TURN OVER]"1 cos2601 October/November 2017 Eliminate state S_ liminate state _2. oleae @ Eimnate state_C. ae S60 bak eo bb fess (9). 4a, ao ¢ Eliminate state (givng the final regular expression) wm | . QO Gt) Coll thg)(20 taalt Kabes t aor si) [TURN OVER]12 QUESTION 8: Kleene’s theorem (RE to FA) cos2601 October/November 2017 [10] Let ri and rz be regular expressions and FA: and FA be finite automata that accept exactly the languages defined by r and re respectively By applying Kleene's theorem, build another FA that accepts all the words of the language defined by ri + rz the union language) (10) FA e a FA Ve oe Cob ) 2 ao. +) QAO Use the table below to find your solution Some z states have been provided for you, and they are not an indication of how many you will need. Remember to indicate start and final state(s) New state 4 b Sema) %. {as Sa +] 2o Xe YY 22 Sanh Xa Yo = Sq + RursX, sles Mai ae ere Rie get st [TURN OVER}cos2601 October/November 2017 Now draw the new FA for ri + rz ITURN OVER}14 COS2601 October/November 2017 QUESTION 9: Pumping lemma with length [10] Use the Pumping Lemma with length to prove that the following language is non-regular L=(aor'e,n20} (10) QE Ae OS [Neral €3) GS and sud There wiare WpSiie hoice(s) for y Use the prompts below to complete the proof ae es (Ze a) ules Then there whe ‘A Nv Mev ull Wasbdes cue Qn and sserds 9 We choose any word w= Cy e hy where. a NiGos.. Gea < Thus wecanwnte w= LD dow oll deni. Wy SNS Then according to the pumping lemma with length, bo. \\, > O 4 coneels ot. As on, Y consicle -V Vis a cenaels & Co om tenajake -
and&, We We EM LeeRee accept a Cnde tan kets © Nisa 2017 [TURN OVER}7 cos2601 October/November 2017 ROUGH WoRK Wotk done here wil not be marked [TURN OVER]
You might also like
TAFL 5 YEAR PYQ
PDF
100% (1)
TAFL 5 YEAR PYQ
11 pages
TAFL First Sessional 2024-Solution
PDF
No ratings yet
TAFL First Sessional 2024-Solution
5 pages
cs402 Solved Mcqs Final Term by Junaid
PDF
No ratings yet
cs402 Solved Mcqs Final Term by Junaid
56 pages
B.tech CSE (CBA_BDA_CS) Sem-6 TOC-Reg-remi- exam APRIL-JUNE 2023
PDF
No ratings yet
B.tech CSE (CBA_BDA_CS) Sem-6 TOC-Reg-remi- exam APRIL-JUNE 2023
24 pages
R16 Question Papers Flat
PDF
No ratings yet
R16 Question Papers Flat
12 pages
Cos2601 2020 1 102 The Assignments For The First Semester of 2020
PDF
100% (1)
Cos2601 2020 1 102 The Assignments For The First Semester of 2020
16 pages
all questions papers
PDF
No ratings yet
all questions papers
18 pages
Quiz 1: Solutions: 6.045J/18.400J: Automata, Computability and Complexity
PDF
No ratings yet
Quiz 1: Solutions: 6.045J/18.400J: Automata, Computability and Complexity
9 pages
Toc Pyq Apna Engineering Wallah
PDF
No ratings yet
Toc Pyq Apna Engineering Wallah
19 pages
TOC_PYQ_
PDF
No ratings yet
TOC_PYQ_
7 pages
Chapter Wise Question Bank (1)
PDF
100% (1)
Chapter Wise Question Bank (1)
8 pages
Cos2601 2016 6 e 1
PDF
No ratings yet
Cos2601 2016 6 e 1
6 pages
Gate Objective Question Unit 1& 2
PDF
No ratings yet
Gate Objective Question Unit 1& 2
10 pages
automata MCQ
PDF
No ratings yet
automata MCQ
42 pages
320 Problem Set 7
PDF
No ratings yet
320 Problem Set 7
6 pages
Theory of Automata
PDF
No ratings yet
Theory of Automata
3 pages
Regular Expressions
PDF
No ratings yet
Regular Expressions
15 pages
TOC Paper 21
PDF
No ratings yet
TOC Paper 21
4 pages
Practice Questions Modules 2 Answer
PDF
No ratings yet
Practice Questions Modules 2 Answer
33 pages
2012 May CE306 TOC
PDF
No ratings yet
2012 May CE306 TOC
3 pages
COS2601Workshop FIN 2013
PDF
No ratings yet
COS2601Workshop FIN 2013
32 pages
CSI3104 S2011 Midterm1 Soln
PDF
No ratings yet
CSI3104 S2011 Midterm1 Soln
7 pages
TOC Paper1
PDF
No ratings yet
TOC Paper1
7 pages
B.sc. (H) V Computer Science Theory of Computation (CSHT-511) - 779
PDF
No ratings yet
B.sc. (H) V Computer Science Theory of Computation (CSHT-511) - 779
4 pages
AT-QB
PDF
No ratings yet
AT-QB
13 pages
Dmbs U1
PDF
No ratings yet
Dmbs U1
12 pages
problems
PDF
No ratings yet
problems
10 pages
ToC -Sheet 3-
PDF
No ratings yet
ToC -Sheet 3-
5 pages
13_Quiz(s) with solution
PDF
No ratings yet
13_Quiz(s) with solution
4 pages
Allama Iqbal Open University, Islamabad (Department of Computer Science) Warning
PDF
No ratings yet
Allama Iqbal Open University, Islamabad (Department of Computer Science) Warning
2 pages
Toc Question Paper
PDF
No ratings yet
Toc Question Paper
2 pages
Toc
PDF
No ratings yet
Toc
6 pages
Department of Computer Application It and Science Question Bank Mca Iv Semester Theory of Computation Unit-I I. Objective Type
PDF
0% (1)
Department of Computer Application It and Science Question Bank Mca Iv Semester Theory of Computation Unit-I I. Objective Type
17 pages
ToC - Sheet 3
PDF
No ratings yet
ToC - Sheet 3
5 pages
ACSE0404
PDF
No ratings yet
ACSE0404
5 pages
TOC VTU Papers
PDF
No ratings yet
TOC VTU Papers
11 pages
TOC Paper 3
PDF
No ratings yet
TOC Paper 3
7 pages
QB TOC
PDF
No ratings yet
QB TOC
11 pages
FAFLMCQ
PDF
No ratings yet
FAFLMCQ
17 pages
Toc PDF
PDF
No ratings yet
Toc PDF
27 pages
TOC EXAMNINATION QUESTION Bank
PDF
No ratings yet
TOC EXAMNINATION QUESTION Bank
6 pages
Assignment 1
PDF
No ratings yet
Assignment 1
2 pages
Untitled
PDF
No ratings yet
Untitled
4 pages
TOA Mid02 Fall'17
PDF
No ratings yet
TOA Mid02 Fall'17
2 pages
ques bank-Formal Languages and Automata Theory _final
PDF
No ratings yet
ques bank-Formal Languages and Automata Theory _final
9 pages
21CS1503-TOC-QB
PDF
No ratings yet
21CS1503-TOC-QB
6 pages
Assignment No. 1: Course: Theory of Automata (3452) Semester: Autumn 2020
PDF
No ratings yet
Assignment No. 1: Course: Theory of Automata (3452) Semester: Autumn 2020
3 pages
Question Solved TCS
PDF
No ratings yet
Question Solved TCS
15 pages
TOC QB
PDF
No ratings yet
TOC QB
15 pages
Question Bank
PDF
No ratings yet
Question Bank
10 pages
CS1303 Theory of Computation
PDF
No ratings yet
CS1303 Theory of Computation
25 pages
Flat PQP
PDF
No ratings yet
Flat PQP
4 pages
FLAT
PDF
No ratings yet
FLAT
7 pages
CS1303 Theory of Computation
PDF
No ratings yet
CS1303 Theory of Computation
26 pages
MSC CSM 303 Toc 2020 Online
PDF
No ratings yet
MSC CSM 303 Toc 2020 Online
3 pages
Toc
PDF
100% (1)
Toc
9 pages
Instructions: Separate Answer-Books
PDF
No ratings yet
Instructions: Separate Answer-Books
4 pages
University of Mumbai Dec 2018 TCS Paper Solved
PDF
No ratings yet
University of Mumbai Dec 2018 TCS Paper Solved
18 pages