You are on page 1of 309
Syllabus Computer SciENCE AND INFORMATION TECHNOLOGY [cs/iT] Contents of the Subject THEORY OF COMPUTATION. Regular languages and finite automata, Context free lan- guages and Push-down automata, Recursively enumerable sets and Turing machines, Un- decidability, NP-completeness. DIGITAL LOGIC. Logic functions, Minimization, Design and Synthesis of Combinational and ‘Sequential circuits, Number representation and Computer arithmetic (fixed and floating point) COMPUTER ORGANIZATION AND ARCHITECTURE: Machine instructions and Ad- dressing modes, ALU and data-path, CPU control design, Memory interface, /O interface (interrupt and DMA mode), Instruction pipelining, Cache and main memory, Secondary storage. PROGRAMMING: Functions, Recursion, Parameter passing, Scope, Binding, Abstract data types, Arrays DATA STRUCTURES AND ALGORITHMS. Analysis, Asymptotic notation, Notions of space and Time complexity, Worst and Average case analysis, Design, Greedy approzch, Dy- namic programming. Divide and Conquer. Tree and Graph traversals, Connected components, Spaniiing trees, Shortest paths. Hashing, Sorting, Searching, ‘COMPILER DESIGN Lexical analysis, Parsing, Syniax directed translation, Runtime environ- ments, Intermediate and target code generation, Basics of code optimization OPERATING SYSTEM. Processes, Threads, Inter-process communication, Concurrency, Synchronization, Deadlock, CPU scheduling, Memory management and Virtual memory, File systems, 1/0 systems, Protection and Security DATABASE: ER-model, Relational model (relational algebra, tuple calculus}, Database design (integrity constraints, normal forms), Query languages (SQL), File structures (sequential files indexing, B and B+ trees), Transactions and Concurrency control INFORMATION SYSTEMS AND SOFTWARE ENGINEERING: Information gathering, Requirement and Feasibility Analysis, Deta fow diagrams, Process specifications, Inpul/Outpat design, Process life evele, Planning and Managing the project, Design, Coding, Testing, Imple- mentation, Maintenance COMPUTER NETWORKS. ISO/OSI stack. LAN technologies (Ethernet, Token ring), Flow and Error control techniques, Routing algorithms. Congestion control, TCP/UDP and Sockets IP(4), Application layer protocols (iemp. dns, smtp. pop, ftp. hitp), Basic concepts of Hubs, Switches, Gateways, and Routers = WEB TECHNOLOGIES: Proxy, HTML, XML, Basic concepts of ogi-bin programming, ENGINEERING MATHEMATICS Mathematical Logic: Propositional Logic, First Order Logic Probability: Conditional Probability, Mean, Median, Mode and Standard Deviation, Random Variables, Distributions, Uniform, Normal, Exponential, Poisson, Binomial Set Theory & Algebra: Sets, Relations, Functions, Groups, Partial Orders, Lattice, Boolean Algebra Combinatories: Permutations, Combinations, Counting, Summation, Generating Functions, Recurrence Relations, Asvmptoties Graph Theory: Connectivity, Spanning Trees, Cut Vertices & Edges, Covering, Matching, Independent Sets, Colouring, Planarity, Isomorphism. Linear Algebra: Algebra of Matrices. Determinants, Systems of Linear Equations, Eigen ‘Values and Eigen Vectors ‘Numerical Methods: LU Decomposition for Systems of Linear Equations, Numerical Solutions of Non-Linear Algebraic Equations by Secant, Bisection and Newton-Raphson ‘Methods, Numerical Integration by Trapezoidal and Simpson’s Rules Caleulus: Limit, Continuity & Differentiability, Mean Value Theorems, Theorems of Integral Caleulus, Evaluation of Definite & Improper Integrals, Partial Derivatives, Total Derivatives, Maxima & Minima InroRMATION Asout GATE What is GATE? Graduate Aptitude Test in Engineering (GATE) is an all India examination administered and conducted jointly by the Indian Institute of Sciencz and seven Indian Institutes of Technology on behalf of the National ‘Coordination Board - GATE, Department of Higher Education, Ministry of Human Resource Development (MHRD), Government of India. The GATE committee, which comprises of representatives from the administering institutes, is the sole authority for regulating the examination and declaring the results. Why Should, we Take GATE ? To pursue M-Tech program in a leading institute of the country, The benefits of M.Tech are More and beter companics are comig for Campus Placement in leading Institutes Higher salaries are being offered for M.Tech as compared to B.E. MTech degree leads to specialization and furthering of interest in a certain area which may lead to PhD MTech degree is a must for those wishing to apply for Faculty/Research positions in educational Institutes/R&D centers. Scholarship is paid during M. Tech, so no headache to parents for financial requirements. ‘The M-Tech program is a IY semester (24 months) program; so get more time to work out career opportunities MOST IMPORTANTLY to get to be a part of any Nationally reputed Educational Institute and enjoy leaming and research GATE Quaurication Admission to postgraduate programmes with MHRD and some other government scholarships/ assisiant- ships in engineering colleges/institates is open to those who qualify through GATE. GATE qualified candi- dates with Bachelor's degree in Engincering/ Technology/ Architecture or Master's degree in any branch. ‘of Science/ Mathematics/ Statistics) Computer Applications are eligible for admission to Master/Doctoral programmes in Engineering Technology’ Architecture as well as for Doctoral programmes in relevant ranches of Science with MHRD or other government scholarships! assistantships, To avail the scholarship, the candidate must secure admission to such @ postgraduate programme, as per the prevailing procedure of the admitting institution, However, candidates with Mastor’s degree in Engincering/ Technology/ Architecture may seek admission to relevant Ph D programmes with scholarship/ assistantship without appearing in the GATE examination Some instit:tions specify GATE qualification as mandatory even for admission of self-financing students to postgraduate programmes. GATE qualified candidates are also eligible for the award of Junior Research Fellowship in CSIR Laboratories and CSIR sponsored projects. Top rank holders in some GATE papers are centiled to apply for "Shyama Prasad Mukhorjec Fellowship" awarded by CSIR. Some government omganizations prescribe GATE qualification as a requirement for applying to the post of a Scientist! Engineer Eucreumy For GATE + Bachelor degree holders m Engineering/ Technology/ Architecture/Pharmacy (4 years after 10+2} and those who are in the final or pre-final year of such programmes ‘Master degree holders in eny branch of Science’ Mathematics’ Statistics’ Computer Applications or ‘quivalent and those who are in the final or pre-final year of such programmes, Candidates in the second or higher year of the Four-year Integrated Master degree: programme (Post- BSc) in Engincering/Technolozy or in the third or higher year of Five-year Integrated Master degree programme and Dual Degree programme in Engincering/Technology Candidates with qualifications obtained through examinations conducted by professional societies recognised by UPSC/AICTE (@g. AMIE) as equivalent to B.E/B.Tech. Those who have completed section A oF equivalent of such professional courses are also eligible After the GATE Exam, What Next? 1 After declaration of GATE results, student must apply 10 individual institutes to get their application ‘forms Instinutes advertise for M, Tech admissions in leading newspapers from Ist April til the end of July. However some institutes do not advertise and therefore studen’s have to send request for the applica~ tions to the institute directly ‘Admission in the institute is based on GATE percentile. The concerned institute may conduct written test and/or interview for the purpose of admission Scholarship During the pursuit of M-Tech, you are paid a scholarship of Rs. 5000 to Rs 9000 per month by the Govenment of India This amount is enough for living expenses including purchase of books, The schol- arship is paid for entire period of M Tech., which is 24 months Students of II" year of their degree can also appear GATE, Since (a) The syllabus prescribed in GATE covers mainly upto Vit Semester (b) It will be a good try! If it is a bad score you can always try again Structure of GATE and GATE Result list of GATE Papers and Conespending Codes ir Code AE AG TAR Br cE cH [cs Gy EC Paper | Instrumentation Enginsering Papor ‘Aerospace Engineering Agricultural Engineering Mathematics Architecture and Plann Biotechnology ‘Mechanical Engineering Mining Engineering Metallurgical Engmcering Chemical Engineering Physics 3 Production and Industrial Engineering Texttic Engineering and Fibre Science Computer Science ard Information Teclmology Chemistry 7 Electronics and Conmunication Engineering, Engineering Sciences Electrical Engineering, Life Sciences | Gc# [ Gooloey and Geophysics # GG (Geology and Geophysics) paper will consist of two paris: Part A and Part B. Part A will be common for all. candidates, Part B will contain two sections: Section 1 (Geology) and Section 2 (Geophysics). Candidates will have to attempt questions in Part A and either Section 1 of Section 2 in Part B. $ GATE 2010 examination for Mining Engineering (MN) and Textile Engineering and Fibre Scieace (TF) Papers will be computer based ONLINE examination * XE (Engineering Sciences) and XL (Life sciences) papers are of general nature and will comprise of the following sections ‘Life Science (XL) Paper Section | Engineering Sciences (XE) Paper Section | Engineering Mathematics (Compulsory) Fluid Mechanics Materials Science | Solid Mechanics Chemistry (Compulsory) Biochemistry Bowany Microbiolog; ‘Thermodynamics | Polymer Science ond Engincoring Food Technology A candidate appearing in XE or XL paper will be required to answer three sections apart from the General Aptitude (GA) questions, Section A is compulsory in XE paper and Sestion His compulsory in XL paper ‘The candidate can choose any two out of the remaining sections listed against the respective papers ‘The choice of the appropriate paper is the responsibility of the candidate. Some guidelines in this respect are suggested below: Candidate is expected to appear in a paper (one of the listed above) appropriate to the discipline of his/her qualifying degree. Candidate is, however, free to choose any paper according to his/her admission plan, keeping ia mind the cligibility criteria of the institutions in which he/she wishes to seek admission. 7 on GATE Results (a) GATE score is valid for two years (b) The Score Card of the Qualified Candidates pperformanice Index. The percentile score in cach discipline is calculated as follow: ill be given Percentile Score for that discipline and the Nay et = *100 Pe N where P = Percentile score N = total number of candidates appearing in the discipline n, = number of candidates having the same all india rank in the same discipline = all India rank Performance index (PI) in a discipline is calculated as follows: (m~a) Performance Index = K,+Kz where m= marks obtained by the candidate in a paper a = average marks in the poper = standard deviation in the paper Ky and Kz = constants which are same for all disciplines (@) The GATE evaluation process is called out with utmost care, Requests for revaluation of answer scrips and reotaling of marks will not be entertained. (©) The GATE results and particulars of the qualified candidates will be made available to interested organizations (educational institutions, R and D laboratories, industries ctc.,) from India and abroad based ‘on written request by the organization and on payment. Details can be obtained from GATE Chairman of IITs/IISe. rape vet ne calsnny a2 iis ait So licen sit a ma slargonees tte sala aT “wre atone 2 ‘wafsid es snigicel at of stacmoaqep (avons banal att Yo amy) mag. m ae of Sate w seine) eh waitin a i it pipe ae sins Tabi ot gemocse wag, yom sence sol saver | 7 mamiraie dome ot mine seve donter a saanatemn 3 Yo ae «eine niet oot ab thes at rect STAD is) | att Hie elgicnié tacts vat ova? ,nlttencreA ‘mooring sd Hiker mmnedadbmea”> boRikau) elt To trac) croc ool (dd walt 20 bateinles 9: onilqioeih dias a rose altmeray fT, svied somearnibig is * a al sealggo’ sat m gneqas eamabitamss Yo ema lesae = 7 eaigiss ours: ats mv egy seo fa, sea ath gt scasbibees Yo Techie ~ im atten nol 12 beminiso = seitgomhy a a (TS; sabe soemamctert u OF a a = aa tment serge 9 aad ef abs mart = a cede apy ad od cha gave = ‘eegey te oli Date = : maciigceth fe wit sme ne bib emcees © =A bes Jt epee ren nical vd pas: ao Seo dna to balls sacar Seite TURSD at i 7 tomarrsinn od ome Hier satiate yet te ee Se sr eee tama (af conmaiive rntomede O fee Sf suosutien iment at era e ant as aeperepy fo hes oxdeezinagpe cat UempeN ier wer PSTN Contents Chapter Theory of Computation Page No. 1.1 Finite State Machine ... 1.2 Regular Expressions and Languages 1.3 Context Free Languages and Pushdown Automata 1.4 Taring Machine ssa 1.5 Analyse of Algorithm and Computational Complesity sno Digital Logic 21 Numbe 2.2 Logic Functions and Minimization 2.3 Combinational Circuits 2.4 Sequential Circuits Computer Organization arid Architecture LL LLL.24 L2N-L.2.22 Ld dell 151-1512 4 2AL-2QAI4 2.2.1-2.2.38 8 2.412.428 Overview of Computer Architecture. Memory Organization, Input Ouiput .... Programming 4.1 C-Fundamentals 42 Control Statements, 4.3 Functions and Point 44 Amys 4.5 Structures and Union sn 46 COR Data Structures and Algorithms Bl Array and Queue Tree and Binary Soarch Tree Sorting and Searching... 4 Stack aad NP complete . 3.113.112 3.21-3.2.26 3.31-3.3.20 341-3410 sv HLL L12 oe QA Q2B 4314332 oe $4144 1B 4.5.1-4.5.10 4.6.1-4.6,10 5.L.1-5.L14 5. 5AI5A10 Compiler Design 61 62 63 64 65 Introduction to Con Lexical Analysi Parsing ‘Techniques .. Syntax Directed ‘Translation Code Generation And Optimization ..... 6.1.1-6,1.10 6.2.1-6.2.8 631-6318 oo OALDAB 65.1.65.12 Operating System 7 12 13 14 Process, IPC and Deadlock File System... Memory Management Japst Outpat ond Disk Scheduling .... Protection and Security nese 2117128 -ZQ1-2212 731-7318 TALTAI2 S1T510 Databases 81 8.2 83 84 85 Introduction to DBMS and Relational Model... Nonmalization .. Structed Query Language Fila Qijenteatton Tochictyie Transaction Management . 8.118.120 1 B2IB21 8318316 841-8410 Tnformation Systems and Software Engineering OL 9.2, 93 O48 9.8 Software Process Models. Soltware Metice & Project Estimation ... Project Planning and Management ....... Software Design: Soliware Testing Computer Networks 101 10.2 10.3 10.4 10.5 Introduction to ISQ/OSI Model & Physical Layer... The Data Link Layer Network Lay Transport Layer. ion, Presentation and Application Lay won GLAO1B 9.2.1-9.2.8 1-93.10 94.19.46 95.1956 » 10,1,1-10.1.14 10.2,1-10.2.16 10.3.1-10.3.12 10.4.1-10-4.16 10.5,1-10.5.10 Web Technology 1L1 HTM 112 XML 11.3 ASP 14 11.5 Software Process Model Engineering Mathematics 12.1 Mathematical Logic......... 12.2 Probability ...... 12.3 Set Theory And Algebra ... 124 Combinatorics... Graph Theory .. Lineat Algebra Numerical Methods Caleulus General Aptitude ~ALLLIL6 11.2.1-11.26 131134 M4144 NS11158 12.1.1-12.1.18 13.2.1-12.2.34 12,3.1-12.3.40 12.4.1-12.4.18 12.8.1-12.5.22 12.6.1-12.6.36 12.2,1-12,.7.18 1128.42 131 Verbal Abiliyecnnsasien 13.2__ Numerical 13.1.1-13.1.16 13.31-13.2.32 Gato Papor 2010 . - GR1-GP24 Pscheaevinn mbege Unit—1 THEORY OF COMPUTATION | 40: YAORHT i ~-s WOITATUIMOD Finite STATE MACHINE 1.1 Ql Q2 Q3 LEVEI-1 The language accepted by Finite Automata is (a) Non-reguiar languages (b) Stnngs, (©) Regular languages (@) None of these Selvet the most appropriate combination (a) DFA, NFA, Mealy (b) DFA, Moore. Mealy (c) DEA, NFA, Moore (d) None of these Following Finite Automata recognizes the languages 3. 86 Na (a) (0.141 0} (b) OF 1* (1, OF (e) 10} 0 (@) None of these Q4 Match the following @ | The set ofall i, ] bes(bFabb) | sinngs over (0,1) | | abt having atmostone || pairof I's LA The set of all aw | CH strngs over fab} | | +401)700 | inwhich thereare || (+01) at least two Jono | occurrences of b | @+1*11 betwseen any two (or10 occurrences of a_| | The set ofall oO strings over {0, 1} beginning with 0 Z Ped Pa yerab () 1-1 2-43- (d) None of the above Turory of COMPUTATION Q5 Which of the following FA recognizes the @.6 Consider the following transition table of an FA. languages (0, 1}* {1 0} Blab start] a Go qo | a on 4 aa Q 1 Ni What is truc for the given FA? (a) Accept strings containing even no, of a's and bs (©) Doss not accept strings containing b's Q 0 (c) Accept strings independent of the no. of b's — 6-6 © (d) Both (a) and (b) Na Q.7 Consider the transition table as given below: 2 Cc Cc Cc IFA becomes an non-accepting state, then how many strings ending with 0 will be accepted. (Maximum length of the string is n) @)n+l o) 0 ©) @eo Q@8 Can DFA simulate NFA? (a) Depends on NFA. (a) 1, 1 {b) Sometimes (o) Lv (c) UI (e) No (@) WL IV (d) Yes ‘The figure shown is a DFA, M. ar Q.10 Qi Q12 Which of the following regular expression denotes the set of all words accepted by M. (a) (1) 0°10 (b) ("011 (c) (oiL)'or1 (a) M'o"001 The number of states of the FSM, requircd to simulate the behaviour of 2 computer, with a memory capable of storing ‘mm’ words, cach of length 'x! bits is (a) 2 (b) 2" (mz (d) None of these ‘An FSM can be considered to be a TM (a) of finite tape length, rewinding capability and bidirectional tape movernent (b) of finite tape length, without rewinding and unidirectional tape movement (0) of finite tape length, rewinding capability and unidirectional tape movement (d) none of the above Which of the following statements about push down machines is true. (a) Tae class of FSM's with two pushdown stacks has the same power as the class of post or turing machines. (b) For n < 3, the class of FSM's with n push down stacks has the same power as the class of FSM's with two pushdown stacks (©) The class of FSM's with ono pushdown stack is more powerfil than FSM (@) All of the above Qi3 Ql4 Q.15 Q16 Contest sensitive grammar can be recognized bya (a) Lincarly bounded automaton (0) Finite state machine (FSM) (©) Non-determimstic push (NDPDM) (@) Deterministic push down machine (DPDM) down machine wi ich of the following recognizes variable prefixes of the grammar’ (a) NFA (©) DFA (c) Neither NFA nor DFA (a) Both NFA and DFA ‘The number of articulation points of the following graph os fa) 3 (b) 2 fe) wo The transition diagram represents (a) FSM to check whether a given unary number is divisible by 3 (b) FSM to check whether a given binary number 1s divisible by 3 (c) both (a) and (b) (@) None of the above Tueory oF COMPUTATION Q.17 Find the odd man out Q.20 Whici of the following 1s true for an NFA? (a) DFA 1, Final state is a sct of states (b) Mealy machine Il, Q is a set of subsets of states (©) Moore machine IIL. Transition table cannot be constructed (@) NFA (a) Only (b) Only 1 LEVEL-2 (e) Only IIT @ All of above Q.18 Consider the transition table given below Q.21 Consider the following transition table for a FA that accepts strings containing substring aba. 3 b sat [a2 a a fia. _é fa a ae a | ao ipl Wg 2 | 2)e 8 ala A Bi alo 4a ‘The given table is for the FA that accepts strings 4% having even number of o's and odd number of bs. What is the state that A represents? “The final state for the given FA is (wWiains (a) ds. dh ae 0) 01g, 4 Om 7 @ a (@) cant be determined 22, After converting following NFA into DFA, the Q.1% Consider the tollowing construction of a BA that idajes dn Usadinal DEA.wil' be accepts a string ending with sab for Z = (a, b) b 4 W | a 4) UW) % a 2 2 % @/| w a where ¢, is the final state Which two states in combination denotes all string ending in b? (@) cannot be determined (A) [dis day ds. Gok fds. G2, Gah fools LT (b) Only q; is sufficient (D) fais ds dsl [ahs es 5: Gol, Ie, 2, G3) [1 (0) Only qs is sufficient (0) (as da ds Goh [dis de ash | | © gy as y (@) [ah da. 2. Gol, [al Ian, 4. 31 @.23_ Consider the transition table of a DFA as given below Q24 % | % 4 a Go a2 @ 0 w fas as qa | 43 a Which of the following is the most precise interpretation of state qx? (a) Accepts strings starting with a and ending with bb (b) Accepts strings starting with b and ending with a (c) Accepts strings starting with a and ending with ab (4) Accepts strings starting with a and ending with b Consider the following NEA with ¢ moves Oo O' Start & 5 ‘Which of the following strings will be accepted by the given NFA? 1 gou22 m2 m2 (a) None of the above (b) 1, and (©) Only T (4) Il and III both, Q.25_ Which of the following are extended transition Q.26 functions of a DFA and NFA respectively? 1 6@.2)-4 Sered= YJ ee redtQ) I 8q.2)=q §q, v2) = 8(5(4, y).a) ML 8@.e)=t0} &a.yay= (J S(ra) Feaa.y) (2) > NFA, I> DEA (b) > DFA. IT > NFA (©) I> NFA, 11> DFA (@) I> DFAT > NFA Design a FSM to check whether a given unary number is divisible by 3 Turory oF COMPUTATION Q27 Q.28 Q29 Q30, ‘The transition table given below is for the FSM that accepts a string if it ends with ‘aa! a | 4 Which is the final state? fa} a (b) go () a (@) Can’ be determined Let = {0,1}, then an automaton A accepting only those words from © having an odd number of I's requires slates including the start state fa) 5 fb) 4 (o) 3 (@ 2 The reverse of a string can be defined moze precisely by recursive niles Which of the following statements is correct? (a) a® = a®, (wa)® = ay® for all a © E, we Et (by a® =a, (wa)® = aw" forall ae Ewe E+ (o) a = a (wa) = (aw) for alla e Ewe st (@) None of these The major difference between a Moore and a Mealy machine is that ourpat of the former depends (a) Only on the preseat input (b) Only on the present state (©) On the present state and present input (d) None of these Q31 Q32 Q33 Consider the given FSMs —O«—o O (a) The second FSM accepts & only (b) The first FSM accepts nothing (e) Both are equivalent (@) None of the above Basie machine will have (a) Only input and output states (b) Internal states (©) Memory (a) None of above The finite automata given below accepts Q34 (a) {01;"(10}" (b) {oy ay" fe) (00; 1" fd) ("C0 Consider the following transition table of an FA Blab sian] qi 0 g |) 90 4 42 4 a (3 a 43 (da G3 42 94 Ga If the final state is q;, which of the following, strings will be accepted” 1. ababab II. aaabbb TH. abbabba fa) 1 (b) I (e) {d) All of the above Q.35 Q.36 Q.37 Q38 Consider the transition table as given below: Bf ae ie @ Ta BC B |- Bc © c How many strings ending with 0 will be accepted by the given DFA if the maxinmum possible length of the string 1s (a) 2a (b) n° 0 @an Which of the following is not true of a DEA? (a) In any state, it has a transition for each input symbol (b) Initial state and final state can be same, (©) There can be more than one accepting state (@) Has a wansition form any state, on any input symbol, to exactly one state The FSM shown in the figure recognize —O (a) e-alone (b) no string, (e) all strings (2) none oF these For the machine shown in the figure 1/0, 0/0 (a) changes the sign bit (b) increments a given bit pattem by | (c) finds 2's complement of a given bit pattem (@) complement a given bit pattern Qs Q40 QA Consider the following transition table of an FA. stat a1 do 4 | a a a) 4 a} 4 a alo a aa Ifthe final state is q,, then which of the following strings will be accepted? 1 asaaa IL, aabbaabbbbb TL, bbababebbb (@) Mand IL () MM and 1 (© Land I @ None of these 6 files F1, F2, F3, F4, FS and F6 have 100, 200, 50, 80, 120, 150 records respectively In what order should they be stored so.as to optimize activity? Assume each file is accessed with the same frequency. (a) ordering is immaterial as alll files are accessed with the same frequency (b) FI, F2, F3, Fa, FS, F6 F3 (c) F2, F6, F5, Fl, FA, (@) F3, Fa, Fl, FS, 99, F2 6 files F1, F2, F3, Pd, FS and F6 have 100, 200, 50, 80, 120, 150 records respectively. The average access time will be (a) 210 unit (b) 293 units (c} 256 unite (4) 268 units QA2 Qa Q44 LEVEL-3 Let § = (a, b} Them an automaton A accepting only those words from E having an even number of a's requires states. including. start state @)3 (b) 15 6 @4 Common Data For Questions 43 & 44: Consider the following construction of FA that accepts a string ending with aab for 5 = (a, b) ojaib start Go Yo oa 4 Wa 4 9242 ©! % 4 where q; is the final state What will be the new entries for rows q: and qs if we want the given automaton to accept strings containing substring ab? (a) a2 = (qpia. q/by 4s = (quia. gy!) (0) 42 = (yb. ao/o) ds = (quia. q/a) (©) a2 = (qyb. qy/b) Gs = (gaia, qy/a) (€) No changes required Which siate denotes the string ending in 2a @q (b) a; © a (@) All of the above QAs Q46 Q47 Tueory of Computation Which of the following represents a Moore machine to determine the residue mod 3 for any binary mumber ie, E = (0, 1}, A= (0, 1, 2} @ 6 | 0 1 folp do a} - start wo 2 ho a | Aprdge pd 2 stat | do a Go | % 4 | 0 a ala a! 2 (©) both (a) and (b) {d) none of these ‘Consider the following transition table for a FA that accepts strings containing substring aba & | a b sat | qo a % | % a % {da A aia 4 Ow If we replace A by qo, which of thé following strings will be accepted” (a) abba (b) bbdbbta (©) abbbbea (4) bbb Using the given information only witch is the best option that could deacte Epsilon closure of % Given: 1Q= fp, di, do, 43. Oud 2e-closure (q2) includes qu (a) tao a Ge} (0) fae 92, a4} (©) far ae ob (4) bo, dz, Gus as} Q.48 Consider the transition table given below: Qag Q.50 Qs1 Blab sat} a2 a GW | a % | qo a} 4 s | a ‘The given table is for FA that accepts strings having 1. odd mumber of a's and even number of b's IL. odd number of a's and odd number of b's Find the final states for both cases (a) a a (0) qs. a. 4, Consider the transition diagram of a DFA as given below Qs2 Which is the language of the given DFA? aa (a) L = {0 | w has equal no, of ones and zeros} WL=4} (co) L= te} (6) None of these ‘Consider the transition system below, find out the strings recognized by the transition system SKS (a) (ata(b-+aayb)a%(b+a)at (b) (@tath-taa)*b)alb+na)ta (©) both (a) & (b) (d) None of the above Consider the transition diagram of an DFA as given below ‘Which should be the final state(s) of the DEA if it should accept strings starting with 'a! and ending with ’b' (8) do 4 b) gs On (@) qo 1 FSM has the capacity to remember arbitrarily large amount of information IL. FSM can muttiply two given arbitrarily long, numbers IIL FSM cannot recognize a palindrome Which of the above statements are not true in case of FSM (@) ) L0 (e) UA @ 0 What is the language of the given DFA? Interpretation 6 ie b stat end stat | qq gy aa aw [ao 4 ab qi 40 42 a bb @ | a boa @® {a a bob 44 143 94 (a) L.= {ov w starts with band ends with a or ww starts with a and ends with b) (b) L = {w | w starts with a and ends with bb or w starts with b and ends with a} (c) L = {w | w starts with a and ends with b or ww starts with b and ends with a} (d} both (a) and (b) Q.54 Q.55 Q56 Q57 (a= Iy/out 1 Consider the following NFA with © moves If the given NFA is converted to NFA without e-moves, which of the follewing will denote the set of final states? (@) {do i. @} ) {gi ©) {a1 a2 (2) None of the above GATE QUESTIONS Which one of the following is the strongest correct statement about a finite language over some finite alphabet £ ? [GATE 1991} (a) It could be undecicable (b) It is Turing machine recognizable (e) Ibis a context sensitive language (@) Ios a regular language In which of the cases stated below is the following statement true? [GATE 1992] "For every nondeterministic machine M, there exists an equivalent deterministic machine My recognizing the same language" (a) M, is nondeterministic finite automaton (b) My is a nondeterministic PDA. (c) M, is a nondetsrministic Turing machine (@) For no machine M, use the above statement ‘True If the state machine described in the figure should have a stable state, then restriction on the input is given by [GATE 1993] (a=O)/out 2 Oveut 1 (b= 1Vout 2 (a) al b)a+b=1 ©atbo=o @ (©) a+b= Q.58 59 Q.60 Treorr oF Cor Which of the following conversion is not possible (algorithmically) ? IGATE 1994] [1-Mark] (a) Regular grammar to context-free grammar (b) Non-Geterministic FSA 10 deterministic FSA (c) Non-ceterministic PDA to deterministic PDA (@) Now-deterministie Turing deterministic Turing machine machine to A finite state machine with the following state table has a single input x and a single output z, [Present state | next state, 7 aaa If the initial state is unknown, then the shortest Input sequence to reach the final stats C is IGATE 1995] [2-Marks] @) or () 10 101 @1i0 Which of the following language over (a, b, c} is accepted by a deterministic pushdown automata? [GATE 1997] [2-Marks] (@) bw wh w efa, BI fa, be} (©) fa'b'e" | n> 0} (a) (w | wis a palindrome over fa, b. ¢}} ‘Note: w® is the string obtained by reversing 'w' &) two? | we (a | —$£@£$ Qél Q.62 Q63 Q.64 ‘Which of the following set can be recognized by a Deterministic Finite-state Automaton? IGATE 1998] [1-Mark] {a) The numbers 1. 2.4.8, 2"... written an binary (&) The numbers 1.2.4. 5005 2% nition am unary (©) The set of binary string in which the number Of zeros is the same as the number of ones (A) The set (1, 101, 1011, 1101, } The string 11 0 1 does not belong to the set [GATE 1998] [1-Mark represented. by fa) 110* (0+) ) 1+ 1) 101 (©) (10) * (01)* (00 + BDF (@) (00 + (1) 0) # Let L. be the set of all binary strings whose last ‘two symbols are the same, The number of states in the minimum state deterministic finite 0 state automaton accepting L is AGATE 1998] @)2 [2-Marks} () 5 ()8 @ 3 Regarding the power of recognition of languages. which of the following statements is falsc”” [GATE 1998} [1-Mark] (a) The non-deterministic finite-state automata are equivalent to deterministic finite-state automata. Pusi-down automata are Push-down (b) Non-determinis ‘equivalent to deterministic automata. () Now-deterministic Tuning machines are equivalent to deterministic Pushdown automata (d) Non-deterministic Turing maciines are equivalent to deterministic Turing machine (e) Multi-tape Turing machines are equivalent to Single-tape Turing machines Q.65 Qs Q67 Q.68 Consider a DFA over © = {a, b} accepting all strings which have number of a's divisible by 6 and mumber of b's divisible by 8. What is the minimum number of states that the DFA will have ? [GATE 2001] [2-Marks] @8 ) 4 (© 1S (4) 48 Given an arbitrary non-doterministic finite automata (NFA) with N states, the maximum number of states in an equivalent minimized DEA is at least IGATE 2001] (1-Mark] @n (be) 2 (©) 2N @N ‘The smallest finite automaton which accepts the language {x llength of x is divisible by 3} has [GATE 2002] [2-Marks] (a) 2 states (b) 3 states (0) 4 states (@) 5 states ‘The language accepted by a Pushdown Automaton in which the stack is limited to 10 items is best described as [GATE 2002] [-Mark] (@) Context free (b) Regular (c) Deterministic Context free (@) Recursive THEORY OF COMPUTATION The Finite state machine described by the @.71 Consider the NFA M shown bclow: Qe following state diagram with A as starting, state, where an are lable is wy and x stands for I-bit input and y stands for 2-bit output [GATE 2002] [2-Marks} onl a7 (a) Outputs the sum of the present and the previous bits of the input (b) Outputs 01 whenever the input sequence contain 11 (c) Outputs 00 whenever the input sequence contains 10 (d) None of the above Consider the following deterministic finite state automaton M Let $ denote the set of seven bit binary strings in which the first, the fourth, and the last bits are 1, The number of strings in S that are accepted by Mis [GATE 2003] [2-Marks} (a1 5 (7 @s Q72 Q73 Let the language accepted by M be L. Let Ly bo the language accepted by the NFA M,, obtained by changing the accepting stato of M to a non: accepting state and by changing the non- accepting state of M to accepting states. Which of the following statements 1 truc? [GATE 2003] fa) L,= (0, 4 [2-Marks] () Ly = (0, 1) lok @) Ly=L The following nite state machine accepts all those binary strings in which the number of I's and 08 are respectively [GATE 2004] L [2-Marks} (a) divisible by 3 and 2 () odd and even {c) even and odd (@) divisible by 2 and 3 Let Ny and Np denote the classes of languages accepted by non-deterministic finite automata and non-deterministic pushdown automata, respectively. Let Dy and D,, denote the classes of languages accepted by deterministic finite automata and deterministic pushdown automata, respectively. Which one of the following is TRUE? IGATE 2005] [2-Marks] (a) Dre Ne and Dy < Finite Stare MACHINE Q.74 Consider the following Finite State Automaton: Q75 Q7% ‘The minimum state automaton equivalent to the above FSA has the following mmber of states IGATE 2007] [2-Marks| (@) 1 (b) 2 () 3 @4 A minimum state deterministic finite automaton accepting the language L = {w | w € (0, 1)*, umber of O's and I's in w are divisible by 3 and 5, respectively} has IGATE 2007] [2-Marks} (a) 15 states (b) 11 states (c) 10 states (a) 9 states Which of the following statements is false? IGATE 2008] [2-Marks} {a) Every NFA can be converted to an equivalent DFA (b) Every non-deterministic Turing machine can be converted to an equivalent deterministic Turing machine (c) Every regular language is also a context free language (d) Every subset of a recursively enumerable set ‘s recursive Q.77 Given below are two finite state automata (> indicates the start state and F indicates @ final state) Which of the following represents the product automaton Z « ¥? IGATE 2008] [2-Marks] (a) + 2 alate woe lo | ©) Re 0) els [ale] © [RmTQ Sir [= | | s @ FR) Q 7B Which one of the following is FALSE? Q.79 Given the following state table of an FSM with two states A and B, one input and one output: [GATE 2008} Fprsat | Present] | NE | nie pa " (Mark) Sis |Site HP! sta i ai { = (a) There is a unique minimal DFA for every 0 a 1 2 | regular language + SS t =| (b) Every NFA can be converted to an —? 2 te oS equivalent PDA. cS 0 to — 1 0 | (©) Complement of every context-free language - is recursive If the initial state is A= 0, B= 6, what is the ‘minimum length of an input string which will take (d) Every nondeterministic PD: be (@ Every connie: FDA: cant be the machine (0 the stat A = 0, B= 1 with converted to an equivalent deterministic output = 1? [GATE 2009] PDA (a) 3 {2-Marks} ib) 4 es {d) 6 ANSWER KEY . (ie [| 3 [eem| + [eeu > ie 6 c 7 é 8 a / > |e« [wo | i fe | 2a) of» | «fee [os [a 1 |-a | 17 [eal is |b | 1 [a | 2 | b 2) a [2 |ea[ 3 |b | 4 |e | 2 | 8 26 [mao] 27 [eeu| 28 | ¢ | 29 [ume 30 | Mb 3. é@ | 2 fom | a | oy mw | a | as [a 36 a 37 a 38 b 39 c 40 | d a [a 2 [a | a | aw | 4 [oe | 4 [oa a | > | 47 fo | # | a | » | a [ so [a 31 [eo] 52 foba| 53 | dee) sa tam) ss [ee 36 | ae | 37 |b | ss | c¢ | 9 | 6) | 6 [ee o fd | 2 fea | = | 6 | o | bo] os |e o | b | 67 | by | o | « | o | a | 7 [ie 1 |>s | 72s | i|a¢|m {os [7 [ae 1 | d@ | 7 [ow | % | a | 7 fa 7 $1 32 33 S4 35 3.6 S.7 SOLUTIONS (c) A Ianguage is said to be regular if it is accepted by a finite automaton, That is, the language accepted by a finite automaton is a regular language. (b) Here, NFA is an odd term as all other have dofinite transition to a unique state on a given input symbol (a) ‘The transition diagram for an Finite Automata recognizes languages {0, 1}* {1 O}. (c) 2. Let W be given set, If W has n a's thon it is in a set represented by (b)* IF W has only ‘one a then it is in a set represemed by bfab*, If W has more than one a write W = WiaW>, whete W does not contain a. Then W, is in a set represented by (btabb)*. So the given set is represented by the regular expression b*+(b+abb)*ab* 3. The set of all strings over (0, I} is represented by (0+1)* and when begining with 00 it becomes 00(0+1)*. (a) “The language {0, 1} {0 1} represents the string which ends always with substring O1 Both FA T and IL represents the above string. (c) We can see that, in any state, if the input 1s b, the machine remains in the same state That is, the occurrence of b does aot affect the current status of machine, Henec, whichever may be final state, the machine accepts the strings independent of the number of b's, though there may be constraints on a's (a) ‘As seen in the transition diagram a string ending, with O should be a string containing only zeros. But since A is an non-accepting state, no string ending with zero will be accepted. $8 so $10 8.12 $13 $8.14 S15 $16 (a) For every NFA, an equivalent DFA can be constructed. Hence, a DFA can simulate NFA. Note : Power of NFA and DFA are some, (c) Minimum string accepted 1s 011, At beginning any number of combinations of 1s and 0s are possible. (oj1y"011 (b) Totally there are rn bits. Each bit will be in one of the two possible states 1 or 0. So the cntire memory made up of mn bits will be in one of the possible 2™" states. (a) Above all siatements are related to the power of pushdown machine (a) Type -1 grammars (context sensitive grammars) generate the context sensitive languages, The languages described by these grammars arc exactly all languages that can be recognized by a linear bounded automaton (a non-deterministic turing machine whose tape is bounded by a constant times the length of the input) (e) Because NFA and DFA don't have storage capability {a) ‘The articulation points are nodes 2, 3 and 5, ‘on removing any of these nodes the graph is not connected (a) Since input is only 1. it is not FSM to check a given binary number divisible by 3, as ina binary number input is either 0 or 1 Ths FSM co check whether a given unary umber i: sible by 3. ‘Transition table States | Input a | a a | @ a2 | a ‘THEORY OF COMPUTATION $.17 $.18 S19 $.20 $.21 (@) All the other three have definite transition to a unique state on a given input symbol. But NFA may have transitions to more than one state on an input symbol. (b) The best method to solve this problem is to take one string (only one will be sufficiont, though more than one can be used for cross-checking) which is valid and chock in which state it resides Eg. U is a valid string. But on 'b! in the start state we go to q, state So qu 48 the final state, But we will consider one more case for confirmation Take agaabbb which is a valid string a aaa bbb {| 7) AAAAAS start 4 db Gy 4 Here qy isthe final state. (a) We can see from table that on b, the transition is made cither on q, oF qs. (see column for input symbol b), Therefore, a; and qs will denote all strings ending in b. qy denot all strings ending in b except sirings ending with aab, But q; denotes all scrmgs ending with ab. (b) For NFA, like DFA Q is a finite non-empty set of states. And definitely transition table can be constructed, though entries in the table may be sets of states (d) That idea will become clear if we know what cach state represents, Then we redraw the given sransition table 2s given below: Ainly a ao, | String ending Stat | qo a with | am | & b a q A ab | a2 % a aba cry a3 $.22 $.23 $.24 We can see that, q, denotes strings ending with b and that b is not preceded by a; As strings ending with b preceded by a 1s denoted by q>. So while in qj, if we get b, we will be in gy itself Hence A denotes a1. {a) ‘The above NFA is NBA with © moves s-closure (qe) = {40 4 e-closure (q:) ~ far. as} exclosure (q) e-closure (q3) ‘Transition Table Input] Tapat 0 1 a as 6-44] fla a. 42-001] Laas fal | tags a) Tal a a) State {b) From the transition diagram we can soc that dy accepts only those strings which starts with b and ends in a Intemprettion 6 | ab stat end stat) qo Gy aa 4% Wm er a ab @ w @ boa a3 b ob 4 | 43 (b) ‘The given machine accepts the language that consists of strings containing any to. of 0: followed by any number of 1's followed by any number of 2's. Honce, all the 3 given strings will be accepted. The idea will be clear from the equivalence NFA without s-moves as given below. $.25 $.26 $27 $.28 8.29 Stat at, 8.30 (b) $.31 From definition: Also we know that entries in transition table for NFA is subsets of states And only IIl gives that output as a set of §(q, 2), Hence 1 should be for DFA. Only one option ic. (b) relates III to NFA. io 8.32 ‘The unary number has 2 single symbol and the “ length of the string is its value. On first symbol ‘of number (ic. 1), we will moye to remainder 1 state; when next input is received we move to remainder 2 slate and on next we move to 0 remainder statc ic q; as we are checking for §.33 divisibility by 3. Also, zero is divisible by 3. therefore, qp is also an accepting state (c) ‘Simulation: 3.34 eof | J\A\Z41 stat Ge Hence, q; is the final state. (©) Transition table for the given automaton A is as shown below b)0 1 siat-> dp 42 Gi Odd 10. of I's ®| a a Even no.of l's gz) 42 4 So, the mo. of states required is 3. 6va)® = aw" for all ac E, wc E* (6) Ourput of Moore machine depends only on the present state. Output of Mealy machine depends on the present staie and the present input (a) Both are not equivalent, since first FSM has same start and accepting state which isnot in case with second FSM. Also no transition is iven in second FSM so (a) is false ‘Also (b) is false as there is an_ implicit transition from any state to itself. So & will be accepted, (a) ‘A Basic machine recognizes an input set 1 and produces a output set O, where I and O are finite. It has neither memory nor internal states (b) From the given FSM we can see that the accepted language is even no. of zero's followed by even no. of ones. (d) If qs becomes the final state, then the given FA. accepts the strings containing exactly 3a's We can see from the table that once the machine centers in q3, it remains i q, for any further entries of b But if an additional ‘a’ comes it goes to qy and remains there whatever the nest symbol may be. ‘Thus, qy denotes the state wath more than 3 a's. The explanation of cach state is as given below qw > 0a's a ota a 28s qs das as > more than 3 If too many words are confusing you, don't worry. Go by simulation THEORY OF Computation $.35 $.36. 8.37 $38 $39 ‘Sumulation: AAAAAS sat og, 4 & & string ends in 4s Similarly for others (d) For the given DFA, the string ending with 0 should be a string contaming only 2er0s. Hence, total no. of string possible is m, starting with string of length 1, length 2, .... length n and all of them contain only zeros (a) ‘Though ftom any state, on any input symbol, thore is a transition to exact'y one state but it is not necessary that there will be a transition for each and every input symbol, Sometimes we design the DFA to “die” in situations where we know it is impossible for any extension of the input sequence to be accepted (a) Here the final state and the start state are one and the same, No transition is there. But by dlofinition, there 1s an (implicit) c-transition from any state of itself, So, the only string that could be accepted is s. {b) Let O1L01I be the input to the FSM and let it be fad from the right (i.e. least significant digit first) If we add | to 011011 we should get 011100. Whenever we add | to a 1. we make it 0 and carry 1 to the next siage (state) and repeat the process. If we add | to a 0, thea first make it 1 and all the more significant digits will remain the samo, iv, a 0 will be 0 and a 1 will be 1. That's what the given machine does. (ce) If, becomes the final state, then the given FA accepts the strings containing exactly 3 a's. We ean see from the table that once the machine enters in qy, it remains in qs for any further cntrics of b. But if an additional 's' comes it goes It will be avcepted 3.40 S41 $.42 to qj and remains there whatever the next symbol may be. Thus, qy denotes the state with more than 3 a's. The explanation of cach state is as given below. @ > 0a a la & > 2a!s > 3 a's > more than 3 als If too many words are confusing you, don't worry. Go by simulation Simulation: VIA 4 & & Since at the end of the string the machine resides in qq it will be accepted if qq is the final state imilarly II will also make the machine reside in qy. Hence, it will also be accepted. But this will not be the case for TI (9) Since the access is scquential, wrcater the distance, greater will be the access time. Since all the files are referenced with equal frequency; overall access time can be reduced by arranging them ic. F3, Fa, FI, F5, F6, F2. (a) Since each file is referenced with equal frequency and cach record in a particular file can be referenced with equal frequency, average access time will be (25 + (50 + 40) + (30 + 80 + $0) + sisn.!6 = 268 (approximately). (a) Transition table for the required automaton A is as given below ‘Transition table: 3.43 $.44 $.45 S46 where, qy = initial state q > odd no. of a's q; = even no. of a's (final state) (a) ‘The new automaton accepts strings containing the substring aab. It doesnt matter whether the string ends with aab or not. This means that, once we get ‘ab, we will be in the final (accepting) state whatever the symbols coming after that, Therefore, once we enter qy state, we will be in qy itself for any further inpurs. ‘The vaill be no changes in gp G2 = (qz/a, gy/b) (same as given) Le. q; ona makes transition to itself and q; on b makes transition-to qs $48 And qs = (as/a, qy/b) ie. q; on a of b makes transition to itself {e) Since qs is the final siate ie accepting strings ending m aab, therefore the state that denotes the strmg ending in aa will be the state that on b goes to final state qa. From the table we can see that the required state is qx (a) ‘The correct machine is 6 | 0 L jolp S49 Remainder start) qg 4d) | > 6 % | aw a2 | 0 1 a} 92 a | F 2(10), afm a | 2 which is not in options. Hence. none of the these. (b) Simian 17 7 i | ‘4 stat dq) Go 4: Ge whereas the other strings don't end in the final sate since no information is given by which we ‘can get the correct answer. hence we willl go by metiiod of elimination. Now again there is no ‘option like ‘cant be determined', So we have! to climinate three options that are definitely false using the given information, Eliminate option (a), Since c-closure of q_ inckades q, (given). then if ¢-closure go contains pit should also contain gy Eliminate opton (c). Since e-closure of any state include itself, here qo is missing, Eliminate option (d). Since qs is not the state of given machine Tis given that Q= fae, di, da 43: a} (9) ‘Again this can be soived by taking two strings that are zecording to the given constraints. The final picture 1s a shown below 6 a b a b start | a 4 even do | 42 a ol a: | ar even 92 | 40 a odd ay | a even even odd odd (a) ‘The given DFA accepts the language L=[w of U's} ‘The job of the states of this DFA is to count, boih the number of 0's and number of I's, but count them modulo 2. That 1s, the state 1s used to remember whether the number of 0's seen so far is even or odd, and also to. remember whether the number 1's seen so far is even or odd. There are thus four states. which can be given the following interpretations: ‘w has both even no. of 0's and even no qo : Both the number of O's seen so far and the number of I's seen se far are even, 1. The number of 0's scen 50 far is even. but the number of I's seen so far is odd 8.50 S51 q: The number of 1's seen so far is even, but the number of O's seen so far is odd, 4 : Both the numbor of 0's seen so far and the number of 1's seen so far are odd Note: State q» is both the start state and the alone accepting state, It is so because before reading any inputs, the numbers of ('s and I's seem So far are both zero, aid zero 1s even (d) The graph docs not contain any ¢ move and there is only one initial state ‘The three equations for qj, q> and qy can be written as 4: = ha + gb +A, a= qa + qb + ga, a = 48 Te is necessary fo reduce the number of unknowns by repeated substitution. By substituting qs mq; ~ equation, we get qua + qyb + qua qa + qa(b + aa) = quatb + aay" Substituting qy in q, we get a = ga * qatbtaay"d + A = q+ alb + aaytb) +A Hence qy = Ma + afb + 2a)*by* a= a + ab 4 aa)*bytab + 2a)* a= (a afb + aa)tbytalb + aajta Since q; 1 the final state, the sct of strings recognized by the graph is given by (ata(b+aa)*b)*a(b+aay%a ae (c) First of all qs cannot be the final state as to enter into qs, starting letter should be b. Now if qp is a final stat2 then it should not accept string ending with a But it accepis strings containing any number of a's without a single b. Therefore, q also cannot be a final state Therefore. climinate all options that either contain qp or qs or both. So option (a), (b) and (d) are eliminated Hence (c), ‘This method is widely used for objective type questions and os known as "Method of Elimination’ $52 Or We can also solve this problem by simulation, Hore we take two valid strings and check in which state they are accepted. Here sometimes choosing of proper trial dala (1¢ two valid strings sn this case) becomes difficult if options have combination of entries, For e.g. option (a) Ww 4 Sinlation: a ob bi Abed stat ga, + gy fs the final st 1 AAA % db & 4 Here too q; comes out to be a final state. Hint for choosing proper trial data 1. Choose the minimum valid sirmg possible, It can be (a) cmpty string (b) String not containing some of the input symbols I Choose the minimum valid string that contains all the input symbols possible as per the given constraints (b) It is the limitation of FSM that, it does not have the capacity to remember arbitranly large amount of information, as it has only a fixed number of states and these sets a limit 0 the length of sequence it can remember Head can never move in reverse direction FSM cannot retrieve what it has read previously, before coming to current position on. the tape. As it cannot retneve, we cannot say it can remember something, In multiplication, it is required to store the partial sums that we obtained nonmaliy, at intermediate stages of multiplication, FSM multiply two arbitrarily long numbers. cannot siven (Cee Stare ace }—__________(49} $.53 $.54 $.55 $.56 $.58 (d) Here, (2) and (b) both represent the same language Interpretation start end a8 a b a bb b bd (a) We know that if we conveat a NFA with e-moves to NFA without ¢-moves. all the states whose closure includes final state(s) are marked as final states. enclosure (qn) = {0) dis a} e-closure (qi) = tq), G2} e-closure (q:) = {a2} We can see that epsilon closures of qy. qy and q include the final state q>, Hence, all of them will bbe marked as final states (@) Set of all strings which will be accepted by an FA is a language, such language is known as Regular set (ae) M, is nondeterminisitic finite automata For every Nondeterministic machine My there exists an equivalent deterministic machine M, recognizes the same language Also, If M, is a non-deterministic turing machine, there is a deterministic turing machine M’, such that T(M,) = T(M), {e) For every non-deterministic PDA there is 8.59 $460 S61 $.62 (b) { Present | it Input | Next [state _| Sequence | state2 [Vp xst Bt B C is the final state x=10 (a. ¢) tw cow") w fay bj*) and {a"b""] 1. 2 0} is accepted by deterministic pushdown automata (a) ‘The numbers 1, 2, 4. 8... 2" written in binary can be recognized by Detemninistic finite state automata 9 7 OG) ‘The numbers 1. 2, 4... 2" written in unary is nothing bat 1, 11, 111, TIT ete. cannot be recognized by deterministic Finite-state automata The sets of binary string in which number of zeroes is same as the number of one is not recognized by Finite automata. Because finite automata docs not have external memory to store zero and one and then check for the equivalence... same way the set {1, 10, 11011, 1110111,} is sot in which string 1s- symmetric about one so it cannot be recognized by Deterministic finite automaton {c, d) Let r= HO*@+1) L(t) = (110, H11, 1100, 1104,..} L(n) contains string 1101 Let S= 10+ 1) 10 LS) = (1101, 10101, 11101, .} L(S) contains 1101 as string, 00+ (LIY* O)* 1) = fs, 00, 0,10, Let t

You might also like