Explore topic-wise InterviewSolutions in .

This section includes InterviewSolutions, each offering curated multiple-choice questions to sharpen your knowledge and support exam preparation. Choose a topic below to get started.

1.

Prim’s algorithm can be implemented using _______(a) a stack data structure(b) radix sort(c) priority queue data structure(d) bubble sortI have been asked this question in a national level competition.My query is from Spanning Trees in division Trees of Discrete Mathematics

Answer»

Correct answer is (c) priority QUEUE data structure

Easy explanation: The time complexity of Prim’s algorithm depends on the data structures used for the graph and for ORDERING the edges by weight, which can be done USING a priority queue. In GENERAL, a priority queue will be quicker at finding the vertex in the SPANNING tree with minimum cost. The choice of data structures for implementation will lead to varying time complexity.

2.

In a maximum spanning tree the weighted graph is of _______(a) maximum number of edges(b) maximum number of cyclic trees(c) minimum number of vertices(d) maximum weightThe question was asked in an online interview.This key question is from Spanning Trees in chapter Trees of Discrete Mathematics

Answer»

Correct OPTION is (d) maximum weight

Best EXPLANATION: A maximum spanning tree can be computed by negating the weights for each edge and APPLYING KRUSKAL’s algorithm. Thus, it is a spanning tree of a WEIGHTED graph having maximum weight assigned to all the edges.

3.

The spanning tree will be maximally acyclic if ____________(a) one additional edge makes a cycle in the tree(b) two additional edges makes a cycle in the tree(c) removing one edge makes the tree cycle free(d) removing two edges make the tree cycle freeI have been asked this question in final exam.My question is based upon Spanning Trees topic in chapter Trees of Discrete Mathematics

Answer»

Right CHOICE is (a) one ADDITIONAL edge makes a CYCLE in the TREE

For explanation I would say: A connected graph G can have more than one spanning tree. Removing one edge from the spanning tree will make the graph disconnected and the spanning tree is MINIMALLY connected. Adding one edge to the spanning tree will create a circuit or loop and the spanning tree is maximally acyclic.

4.

A complete undirected graph of n nodes can have maximum ______ spanning trees.(a) n^n+1(b) n^n-2(c) \(\frac{n(n+1)}{2}\)(d) nThe question was posed to me during an online exam.Enquiry is from Spanning Trees topic in chapter Trees of Discrete Mathematics

Answer»

The correct OPTION is (b) n^n-2

The explanation is: The spanning TREE does not CONTAIN any cycle. If a spanning tree has n nodes, there are n-1 edges. A COMPLETE graph can have a maximum of n^n-2number of spanning trees.

5.

An immediate application of minimum spanning tree ______(a) gesture analysis(b) handwriting recognition(c) fingerprint detection(d) soft computingI got this question by my school teacher while I was bunking the class.Query is from Spanning Trees in division Trees of Discrete Mathematics

Answer» RIGHT choice is (b) handwriting recognition

The best I can EXPLAIN: Minimum spanning tree is the spanning tree where the cost is minimum among all the spanning trees. It is used in network designing, in the algorithms predicting the TRAVELLING salesman problem,multi-terminal minimum CUT problem and minimum-cost weighted PERFECT matching. It can also used in Handwriting recognition and image segmentation.
6.

If minimum cost edge of a graph is unique, then that edge will be added to any MST. Choose the correct option.(a) false(b) maximum cost edge is added(c) true(d) minimum cost edge need not be uniqueI got this question in examination.This question is from Spanning Trees in portion Trees of Discrete Mathematics

Answer»

Right option is (c) true

To ELABORATE: If the edge was not included in the MST, removing any of the (larger COST) edges in the cycle formed after adding E to the MST, would yield a spanning tree of smaller weight. Thus, if the minimum cost edge e of a graph is unique, then this edge is included in any MST.

7.

