THEORY OF COMPUTING AND MACHINE ARCHITECTURE
Completion requirements
3. Key Concepts
Key Concepts:
- Turing Completeness:
- A system is Turing complete if it can simulate a Turing machine.
- Examples: Modern programming languages (e.g., Python, Java).
- Decidability:
- A problem is decidable if an algorithm exists to solve it in finite time.
- Example: Checking if a number is prime.
- Undecidability:
- A problem is undecidable if no algorithm can solve it for all cases.
- Example: The Halting Problem (determining whether a program will terminate).
- Reduction:
- A method to prove undecidability by reducing one problem to another.
- Example: Reducing the Halting Problem to the Post Correspondence Problem.
Complexity Theory
Complexity theory classifies problems based on the resources (time and space) required to solve them.
Key Concepts:
- Time Complexity:
- Measures the number of steps an algorithm takes as a function of input size.
- Example: O(n), O(n²), O(log n).
- Space Complexity:
- Measures the amount of memory an algorithm uses as a function of input size.
- Example: O(1), O(n).
- Complexity Classes:
- P: Problems solvable in polynomial time by a deterministic Turing machine.
- NP: Problems solvable in polynomial time by a non-deterministic Turing machine.
- NP-Complete: The hardest problems in NP; solving one would solve all NP problems.
- NP-Hard: Problems at least as hard as NP-Complete problems.
- P vs. NP Problem:
- The most famous unsolved problem in computer science: Is P = NP?