• Courses
  • Tutorials
  • Jobs
  • Practice
  • Contests

GATE CS 2022

Question 21

Consider solving the following system of simultaneous equations using LU decomposition. 

x1 + x2 - 2x3 = 4

x1 + 3x2 - x3 = 7

2x1 + x2 - 5x3 = 7

where L and U are denoted as

[Tex] L =\begin{pmatrix} &L11  &0 &0 \\ &L21 &L22 &0  \\ &L31  &L32 &L33 \\ \end{pmatrix}[/Tex]

[Tex]U =\begin{pmatrix} &U11  &U12 &U13 \\ &0 &U22 &U23  \\ &0  &0 &U33 \\ \end{pmatrix}[/Tex]

Which one of the following is the correct combination of values for L32, U33, and x1

  • L32 = 2, U33  = -1/2, x1 = -1

  • L32 = 2, U33  = 2, x1 = -1

  • L32 = -1/ 2, U33  = 2, x1 = 0

  • L32 = -1/2, U33  = -1/2, x1 = 0

Question 22

Which of the following is/are undecidable?

  • Given two Turing machines M1 and M2, decide if L(M1) = L(M2). 

  • Given a Turing machine M, decide if L(M) is regular.

  • Given a Turing machine M, decide if M accepts all strings.

  • Given a Turing machine M , decide if M takes more than 1073 steps on every string.

Question 23

Consider the following languages: 

L1 = {ww | w ∈ {a, b}* }

L2 = {anbncn | m, n≥ 0}

L3 = {ambncn | m, n≥ 0}

Which of the following statements is/are FALSE?

  • L1 is not context-free but L2 and L3 are deterministic context-free.

  • Neither L1 nor L2 is context-free. 

  • L2, L3, and L2 ∩ L3 all are context-free.

  • Neither L1 nor its complement is context-free. 

Question 24

Consider the following languages:

L1 = {anwan | w ∈ {a, b}*}

L2 = {wxwR | w, x ∈ {a, b}*, |w|, |x|>0}

Note that R w is the reversal of the string w. Which of the following is/are TRUE?

  • L1  and L2 are regular

  • L1  and L2 are context-free

  • L1  is regular and L2 is context-free.

  • L1  and L2 are context-free but not regular

Question 25

Consider a simple undirected weighted graph G, all of whose edge weights are distinct. Which of the following statements about the minimum spanning trees of G is/are TRUE? 

  • The edge with the second smallest weight is always part of any minimum spanning tree of G .

  • One or both of the edges with the third smallest and the fourth smallest weights are part of any minimum spanning tree of G .

  • Suppose S C V be such that S ≠∅ and S ≠ V . Consider the edge with the minimum weight such that one of its vertices is in S and the other in V \ S . Such an edge will always be part of any minimum spanning tree of G

  • G can have multiple minimum spanning trees

Question 26

The following simple undirected graph is referred to as the Peterson graph

Which of the following statements is/are TRUE?

  • The chromatic number of the graph is 3

  • The graph has a Hamiltonian path

  • The following graph is isomorphic to the Peterson graph.

  • The size of the largest independent set of the given graph is 3. (A subset of vertices of a graph form an independent set if no two vertices of the subset are adjacent.)

Question 27

Consider the following recurrence:

f(1) = 1;
f(2n) = 2f(n) -1, for n≥1;
f(2n+1) = 2f(n) +1, for n≥1;

Then, which of the following statements is/are TRUE?

  • f(2n -1) = 2n-1

  • f(2n) = 1

  • f(5. 2n) = 2n+1+1

  • f(2n +1) = 2n+1

Question 28

Which of the properties hold for the adjacency matrix A of a simple undirected unweighted graph having n vertices? 

  • The diagonal entries of A2 are the degrees of the vertices of the graph. 

  • If the graph is connected, then none of the entries of An-1 + In can be zero.

  • If the sum of all the elements of A is at most 2(n-1), then the graph must be acyclic.

  • If there is at least a 1 in each of A’s rows and columns, then the graph must be connected. 

Question 29

Which of the following is/are the eigenvector(s) for the matrix given below?

[Tex]\begin{pmatrix} -9 &-6  &-2  &-4 \\ -8& -6 &-3 &-1 \\ 20& 15 &8  & 5\\ 32& 21 &7  & 12 \end{pmatrix}[/Tex]

  • [Tex]\begin{pmatrix} -1 \\ 1 \\ 0\\ 1 \end{pmatrix}[/Tex]

  • [Tex]\begin{pmatrix} 1 \\ 0 \\ -1\\ 0 \end{pmatrix}[/Tex]

  • [Tex]\begin{pmatrix} -1 \\ 0 \\ 2\\ 2 \end{pmatrix}[/Tex]

  • [Tex]\begin{pmatrix} 0 \\ 1 \\ -3\\ 0 \end{pmatrix}[/Tex]

Question 30

Consider a system with a 2 KB direct-mapped data cache with a block size of 64 bytes. The system has a physical address space of 64 KB and a word length of 16 bits. During the execution of a program, four data words P, Q, R, and S are accessed in that order 10 times (i.e., PQRSPQRS…). Hence, there are 40 accesses to the data cache altogether. Assume that the data cache is initially empty and no other data words are accessed by the program. The addresses of the first bytes of P, Q, R, and S are 0xA248, 0xC28A, 0xCA8A, and 0xA262, respectively. For the execution of the above program, which of the following statements is/are TRUE with respect to the data cache? 

  • Every access to S is a hit.

  • Once P is brought to the cache it is never evicted.

  • At the end of the execution-only R and S reside in the cache.

  • Every access to R evicts Q from the cache.

There are 65 questions to complete.

Last Updated :
Take a part in the ongoing discussion