Time complexity of Prim’s algorithm is _________(a) O((V+E)logV)(b) O(E+V)(c) O(E)(d) O(V+1)I have been asked this question by my school teacher while I was bunking the class.Question is from Spanning Trees in division Trees of Discrete Mathematics

Answer»

Correct choice is (a) O((V+E)logV)

To elaborate: In Prim’s Algorithm, we will start with an arbitrary node (TAKE any point to start) and mark it. In each ITERATION, a new VERTEX is marked that is adjacent to the one that we have already marked. Each vertex is inserted in the priority queue only once and insertion in priority queue take logarithmic time. Hence, the time COMPLEXITY of Prim’s Algorithm is O((V+E)logV).

8.

For every spanning tree with n vertices and n edges what is the least number of different Spanning trees can be formed?(a) 2(b) 5(c) 3(d) 4I have been asked this question in semester exam.This question is from Spanning Trees in portion Trees of Discrete Mathematics

Answer»

Correct option is (c) 3

Easiest explanation: If GRAPH is CONNECTED and has ‘n’ edges, there will be EXACTLY one cycle, if n vertices are there. A different spanning TREE can be constructed by removing one edge from the cycle, one at a time. The minimum cycle length can be 3. So, there MUST be at least 3 spanning trees in any such Graph. Consider a Graph with n = 4, then 3 spanning trees possible at maximum (removing edges of cycle one at a time, alternatively). So, any Graph with minimum cycle length ‘3’ will have at least 3 spanning trees.

9.

What is the time complexity of Kruskal’s algorithm?(a) O(ElogV)(b) O(V+logE)(c) O(E+1)(d) O(V^2)I got this question in an online interview.This question is from Spanning Trees in division Trees of Discrete Mathematics

Answer»

Right answer is (a) O(ElogV)

The best explanation: In KRUSKAL’s algorithm, at each iteration, we will select the edge with the lowest WEIGHT. So, we will START with the lowest weighted edge first. After that we will select the second lowest weighted edge. In Kruskal’s algorithm, most time consuming OPERATION is sorting because the total COMPLEXITY of the Disjoint-Set operations will be O(ElogV)and it is the overall Time Complexity of the algorithm.

10.

If the weight of an edge e of cycle C in a graph is larger than the individual weights of all other edges of C, then that edge ________(a) belongs to an minimum spanning tree(b) cannot belong to an minimum spanning tree(c) belongs to all MSTs of the graph(d) can not belong to the graphI had been asked this question in an international level competition.Query is from Spanning Trees in chapter Trees of Discrete Mathematics

Answer»

Correct CHOICE is (b) cannot BELONG to an minimum spanning tree

For explanation I would say: For any cycle C in the graph, if the weight of an edge e of C is larger than the individual weights of all other edges of C, then this edge cannot belong to an MST.

11.

Prefix expression can be evaluated _________(a) from right to left(b) from left to right(c) from the exact middle(d) from second right elementThis question was posed to me in an interview for job.This is a very interesting question from Trees topic in section Trees of Discrete Mathematics

Answer»

Correct choice is (B) from left to right

The explanation is: Expressions are usually EVALUATED from left to right manner. Prefix expressions follow the normal RULE i.e from left to right. POSTFIX expressions can be evaluated from right to left.

12.

Spanning trees have a special class of depth-first search trees named _________(a) Euclidean minimum spanning trees(b) Tremaux trees(c) Complete bipartite graphs(d) Decision treesThis question was addressed to me in homework.Question is taken from Spanning Trees topic in division Trees of Discrete Mathematics

Answer» RIGHT choice is (B) Tremaux trees

Explanation: A tremaux tree of an undirected graph G is a SPANNING tree of G which is rooted at one of its vertices with the property that every two adjacent vertices in G are related to each other as an ancestor and descendant in the tree.
13.

