How many functions are there from {0,1} to {0,1} without restricted domains?

  • Thread starter Thread starter Panphobia
  • Start date Start date
  • Tags Tags
    Functions
Click For Summary

Homework Help Overview

The discussion revolves around the number of functions from the set {0,1} to itself, specifically addressing the implications of function definitions and domain restrictions.

Discussion Character

  • Conceptual clarification, Assumption checking

Approaches and Questions Raised

  • Participants explore the reasoning behind the number of functions, with some asserting there are 9 functions based on the inclusion of undefined values, while others argue for 4 functions based on standard definitions of functions.

Discussion Status

The conversation reflects differing interpretations of function definitions and domain specifications, with some participants questioning the validity of including undefined values in the count of functions. There is no clear consensus, as multiple interpretations are being actively discussed.

Contextual Notes

Some participants reference specific exam questions that suggest a different answer, indicating potential discrepancies in understanding or definitions used in academic settings.

Panphobia
Messages
435
Reaction score
13

Homework Statement



How many functions are there from {0,1} to {0,1}?

The Attempt at a Solution


I know the answer is 9, but how is the answer 9?
 
Physics news on Phys.org
Panphobia said:

Homework Statement



How many functions are there from {0,1} to {0,1}?

The Attempt at a Solution


I know the answer is 9, but how is the answer 9?

f(0) could be either 0, 1 or undefined. Same for f(1). Count all of the possibilities.
 
ohhhh I thought it was 2^2 possibilities not 3^2, thanks, because {} [itex]\subset[/itex] {0,1} and the value of {} is undefined correct?
 
Panphobia said:
ohhhh I thought it was 2^2 possibilities not 3^2, thanks, because {} [itex]\subset[/itex] {0,1} and the value of {} is undefined correct?

No, it's because they only said f:{0,1}->{0,1}. They didn't say the function was defined for all values in the set {0,1}. If they had said the DOMAIN of f was {0,1}, then the answer 4 would be correct. It's more legalese than important.
 
Dick said:
f(0) could be either 0, 1 or undefined. Same for f(1). Count all of the possibilities.

By what definition of "function" can it be said that if [itex]f: \{0,1\} \to \{0,1\}[/itex] then [itex]f(0)[/itex] is not either [itex]0[/itex] or [itex]1[/itex]?

Panphobia said:
ohhhh I thought it was 2^2 possibilities not 3^2, thanks, because {} [itex]\subset[/itex] {0,1} and the value of {} is undefined correct?

You were right the first time: there are four functions from [itex]\{0,1\}[/itex] to [itex]\{0,1\}[/itex], because there are exactly two choices for [itex]f(0)[/itex], and independently of that choice there are exactly two choices for [itex]f(1)[/itex].

See further this post by Tim Gowers.
 
Dick said:
No, it's because they only said f:{0,1}->{0,1}. They didn't say the function was defined for all values in the set {0,1}. If they had said the DOMAIN of f was {0,1}, then the answer 4 would be correct. It's more legalese than important.

Except that notation [itex]f: A \to B[/itex] means that the domain of [itex]f[/itex] is [itex]A[/itex] and the codomain of [itex]f[/itex] is [itex]B[/itex]!
 
On my practise mid term exam, it gives this exact question, the answer was 9, so pasmith, it can't be 4.
 
The definition of a function requires every element of the domain to have a defined function value. So, if f(0) or f(1) is not defined, then f is not a function of {0, 1}.

The answer must be there are only 4 functions.
 
Panphobia said:
On my practise mid term exam, it gives this exact question, the answer was 9, so pasmith, it can't be 4.

Then your exam is wrong. By convention, [itex]f: \{0,1\} \to \{0,1\}[/itex] means that the domain and codomain of [itex]f[/itex] are both [itex]\{0,1\}[/itex], so that [itex]f(0) \in \{0,1\}[/itex] and [itex]f(1) \in \{0,1\}[/itex].
 
  • #10
Ok thanks, I shouldn't have doubted myself :P
 
  • #11
One more question, if (A,B,C) is a function, and (A',B', C') is equal to that function if A=A' and B=B' and C=C': consider the function
f: R -> R
x|-> 1/x
Which denote the same function as f.
a)
g: R -> R
x|-> 1/x

b)
h: R* -> R
u |-> 1/u

c)
d: R -> R
w |-> w/w^2

d)
k: R->R
z|-> z-1/(z*(z-1))

I know that h cannot be right because R* != R, I know that g is the same as f, but I don't know b or c, according to the answers, d is the same as f, but not k, why is this? Oh wait nevermind, the domain of definition is different for k, sorry.
 
Last edited:
  • #12
None of these are functions of R as they are not defined at 0. These are functions of R\{0} and in the last case R\{0, 1}.

For two functions to be equal, the range, domain and all function values must be equal. It doesn't matter if two different different formulas are given, as long as the formulas are valid and equal on the same domain.

For example:

f: R -> R defined by f(x) = x is the same as:

g: R -> R defined by 2x/2

It's not the same as

h: R\{0} -> R defined by f(x) = x^2/x

And, strictly speaking:

f: R -> R, f(x) = x^2

is not the same as

f: R -> [0, ∞), f(x) = x^2

Another example is:

f: C -> C, f(z) = |z|

is not the same as:

f: C -> R, f(z) = |z|
 

Similar threads

  • · Replies 7 ·
Replies
7
Views
2K
  • · Replies 23 ·
Replies
23
Views
2K
  • · Replies 13 ·
Replies
13
Views
5K
  • · Replies 15 ·
Replies
15
Views
4K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 8 ·
Replies
8
Views
3K
Replies
3
Views
2K
  • · Replies 7 ·
Replies
7
Views
3K
  • · Replies 10 ·
Replies
10
Views
2K
Replies
15
Views
4K