• Courses
  • Tutorials
  • Jobs
  • Practice
  • Contests

GATE CS 1999

Question 51

[5 Marks question] Let G be a finite group and H be a subgroup of G. For a∈G, define  aH= { ah | h∈H } a.  Show that |aH| - |H| b.  Show that for every pair of elements a, bG, either aH=bH or aH and bH are disjoint. c.  Use the above to argue that the order of H must divide the order of G.

    Question 52

    [5 Marks question] Let G be a connected, undirected graph. A cut in G is a set of edges whose removal results in 0 being broken into two or more components which are not connected with each other. The size of a cut is called its cardinality. A men-cut of G is a cut in G of minimum cardinality. Consider the following graph. q55 a.  Which of the following sets of edges is a cut? (i) {(A,B), (E,F), (B,D), (A,E), (A,D)} (ii)  {(B,D), (C,F), (A,B)} b.  What is the cardinality of a min-cut in the graph? c.  Prove that if a connected undirected graph G with n vertices has a min-cut of cardinality K, then G has atleast  (nk/2) edges.

      Question 53

      [5 Marks question] a.  Given that A is regular and A∪B is regular, does it follow that B is necessarily regular? Justify your answer. b.  Given two finite automata M1, M2, outline an algorithm to decide if L(M1)⊆L(M2).    (note: strict subset)

        Question 54

        [5 Marks question] Show that the language L = { xcx | x∈ {0,1}* and c is a terminal symbol } is not context free, c is not 0 or 1.

          Question 55

          [5 Marks question] Let A be an n*n matrix such that the elements in each row and each column are arranged in ascending order. Draw a decision tree which finds 1st, 2nd and 3rd smallest elements in minimum number of comparisons.  

            Question 56

            The least number of temporary variables required to create a three-address code in static single assignment form for the expression a=b * d - c + b * e - c is ______

            • 3

            • 4

            • 5

            • 6

            Question 57

            [5 Marks question] Suppose we have a function HALTS which when applied to any arbitrary function f and its arguments will say TRUE if function f terminates for those arguments  and FALSE otherwise. Example, Given the following function definition.
            FACTORIAL (N) = IF(N=0) THEN 1 ELSE N*FACTORIAL (N-1)
            Then HALTS(FACTORIAL 4)= TRUE and HATS(FACTORIAL -5)=FLASE
            
            Let us define the function FUNNY(f) = IF HALTS(ff) THEN not(ff) ELSE TRUE
            
            
            a.  Show that FUNNY terminates for all functions f b.  Use (a) to prove (by contradiction) that it is not possible to have a function like HALTS which for arbitrary functions and inputs says whether it will         terminate on that input or not.

              Question 58

              [5 Marks question] a.  Consider the following algorithm. Assume procedure A and procedure B take O(1) and O(1/n) unit of time respectively. Derive the time complexity of the algorithm in O-notation.
              algorithm what (n)      
              begin 
                  if n = 1 then call A 
                  else 
                      begin
                          what (n-1);
                          call B(n)
                      end
              end.
              
              b. Write a constant time algorithm to insert a node with data D just before the node with address p of a singly linked list.

                Question 59

                [5 Marks question] a. In a binary tree, a nil node is defined to be a node with 2 children. Use induction on the height of the binary tree to prove that the number of full nodes plus one is equal to the number of leaves. b. Draw a min-heap that results from insertion of the following elements in order into an initially empty min-heap: 7, 6, 5, 4, 2, 3, 1. Show the result after the deletion of the root of this heap.

                  Question 60

                  [5 Marks question] An instruction pipeline consists of 4 stages: Fetch(F), Decode operand field (D), Execute (E), and Result-Write (W). The five instructions in a certain instruction sequence need these stages for the different number of clock cycles as shown by the table below. No. of cycles needed for Untitled
                  
                  Find the number of clock cycles needed to perform the 5 instructions.
                  

                    There are 70 questions to complete.

                    Last Updated :
                    Take a part in the ongoing discussion