What is the postfix expression of the given expression, (2*4-(5+7/3^4)-8)10?(a) 2 4 5 * 7 3 4 ^ / + 8 – – 10(b) 2 4 * ^ 5 7 3 4 / + 8 10 – –(c) 2 4 * 5 7 ^ 3 4 / + – 8 10 –(d) 2 4 * 5 7 3 4 ^ / + – 8 – 10The question was asked during an interview.This is a very interesting question from Trees topic in chapter Trees of Discrete Mathematics

Answer»

The correct answer is (d) 2 4 * 5 7 3 4 ^ / + – 8 – 10

For explanation: By SOLVING we can have,

(2*4-(5+7/3^4)-8)10

= (2*4-(5+7/34^)-8)10

= (2*4-(5+734^/)-8)10

= (2*4-(5734^/+)-8)10

= (2*45734^/+–8)10

= 2*45734^/+-8-10

= 24*5734^/+-8-10

So the output is: 2 4 * 5 7 3 4 ^ / + – 8 – 10.

14.

What is the postfix expression of (A+B)-C*(D/E))+F?(a) A B + C D E / * – F +(b) A B CD E + / * F – +(c) A B C + * D E /F + –(d) A B + C – * D E / F +This question was addressed to me during a job interview.I'd like to ask this question from Trees topic in section Trees of Discrete Mathematics

Answer»

The correct choice is (a) A B + C D E / * – F +

To elaborate: The EXPRESSION is (A+B)-C*(D/E))+F

= (A+B)-C*(DE/)+F

= (A+B)-C*(DE/)F+

= (A+B)-C(DE/)*F+

= (A+B)C(DE/)*-F+

= (AB+)C(DE/)*-F+

