1 / 5

The Classes L and NL

Giorgi Japaridze Theory of Computability. The Classes L and NL. Section 8.4. 8.4.a. Giorgi Japaridze Theory of Computability. Sublinear complexity. Sublinear (less than linear) time complexity does not make sense (why?).

frieda
Download Presentation

The Classes L and NL

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Giorgi Japaridze Theory of Computability The Classes L and NL Section 8.4

  2. 8.4.a Giorgi JaparidzeTheory of Computability Sublinear complexity Sublinear (less than linear) time complexity does not make sense (why?). But it does make sense as space complexity. We need to slightly modify our TM model of computation though. The modification consists in separating the input tape from the work tape. The work tape remains read/write, but the input tape is read-only. When counting space complexity, we only look at how many cells of the work tape are utilized. This separation is not artificial. In real life, it is often the case that read-only input is bigger than the computer’s memory (“work tape”). CD-ROM is an example. Or, if we want to focus on fast computations, computer’s memory becomes even more limited --- registers only. Logarithmic space computability can be seen as computability with registers only. Or, more generally, computability with memory that is “much smaller than” input.

  3. 8.4.b Giorgi JaparidzeTheory of Computability L and NL defined Definition 8.17 1. L is the class of languages that are decidable in logarithmic space on a deterministic Turing machine. In other words, L = SPACE(log n) 2. NL is the class of languages that are decidable in logarithmic space on a nondeterministic Turing machine. In other words, NL = NSPACE(log n)

  4. 8.4.c Giorgi JaparidzeTheory of Computability {0k1k | k0}  L Example 8.18 Remember the machine for {0k1k | k0} from Section 7.1, which works by zigzagging back and forth. What is its space complexity? To improve space (but not time!) complexity, we can set up a different machine. Instead of zigzagging, such a machine just makes one pass through the input, and records on its work tape --- in the binary notation --- the number m of 0s and the number n of 1s. Holding m and n requires only logarithmic space. Then the machine compares these two numbers by zigzagging. This does not take any additional space.

  5. 8.4.d Giorgi JaparidzeTheory of Computability PATH  NL Example 8.19 Remember our polynomial-time algorithm for PATH from Section 7.2, which works by marking nodes. What is its space complexity? We can set up a nondeterministic logarithmic space machine for PATH. Starting from s as the “current node”, every time it guesses a next node --- among the nodes pointed to by the current node --- and jumps to it, until it hits t or has already visited more nodes than the number of nodes in the graph without hitting t. In the former case it accepts, and in the latter case rejects. At any time, the machine thus only needs to remember “the current node”, as well as the node count. How much space do these two pieces of information take? So, the whole algorithm runs in logarithmic space.

More Related