Final Flashcards

1
Q

In the backtracking solution to the m-coloring problema node is considered nonpromising if

A

it has the same color as its parent, and the parent represents an adjacent vertex

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

One advantage of using an adjacency list rather than an adjacency matrix for representing graphs is

A

the adjacency list has lower storage space requirements when the graph is sparse

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

When is an adjacency matrix a good choice for implementing a graph?

A

When the graph is nearly complete

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

In a branch-and-bound solution, each node in the decision tree is assigned a value called a bound The bound represents

A

the value of the partial solution represented by the node being examined

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

has been shown that the Minimum Cost Spanning Tree problem is in the following categories many as applicable)

A

NP

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

has been shown that the Boolean problem is in the following categories.

A

NP

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

An NP - Complete problem is

A

solvable, and the best known solution runs in polynomial time

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

The local UPS dispatcher creates the list of deliveries for various drivers each dayFor each driverthe goal is to minimize the total distance driven by the trucksYet, doing this by hand is highly time-consuming and unreliableYou have been hired to develop a program thatgiven the locations of all the deliveries for a particular driveroutputs the best route for delivery of all the packages For the problem described above, you are to think about the general problem solving techniques studied in class (see below)as well as their relative advantages and disadvantages

Identify what you consider would be the best technique for solving this problem.

A

Dynamic programming

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

The Department of Motor Vehicles (DMV) has developed three versions of a video based licensing examination When applicants wish to take an exam, they are assigned the next available examinations station. The stations are place side by side in multiple rowsThe DMV wishes you to develop a system that will select one of the three versions of the exam so that no applicant is placed at a station beside behind another applicant who is taking the same exam. The system should also tell the administrator the exam if there is no exam the applicant can take at this point For the problem described above, you are to think about the general problem solving techniques in class (see below) as well as their relative advantages and disadvantages

Identify what you consider would be the best technique for solving this problem

A

Backtracking

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Suppose you have a collection of n elements stored in a complete and balanced binary search tree.

The time complexity associated with finding the MEDIAN element is.

A

0(Log n)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Suppose you have a heap of n elements stored in an array starting at index 1. The time complexity associated with finding the parent of the last leaf is

A

O(1)

Constant

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What is the big-theta worst case time complexity associated with searching a hash table in which elements were WITHOUT collisions

A

O(1)

Constant

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Which of the following sorting algorithms should you use you need to guarantee O(n) log n) running time even in the worst case, but you cannot use any extra space (except for a few local vanables

A

Heap sort

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Dijkstra’s Algorithm is an example of the design strategy known as

A

Greedy techniques

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

A college professor has very high standards for the type of music he listens to regularlyHe owns an extensive library of mp3 files full of classical treasuresincluding works by BachMozart Lennon/McCartney, etc. In order to listen to these artistic masterpieces in his car and other devicesthe professor wishes to place as many as possible in a flash drive with capacity Unfortunately not all of the music fits in the Therefore the professor asks you to write a program that will determine given a list of all the musical selections in his library, an optimal collection of files to be stored in the device so as to enjoymentorder to accomplish this objectivefor each songyou are provided with the size of the corresponding file and with an integer in the range representing the quality of the song For the problem described above you are to think the general problem solving techniques studied in class (see below as well as their relative advantages and disadvantages

Identify what you consider would be the best technique for solving this problem

A

Branch and bound

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

are part of a team in charge of developing software to help a city in its transponation systemCity officials plan to so they the software to report the shortest travel times among points the For the problem described above you are the general problem solving see belowas well as their relative advantages and

Identify what you consider would be the best technique for solving this problem

A

Dynamic programming