So the output is: AB+CDE/*-F+.

15.

Conversion from prefix to postfix expression can be done _______________(a) using bubble sort(b) using radix sort(c) using two queues(d) in a direct mannerI got this question in an international level competition.I'm obligated to ask this question of Trees in division Trees of Discrete Mathematics

Answer»

Correct CHOICE is (d) in a direct manner

Explanation: In a postfix EXPRESSION, the operators appear after the OPERANDS. Conversion from prefix to postfix is done DIRECTLY which is better than converting the prefix expression in infix and then infix to postfix expression. It gives better EFFICIENCY.

16.

Infix to prefix conversion can be done using __________(a) two queues(b) two stacks(c) one stack and two queues(d) one stackI have been asked this question during an online interview.My question is from Trees in section Trees of Discrete Mathematics

Answer»

Right choice is (b) two stacks

Best explanation: In the infix EXPRESSION, the operator appears between the operands and in infix NOTATION if the operator appears before the operands in the expression. For the conversion between them two stacks are used efficiently. The IDEA is to use one STACK for operators and other to STORE operands.

17.

What is the postfix expression of 9+3*5/(10-4)?(a) 9 3 + * 5 / 10 4 –(b) 9 3 5 + * / 10 4 –(c) 9 3 + 5 * / 10 4 –(d) 9 3 5 * / + 10 – 4This question was posed to me in an internship interview.Enquiry is from Trees topic in division Trees of Discrete Mathematics

Answer» RIGHT ANSWER is (c) 9 3 + 5 * / 10 4 –

For explanation I would say: The EXPRESSION, 9+3*5/(10-4)

= 9+3*5/(10 4-)

= 9+35/*(10 4-)

= 935/*+(10 4-)

So the output is:9 3 5 / * + 10 4 -.
18.

Evaluation of 4*5+3/2-9 inprefix notation.(a) *45-/32+9(b) *+453/-29(c) -+*45/329(d) *+/45932I had been asked this question in quiz.This key question is from Trees in section Trees of Discrete Mathematics

Answer»

Correct choice is (c) -+*45/329

Explanation: The expression=4*5+3/2-9

={(4*5)+(3/2)-9}

={(*45)+(/32)-9}

={+(*45)(/32)}-9

=-{+(*45)(/32)9

So the output is; -+*45/329.

19.

Evaluation of expression a/b+c*d-e in postfix notation.(a) ab+cd/*-e(b) ab/cd*+e-(c) abc/+d*-e(d) abcd/+*-eThis question was posed to me by my school principal while I was bunking the class.I need to ask this question from Trees topic in section Trees of Discrete Mathematics

Answer» CORRECT ANSWER is (B) AB/cd*+E-

Explanation: The expression=a/b+c*d-e

={(ab/)+(cd*)}-e

={(ab/)(cd*)+}-e

={(ab/)(cd*)+}e-

So the output is:ab/cd*+e-
20.

Worst case complexity of Breadth First Search traversal __________(a) O(n*n)(b) O(nlogn)(c) O(n^2 logn)(d) O(n^3)The question was asked in my homework.Question is from Tree Traversal topic in portion Trees of Discrete Mathematics

Answer»

Correct CHOICE is (b) O(nlogn)

Easy explanation: In an n-ary binary TREE, we MUST have to visit all nodes from an adjacent node and repeat the same for next UNVISITED nodes. Hence, in worst case the TIME complexity should be O(nlogn).

21.

Breadth First Search traversal of a binary tree finds its application in __________(a) Cloud computing(b) Peer to peer networks(c) Weighted graph(d) Euler pathI had been asked this question by my college director while I was bunking the class.Origin of the question is Tree Traversal topic in division Trees of Discrete Mathematics

Answer»

Right answer is (b) PEER to peer NETWORKS

Explanation: Breadth FIRST Search traversal has diverse applications such as in the peer to peer networks like BitTorrent, BFS traversal is used to FIND all the NEIGHBOUR nodes of the network.

22.

An immediate application of a Depth First Search traversal is __________(a) count the number of leaf nodes(b) perform Inorder traversal in easy way(c) count number of nodes(d) implement preorder traversalI have been asked this question by my school principal while I was bunking the class.Query is from Tree Traversal in section Trees of Discrete Mathematics

Answer»

Right option is (a) count the number of LEAF NODES

Easy explanation: GIVEN an n-ary BINARY TREE, by performing DFS traversal on that tree number of leaf nodes can be calculated and for that we need to maintain an array for the leaf count.

23.

The time complexity of calculating the sum of all leaf nodes in an n-order binary tree is __________(a) O(n^2)(b) O(n+1)(c) O(1)(d) O(n)The question was asked in an interview for internship.The query is from Tree Traversal topic in chapter Trees of Discrete Mathematics

Answer»
24.

For the expression (7-(4*5))+(9/3) which of the following is the post order tree traversal?(a) *745-93/+(b) 93/+745*-(c) 745*-93/+(d) 74*+593/-This question was addressed to me in unit test.This is a very interesting question from Tree Traversal in portion Trees of Discrete Mathematics

Answer»

Right choice is (c) 745*-93/+

To explain: FIRST build a BINARY TREE for the expression then find out the postorder traversal of that tree and after that the ANSWER will be 745*-93/+.

25.

What is the minimum height for a binary search tree with 60 nodes?(a) 1(b) 3(c) 4(d) 2I had been asked this question during an online exam.My question is from Tree Traversal in division Trees of Discrete Mathematics

Answer»

Right option is (d) 2

The explanation: If there are k NODES in a binary TREE, maximum height of that tree should be k-1, and MINIMUM height should be FLOOR(log2k). By using the FORMULA, minimum height must be 2 when there are 60 nodes in a tree.

26.

An important application of binary tree is ______(a) Huffman coding(b) stack implementation(c) queue implementation(d) traverse a cyclic graphThe question was asked by my school principal while I was bunking the class.I need to ask this question from Tree Traversal in section Trees of Discrete Mathematics

Answer» RIGHT choice is (a) Huffman coding

Explanation: A binary tree is USED to sort a list of ELEMENTS; the inorder traversal will do this automatically. Better tree sorting algorithm will involve balancing the trees. The binary coding, in particular for the Huffman coding is an immediate application of binary trees.
27.

Topological sorting of a graph represents _______ of a graph.(a) linear probing(b) linear ordering(c) quadrilateral ordering(d) insertion sortingI got this question in an interview.My query is from Trees in portion Trees of Discrete Mathematics

Answer»

Correct answer is (B) linear ordering

Explanation: TOPOLOGICAL sorting for Directed Acyclic GRAPH (DAG) is a linear ordering of vertices such that for every directed edge uv, VERTEX u comes before V in the ordering. If the graph is not a DAG, topological sorting for a graph is not possible.

28.

In preorder traversal of a binary tree the second step is ____________(a) traverse the right subtree(b) traverse the left subtree(c) traverse right subtree and visit the root(d) visit the rootThe question was posed to me in my homework.The query is from Tree Traversal topic in section Trees of Discrete Mathematics

Answer»

Correct option is (b) TRAVERSE the left subtree

Explanation: In a PREORDER traversal of a BINARY tree first is to VISIT the root, second traverse the left subtree of the tree and third traverse the RIGHT subtree of the tree.

29.

The time complexity to find shortest distances by using Dijkstra’s algorithm is __________(a) O(E^2)(b) O(V+1-E)(c) O(V+E)(d) O(E+VlogV)I have been asked this question in final exam.I'd like to ask this question from Trees topic in portion Trees of Discrete Mathematics

Answer»

Correct OPTION is (d) O(E+VlogV)

For explanation: Time complexity of finding SHORTEST DISTANCE can be O(E + VLogV) using Fibonacci Heap. The reason is that Fibonacci Heap takes O(1) time for decrease-key OPERATION while Binary Heap takes O(logn) time.

30.

The time complexity to find a Eulerian path in a graph of vertex V and edge E is _____________(a) O(V^2)(b) O(V+E-1)(c) O(V+E)(d) O(E+1)I had been asked this question in an online quiz.My question is taken from Trees in portion Trees of Discrete Mathematics

Answer»

Right choice is (C) O(V+E)

For explanation I would say: An undirected graph has Eulerian PATH if the following two conditions are true: -a) All vertices with a non-zero DEGREE are connected. A graph of vertices with zero DEGREES don’t belong to Eulerian Cycle or Path, b) If two vertices have odd degree and all other vertices have even degree. Thus, the time to find whether a graph has a Eulerian path or not is O(V+E) with V vertices and E EDGES.

31.

How many cycles are there in a wheel graph of order 5?(a) 6(b) 10(c) 25(d) 7I have been asked this question during an online interview.This interesting question is from Trees in division Trees of Discrete Mathematics

Answer»

Right option is (d) 7

To explain: In a CYCLE of a graph G if we join all the vertices to the CENTRE point, then that graph is called a wheel graph. There is always a HAMILTONIAN cycle in a wheel graph and there are n^2-3n+3 CYCLES. So, for order 5 the ANSWER should be 7.

32.

How many edges are there in a complete graph of order 9?(a) 35(b) 36(c) 45(d) 19I had been asked this question during an interview for a job.My doubt is from Trees in chapter Trees of Discrete Mathematics

Answer»

Right answer is (b) 36

Explanation: In a COMPLETE graph of order n, there are n*(n-1) number of EDGES and degree of each vertex is (n-1). HENCE, for a graph of order 9 there should be 36 edges in total.

33.

If G is a simple graph with n-vertices and n>=3, the condition for G has a Hamiltonian circuit is __________(a) the degree of each vertex is at most n/2(b) the degree of each vertex is equal to n(c) the degree of every vertex is at least n+1/2(d) the degree of every vertex in G is at least n/2I have been asked this question in class test.The above asked question is from Trees topic in chapter Trees of Discrete Mathematics

Answer»

The correct option is (d) the degree of EVERY VERTEX in G is at least n/2

The best explanation: A simple circuit in a graph G that PASSES through every vertex exactly once is CALLED a Hamiltonian circuit. If there is a vertex of degree ONE in a graph then it is impossible for it to have a Hamiltonian circuit. If G is a simple graph with n-vertices and n>=3 such that the degree of every vertex in G is at least n/2, then G has a Hamiltonian circuit.

34.

What is a separable graph?(a) A disconnected graph by deleting a vertex(b) A disconnected graph by removing an edge(c) A disconnected graph by removing one edge and a vertex(d) A simple graph which does not contain a cycleThe question was posed to me during an online interview.My question comes from Trees in division Trees of Discrete Mathematics

Answer»

Right OPTION is (a) A disconnected GRAPH by DELETING a vertex

To explain: By deletion of a vertex the graph is disconnected and the graph is called separable graph and the vertex is called CUT vertex.

35.

A binary cycle space forms a ______ over the two element field.(a) triangular graph(b) vector space(c) binary tree(d) hamiltonian graphI got this question at a job interview.I need to ask this question from Trees topic in section Trees of Discrete Mathematics

Answer»

Correct option is (b) vector SPACE

For EXPLANATION I WOULD say: The TERM cycle refers to an element of the cycle space of a graph. There are many cycle spaces. The most common is the binary cycle space, which contains the edge SETS that have even degrees at every vertex and it forms a vector space over the two-element field.

36.

For an n-vertex undirected graph, the time required to find a cycle is ____________(a) O(n)(b) O(n^2)(c) O(n+1)(d) O(logn)This question was addressed to me during an internship interview.I'm obligated to ask this question of Trees in division Trees of Discrete Mathematics

Answer»

Right answer is (a) O(n)

Explanation: The existence of a cycle in directed and UNDIRECTED graphs can be determined by depth-first search (DFS) of the graph FINDS an edge that points to an ancestor of the current vertex. In an undirected graph, finding any already visited vertex will INDICATE a BACK edge. All the back edges which DFS skips over are PART of cycles. In the case of undirected graphs, only O(n) time is required to find a cycle in an n-vertex graph, since at most n − 1 edges can be tree edges.

37.

If two cycle graphs Gm and Gn are joined together with a vertex, the number of spanning trees in the new graph is ______(a) m+n-1(b) m-n(c) m*n(d) m*n+1This question was posed to me in my homework.This question is from Trees in chapter Trees of Discrete Mathematics

Answer»

Correct option is (c) m*n

Easy EXPLANATION: As there are n possible EDGES to be removed from G and m edges to be removed from G and the rest from a spanning tree so the NUMBER of spanning tree in the new GRAPH is m*n.

38.

What is a bipartite graph?(a) a graph which contains only one cycle(b) a graph which consists of more than 3 number of vertices(c) a graph which has odd number of vertices and even number of edges(d) a graph which contains no cycles of odd lengthI have been asked this question by my school teacher while I was bunking the class.The doubt is from Properties of Tree topic in division Trees of Discrete Mathematics

Answer»

The correct answer is (d) a graph which CONTAINS no cycles of odd LENGTH

Explanation: A graph is called a bipartite graph if and only if it contains no cycle of odd length. EVERY TREE is a bipartite graph and a median graph.

39.

A graph which consists of disjoint union of trees is called ______(a) bipartite graph(b) forest(c) caterpillar tree(d) labeled treeThis question was addressed to me during an interview for a job.The query is from Properties of Tree topic in portion Trees of Discrete Mathematics

Answer»
40.

Two labeled trees are isomorphic if ____________(a) graphs of the two trees are isomorphic(b) the two trees have same label(c) graphs of the two trees are isomorphic and the two trees have the same label(d) graphs of the two trees are cyclicI had been asked this question in my homework.Enquiry is from Properties of Tree in section Trees of Discrete Mathematics

Answer»

Right option is (c) graphs of the two trees are isomorphic and the two trees have the same label

To EXPLAIN I would SAY: The number of LABELED trees of k number of vertices is k^n-2. Two labeled trees are isomorphic if their graphs are isomorphic and the CORRESPONDING points of the two trees have the same labels.

41.

In an n-ary tree, each vertex has at most ______ children.(a) n(b) n^4(c) n*n(d) n-1This question was posed to me during an interview.This key question is from Properties of Tree topic in chapter Trees of Discrete Mathematics

Answer»

Right answer is (a) n

To elaborate: An n-ary tree is a ROOTED tree in which each vertex has at most n CHILDREN. 2-ary TREES are termed as binary trees, 3-ary trees are sometimes called ternary trees.

42.

A linear graph consists of vertices arranged in a line.(a) false(b) true(c) either true or false(d) cannot determinedThis question was posed to me during an interview.The question is from Properties of Tree in chapter Trees of Discrete Mathematics

Answer»

Correct answer is (b) true

Easiest explanation: A linear GRAPH ALSO known as a path graph is a graph which consists of k vertices arranged in a LINE, so that vertices from i and i+1 are connected by an edge for i=0,…, k-1.

43.

The tree elements are called __________(a) vertices(b) nodes(c) points(d) edgesThe question was asked during an internship interview.My question comes from Properties of Tree topic in chapter Trees of Discrete Mathematics

Answer»

Right CHOICE is (b) nodes

Easy explanation: Every tree ELEMENT is called a NODE and the lines connecting the elements are called branches. A FINITE tree structure has a member that has no superior and is called the “ROOT” Or root node. Nodes that have no child are called leaf nodes.

44.

A polytree is called _______________(a) directed acyclic graph(b) directed cyclic graph(c) bipartite graph(d) connected graphThe question was posed to me in a job interview.My question is taken from Properties of Tree topic in chapter Trees of Discrete Mathematics

Answer»

Correct option is (a) directed acyclic graph

The explanation: A directed acyclic graph is KNOWN as a POLYTREE whose underlying UNDIRECTED graph is a tree. In other words, a directed tree is a directed graph which WOULD be tree if the directions on the EDGES were ignored.

45.

What is a star tree?(a) A tree having a single internal vertex and n-1 leaves(b) A tree having n vertices arranged in a line(c) A tree which has 0 or more connected subtrees(d) A tree which contains n vertices and n-1 cyclesThe question was asked in an online interview.This intriguing question comes from Properties of Tree topic in chapter Trees of Discrete Mathematics

Answer»

The correct choice is (a) A TREE having a single INTERNAL VERTEX and n-1 LEAVES

Explanation: A star tree of order n is a tree with as many leaves as possible or in other words a star tree is a tree that consists of a single internal vertex and n-1 leaves. However, an internal vertex is a vertex of DEGREE at least 2.

46.

An n-vertex graph has ______ edges.(a) n^2(b) n-1(c) n*n(d) n*(n+1)/2This question was addressed to me in exam.I would like to ask this question from Properties of Tree topic in chapter Trees of Discrete Mathematics

Answer»

Correct answer is (b) n-1

For explanation I would SAY: Suppose G is a connected graph which has no cycles. Every subgraph of G INCLUDES at least one VERTEX with zero or one incident edges. It has n vertices and n-1 edges. Generally, the order-zero graph is not considered to be a tree.

47.

An undirected graph G which is connected and acyclic is called ____________(a) bipartite graph(b) cyclic graph(c) tree(d) forestThe question was posed to me during an interview for a job.I want to ask this question from Properties of Tree in section Trees of Discrete Mathematics

Answer»

Correct answer is (c) tree

Best explanation: An UNDIRECTED GRAPH G which is connected and acyclic is termed as a tree. G CONTAINS no cycles and if any edge is added to G a simple cycle is FORMED.