COP 3530 Quiz 14

Lakukan tugas rumah & ujian kamu dengan baik sekarang menggunakan Quizwiz!

The following numbers are inserted into an empty binary search tree in the given order: 10, 1, 3, 5, 15, 12, 16. If the root is consider level 0, what is the level of the node containing the value 15?

1

A random undirected graph has 9 vertices. An unordered cycle is a connection within the graph that connects a number of vertices. For example an unordered cycle of 3 would be a triangle within the graph of 3 connected vertices. To find the total number of possible unordered cycles of 3 vertices from a total of 9 you can use the Combination Formula C(n,r) = n!/r!(n-r)! which is total number of possible combinations of r objects from a set of n objects. If the probability of an edge between any two vertices is 50% - what is the expected number of unordered cycles?

10.5

Each new term in the Fibonacci sequence is generated by adding the previous two terms. By starting with 1 and 2, the first 10 terms will be: 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, ... By considering the terms in the Fibonacci sequence whose values do not exceed one million, find the sum of the even-valued terms.

1089154

A random undirected graph has 6 vertices. An unordered cycle is a connection within the graph that connects a number of vertices. For example an unordered cycle of 3 would be a triangle within the graph of 3 connected vertices. To find the total number of possible unordered cycles of 3 vertices from the total you can use the Combination Formula C(n,r) = n!/r!(n-r)! which is total number of possible combinations of r objects from a set of n objects. If the probability of an edge between any two vertices is 100% (all vertices connected)- what is the expected number of unordered cycles of length 3?

20

Level of a node is distance from root to that node. For example, level of root is 1 and levels of left and right children of root is 2. The maximum number of nodes on level i of a binary tree is

2^(i-1)

A random undirected graph has 9 vertices. An unordered cycle is a connection within the graph that connects a number of vertices. For example an unordered cycle of 3 would be a triangle within the graph of 3 connected vertices. To find the total number of possible unordered cycles of 3 vertices from the total you can use the Combination Formula C(n,r) = n!/r!(n-r)! which is total number of possible combinations of r objects from a set of n objects. If the probability of an edge between any two vertices is 100% (all vertices connected)- what is the expected number of unordered cycles of length 3?

84

For an undirected graph the sum of the degrees of all vertices is always even.

True

The following are the degrees of each vertex in a simple graph in decreasing order. (There are no loops). Is this graph possible (True = Yes, False = No)? 7, 6, 6, 4, 4, 3, 2, 2

True

When repesenting a graph as an adjacency list, space is saved compared to representation as an adjacency matrix.

True

What is the maximum number of edges in an acyclic undirected graph with n vertices? Hint: an acyclic graph would be a spanning tree.

n - 1


Set pelajaran terkait

Cultura Prehispánica y su legado

View Set

Diesel II Chapter 9-Circuit Control Devices

View Set

Ch. 1 The Science of Psychology |Quiz

View Set

Chapter 8: Segment and Interim Reporting

View Set

Le Istituzioni dello Stato italiano

View Set