# How Fast Can You Count?

How Fast Can You Count?

Students will produce a list of numbers from 1 to n for large values of n and explore the differences between using a computer to do this and speaking, writing or typing it themselves.

Appropriate for ages 6+.

Allow 30 minutes to complete the module.

Important note: This module should be led by an instructor with basic Wolfram Language knowledge. If you would like to learn the language, please try this free online introduction. If you would like a Computational Thinking Initiative ambassador or volunteer to help you run an adventure, please contact us.

Appropriate for ages 6+.

Allow 30 minutes to complete the module.

Important note: This module should be led by an instructor with basic Wolfram Language knowledge. If you would like to learn the language, please try this free online introduction. If you would like a Computational Thinking Initiative ambassador or volunteer to help you run an adventure, please contact us.

Learning Objective

◼

Students will be able to produce a list of numbers from 1 to n, including large values of n.

Computational Thinking Principles and Practices

◼

Simulating things that are hard or impossible to do by performing real-world experiments

Standards Alignment

◼

Common Core:

◼

CCSS.MATH.CONTENT.K.CC.A.3: Write numbers from 0 to 20. Represent a number of objects with a written numeral 0–20 (with 0 representing a count of no objects).

Helpful Background

◼

Background information on counting: https://en.wikipedia.org/wiki/Counting

## STARTING POINT

STARTING POINT

“Today we will see the power of using a computer to do things that are very hard to do by hand. We’ll measure how fast a computer can type and count compared to how fast we can.”

Direct the students to https://www.wolframcloud.com/objects/computationinitiative/Stopwatch, where they will find a stopwatch to use during this activity. Demonstrate the timer for the students.

Have the students pair off. Tell them to take turns timing each other doing the following tasks and to record each time:

(1) count to 20 out loud

(2) count to 20 by writing each number symbol

(3) count to 20 by typing each number symbol (with commas in between each number)

(1) count to 20 out loud

(2) count to 20 by writing each number symbol

(3) count to 20 by typing each number symbol (with commas in between each number)

You may want to demonstrate the counting and timing process for each of these tasks so that students understand the instructions better.

◼ How long did it take you to count out loud, write or type?

◼ Did you and your partner count at the same speed?

◼ Did you ever make a mistake and have to go back?

◼ Are there other ways that we can count? If students suggest counting by a different step size (e.g. counting by threes up to 50) show them Range[1,50,3]). If they suggest counting by increasing powers of 2, show them Table[2^x,{x,1,20}]). If they suggest counting by prime numbers, show them Prime[Range[20]]).

CHECKPOINT

Check in to determine when students have finished timing themselves.

“Imagine trying to do these tasks, but count to 40. How long would it take you?”

Students may need help understanding that it is a fairly good estimate to double their times when counting to 20.

“If it took you 4.45 seconds to count out loud to 20...”

In[1]:=

Out[1]=

“... it might take you about 8.9 seconds to count to 40.”

“What about counting to 100?”

Encourage students to figure out how long it would take them to count to specific multiples of 20.

◼ About how long would it take you to count to 1,000?

◼ Do you think it will take you the same amount of time to count every group of 20 numbers? Why or why not? How could you test it?

CHECKPOINT

Check whether all students have estimates of how long it might take them to count to very high numbers.

“The computer can type these numbers for us.”

In[2]:=

Range[20]

Out[2]=

{1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20}

Change the argument in Range so they can see more of what Range does and how fast it works.

100000

“Does anyone know what that number is called?”

If a student responds to your question with a correct answer: “Yes! It’s called...”

If no students can respond to your question with a correct answer: “This number is called...”

If no students can respond to your question with a correct answer: “This number is called...”

In[3]:=

IntegerName[100000]

Out[3]=

100 thousand

In[4]:=

IntegerName[100000,"Words"]

Out[4]=

one hundred thousand

For students with desktop versions of Mathematica, you could introduce Speak here. Not only does the computer know the number names, but it can speak them as well.

“If you had to count to 100,000, would you know all the number names to get there?”

In[5]:=

IntegerName[Range[100000],"Words"]

Out[5]=

“About how long would it take you to count to 100,000?”

CHECKPOINT

Check whether all students have approximated how long it would take for them to count to 100,000.

“Someone try to time this for me. How long does it take the computer to count to 100,000?”

In[6]:=

Range[100000]

Out[6]=

Have multiple students time you running Range[100000].

◼ Did you time it right?

◼ Did you all get the same thing?

◼ Is there a chance you timed your partners wrong earlier?

CHECKPOINT

Check to see if students realize that their timing may have been off.

“Lucky for us, the computer will also time itself.”

Explain that the first number in this list is how long it took the computer to write all of the numbers that follow.

Explain that it took the computer less than one second to write all of the integers from 1 to 100,000!

“Can you do that?”

## FINAL POINT

FINAL POINT

Ten minutes before the end of the module time.

### Summarize

Summarize

Summarize what was done in the module and talk about the findings.

### Refer

Refer

Refer back to the learning objective and summarize how you have reached it.

### Extend

Extend

Extend the module to the future. For example, “If you have time at home, do something with these lists, like adding an integer to them. Explore An Elementary Introduction to the Wolfram Language for more ideas.”

### Possible Additional Relevant Functions

Possible Additional Relevant Functions

Table • Range[min,max,steps] • Prime

### Possible Pitfalls

Possible Pitfalls

◼

Students may have heard of that thing called infinity. They may want to try Range[Infinity]. Let them try it. The error message will read that Range was not given proper bounds. Explain that this means that the computer knows you are asking it to do something that will last forever and it doesn’t want to get stuck doing that. (It has more important things to do, like count higher than they can.)

◼

Students with desktop versions of Mathematica may try to Map the function Speak over a long list of numbers. If they do this and the noise will not stop, close Mathematica completely.