- #1
Panphobia
- 435
- 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?
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?
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?
Dick said:f(0) could be either 0, 1 or undefined. Same for f(1). Count all of the possibilities.
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?
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.
Panphobia said:On my practise mid term exam, it gives this exact question, the answer was 9, so pasmith, it can't be 4.
A function from {0,1} to {0,1} is a mathematical rule that maps any element from the set {0,1} to another element in the same set. It is also known as a binary function, as it only has two possible inputs and outputs.
A function from {0,1} to {0,1} can be represented using a truth table, where the input values of 0 and 1 are listed in the left column and the corresponding output values are listed in the right column. The function can also be represented using a graph or a mathematical equation.
Functions from {0,1} to {0,1} are commonly used in digital logic and computer science to represent and manipulate binary values. They are also used in cryptography and communication systems to encode and decode information.
Examples of functions from {0,1} to {0,1} include logical operations such as AND, OR, and NOT, as well as mathematical functions like addition, subtraction, and multiplication. These functions take in two binary inputs and produce a single binary output.
No, a function from {0,1} to {0,1} can only have two inputs and two outputs. This is because the set {0,1} only contains two elements, and a function must map each input to a unique output. If there were more inputs or outputs, there would be more possible combinations than elements in the set, making it impossible for the function to be well-defined.