1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Nezavi [6.7K]
3 years ago
7

Give an example of a function from N to N that is:______.

Computers and Technology
1 answer:
vichka [17]3 years ago
4 0

Answer:

Let f be a function

a) f(n) = n²

b) f(n) = n/2

c) f(n) = 0

Explanation:

a) f(n) = n²

This function is one-to-one function because the square of two different or distinct natural numbers cannot be equal.

Let a and b are two elements both belong to N i.e. a ∈ N and b ∈ N. Then:

                                f(a) = f(b) ⇒ a² = b² ⇒ a = b

The function f(n)= n² is not an onto function because not every natural number is a square of a natural number. This means that there is no other natural number that can be squared to result in that natural number.  For example 2 is a natural numbers but not a perfect square and also 24 is a natural number but not a perfect square.

b) f(n) = n/2

The above function example is an onto function because every natural number, lets say n is a natural number that belongs to N, is the image of 2n. For example:

                                f(2n) = [2n/2] = n

The above function is not one-to-one function because there are certain different natural numbers that have the same value or image. For example:

When the value of n=1, then    

                                   n/2 = [1/2] = [0.5] = 1

When the value of n=2 then

                                    n/2 = [2/2] = [1] = 1

c) f(n) = 0

The above function is neither one-to-one nor onto. In order to depict that a function is not one-to-one there should be two elements in N having same image and the above example is not one to one because every integer has the same image.  The above function example is also not an onto function because every positive integer is not an image of any natural number.

You might be interested in
Question 2 of 10
horrorfan [7]

Answer:

Lowest Level; Machine Language.

Explanation:

The lowest level of a computer is machine language, which are strings of 0's and 1's in bits, and it's possible to perform tasks at this level. It's however difficult to do and humans created <em>Assembly</em>; a type of low level programming language to be readable, and converts to machine language so that we don't have to work in binary.

4 0
2 years ago
19. Fair use applies to which of the following situations?
MatroZZZ [7]
I think it’s B if not it’s D both are similar
4 0
3 years ago
What are two type of physicals connection
netineya [11]
Two types of physical connection are:

A wired connection using a cable

A wireless connection using radio waves
7 0
3 years ago
Write the definition of a function minMax that has five parameters. The first three parameters are integers. The last two are se
guapka [62]

void minMax(int a, int b, int c, int*big, int*small)

{

if(a>b && a >c){

*big = a;

if(b>c)

*small = c;

else

*small = b;

}

else if (b>a && b>c){

*big = b;

if(a>c)

*small = c;

else

*small = a;

}

else{

*big = c;

if(a>b)

*small = b;

else

*small = a;

}

}

8 0
2 years ago
Select the data type for each example below. <br> Possible answers<br> -Int<br> -float <br> -string
Shkiper50 [21]

Answer:

2.5 = float

'2.5' = str

3 = int

Explanation:

The data type: "float" is used for positive or negative decimals.

The data type: "str" is used for a sequence of letters, numbers, or symbols. Since the decimal used apostrophes, this means it's a character literal.

The data type: "int" is used for any positive or negative whole number.

7 0
2 years ago
Other questions:
  • Describe in 2–3 sentences how you would use the autosum shortcut.
    9·2 answers
  • 2(x-5)-3(3-x)=1/2(x-2)
    9·1 answer
  • Which of the following information is most important to include in a timeline
    14·2 answers
  • Assume there is a variable , h already associated with a positive integer value. Write the code necessary to count the number of
    13·1 answer
  • Assume that the int variables i and j have been declared, and that n has been declared and initialized.
    10·1 answer
  • I need names for an anime and powers so plz make then unique
    14·1 answer
  • What describes a group of cells?<br> O crowd<br> Orange<br> O set<br> gangle
    7·2 answers
  • Software que busca, detecta y elimina malware tipo espía; puede instalarse en la computadora de manera aislada o en conjunto con
    11·1 answer
  • Develop a C program that calculates the final score and the average score for a student from his/her (1)class participation, (2)
    9·1 answer
  • Which is government departments fund the Global Positioning System
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!