You are on page 1of 3
It’s your time to choose the ‘Time: 1:30 Hrs Answers ALL the questions 1. (@) Find an ambiguous grammar and construct LMD, RMD and Parse tree for the given string arithmetic expression, involving ~ and *, With no redundant parenthesis, ( Ex: Parenthesis is id notin (id id) “id [PEt] saa | | | TOCy"FIF ADAtd MHididM FOE/id M(AyW AMAA) ESAMT ESAMid ADAHTIMATIT AD Atid/Mtidlidtid M(A)T/ATIAN(T) | MO(A)tidid(AVASid id IdM id Tid) en CFG (&) rite down CNF forth SPA/ABO/ATA ADADle , BPBILBC . CP CBICA|IB (C) GeSPAaS|e .APSDB , BHCC CHcDiEe DPabAA EPbe FIbBC mbols in the G: @ Find the number of useless s (i) Find the no. of Production in G”, after removal of null production. suet that L(G. 2G S>X1 XDAIB|? ASBIAB BaBACKC capac DHE oid * (b) Define Handle Pruning and Viable Prefixes {6)-The string ofthe form agp gives--—-~ of the system where the next iRPY 4 46) Construct Pushdown automata for L = {al?"e""d"6™ imac OF (b) Construct deterministic pushdown automata fo ac tthe binary strings that start and end with the same symbol and have the same number of Os as Is 0,1},{0,1,B1.9, anB, (ad) 15+] M = ({qutnasads sf states, the input alphabet, the tape alphabet: 5. (a) Consider the Turing machine where the elements in the 7-tuple denote the lank symbol, and the set of accepting states. the transition function, the star respectively. Suppose 6 consists of the following. $= fof rules: O(gy,0)=(u LEDs Describe the language L(M) using the notation of regular expresions (by Show the ID's of the Turing machin sput tape contains w1= 00000010 and wa= 00100100 e/a.k sit

You might also like