Join our community!

Update all PDFs

Function Rules

Alignments to Content Standards: 8.F.A.1


A function machine takes an input, and based on some rule produces an output.


The tables below show some input-output pairs for different functions. For each table, describe a function rule in words that would produce the given outputs from the corresponding inputs. Then fill in the rest of the table values as inputs and outputs which are consistent with that rule.

  1. Input values can be any English word. Output values are letters from the English alphabet.

    $\ \ \ \ \ $
    input cat house you stem $\ \ \ \ \ $ $\ \ \ \ \ $ $\ \ \ \ \ $
    output t e u   z    
  2. Input values can be any rational number. Output values can be any rational number.

    input $2$ $5$ $-1.53$ $0$ $-4 $ $\ \ \ \ \ $ $\ \ \ \ \ $
    output $7$ $10$ $3.47$ $5$   $8$  
  3. Input values can be any whole number. Output values can be any whole number.

    input $1$ $2$ $3$ $4$ $5$ $6$ $7$
    output $2$ $1$ $4$ $\ \ \ \ \ $      
  4. Input values can be any whole number between 1 and 365. Output values can be any month of the year.

    input 25 365 35 95 330 66  
    output January December February April November $\ \ \ \ \ \ \ \ $ October

For at least one of the tables, describe a second rule which fits the given pairs but ultimately produces different pairs than the first rule for the rest of the table.

IM Commentary

The purpose of this task is to connect the a function described by a verbal rule with corresponding values in a table (one of six connections to be made between the four ways to represent a function, the other two being through its graph and through an expression). It also encourages students to think more broadly about functions as relating objects other than numbers, although this broad application is not intended to be assessed. Because of its ambiguity, this task would be more suitable for use in a classroom than for assessment.

Teachers should scrutinize similar tasks with care. Sometimes such tasks are presented without asking students to do the mathematical work of describing the rule, which is a main purpose for the task, or acknowledging the possibility for multiple possible table values, which would be mathematically incorrect.

This task can provide an opportunity to discuss mathematical modeling and function fitting (to bring in a real-world example one can discuss predicting sea levels), as well as the nature of scientific extrapolation and inductive reasoning versus mathematical deductive reasoning.

This task can be modified to be played as a game where the instructor has a chosen rule and then gives input-output pairs one by one, and students have to try to guess the rule. Students who think they have found the rule could either describe it, or perhaps supply input-output pairs which follow the rule they are guessing. The act of guessing what someone is thinking is not really mathematics, but mirrors the process one often goes through when modeling with mathematics. What is needed in either case is an analysis of whether the chosen rule is appropriate and whether there are other reasonable rules.

For examples such as in the first part, a question might come up along the lines of "Could we define a function using other letters in the word?" It is clear that "take the first letter" is a rule defining a function from words to letters. But to do something like "take the third letter," when some words don't have a third letter, we must attend to precision. There are a number of reasonable possibilities. Either the set from which the input is taken can be modified to be words with at least three letters. Or we can add an element to the output set to indicate the absence of a letter (mathematicians would usually use $\phi$ to indicate such a "null letter"). Or one can modify the rule to, for example, use the last letter for words with fewer than three letters. There's no mathematical reason to prefer any of these, but modeling situations would often point to one or the other. For example, in Scrabble every word has at least two letters, so a second-letter function would be well-defined there.

The task brings to mind one function which is of more value as a brain teaser than of mathematical value. It takes as input positive integers and has as output the number of letters in its (American) English spelling, so the first few values are $3,3,5,4,4,3,5,\ldots$.


  1. We can notice that the letters provided as output are the last letters in the words provided as input, so one possible rule is "take the last letter" of the input. Below is one possible way to complete the table consistent with this rule.

    input cathouseyoustembuzzskypicture
    output teumzye
  2. We can notice that the output and input pairs given all differ by five, so one possible rule is “add 5” to the input value. Below is one possible way to complete the table consistent with this rule.

    input 25-1.50-430.1113
    output 7103.55185.1113
  3. The numbers seem to be "switching places" in a way. One possible precise rule could be that the output for an odd number is the even number which is one greater, and the output for an even number is the odd number which is one less. Below is how to complete the table consistent with this rule.

    input 1234567
    output 2143658
  4. One possible rule here is “the month in which the input day of the year falls”, defining January 1st to be day one. To be precise, we specify that we are using a non-leap year to determine the output values. Below is one possible way to complete the table consistent with this rule.

    input 25365359533066280
    output JanuaryDecemberFebruaryAprilNovemberMarchOctober

Mathematically, any of these tables could be fit by an unlimited number of rules.

For (c), we could instead choose the rule to produce the values "divide by 2 then multiply by 4". That is, starting at $f(1) = 2$ we have $f(n+1) = f(n)/2$ if $n$ is odd and $f(n+1) = 4 \cdot f(n)$ if $n$ is even. (Such a definition would be aligned with F-IF.3, and is conceivable as a student answer in its less formal description.) This gives a different value for $f(5)$ than the rule which we provided above.

As implied by the first answer for part (d) precise, an alternate rule would be to use a leap year as the basis for the rule. In this case for example $f(60)$ would differ from the value given by the rule provided.