题目内容

We often use graphs to simplify optimization problems, as they are easy implement on a computer.The following concepts can be illustrated with a graph. Determine which variables should be represented by edges and vertices in this graph.A school's course catalogSome classes must occur at least one semester before certain other classes (e.g., Calculus I must be taken before Calculus II), but not all classes have prerequisites.If we want to represent the catalog as a graph, which variables should be represented as edges and vertices?

A) Each edge is a class, while different vertices indicate the semester the class is taken.
B) Each vertex is a class, while a directional edge indicates that one class must come before another.
C) Each vertex is a class, while edges between two vertices indicate that the classes may be taken at the same time.

查看答案
更多问题

Please help the burglar out! For each of the following metrics, what should be the burglar's first two choices of items? Here's a table of the items from the slides:item $ kg $/kgclock 175 10 17.5picture 90 9 10radio 20 4 5vase 50 2 25book 10 1 10computer 200 20 10For this problem, assume that the maximum weight the burglar can carry is 20.Metric: max valueThe burglar should first pick:

A. clock
B. picture
C. radio
D. vase
E. book
F. computer
G. no more space

What will be the result of running the burgler's algorithm with Metric 3?

A. The algorithm runs and returns the optimal solution.
B. The algorithm runs and returns a non-optimal solution.
C. The algorithm does not run.

Metric 3:def metric3(item): return item.getValue()Which heuristic does Metric 3 employ?

A. Choose the lightest object first.
B. Choose the most valuable object first.
Choose the item with the best value to weight ratio first.

What will be the result of running the burgler's algorithm with Metric 2?

A. The algorithm runs and returns the optimal solution.
B. The algorithm runs and returns a non-optimal solution.
C. The algorithm does not run.

答案查题题库