> For the complete documentation index, see [llms.txt](https://cs70.bencuan.me/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://cs70.bencuan.me/discrete-math/computability.md).

# Computability

Computability is the study of a massively important question:  **do there exist any problems that are impossible for a computer to solve?**&#x20;

## **The Halting Problem**

It turns out that the above question itself is impossible to solve: in other words, **there cannot exist a program HALT which determines if a program can halt in finite time given a particular input.**&#x20;

This was originally proposed by Alan Turing- he proved the nonexistence by attempting to feed the Halting Problem into itself: if the Halting Problem doesn't halt, then it is supposed to output an answer. That means that the Halting Problem would state that the Halting Problem halts, even though it didn't. This paradox led to demonstrating that the Halting Problem simply cannot be solved.

{% embed url="<https://www.youtube.com/watch?v=macM_MtS_w4>" %}

## Reductions

**Reducing** a problem A to another problem B means that we can solve problem A if we know how to solve problem B.

For instance, we might be able to write psuedocode that has a whole bunch of known components, but rely on the output of problem B in order to determine the final output.

One application of reduction is to show that **a program cannot exist if it requires the Halting Problem as a component.**&#x20;


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://cs70.bencuan.me/discrete-math/computability.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
