Friday, 27 November 2015

Q23,p3,J15. Which of the following is false for the programming language Prolog.?

a)      A Prolog variable can be assigned a value once.
b)      Prolog is a strongly typed language.
c)       The scope of a variable in Prolog is a single clause or a rule.
d)      The scope of a variable  in Prolog is a single query.
Answer B.
Explanation.

Prolog is a statically typed language .

Q22,p3,J15. The clausal form of the disjunctive normal form ~Av~Bv~C v D is

Options
A)     A^B^C->D           B)AvBVCVD->True.         C)A^B^C^D->true           D)A^B^C^D->false.
Answer A.
Explanation
~Av(~Bv~C)vD.
~AV ~(B^C)VD.
~(A^B^C)VD.
We know A-> B = ~AV B.
So it turns out to be A^B^C->D.


Q21,p3,j15. The transition function for the language L={w|na(w) and nb(w) are both odd} is given by.


Δ(q0,a)=q1.;              Δ(q0,b)=q2.
Δ(q1,a)=q0.               Δ(q1,b)=q3.
Δ(q2,a)=q3.               Δ(q2,b)=q0.
Δ(q3,a)=q2.               Δ(q3,b)=q1.
The initial and final states are.
Options.
A)     Q0 and q0
B)      Q0 and q1.
C)      Q0 and q2
D)     Q0 and q3.
Answer D.
Explanation.
Accepted words are { ab, ba, aaab,abaa, aaba,bbba-----}
A and b are of odd length. Hence from diagram from the above transitions. option D is correct.


Q20,P3,j15. The regular expression corresponding to the language L

where L={xε {0,1}* |x ends with 1 and does not contain  substring 00} is:
Options
A.      (1+01)*(10+01)
B.      (1+01)*01
C.      (1+01)*(1+01)
D.      (10+01)01.
Answer C.
Explanation.
Option A can yield string terminating with 0 hence it fails.
Option D  an yield string 1001. Hence it also fails.

Option C. generates all string with  length1,2,3,----- terminating with 1 and does not contain 00 substring.

Q19,p3,j15. Minimal deterministic finite automation for the language L={0n, | n>=0, n|= 4} will have:

Options
A.)One final state among  5 states.
B.) 4 final states among 5 states.
C.) 1 final state among 6 states.
D.) 5. Final states among 6 states.

Answer D.
Explanation.

Accepted words are {Epsilon,o,oo,ooo,ooooo,oooooo---}

Q18,p3,j15. Match the following.


List 1
List 2
A.      Flood Gun
1.       An electron gun designed to flood the entire screen with electrons.
B.      Collector
2.       Partly energized by flooding gun, stores the charge generated by the writing gun.
C.      Ground
3.       Used to discharge the collector.
D.      Phosphorus
4.       Used in memory tube display and similar to those used in standard CRT.
E.       Writing gun system
5.       Used in memory tube  display , basically the same as electron gun used in conventional CRT. 

Codes
                A             B             C             D             E
A.            i.              ii.             Iii.           Iv.           V.
B.            i.              iii             iv             v              i
C.            III            I               ii.             V.            iv.
D.            iv.           V.            i.              ii.             Iii.

Answer A.

Thursday, 26 November 2015

Q17. P3,j15. Which of the following statements are incorrect?

1.       Mapping the coordinates of the points and lines that form the pictures into the appropriate coordinates on the devices or workstations  is known as viewing transformation.
2.       The right handed Cartesian coordinate  system in whose coordinate we describe the picture is known as world coordinate system.
3.       The coordinate system that corresponds to the device or workstation where the image is to be displayed is known as  physical device coordinate system.
4.       Left hand coordinate system In which the displayed area of the virtual device corresponds to unit |x| square whose left hand corner is at the origin of the coordinate system, is known as normalized device coordinate system.
Codes
A)     I only.   B)1 and 2.     C) 3 only      D) 4 only.
Answer D.
Explanation.
In normalized device coordinate system lower left corner corresponds to (0,0) and upper right corner corresponds to (1,1).