Consider a binary max-heap implemented using an array. Which one of the following array represents a binary max-heap?
Data Structures
gate 2009
Heap-Tree
Consider a binary max-heap implemented using an array. What is the content of the array after two delete operations on the correct answer to the previous question?
Data Structures
gate 2009
Heap-Tree
Mathematics
Graph Theory
gate 2010
In a binary tree with n nodes, every node has an odd number of descendants. Every node is considered to be its own descendant. What is the number of nodes in the tree that have exactly one child?
Data Structures
gate 2010
Binary-Trees
Two alternative packages A and B are available for processing a database having 10k records.Package A requires 0.0001n2 time units and package B requires 10nlog10n time units to process n records. What is the smallest value of k for which package B will be preferred over A?
Algorithms
Time-Complexity
gate 2010
The degree sequence of a simple graph is the sequence of the degrees of the nodes in the graph in decreasing order. Which of the following sequences can not be the degree sequence of any graph?
(I) 7, 6, 5, 4, 4, 3, 2, 1
(II) 6, 6, 6, 6, 3, 3, 2, 2
(III) 7, 6, 6, 4, 4, 3, 2, 2
(IV) 8, 7, 7, 6, 4, 2, 1, 1
Graph Theory
gate 2010
Engineering-Mathematics
Algorithms
Dynamic-Programming
gate 2010
Let G be a group with 15 elements. Let L be a subgroup of G. It is known that L ≠ G and that the size of L is at least 4. The size of L is __________.
GATE 2014 SET 3
What is the minimum possible weight of a spanning tree T in this graph such that vertex 0 is a leaf node in the tree T?
Algorithms
Minimum-Spanning-Tree
gate 2010
What is the minimum possible weight of a path P from vertex 1 to vertex 2 in this graph such that P contains at most 3 edges?
Data Structures
gate 2010
Graphs
Which one of the following choices gives a possible order in which the key values could have been inserted in the table?
Data Structures
Hashing
gate 2010
Consider the following processors (ns stands for nanoseconds). Assume that the pipeline registers have zero latency. P1: Four-stage pipeline with stage latencies 1 ns, 2 ns, 2 ns, 1 ns. P2: Four-stage pipeline with stage latencies 1 ns, 1.5 ns, 1.5 ns, 1.5 ns. P3: Five-stage pipeline with stage latencies 0.5 ns, 1 ns, 1 ns, 0.6 ns, 1 ns. P4: Five-stage pipeline with stage latencies 0.5 ns, 0.5 ns, 1 ns, 1 ns, 1.1 ns. Which processor has the highest peak clock frequency?
computer organization
GATE 2014 SET 3
Consider the following rooted tree with the vertex la beled P as t he root:
he order in which the nodes are visited during an i n-order trave rsal of the tree is
Algorithms
GATE 2014 SET 3
Suppose depth first search is executed on the graph below starting at some unknown vertex. Assume that a recursive call to visit a vertex is made only after first checking that the vertex has not been visited earlier. Then the maximum possible recursion depth (including the initial call) is _________.
Algorithms
GATE 2014 SET 3
Graphs
You have an array of n elements. Suppose you implement quicksort by always choosing the central element of the array as the pivot. Then the tightest upper bound for the worst case performance is
Algorithms
Sorting
GATE 2014 SET 3
A system uses 3 page frames for storing process pages in main memory. It uses the Least Recently Used (LRU) page replacement policy. Assume that all the page frames are initially empty. What is the total number of page faults that will occur while processing the page reference string given below? 4, 7, 6, 1, 7, 6, 1, 2, 7, 2
operating systems
GATE 2014 SET 3
A system contains three programs and each requires three tape units for its operation. The minimum number of tape units which the system must have such that deadlocks never arise is _________.
operating systems
GATE 2014 SET 3
operating systems
GATE 2014 SET 3
Consider a paging hardware with a TLB. Assume that the entire page table and all the pages are in the physical memory. It takes 10 milliseconds to search the TLB and 80 milliseconds to access the physical memory. If the TLB hit ratio is 0.6, the effective memory access time (in milliseconds) is _________.
operating systems
GATE 2014 SET 3
Suppose you want to move from 0 to 100 on the number line. In each step, you either move right by a unit distance or you take a shortcut. A shortcut is simply a pre-specified pair of integers i, j with i < j. Given a shortcut i, j if you are at position i on the number line, you may directly move to j. Suppose T(k) denotes the smallest number of steps needed to move from k to 100. Suppose further that there is at most 1 shortcut involving any number, and in particular from 9 there is a shortcut to 15. Let y and z be such that T(9) = 1 + min(T(y),T(z)). Then the value of the product yz is _____.
GATE 2014 SET 3