GATE 2014 (Session 3)
65 questions
MCQ 47 · NAT 181-mark 30 · 2-mark 35
Questions 61–65 of 65
If G is a forest with n vertices and k connected components, how many edges does G have?
Answer: (C)
Take any one tree in the forest. If it has vertices, then it has edges. Now add up the edges of all k trees: .
Answer: n k
Answer: n k
Let denote the minimum degree of a vertex in a graph. For all planar graphs on n vertices with , which one of the following is TRUE?
Answer: (A)
Now use Euler's formula: . This holds for every planar embedding.
Answer: In any planar embedding, the number of faces is at least
The CORRECT formula for the sentence, "not all rainy days are cold" is
Answer: (D)
The sentence "not all rainy days are cold" means that at least one rainy day is not cold.
Answer:
Answer:
Consider the following relational schema:
Employee (empId, empName, empDept )
Customer (custId,custName, salesRepId, rating)
SalesRepId is a foreign key referring to empId of the employee relation. Assume that each employee makes a sale to at least one customer. What does the following query return?
Employee (empId, empName, empDept )
Customer (custId,custName, salesRepId, rating)
SalesRepId is a foreign key referring to empId of the employee relation. Assume that each employee makes a sale to at least one customer. What does the following query return?
SELECT empName
FROM employee E
WHERE NOT EXISTS (SELECT custId
FROM customer C
WHERE C. salesRepId = E. empId
AND C. rating < > 'GOOD')Answer: (D)
The inner query picks the customers of this employee whose rating is not 'GOOD'. With NOT EXISTS, the employee is returned only when no such customer is found.
Every employee has at least one customer. So this means all customers of that employee have the rating 'GOOD'.
Answer: Names of all the employees with all their customers having a 'GOOD' rating
Every employee has at least one customer. So this means all customers of that employee have the rating 'GOOD'.
Answer: Names of all the employees with all their customers having a 'GOOD' rating
Let denote the Exclusive OR (XOR) operation. Let '1' and '0' denote the binary constants. Consider the following Boolean expression for F over two variables P and Q.
The equivalent expression for F is
The equivalent expression for F is
Answer: (D)
XOR can be regrouped and reordered freely (it is associative and commutative). Three rules are used: , and .
Remove the brackets:
P appears three times. Two copies cancel (), so one P is left. Q also appears three times, so one Q is left. The 0 drops out.
Option (C) is , which is missing the final complement.
Answer: (D)
Remove the brackets:
P appears three times. Two copies cancel (), so one P is left. Q also appears three times, so one Q is left. The 0 drops out.
Option (C) is , which is missing the final complement.
Answer: (D)