Search the courses, subjects, tracks, games and features, or jump straight to a page.
Learn it your way
A short class with Sarah and her students. The other ways are under More.
Sign up free to listen. Transcripts are free to read.
Today, we will kick off by discussing computable functions. A function is computable if a computer program can determine its output for every potential input. Can anyone provide an example of a simple computable function?
How about the function that adds two numbers?
Great example! Adding two numbers is a computable function because we can write a clear algorithm that takes two inputs and produces a sum as an output. Remember, we denote a computable function as one that has a program executable in a programming language. Let's keep this in mind: C for Computable = Clear Algorithm.
Now, let's shift gears to uncomputable functions. These are functions for which no program exists that can compute their output for every input. Can anyone think of a potential example of an uncomputable function?
I read about the Halting Problem, where you can't determine whether a program will finish running or not.
Excellent! The Halting Problem is indeed a classic example of an uncomputable function. In these cases, no amount of resources or time can help us find a solution. That’s our memory aid: U for Uncomputable = Unpredictable Outcome.
To prove that uncomputable functions exist, we use something called cardinality. We know that the collection of all programs is countable—this means we can list them out. What happens when we compare this to the functions mapping the positive integers to a set of limited integers?
Isn't it that there are more functions than there are programs?
Exactly! We demonstrate this through injective mapping. We can establish that the set of all real numbers is uncountable, leading us to conclude there's a disparity in cardinality, proving uncomputable functions exist. Remember, the key takeaway here is: C for Countable = Can list it; U for Uncountable = Undefinable.
We often use non-constructive proofs when showing uncomputable functions exist. This means we are asserting the existence of a function without constructing it. Why would this be significant?
Because it shows limitations in computing without needing to specify an example?
Exactly! Non-constructive proofs underscore foundational limits in computer science. Let’s remember: N for Non-constructive = Not an Example, but Existence.
Functions that have corresponding computer programs able to compute their outputs for any input.
Functions without any computer program that can compute their outputs for every input.
The concept used to measure the 'size' of sets, crucial for understanding computability.
Proofs that establish the existence of an object without constructing a specific example.
In the world of code and function's flow, / Some can compute, some can’t, you know.
Once in a coding land, there was a castle filled with programs. The wise wizard said, 'Some functions can be harnessed, while others remain mysterious, forever uncatchable, like the whispers of the wind.'
C for Clear Algorithms (Computable) and U for Unpredictable Outcomes (Uncomputable).
F-U-C (Functions - Uncomputable - Computable) to remember the main ideas!
Term
What is a computable function?
Click to flip
Term
What is an uncomputable function?
Click to flip
Term
What is the Halting Problem?
Click to flip
A function for which a computer program can compute an output for every input within its domain.
A function for which no program can be constructed that computes an output for every input.
A measure of the 'number of elements' in a set, used to compare sizes of sets.
A proof that establishes the existence of a mathematical object without providing a concrete example.
A specific example of an uncomputable function concerning whether a program will finish running or run indefinitely.
This section introduces computable and uncomputable functions, detailing the existence of uncomputable functions based on cardinality theory.
In this section, the concept of computable functions, defined as those that can be executed by a computer program for all inputs, is explored. It highlights the existence of uncomputable functions, demonstrated through cardinality arguments, emphasizing that certain functions cannot be computed regardless of the available resources.
In the realm of discrete mathematics, understanding the distinction between computable and uncomputable functions is essential. A computable function can be described as a function for which a computer program exists that can determine the output for every possible input from the function's domain. The analysis does not concern itself with the efficiency or time it takes for the program to execute; rather, it focuses solely on the existence of such a program.
On the other hand, an uncomputable function is one for which no such program can be written, indicating that it cannot be computed under any circumstances, regardless of the time, resources, or memory dedicated to the task.
The section further establishes the existence of uncomputable functions by utilizing cardinality theory, specifically showing that the set of all functions from natural numbers to a finite set exceeds the countable set of programs representable in any programming language. This proof strategy employs a non-constructive approach, asserting the presence of uncomputable functions without necessarily identifying a concrete example. The significance lies in demonstrating inherent limitations of computation, suggesting that there are tasks that exceed the capability of any computer—a fundamental insight in computer science.