| word looked up : | home / archive |
Computational complexity theoryComplexity Theory is part of the theory of computation dealing with the resources required during computation to solve a given problem. The most common resources are time (how many steps does it take to solve a problem) and space (how much memory does it take to solve a problem). Other resources can also be considered, such as how many parallel processors are needed to solve a problem in parallel. Complexity theory differs from computability theory, which deals with whether a problem can be solved at all, regardless of the resources required. A single "problem" is an entire set of related questions, where each question is a finite-length string. For example, the problem FACTORIZE is: given an integer written in binary, return all of the prime factors of that number. A particular question is called an instance. For example, "give the factors of the number 15" is one instance of the FACTORIZE problem. The time complexity of a problem is the number of steps that it takes to solve an instance, as a function of the size of the instance. If an instance that is n bits long can be solved in n2 steps, then we say it has a time complexity of n2. Of course, the exact number of steps will depend on exactly what machine or language is being used. To avoid that problem, we generally use Big O notation. If a problem has time complexity O(n2) on one typical computer, then it will also have complexity O(n2) on most other computers, so thisn'tation allows us to generalize away from the details of a particular computer.
Decision ProblemsMuch of complexity theory deals with decision problems. A decision problem is a problem where the answer is always YES/NO. For example, the problem IS-PRIME is: given an integer written in binary, return whether it is a prime number or not. A decision problem is equivalent to a language, which is a set of finite-length strings. For a given decision problem, the equivalent language is the set of all strings for which the answer is YES. Decision problems are often considered because an arbitrary problem can always be reduced to a decision problem. For example, the problem HAS-FACTOR is: given integers n and k written in binary, return whether n has any prime factors less than k. If we can solve HAS-FACTOR with a certain amount of resources, then we can use that solution to solve FACTORIZE without much more resources. Just do a binary search on k until you find the smallest factor of n. Then divide out that factor, and repeat until you find all the factors. Complexity theory often makes a distinction between YES answers and NO answers. For example, the set NP is defined as the set of problems where the YES instances can be checked quickly. The set Co-NP is the set of problems where the NO instances can be checked quickly. The "Co" in the name stands for "complement". The complement of a problem is one where all the YES and NO answers are swapped, such as IS-COMPOSITE for IS-PRIME.
The P=NP QuestionThe set P is the set of decision problems that can be solved by a deterministic machine in polynomial time. The set NP is the set of decision problems that can be solved by a non-deterministic machine in polynomial time. The question of whether P is the same set as NP is the most important open question in theoretical computer science. There is even a $1,000,000 prize for solving it. (See Complexity classes P and NP and oracles). Questions like this motivate the concepts of hard and complete. A set of problems X is hard for a set of problems Y if every problem in Y can be transformed easily into some problem in X with the same answer. The definition of "easily" is different in different contexts. The most important hard set is NP-hard. Set X is complete for Y if it is hard for Y, and is also a subset of Y. The most important complete set is NP-complete. See the articles on those two sets for more detail on the definition of "hard" and "complete".
Famous Complexity ClassesThe following are some of the classes of problems considered in complexity theory, along with rough definitions. See computation for a chart showing which classes are subsets of other classes.
In computing the complexity of an algorithm is a formal notion to describe its "speed". However, the important thing is not the actual execution time (e.g. in seconds), because this would depend on the special implementation and the computational power of the used computer, but on how it depends on a certain input value. Mostly, this input value is the size of the input data. Example: Mowing grass has linear complexity because it takes double the time to mow the double area. However, looking up something in a dictionary has only logarithmic complexity because for a double sized dictionary you have to open it only one time more (e.g. exactly in the middle - then the problem is reduced to the half). Sometimes, not the timing of an algorithm is the subject but the memory demand or the demand for any other resource. For a mathematical formulation, the big O notation is used. For instance, O(N) means linear complexity, O(N2) means quadratic complexity.
family, and bring her up like a Christian, I should hand.html">hand her over
require in this house, it is an idle and irresponsible female.
"I merely stated the only alternative to my guardianship."
"I should be willing--only too willing--to contribute towards her
well have allowed the good.html">good.html">good man to pay my gas bill.
"I know.html">know of a nice convent home kept by the Little Sisters of St.
pleasure. She is a saint for whom I have a great fascination.
facetious grant of as much land as she could cover with her
north, west, south and east, until her cloak covered several
But the age of miracles is past, and I fear the Little Sisters
extraordinary creature."
I know I ought to have given some consideration to the proposal;
logical faculty. It revolted against the suggested congruity of
bring me nearer to my unhappy boy.html">boy.html">boy. He seems so far away."
I rang the bell and summoned Carlotta.
"Perhaps you had better not say who you are," I suggested.
When Carlotta entered, he rose and looked at her---oh, so
make your acquaintance."
She advanced shyly and held out a timid hand. Obviously she was
unsuccessful experiment of powder and paint on my vile body and
place."
"It is the best.html">best place in the world to be young in," said he.
"Is it?" said Carlotta, with the simplicity of a baby.
"The very best."
"But is it not good to be old in?"
"No country is good for that."
The old man sighed and took his leave. I accompanied him to the
I never expected such sweet innocence. For my boy's sake, I
that the boy is dead. It would kill her."
. All is still licensed under the GNU FDL.
|
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||