Jump to content
Main menu
Main menu
move to sidebar
hide
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Special pages
Niidae Wiki
Search
Search
Appearance
Create account
Log in
Personal tools
Create account
Log in
Pages for logged out editors
learn more
Contributions
Talk
Editing
P-complete
(section)
Page
Discussion
English
Read
Edit
View history
Tools
Tools
move to sidebar
hide
Actions
Read
Edit
View history
General
What links here
Related changes
Page information
Appearance
move to sidebar
hide
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
== P-complete problems == The most basic '''P'''-complete problem under logspace many-one reductions is following: given a [[Turing machine]] <math>M</math>, an input for that machine x, and a number ''T'' (written in [[unary numeral system|unary]]), <math>\langle M,x,T \rangle</math> does that machine halt on that input within the first ''T'' steps? For any x in <math>L</math> in P, output the encoding of the Turing machine which accepts it in polynomial-time, the encoding of x itself, and a number of steps <math>T=p(|x|)</math> corresponding to the p which is there polynomial-time bound on the operation of the Turing Machine <math>M_L</math> deciding <math>L</math>, <math>\langle M,x,p(|x|) \rangle</math>. The machine M halts on x within <math>p(|x|)</math> steps if and only if x is in L. Clearly, if we can parallelize a general simulation of a sequential computer (ie. The Turing machine simulation of a Turing machine), then we will be able to parallelize any program that runs on that computer. If this problem is in '''NC''', then so is every other problem in '''P'''. If the number of steps is written in binary, the problem is [[EXPTIME-complete]]. This problem illustrates a common trick in the theory of '''P'''-completeness. We aren't really interested in whether a problem can be solved quickly on a parallel machine. We're just interested in whether a parallel machine solves it ''much more'' quickly than a sequential machine. Therefore, we have to reword the problem so that the sequential version is in '''P'''. That is why this problem required ''T'' to be written in unary. If a number ''T'' is written as a [[binary numeral system|binary]] number (a string of ''n'' ones and zeros, where ''n'' = log ''T''), then the obvious sequential algorithm can take time 2<sup>''n''</sup>. On the other hand, if ''T'' is written as a unary number (a string of ''n'' ones, where ''n'' = ''T''), then it only takes time ''n''. By writing ''T'' in unary rather than binary, we have reduced the obvious sequential algorithm from exponential time to linear time. That puts the sequential problem in '''P'''. Then, it will be in '''NC''' if and only if it is parallelizable. Many other problems have been proved to be '''P'''-complete, and therefore are widely believed to be inherently sequential. These include the following problems which are '''P'''-complete under at least logspace reductions, either as given, or in a decision-problem form: * [[Circuit Value Problem]] (CVP) β Given a [[boolean circuit|circuit]], the inputs to the circuit, and one gate in the circuit, calculate the output of that gate. * Restricted Case of CVP β Like CVP, except each gate has two inputs and two outputs (F and Not F), every other layer is just AND gates, the rest are OR gates (or, equivalently, all gates are NAND gates, or all gates are NOR gates), the inputs of a gate come from the immediately preceding layer * [[Linear programming]] β Maximize a linear function subject to linear inequality constraints * Lexicographically First Depth First Search Ordering β Given a [[graph theory|graph]] with fixed ordered adjacency lists, and nodes ''u'' and ''v'', is vertex ''u'' visited before vertex ''v'' in a depth-first search induced by the order of the adjacency lists?<ref>{{Cite journal |last=Cook |first=Stephen A. |date=1985-01-01 |title=A taxonomy of problems with fast parallel algorithms |url=https://www.sciencedirect.com/science/article/pii/S0019995885800413 |journal=Information and Control |series=International Conference on Foundations of Computation Theory |volume=64 |issue=1 |pages=2β22 |doi=10.1016/S0019-9958(85)80041-3 |issn=0019-9958}}</ref> * Context Free Grammar Membership β Given a [[context-free grammar]] and a string, can that string be generated by that grammar? * [[Horn-satisfiability]] β given a set of [[Horn clause]]s, is there a variable assignment which satisfies them? This is '''P''''s version of the [[boolean satisfiability problem]]. * Game of Life β Given an initial configuration of [[Conway's Game of Life]], a particular cell, and a time ''T'' (in unary), is that cell alive after ''T'' steps? * [[LZW (algorithm)]] (1978 paradigm) Data Compression β given strings ''s'' and ''t'', will compressing ''s'' with an LZ78 method add ''t'' to the dictionary? (Note that for [[LZ77]] compression such as [[gzip]], this is much easier, as the problem reduces to "Is ''t'' in ''s''?".) * [[Type inference]] for partial types β Given an [[type theory|untyped]] term from the [[lambda calculus]], determine whether this term has a partial type. Most of the languages above are '''P'''-complete under even stronger notions of reduction, such as uniform <math>AC^0</math> many-one reductions, DLOGTIME reductions, or polylogarithmic projections. In order to prove that a given problem in '''P''' is '''P'''-complete, one typically tries to reduce a known '''P'''-complete problem to the given one. In 1999, [[Jin-Yi Cai]] and D. Sivakumar, building on work by Ogihara, showed that if there exists a [[sparse language]] that is '''P'''-complete, then '''L''' = '''P'''.<ref>{{Citation | last = Cai | first = Jin-Yi | last2 = Sivakumar | first2 = D. | title = Sparse hard sets for P: resolution of a conjecture of Hartmanis | journal = Journal of Computer and System Sciences | volume = 58 | issue = 2 | pages = 280–296 | year = 1999 | doi = 10.1006/jcss.1998.1615 | url = http://citeseer.ist.psu.edu/501645.html| doi-access = free }}</ref> '''P'''-complete problems may be solvable with different [[time complexity|time complexities]]. For instance, the [[Circuit Value Problem]] can be solved in [[linear time]] by a [[topological sort]]. Of course, because the reductions to a '''P'''-complete problem may have different time complexities, this fact does not imply that all the problems in '''P''' can also be solved in linear time.
Summary:
Please note that all contributions to Niidae Wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
Encyclopedia:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Search
Search
Editing
P-complete
(section)
Add topic