Define CYCLE= {(G)| G is a directed graph that contains a directed cycle}. Show that CYCLEis NL-complete.

Short Answer

Expert verified

The implementation in log space is straightforward. Furthermore, a simple experiment demonstrates that CYCLENL. As a result, CYCLE is NL-complete

Step by step solution

01

To Complete NL class

NL-complete is a complexity class in computational complexity theory that includes all languages that are complete for NL, a class of decision problems that can be handled by a nondeterministic Turing machine with a logarithmic amount of memory space.

02

To CYCLE is NL-complete

PATH should be reduced to CYCLE. The reduction is done by adding an edge from t to s in G to the PATH problem instanceG,s,t.

A directed cycle will occur in the modified G if a path from s to t exists in G. Other cycles, on the other hand, could exist in the modified G if they are already present in G.

To solve this issue, first remove all cycles from G. A levelled directed graph is one in which nodes are separated into groups called levels, A1,A2,...,Ak, and only edges from one level to next higher level are allowed. A levelled graph is acyclic.

As the following reduction from the unconstrained PATH problem indicates, the PATH issue for levelled graphs is still NL-complete. Produce the levelled graph G’, whose levels are m copies of G's nodes, given a graph G with 2 nodes s and t and m total nodes.

If G contains an edge from i to j, draw an edge from node i at each level to node j at the next level.

Draw an edge from node I in one level to node I in the following level in each level. Let s0 represent the first-level node s, and t’ represent the last-level node t.

A path from s to t is shown in Graph G. A path from s’ to t’ can be found in G’. Then, add an edge from t’ to s’ in G’, then get a reduction from PATH to CYCLE. The reduction is straightforward in terms of computation, and its.

Unlock Step-by-Step Solutions & Ace Your Exams!

  • Full Textbook Solutions

    Get detailed explanations and key concepts

  • Unlimited Al creation

    Al flashcards, explanations, exams and more...

  • Ads-free access

    To over 500 millions flashcards

  • Money-back guarantee

    We refund you if you fail your exam.

Over 30 million students worldwide already upgrade their learning with Vaia!

One App. One Place for Learning.

All the tools & learning materials you need for study success - in one app.

Get started for free

Most popular questions from this chapter

Consider the following position in the standard tic-tac-toe game.

Let’s say that it is the ×-player’s turn to move next. Describe a winning strategy for this player. (Recall that a winning strategy isn’t merely the best move to make in the current position. It also includes all the responses that this player must make in order to win, however, the opponent moves.)

The cat-and-mouse game is played by two players, "Cat" and "Mouse," on an arbitrary undirected graph. At a given point, each player occupies a node of the graph. The players take turns moving to a node adjacent to the one that they currently occupy. A special node of the graph is called "Hole." Cat wins if the two players ever occupy the same node. Mouse wins if it reaches the Hole before the preceding happens. The game is a draw if a situation repeats (i.e., the two players simultaneously occupy positions that they simultaneously occupied previously, and it is the same player's turn to move).
HAPPY-CAT={<G,c,m,h>G,c,m,hAre respectively a graph and positions of the Cat, Mouse, and Hole, such that Cat has a winning strategy if Cat moves first}.
Show thatHAPPY-CAT is in P. (Hint: The solution is not complicated and doesn't depend on subtle details in the way the game is defined. Consider the entire game tree. It is exponentially big, but you can search it in polynomial time.)

Read the definition of in Problem 7.46.
a. Show that MIN-FORMULAPSPACE.

b. Explain why this argument fails to show thatMIN-FORMULAcoNP.If ϕMIN-FORMULA, thenϕ has a smaller equivalent formula. An NTM can verify thatϕMIN-FORMULA by guessing that formula.

The Japanese game go-moku is played by two players, “X” and “O” on a 19 × 19 grid. Players take turns placing markers, and the first player to achieve five of her markers consecutively in a row, column, or diagonal is the winner. Consider this game generalized to an n × n board.

Let.GM={(B)|Bisapositioningeneralizedgomoku,whereplayerXhasawinningstrategy}

By a position we mean a board with markers placed on it, such as may occur in the middle of a play of the game, together with an indication of which player moves next. Showthat .GMPSPACE

a. Let ADD={x,y,z|x,y,z>0 are binary integers and x+y=z}. Show
that ADDL.
b. Let PAL_ADD={x,y|x,y>0are binary integers wherex+y is an integer whose binary representation is a palindrome). (Note that the binary representation of the sum is assumed not to have leading zeros. A palindrome is a string that equals its reverse.) Show that PAL_ADDL.

See all solutions

Recommended explanations on Computer Science Textbooks

View all explanations

What do you think about this solution?

We value your feedback to improve our textbook solutions.

Study anywhere. Anytime. Across all devices.

Sign-up for free