Professional Documents
Culture Documents
CS402 Solved MCQZ by Ishfaq
CS402 Solved MCQZ by Ishfaq
CS402 Solved MCQZ by Ishfaq
CS402- MCQs: For a given input, it provides the compliment of Boolean !" output# ! !" $o% &!'( !") "*+ , $o% '- $o% !" $o% .t dela/s the transmission of signal along the 0ire $/ one step &cloc1 pulse)# ! !" $o% &!'( !") "*+ , $o% '- $o% !" $o% For the given input, it provides the Boolean '- output ! !" $o% &!'( !") "*+ , $o% '- $o% !" $o% For the given input, !" $o% provides the Boolean !" output# (rue False (he current in the 0ire is indicated $/ 2 and 0 indicates the a$sence of the current# (rue False n/ language that can not $e e%pressed $/ a -* is said to $e regular language# (rue False .f +2 and +2 are regular languages is3are also regular language&s)# +2 4 +2 +2+2 +2 ll of a$ove
Page No.15
+et + $e a language defined over an alpha$et 5, then the language of strings, defined over 5, not $elonging to +, is called Complement of the language +, denoted $/ +c or +6# (rue False (o descri$e the complement of a language, it is ver/ important to descri$e the ----------- of that language over 0hich the language is defined# lpha$et -egular *%pression String
Page No.15
Converting each of the final states of F to non-final states and old non-final states of F to final states, F thus o$tained 0ill re9ect ever/ string $elonging to + and 0ill accept ever/ string, defined over 5, not $elonging to +# is called (ransition :raph of + -egular e%pression of + Complement of + Finite utomata of + .f +2 and +2 are t0o regular languages, then +2 ; +2 is not a regular# (rue False "e-Morgan<s la0 for sets is e%pressed $/, & L2c L2 c )c = L2c L2 c & L2c L2 c )c = L2c L2 c & L2c L2 c )c = L2 L2 & L2c L2 c )c = L2 L2 .f +2 and +2 are regular languages, then these can $e e%pressed $/ the corresponding F s# (rue False +8 language of 0ords containing even num$er of a6s# -egular *%pression is &a4$)aa&a4$) &$4a$a) a4$$aa$a &a4$)a$&a4$) (he regular e%pression defining the language +2 ; +2 can $e o$tained, converting and reducing the previous ------------- into a ------------ as after eliminating states# :(:, (: F , :(: F , (: (:, -*
Page No.15
(he language that can $e e%pressed $/ an/ regular e%pression is called a !on regular language# (rue False (he languages -------------- are the e%amples of non regular languages# = +.!"-'M* and =-.M* = +.!"-'M* and *>*!-*>*! *>*!-*>*! and =-.M* F C('-. + and SQ;-* +et + $e an/ infinite regular language, defined over an alpha$et 5 then there e%ist three strings %, / and ? $elonging to 5such that all the strings of the form %/ n ? for n82,2,@, A are the 0ords in +# called# Complement of + =umping +emma Bleene6s theorem !one in given &22 +anguages are proved to $e regular or non regular using pumping lemma# (rue False &22) ------------------- is o$viousl/ infinite language# *Q; +-*Q; + *>*!-*>*! = +.!"-'M* F C('-. + &2@) .f, t0o strings % and /, defined over 5, are run over an F accepting the language +, then % and / are said to $elong to the same class if the/ end in the same state, no matter that state is final or not# (rue False M/hill !erode theorem is consisting of the follo0ings, + partitions 5into distinct classes# .f + is regular then, + generates finite num$er of classes# .f + generates finite num$er of classes then + is regular# ll of a$ove (he language Q is said to $e Cuotient of t0o regular languages = and -, denoted $/--- if =Q8-# -8Q3= Q8-3= Q8=3=8-3Q
.f t0o languages - and Q are given, then the prefi%es of Q in - denoted $/ =ref&Q in -)#
Page No.15
=ref &Q in
.f - is regular language and Q is an/ language ®ular3 non regular), then =ref &Q in -) is ---------# !on-regular *Cual -egular .nfinite GCF:G stands for HHHHHHHHH Conte%t Free :raph Conte%t Free :rammar Conte%t Finite :raph Conte%t Finite :rammar &2I) HHHHHHHHHHH states are called the halt states#
CC*=( and -*J*C( CC*=( and -* " CC*=( !" S( -( CC*=( !" 7-.(* &@0) (he part of an F , 0here the input string is placed $efore it is run, is called HHHHHHH
State (ransition .nput (ape 'utput (ape .n ne0 format of an F &discussed in lecture @D), (his state is li1e dead-end non final state CC*=( -*J*C( S( (-* " For language + defined over Ea, $F, then + partitions Ea, $Finto AA classes .nfinite Finite "istinct
Page No.15
&@K)
n82, 2, @, 4AAA# n80, 2, 2, @, 4AAA# n8AA#-@,-2,-2, 0, 2, 2, @, 4AA n8AA#-@,-2,-2, 2, 2, @, 4AA &@M) state (he =" is called non-deterministic =" 0hen there are more than one out going edges fromAAA
S( -( or -* " ='= or -*J*C( -* " or ='= =;SN or ='= .dentif/ the (-;* statement: =" is non-deterministic, if there are more than one -* " states in =" =" is never non-deterministic +i1e (:, =" can also $e non-deterministic =" is non-deterministic, if there are more than one -*J*C( states in =" (here is a pro$lem in deciding 0hether a state of F should $e mar1ed or not 0hen the language Q is infinite# (rue False .f an effectivel/ solva$le pro$lem has ans0ered in /es or no, then this solution is called --------"ecision procedure "ecision method "ecision pro$lem
Page No.15
(o e%amine 0hether a certain F accepts an/ 0ords, it is reCuired to see1 the paths from ------- state# Final to initial Final to final .nitial to final .nitial to initial (he high level language is converted into assem$l/ language codes $/ a program called compiler# (-;* F +S* :rammatical rules 0hich involve the meaning of 0ords are called --------------Semantics S/ntactic Both a and $ !one of given :rammatical rules 0hich do not involve the meaning of 0ords are called --------------Semantics S/ntactic Both a and $ !one of given
(he s/m$ols that can6t $e replaced $/ an/thing are called ----------------=roductions (erminals !on-terminals ll of a$ove (he s/m$ols that must $e replaced $/ other things are called HHHHHHHHHH =roductions (erminals !on-terminals !one of given &4D) (he grammatical rules are often calledHHHHHHHHHHHHH
Page No.15
(he terminals are designated $/ HHHHHHHH letters, 0hile the non-terminals are designated $/ HHHHHHHH letters# Capital, $old Small, capital Capital, small Small, $old (he language generated $/ HHHHHHHHHH is called Conte%t Free +anguage &CF+)# F (: CF: (:( &4I) 5 8 Ea,$F =roductions SOPaaP POaP (his grammar defines the language e%pressed $/HHHHHHHHHHH &a4$)aa&a4$) &a4$)a&a4$)a &a4$)aa&a4$)aa &a4$)a$a4$) &K0) S O aP$R$ PaP O aPR$PRQ (he given CF: generates the language in *nglish HHHHHHHHHH PO$P POQ
Beginning and ending in different letters Beginning and ending in same letter Naving even-even language !one of given &K2) (he CF: is not said to $e am$iguous if there e%ists atleast one 0ord of its language that can $e generated $/ the different production trees, (-;* F +S* (he language generated $/ that CF: is regular if HHHHHHHHH !o terminal O semi 0ord !o terminal O 0ord Both a and $ !one of given (he production of the form no terminal O Q is said to $e null production#
Page No.15
!ull production ;nit production !ull a$le production !one of given &KM) C!F is stands for
Conte%t !ormal Form Complete !ormal Form Choms1/ !ormal Form Compared !ull Form =roof&Bleene6s (heorem =art ..) .f a (: has more than one start states, then .ntroduce the ne0 start state *liminate the old start state -eplace the old start state 0ith final state -eplace the old final state 0ith ne0 start state Question S 2 7hile finding -* corresponding to (:, 0e connect the ne0 start state to the old start state $/ the transition la$eled $/ Select correct option: a $ null string !one of the given options Question S @ of 20 & Start time: 0K:4I:0@ =M ) (otal Mar1s: 2 7hich of the follo0ing regular e%pression represents same languageT a# &a4a$)$# &$a4a)c# a&aa$)d# &a$)
a4$)a&a4$)$&a4$)4 &a4$)$&a4$)a&a4$)#
Page No.15
Question S K of 20 & Start time: 0K:K2:@0 =M ) (otal Mar1s: 2 +et F @ $e an F corresponding to F 24F 2, then the initial state of F @ must correspond to the initial state of Select correct option: F 2 onl/ F 2 onl/ F 2 or F 2 F 2 and F 2 Question S M of 20 & Start time: 0K:K@:02 =M ) (otal Mar1s: 2 7hich of the follo0ing statement is !'( true a$out (:T Select correct option: (here e%ists e%actl/ one path for certain string (here ma/ e%ist more than one paths for certain string (here ma/ e%ist no path for certain string (here ma/ $e no final state Question S D of 20 & Start time: 0K:K4:0M =M ) (otal Mar1s: 2 Bleene6s theorem states Select correct option: ll representations of a regular language are eCuivalent# ll representations of a conte%t free language are eCuivalent# ll representations of a recursive language are eCuivalent Finite utomata are less po0erful than =ushdo0n utomata# Question S U of 20 &Start time: 0K:KK:@M =M) (otal Mar1s: 2 7hat do automata meanT Select correct option: Something done manuall/ Something done automaticall/ Question S I of 20 & Start time: 0K:KM:K2 =M ) (otal Mar1s: 2 language accepted $/ an F is also accepted $/ Select correct option: (: onl/ :(: onl/ -* onl/ ll of the given Question S 20 of 20 & Start time: 0K:KU:2M =M ) (otal Mar1s: 2 .f r2 8 &aa 4 $$) and r2 8 &a 4 $) then the language &aa 4 $$)&a 4 $) 0ill $e generated $/ Select correct option: &r2)&r2) &r2 4 r2)
Page No.15
.f r2 8 &aa 4 $$) and r2 8 & a 4 $) then the language &aa 4 $$)&a 4 $) 0ill $e generated $/ V &r2)&r2) V &r2 4 r2) V &r2)&r2) V &r2) Question !o: 2 & Mar1s: 2 ) - =lease choose one W'ne language can $e e%pressed $/ more than one F X# (his statement is HHHHHH V (rue V False V Some times true Y sometimes false V !one of these Question !o: @ & Mar1s: 2 ) - =lease choose one 7ho did not invent the (uring machineT V lan (uring V # M# (uring V (uring V !one of these Question !o: 4 & Mar1s: 2 )- =lease choose one 7hich statement is trueT V (he tape of turing machine is infinite# V (he tape of turing machine is finite# V (he tape of turing machine is infinite 0hen the language is regular V (he tape of turing machine is finite 0hen the language is nonregular# Question !o: K & Mar1s: 2 ) - =lease choose one regular language: V Must $e finite V Must $e infinite V Can $e finite or infinite V Must $e finite and cannot $e infinite Question !o: M & Mar1s: 2 ) - =lease choose one *ver/ regular e%pression can $e e%pressed as CF: $ut ever/ CF: cannot $e e%pressed as a regular e%pression# (his statement is: V "epends on the language V !one of the given options V (rue V False
Page No.15
a
P2Z
$
P24
(his statement is (rue False "epends on language !one of these Question !o: U & Mar1s: 2 ) - =lease choose one Consider the language + of strings, defined over 5 8 Ea,$F, ending in a (here are finite man/ classes generated $/ +, so + is regular (here are infinite man/ classes generated $/ +, so + is regular (here are finite man/ classes generated $/ +, so + is non-regular (here are infinite man/ classes generated $/ +, so + is non-regular Question !o: I & Mar1s: 2 ) - =lease choose one
aa,$$
a$,$a
aa,$$
a$,$a
$ove given (: has HHHHHHHHHHHHH -*# V &aa4aa4&a$4a$)&aa4a$)&a$4$a)) V &aa4$$4&a$4$a)&aa4$$)&a$4$a)) V &aa4$$4&a$4$a)&aa4$$)&a$4$a)) V !one of these Question !o: 20 & Mar1s: 2 ) - =lease choose one (he 0ord [formal6 in formal languages means V (he s/m$ols used have 0ell defined meaning
Page No.15
(he num$er of possi$le strings of length [n6 that can $e formed $/ the elements of the set V n\ V n2 V nm V 2n Question !o: 22 & Mar1s: 2 ) - =lease choose one
+et is
8 E0, 2F#
Choose the correct statement# V Meal/ machine generates no language as such V Moore machine generates no language as such V Meal/ machine has no terminal state V ll of these Question !o: 2@ & Mar1s: 2 ) - =lease choose one (M is more po0erful than FSM $ecause V (he tape movement is confined to one direction V .t has no finite state control V .t has the capa$ilit/ to remem$er ar$itrar/ long seCuences of input s/m$ols V !one of these Question !o: 24 & Mar1s: 2 ) - =lease choose one .f +2 and +2 are e%pressed $/ regular e%pressions r2 and r2, respectivel/ then the language e%pressed $/ r2 4 r2 0ill $e HHHHHHHHH V -egular V .r-regular V Can6t $e decided V nother +anguage 0hich is not listed here Question !o: 2K & Mar1s: 2 ) - =lease choose one +i1e (:, a =" can also $e non-deterministic V (rue V False Question !o: 2M & Mar1s: 2 ) - =lease choose one
Page No.15
(he a$ove machine is a3an(: HHHHHHHHHHH V Finite utomata V (uring machine VF V (: Question !o: 2D & Mar1s: 2 ) - =lease choose one (he language of all 0ords &made up of a6s and $6s) 0ith at least t0o a6s can not $e descri$ed $/ the regular e%pression# V a&a4$)a&a4$)&a4$)a$ V &a4$)a$a&a4$) V $a$a&a4$) V none of these Question !o: 2U & Mar1s: 2 ) - =lease choose one .n F , if one enters in a specific state $ut there is no 0a/ to leave it, then that specific state is called V "ead State V 7aste Bas1et V "ave/ John +oc1er V ll of these Question !o: 2I
c
& Mar1s: 2 )
language then, + is also a HHHHH language# V -egular V !on-regular V -egular $ut finite V !one of the given Question !o: 20 & Mar1s: 2 ) - =lease choose one .n CF:, the s/m$ols that can6t $e replaced $/ an/thing are calledHHH V (erminal V !on-(erminal V =roduction V ll of given Question !o: 22 & Mar1s: 2 ) - =lease choose one
Page No.15
7hich of the
Choose the incorrect &F +S*) statement# V Meal/ machine generates no language as such V Meal/ machine has no terminal state V For a given input string, length of the output string generated $/ a Moore than the length of the output string generated $/ that of a Meal/ machine V ll of these Question !o: 2@ & Mar1s: 2 ) - =lease choose one =umping lemma is generall/ used to prove that: V given language is infinite V given language is not regular V 7hether t0o given regular e%pressions of a regular language are eCuivalent or not V !one of these Question !o: 24 & Mar1s: 2 ) - =lease choose one 7hich of the follo0ing is a regular languageT V String of odd num$er of ?eroes V Set of all palindromes made up of 06s and 26s V String of 06s 0hose length is a prime num$er V ll of these Question !o: 2K & Mar1s: 2 ) - =lease choose one Choose the incorrect statement: V &a4$)aa&a4$)generates -egular language# V language consisting of all strings over ]8Ea,$F having eCual num$er of a6s and $6s is a regular language V *ver/ language that can $e e%pressed $/ F can also $e e%pressed $/ -* V !one of these Question !o: 2M & Mar1s: 2 ) - =lease choose one +eft hand side of a production in CF: consists of: V 'ne terminal V More than one terminal V 'ne non-terminal V (erminals and non-terminals