FACTOID # 34: Ethiopians are by far the most agricultural people on earth (both men and women)
 
 Home   Encyclopedia   Statistics   Countries A-Z   Flags   Maps   Education   Forum   FAQ   About 
 
WHAT'S NEW
RECENT ARTICLES
More Recent Articles »
 

FACTS & STATISTICS    Simple view

  1. Select countries to view: (hold down Control key and click to select several)

     

     

    Compare:

     

     

  1. Select fact or statistic: (* = graphable)

     

     

     

  2. (OPTIONAL) Compare to statistic: (both need to be graphable)

     

     

     

  3. View result as:

     

       
(OR) SEARCH ALL encyclopedia, stats & forums:   

Encyclopedia > RP (complexity)

In complexity theory, RP ("randomized polynomial time") is the complexity class of problems for which a probabilistic Turing machine exists with these properties: In computer science, computational complexity theory is the branch of the theory of computation that studies the resources, or cost, of the computation required to solve a given problem. ... In computational complexity theory, a complexity class is a set of problems of related complexity. ... In computability theory, a probabilistic Turing machine is a non-deterministic Turing machine which randomly chooses between the available transitions at each point with equal probability. ...

RP algorithm (1 run)
Answer produced
Correct
answer
YES NO
YES ≥1/2 ≤1/2
NO 0 1
RP algorithm (n runs)
Answer produced
Correct
answer
YES NO
YES ≥1-½n ≤½n
NO 0 1
Co-RP algorithm (1 run)
Answer produced
Correct
answer
YES NO
YES 1 0
NO ≤1/2 ≥1/2
  • It always runs in polynomial time in the input size
  • If the correct answer is NO, it always returns NO
  • If the correct answer is YES, then it returns YES with probability at least 1/2

In other words, the algorithm is allowed to flip a truly-random coin while it's running. The only case in which the algorithm can return YES is if the actual answer is YES; therefore if the algorithm terminates and produces YES, then the correct answer is definitely YES; however, the algorithm can terminate with NO regardless of the actual answer. That is, if the algorithm returns NO, it might be wrong. Flowcharts are often used to represent algorithms. ...


Some authors call this class R, although this name is more commonly used for the class of recursive languages. A recursive language in mathematics, logic and computer science, is a type of formal language which is also called recursive, decidable or Turing-decidable. ...


If the correct answer is YES and the algorithm is run n times with the result of each run statistically independent of the others, then it will return YES at least once with probability at least 1 - ½n. So if the algorithm is run 100 times, then the chance of it giving the wrong answer every time is lower than the chance that cosmic rays corrupted the memory of the computer running the algorithm. In this sense, if a source of random numbers is available, most algorithms in RP are highly practical. In probability theory, to say that two events are independent intuitively means that knowing whether or not one of them occurs makes it neither more probable nor less probable that the other occurs. ...


The fraction 1/2 in the definition is arbitrary. The set RP will contain exactly the same problems, even if the 1/2 is replaced by any constant nonzero probability less than 1; here constant means independent of the input to the algorithm.


Related complexity classes

The definition of RP says YES is always right and NO is usually right. The complexity class Co-RP is similarly defined, except that NO is always right and YES is usually right. In other words, it accepts all YES instances but can either accept or reject NO instances. The class BPP describes algorithms that can give incorrect answers on both YES and NO instances. The intersection of the sets RP and Co-RP is called ZPP. Just as RP may be called R, some authors use the name Co-R rather than Co-RP. This article is about the complexity class. ... In complexity theory, ZPP (Zero-error Probabilistic Polynomial time) is the complexity class of problems for which a probabilistic Turing machine exists with these properties: It always returns the correct YES or NO answer. ...


Connection to P and NP

P is a subset of RP, which is a subset of NP. Similarly, P is a subset of Co-RP which is a subset of Co-NP. It is not known whether any of these subsets are strict. However, it is believed that either PRP or RPNP, since otherwise P = NP, which is widely believed to be false. It is also not known whether RP = Co-RP, or whether RP is a subset of the intersection of NP and Co-NP. In computational complexity theory, P is the complexity class containing decision problems which can be solved by a deterministic Turing machine using a polynomial amount of computation time, or polynomial time. ... In computational complexity theory, NP (Non-deterministic Polynomial time) is the set of decision problems solvable in polynomial time on a non-deterministic Turing machine. ... In computational complexity theory, co-NP is a complexity class. ...


A natural example of a problem in Co-RP currently not known to be in P is the problem of deciding whether a given multivariate arithmetic expression over the integers is the zero-polynomial. For instance, "x*x - y*y - (x+y)*(x-y)" is the zero-polynomial while "x*x + y*y" is not.


An alternative characterization of RP that is sometimes easier to use is the set of problems recognizable by nondeterministic Turing machines where the machine accepts if and only if at least some constant fraction of the computation paths, independent of the input size, accept. NP on the other hand, needs only one accepting path, which could constitute an exponentially small fraction of the paths. This characterization makes the fact that RP is a subset of NP obvious. In theoretical computer science, an ordinary (deterministic) Turing machine has a transition rule that specifies for a given current state of the head and computer (s,q) a single instruction (s, q, d), where s is the symbol to be written by the head, q is the subsequent state of...


See also: randomized algorithm A randomized algorithm or probabilistic algorithm is an algorithm which is allowed to flip a truly random coin. ...



Important complexity classes (more)
P | NP | Co-NP | NP-C | Co-NP-C | NP-hard | UP | #P | #P-C | L | NL | NC | P-C | PSPACE | PSPACE-C
EXPTIME | EXPSPACE | PR | RE | Co-RE | RE-C | Co-RE-C | R | BQP | BPP | RP | ZPP | PCP | IP | PH


 

COMMENTARY     


Share your thoughts, questions and commentary here
Your name
Your comments
Please enter the 5-letter protection code

Want to know more?
Search encyclopedia, statistics and forums:

 


Lesson Plans | Student Area | Student FAQ | Reviews | Press Releases |  Feeds | Contact
The Wikipedia article included on this page is licensed under the GFDL.
Images may be subject to relevant owners' copyright.
All other elements are (c) copyright NationMaster.com 2003-5. All Rights Reserved.
Usage implies agreement with terms.