Languages

Document last modified: 
 

The Longest Simple Cycle (LSC) problem determines the longest path <v0, v1, ..., vk> of a directed graph such that v0=vk and <v1, ..., vk> are distinct.

a)    For the Longest Simple Cycle (LSC) problem, give the language LSCL:

    LSCL = {<G> :

G=(V, E) is an directed graph }

b)    Define the instance of LSCL for the graph at right.

V={1,2,3,4}

E={(1,2),(2,4),(4,4),(4,3),(3,2),(3,1)}

G=<V,E>

c)    LSCL's I - is the set of all problem instances of the LSCL. Define a problem instance for the graph at right. (G)

d)    LSCL's S - is the set of all LSCL solutions. What is S? 

{<1,2,4,3>, <2,4,3,1>, <4,3,1,2>, <3,1,2,4>}

e)    For the Longest Simple Cycle (LSC) decision problem, give the language LSCLD:

LSCLD = { <G, k>

G=(V, E) is an directed graph
k ≥ 0 an integer and there exists a simple cycle in G consisting of at least k edges }

f)    Define the instance of LSCLD for the graph at right and a problem instance.

V={1,2,3,4}

E={(1,2),(2,4),(4,4),(4,3),(3,2),(3,1)}

G=<V,E>

g)    Define a problem instance of LSCLD for the graph at right.  (G, 4)

h)    Give the result of g).   1