2) [Ben Wiedermann] Consider the problem of computing the length of a route in a weighted graph. Formulate this problem as a language recognition problem. Assume that a route is given as a sequence of edges to be traversed.
What will be an ideal response?
Problem: Given a sequence of edges in an undirected graph, compute the length of the route that is defined by that sequence of edges.
Encoding of the problem: We transform the problem of computing the length of a route into the problem of checking a proposed length to see if it is correct.
The language to be decided: ROUTELEN =
{w of the form:
edge (and its weight), the endpoint of edgei = the starting point of edgei+1, and k is equal to the
sum of the edge weights}.
You might also like to view...
The ________ topology is ideal for office buildings, computer labs, and WANs.
a. ring b. bus c. star d. network
________ text describes a text-based description of an image
Fill in the blank(s) with correct word