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: // … // : each of the substrings edgei describes an
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}.

Computer Science & Information Technology

You might also like to view...

Match the font family name with the text sample.

Computer Science & Information Technology

You can import tables and queries from Access by dragging the object from the Navigation Pane and dropping it into the desired starting cell

Indicate whether the statement is true or false.

Computer Science & Information Technology

When you save data on a disk, the OS places it in an available storage area, or ____.?

A. ?library B. ?tile C. ?page file D. ?sector

Computer Science & Information Technology

How are FTTN connections implemented?

What will be an ideal response?

Computer Science & Information Technology