Discrete Mathematics (confused and help wanted)

Join the discussion
Ask a follow-up here, or get your own question answered by working scientists, mathematicians and engineers — people, not an autocomplete.
Real named experts · corrections over time · the nuance an AI answer skips
2 replies · 2K views
sampahmel
Messages
20
Reaction score
0
Dear all,

I have an example taken from the book titled "Discrete Mathematics For Computer Science" by Kenneth Bogart. In the book, page 11, example 1.2-2, it says: Write down all the functions from the two element set {1,2} to the two element set {a,b}.

I couldn't understand the reasoning behind its explanation and I can't tell the difference between the functions in algebra and calculus.

According to the book, it says there are 8 functions for the example above. Why? And how is it different from a typical function? ( Functions in algebra and calculus has an infinite number sets of numbers as their domain) I do know about that and functions in discrete mathematics has a finite sets as their domain and range, I also understand this too and so ...How did the book came to the conclusion that there are 8 functions?

Thank you,

S
 
Physics news on Phys.org
A function is defined by the value of the function at each point in its domain. So the number of functions is just the number of choices for f(1) times the number of choices for f(2). I would say that there are only four functions:

f(1) = a, f(2) = a
f(1) = b, f(2) = b
f(1) = a, f(2) = b
f(1) = b, f(2) = a

I don't distinguish between functions in algebra, calculus, and discrete math; they're all just functions. True, some functions have the real numbers as their domain while others have the positive reals, the integers, the nonnegative integers, some other infinite set, or a finite set, but they all follow the same rules.
 
At the simplest you can define a relation as any set of ordered pairs of objects: a function is a relation in which no two distinct ordered pairs have the same first coordinate.
These are not the most general statements, but they apply to the current setting and serve to show one distinction between functions and other collections.