• Courses
  • Tutorials
  • Jobs
  • Practice
  • Contests

Gate IT 2007

Question 41

The line T in the following figure is permanently connected to the ground. Which of the following inputs (X1 X2 X3 X4) will detect the fault ?
  • 0000
  • 0111
  • 1111
  • None of these

Question 42

The two grammars given below generate a language over the alphabet {x, y, z}
2007_46
Which one of the following choices describes the properties satisfied by the strings in these languages?
  • G1 : No y appears before any x
    G2 : Every x is followed by at least one y
  • G1 : No y appears before any x
    G2 : No x appears before any y
  • G1 : No y appears after any x
    G2 : Every x is followed by at least one y
  • G1 : No y appears after any x
    G2 : Every y is followed by at least one x

Question 43

Consider the following DFA in which s0 is the start state and s1, s3 are the final states.
2007_47
What language does this DFA recognize ?
  • All strings of x and y
  • All strings of x and y which have either even number of x and even number of y or odd number or x and odd number of y
  • All strings of x and y which have equal number of x and y
  • All strings of x and y with either even number of x and odd number of y or odd number of x and even number of y

Question 44

Consider the grammar given below
S → x B | y A
A → x | x S | y A A
B → y | y S | y B B
Consider the following strings.
(i) xxyyx
(ii) xxyyxy
(iii) xyxy
(iv) yxxy
(v) yxx
(vi) xyx
Which of the above strings are generated by the grammar ?
  • (i), (ii), and (iii)
  • (ii), (v), and (vi)
  • (ii), (iii), and (iv)
  • (i), (iii), and (iv)

Question 45

Consider the following grammars. Names representing terminals have been specified in capital letters.
2007_49
Which one of the following statements is true?
  • G1 is context-free but not regular and G2 is regular
  • G2 is context-free but not regular and G1 is regular
  • Both G1 and G2 are regular
  • Both G1 and G2 are context-free but neither of them is regular

Question 46

Consider the following finite automata P and Q over the alphabet {a, b, c}. The start states are indicated by a double arrow and final states are indicated by a double circle. Let the languages recognized by them be denoted by L(P) and L(Q) respectively.
2007_50
The automation which recognizes the language L(P) ∩ L(Q) is :
2007_50_a
2007_50_b
2007_50_c
2007_50_d
  • a
  • b
  • c
  • d

Question 47

In the simplified flowchart given below, the shaded boxes represent code that is executed during a test case.
2007_53
The Branch coverage is
  • 3/4
  • 2/3
  • 1/2
  • 3/8

Question 48

Consider the CPM activity chart where an arc connecting two milestones is labeled with a task identifier and the time taken in days. For example in order to go from A to B, task T1 takes 180 days. A dashed line depicts an additional dependency that is equivalent to a zero time task.
2007_54
The set of activities that lie on the critical path are
  • T1, T2, T8, T10
  • T1, T3, T8, T10
  • T1, T2, T3, T4, T5, T6, T7, T8, T9, T10
  • T1, T4, T5, T7, T8, T10

Question 49

Consider the following pseudo-code: C
 IF ((A > B) AND (C > D)) THEN
       A = A + 1
       B = B + 1
ENDIF
The cyclomatic complexity of the pseudo-code is
  • 2
  • 3
  • 4
  • 5

Question 50

Synchronization in the classical readers and writers problem can be achieved through use of semaphores. In the following incomplete code for readers-writers problem, two binary semaphores mutex and wrt are used to obtain synchronization
wait (wrt)
writing is performed
signal (wrt)
wait (mutex)  
readcount = readcount + 1
if readcount = 1 then S1
S2
reading is performed
S3
readcount = readcount - 1
if readcount = 0 then S4 
signal (mutex)
The values of S1, S2, S3, S4, (in that order) are
  • signal (mutex), wait (wrt), signal (wrt), wait (mutex)
  • signal (wrt), signal (mutex), wait (mutex), wait (wrt)
  • wait (wrt), signal (mutex), wait (mutex), signal (wrt)
  • signal (mutex), wait (mutex), signal (mutex), wait (mutex)

There are 80 questions to complete.

Last Updated :
Take a part in the ongoing discussion