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're diving into the concept of computable functions. Can anyone tell me what a computable function is?
Is it a function that can be evaluated by a program?
Exactly! A function is computable if you can write a program that computes its value for any input. Remember, we're not concerned about how long the program takes.
So, if a function can't be computed by any program, what do we call it?
Good question! We call it an uncomputable function. Understanding the difference between these two is crucial.
Are all functions computable then?
Not at all! We will explore why some functions are uncomputable in this section.
To summarize, computable functions can be evaluated by programs, while uncomputable functions cannot be computed no matter the resources.
Now, let’s discuss why uncomputable functions exist. Who remembers our discussion on the countability of sets?
A countable set can be enumerated, right? Like we can list all integers.
Exactly! The set of all valid programs in any programming language is countable. But guess what...
What about the functions we can define?
Great connection! The set of all functions from positive integers to {0, ..., 9} is uncountable. This difference is fundamental!
How do we demonstrate that?
We will use an injective mapping. This means we can pair each function uniquely to an element from an uncountable set, such as real numbers from 0 to 1.
In summary, the set of valid programs is countable while the set of functions from positive integers to {0, 9} is uncountable, illustrating the existence of uncomputable functions.
Let’s visualize injective mapping: for every real number x in [0, 1), we can create a function from its decimal representation.
How does that work exactly?
We take the digits of x: d1, d2, d3, etc. We then create a function f such that f(n) gives us the nth digit of the decimal representation.
Does this function stay unique?
Absolutely! Different x values result in different functions, making this injective!
To conclude, the mapping from the real numbers in [0, 1) to functions shows that we have more functions than programs, thereby proving the existence of uncomputable functions.
Now that we've established the existence of uncomputable functions, let’s discuss its implications in computer science.
Why does it matter that there are uncomputable functions?
Understanding uncomputable functions shows the limits of what computers can achieve. Not every problem is solvable with algorithms.
Could you give an example where this is relevant?
Good point! Tasks requiring infinite resources or that lead to contradictions often fall into this realm.
So, computers aren’t omnipotent?
That's correct! Known limitations help shape our expectations and understanding of computational tasks.
To summarize, the existence of uncomputable functions highlights our current understanding of what can be achieved in computer science.
Functions that can be computed by a program for each input.
Functions that cannot be calculated by any program.
A function that ensures a unique mapping between sets.
The property of a set that can be counted or enumerated.
The property of a set that cannot be fully enumerated.
Computable's a breeze, so easy to see, but uncomputable's a puzzle, not just a tease.
Imagine a wizard trying to compute every magic spell. Some spells are like uncomputable functions, impossible to articulate or execute no matter the wand's power.
C-U-I for Computable and Uncomputable, inject Yourself into understanding!
C for Countable, U for Uncountable, I for Injective — remember CUI to navigate through these concepts!
Term
Computable Function
Click to flip
Term
Uncomputable Function
Click to flip
Term
Injective Mapping
Click to flip
Term
Countable Set
Click to flip
Term
Uncountable Set
Click to flip
A function for which a program can be written to compute its output for every input.
A function that cannot be computed by any program, regardless of time or resources.
A function that pairs each element from one set to a unique element in another set, ensuring no two elements are mapped to the same output.
A set that can be enumerated, or counted, meaning its elements can be listed as a sequence.
A set that cannot be enumerated, meaning its elements cannot be fully listed as a sequence.
This section discusses injective mappings and the existence of uncomputable functions, highlighting the contrast between computable and uncomputable functions through an injective mapping example.
The section presents a comprehensive exploration of injective mappings in relation to uncountability. It illustrates how the cardinality of the set of all functions from positive integers to a limited set exceeds the countability of valid programs, leading to the conclusion that some functions cannot be computed, thus establishing the existence of uncomputable functions.
In this section, we explore the concepts of computable and uncomputable functions, focusing on injective mapping and its connection to cardinality. A function is termed computable if there exists a program that can determine its output for every input in its domain; however, if no such program can be created regardless of resources, the function is deemed uncomputable. The lecture establishes that the set of all valid programs is countable, while the set of functions from positive integers to {0,...,9} is uncountable. We demonstrate an injective mapping from the uncountable set of real numbers in [0, 1) to the aforementioned set of functions, highlighting the existence of functions for which no corresponding programs exist. Thus, this section concludes that uncomputable functions inherently exist, emphasizing a critical concept in computer science regarding the limitations of computational capabilities.