Question

s children nodes Finding the specific odsbothers DAodging whether the specifie node is leaf or by the adjacent matrix, then the matrix gr Gwith n vertices, ㅲt is 10. Ifthe binary tree is stored by the Judge if the node is on the same level D Find the node position acording to its eenial method, which operation is easy to implement? 10 l Answer are Il True or False ( 10 POINTS) 2. The insertion and deletion 3. Sequential storage 4. Every node in linear list has one precusor 5. In the tree structure, there is one precursor is not related to representation and implementation in computer is only used for linear structure; efficiency is lower for sequential storage, so it is worse than linked storage; one precusor and successor; There is at least one node with the degree 2 in node for every node. 6. 7. In the directed graph, the sum 9. In the 10. In tree structure, vertices of vertices in-degree equals to that of out-degree. graphs adjacent matrix is symmetric, then it must be complete directed legre ove t the degree m, there is at least one node with the degree m, and no node with the degree over m. tree with II Answer area there is sibling relationship among every nodes in the same level. 10 Ⅲ Answer ( 70 POINTS ) 1. Define an integer array X[7]/4]5], the first element address is 100. ( 10 points) (I) The number of elements in the array XI7)4115]? (2) Each integer occupies 4 bytes. Then calculate memory address of the following elements ①xIOIOIOI; ②xt1][1][11; ③x(3][1][21; ④x14][2][3]
0 0
Add a comment Improve this question Transcribed image text
Answer #1

Question 8:

  • We cannot find a parent node from a child node. Hence, option (a) is incorrect.
  • We cannot find a node’s brother nodes if the node is a parent. Hence, option (c) is incorrect.
  • We already know that the node is a parent node, therefore, we’ll node judge if it is a leaf or not. Hence, option (d) is incorrect.
  • From a parent node, it is convenient to find its children nodes. Therefore, option (b) is correct.

Question 9:

In an undirected graph, there is a probability that an edge exists between every pair of vertices. Therefore, if it has n vertices then it is necessary to have an n * n matrix to represent the graph using adjacency matrix. Option (d) is correct.

Question 10:

Preorder traversal will be easy to implement because we don’t have to search for node’s position, we can just traverse the tree and place the nodes sequentially. Option (a) is correct.

II. True or False.

  1. False, ADTs are logical ideas of storing data which represents a new type of data required for the desired task which needs to be implemented using normal programming on a computer.
  2. False, the insertion and deletion efficiency is higher for sequential storage than for linked storage because we know exactly where the data resides.
  3. False, we can use sequential storage for non-linear structures too like in case of trees.
  4. False, not every node in a linear list has precursor and successor as in case of the first and last elements. But in case of circular lists, the statement is true.
  5. False, in a tree structure, except the root node, every node has a precursor node.
  6. True, in an n nodes binary tree where n > 2, there is at least one node with degree 2.
  7. True, because all edges that are going out from vertices is also coming into some other vertices.
  8. True, a complete directed graph has a symmetric pair of edges between every pair of vertices and hence, it will create a symmetric adjacency matrix.
  9. True, the root node will have degree m and no node will have a degree over m.
  10. False, in a tree, there is a sibling relationship among the children of a parent node.
Add a comment
Know the answer?
Add Answer to:
s children nodes Finding the specific od'sbothers DAodging whether the specifie node is leaf or by...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • k-d tree Background One generalization of binary trees is the k-d tree, which stores k-dimensional data....

    k-d tree Background One generalization of binary trees is the k-d tree, which stores k-dimensional data. Every internal node of a k-d tree indicates the dimension d and the value v in that dimension that it discriminates by. An internal node has exactly two children, containing data that is less-than-or-equal and data that is greater than v in dimension d. For example, if the node distinguishes on dimension 1, value 107, then the left child is for data with y...

  • Here is the IntegerLinkedList_incomplete class: public class IntegerLinkedList { static class Node { /** The element...

    Here is the IntegerLinkedList_incomplete class: public class IntegerLinkedList { static class Node { /** The element stored at this node */ private int element; // reference to the element stored at this node /** A reference to the subsequent node in the list */ private Node next; // reference to the subsequent node in the list /** * Creates a node with the given element and next node. * * @param e the element to be stored * @param n...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT