the benefits of computer programming in developing algorithmic thinking
TRANSCRIPT
The Benefits of Computer Programming in Developing Algorithmic ThinkingAuthor(s): RITA L. PETOSASource: The Mathematics Teacher, Vol. 78, No. 2 (FEBRUARY 1985), pp. 128-130Published by: National Council of Teachers of MathematicsStable URL: http://www.jstor.org/stable/27964405 .
Accessed: 14/07/2014 08:11
Your use of the JSTOR archive indicates your acceptance of the Terms & Conditions of Use, available at .http://www.jstor.org/page/info/about/policies/terms.jsp
.JSTOR is a not-for-profit service that helps scholars, researchers, and students discover, use, and build upon a wide range ofcontent in a trusted digital archive. We use information technology and tools to increase productivity and facilitate new formsof scholarship. For more information about JSTOR, please contact [email protected].
.
National Council of Teachers of Mathematics is collaborating with JSTOR to digitize, preserve and extendaccess to The Mathematics Teacher.
http://www.jstor.org
This content downloaded from 129.130.252.222 on Mon, 14 Jul 2014 08:11:11 AMAll use subject to JSTOR Terms and Conditions
The Benefits of Computer
Programming in Developing
Algorithmic Thinking By RITA L. PETOSA, Adrien Black Intermediate School #25, Flushing, NY 11358
Our
school has not adopted a computer
literacy course. Instead, we have opted to direct students' interest in computers toward the study of mathematics. That is, we have infused an ongoing component of instruction in computer programming into our mathematics curriculum with interest
ing results. The focus of the instruction is on algorithmic development, which comes
about when we generalize solutions to
mathematical problems. Students move
from developing their own formulas (e.g., for finding the perimeter of a square, the sale price of an item given the rate of dis count and the list price, the complement and supplement of an angle) to creating more procedural algorithms (e.g., for find
ing prime numbers or factors of numbers or
for classifying triangles by angles given the
lengths of the sides). It seems that this emphasis on algorith
mic development has led to greater explora tion of mathematical phenomena by stu dents. The remainder of this article de scribes an example of what is happening in our mathematics classes since we began using the computer.
One student, Susan, along with her
classmates, had been discussing in their social studies class a book that has recently been greatly publicized?1984 by George Orwell. The class had discussed that the book's title was a deliberate reversal of the
digits in 1948, the year the book was pub lished. While many of the students were
conjuring up images of Big Brother, Susan made the following discovery (written in her own words).
Susan's conjecture
Take a two-digit number with the two
digits being consecutive, such as 23.
Switch the two digits around, such as 23
turned to 32. Subtract the smaller number from the larger one, 32 ? 23 = 9.
No matter what two consecutive digits you use, the difference will always be
nine.
Now choose a two-digit number, the
digits not being consecutive, such as 58.
Find the difference between the digits, 8-5 = 3. Multiply the difference by 9, 3 9 = 27. Now take 58 and turn it
around, such as 58 to 85. Find the differ
ence, 85 - 58 = 27.
The point I am trying to make is that the
product found when the difference of the two digits is multiplied by 9, is the same
as the difference of the original number
and the number when it is turned around, if the smaller number is subtracted from
the larger number.
After having Susan write her discovery in words that, as Susan said, "even her
sixth-grade brother" could understand, I
asked her to teach it to her classmates. The student were highly motivated. One student
suggested that a number like 55 was an ex
ception. Other students were quick to point out that it followed Susan's algorithm in
that
55 - 55 = 9(5 -
5).
When Susan finished her lesson, I asked the students to consider whether an analo
gous algorithm could be developed for
nondecimal-based numerals. For example, could they find a whole number, c, such that
42five-24five =
c(4-2)?
128 Mathematics Teacher
This content downloaded from 129.130.252.222 on Mon, 14 Jul 2014 08:11:11 AMAll use subject to JSTOR Terms and Conditions
Many students immediately guessed that c = 4 for all two-digit numerals in base five.
They were then given the task of extending Susan's discovery to systems in all other bases. Nurit's extension (also written in her own words) of Susan's conjecture follows.
Nurit's conjecture
To find the difference of a two-digit number and the number with its digits reversed, you subtract the two digits of the number and multiply their difference
by the largest one-digit number in that base. (Note: 4 ? 1=3, and 4 is the larg est one-digit number in base five.) For ex
ample :
TABLE 1
Base five
Base four
Base nine
41five 3five
-14, five x4, five
22fiv
32,
22, five
four Lfour
23fl x3f<
3four 3four
4nin.
-26n
35n
x8n
35n
Earlier in the school year, the students had been asked to code a computer program that would convert a three-digit, non decimal-base numeral to base ten, given the three digits and the base number (Elgarten and Posamentier 1984). As a result, Alec wrote a program in BASIC (table 1). Refine ments of Alec's program by his classmates followed his presentation. Also, Alec and the other students became aware that they did not know how to code a program to con vert a base-ten numeral to a nondecimal base. Our discussion of Euclid's division al
gorithm is still in progress. I then asked the students, "When, in
mathematics, does a conjecture become a
theorem?" They were familiar with Gold bach's conjecture ("Every even number
larger than 2 is equal to the sum of two
prime numbers"), which was discussed ear
lier in the school year. We discussed that we would have to show that the conjecture worked for every possible two-digit number
A Program to Convert a Three-Digit Nondecimal-Base Numeral to Base Ten
5 10 20 30 40
45
50
55
60
62
64
66
70 80 90 100
110 120 130 140 150 160 170 180 185 190 200 205 210 220 225 230 240 250 260 270 280 285 290 300 305 310 320
REM ALEC'S PROGRAM PRINT "THE 7-356 THEORY" PRINT "HERE'S THE THEORY" PRINT "_" PRINT "FIRST YOU TAKE A TWO DIGIT
NUMBER AND" PRINT "SUBTRACT THE SMALLER DIGIT
FROM THE LARGER ONE." PRINT "THEN YOU MULTIPLY THE
DIFFERENCE BY" PRINT "A NUMBER ONE LESS THAN THE
BASE NUMBER." PRINT "FINALLY, IF YOU TAKE THE
ORIGINAL NUMBER" PRINT "AND SWITCH AROUND THE DIGITS
AND THEN SUBTRACT" PRINT "THE SMALLER NUMBER FROM THE
LARGER ONE," PRINT "YOU WILL GET THE SAME ANSWER
AS WHEN YOU MULTIPLIED." PRINT PRINT "LET'S TRY IT." PRINT "_" PRINT "ENTER A TWO DIGIT NUMERAL IN
ANY BASE." PRINT "ONE DIGIT AT A TIME PLEASE." INPUT A, PRINT "ENTER THE BASE NUMBER PLEASE.' INPUT IF A>B THEN GOTO 180 IF B>A THEN GOTO 200 IF A = B THEN GOTO 200
C = A-B PRINT A;"-";B;"
= ";C GOTO 210 C = B-A PRINT B;"-";A;"
= ";C R = N-1 D = C*R PRINT C;"X";R;"
= ";D Z = A*N + B X = B*N + A IF Z>X THEN GOTO 280 IF X>Z THEN GOTO 300 IF X = Z THEN GOTO 300
Y = Z-X PRINT Z;"-";X;"
= ";Y
GOTO 310 Q = X-Z PRINT X;"-";Z;"
= ";Q PRINT "AND THAT'S HOW IT WORKS!" END
in every possible base. We agreed that even
with the assistance of Alec's program, this
undertaking would be impossible. We then
discussed the difference between inductive
reasoning, which we were trying to apply to
this case, and deductive reasoning. I men
February 1985 129
This content downloaded from 129.130.252.222 on Mon, 14 Jul 2014 08:11:11 AMAll use subject to JSTOR Terms and Conditions
tioned that algebra, that is, generalized arithmetic, might be helpful. I did go
through the following algebraic derivation for base ten only. The students were able to follow but not reproduce it, since, being seventh graders, they had not yet been
taught the algebraic manipulations that were necessary.
Algebraic justification
Let t be the tens digit of a two-digit number, and let u be the units digit of a two-digit number. Then,
10*+ lu -It - lOu
9t- 9u = 9(t -
u).
We had discussed the distributive property of multiplication over subtraction earlier in the school year.
Later I asked the students to explore three-digit numbers. Some students might conclude that for any base 6 and any three
digit number represented by
b2x + by + z,
the absolute value of the difference of the number and the number with its digits re versed is always equal to
(b2-l)\x-z\ or
(? + l)(?-l)|*-z|.
Students' exposure to computer program ming all year enabled them to develop an
algorithmic approach to use as a basis for
solving the problem.
REFERENCE
Elgarten, Gerald H., and Alfred S. Posamentier. Using Computers. Melilo Park, Calif. : Addison-Wesley Pub
lishing Co., 1984. m
DEPT. OF MATH. & COMPUTER SCIENCE UNIV. OF NEBRASKA AT OMAHA, OMAHA, NE 68182
Math. Center Director. Tenure Track Asst. Prof, position. Duties include administering the Pre-Calculus instruction in the center, some classroom teaching, and research. Qualifications: Ph.D. in Math, or Ed.D. with strong math, background. Previous administrative- experience is a plus. Send a resume, transcripts, and 3 letters of recommendation to Charles Downey by March 20, 1985. UNO is an equal opportunity/affirmative action employer.
Activities Swap and Share Session The Editorial Panel of the Mathematics Teacher will offer a special "swap and share" session at the annual
meeting in San Antonio. The session is designed es
pecially for middle and junior high school teachers, who should bring twenty-one copies of one activity that has been successfully used in the classroom. The teacher can then swap a copy of this activity for one of another teacher. Bring twenty-one copies of one ac
tivity and leave with twenty different activities (the MT will keep one copy for possible publication). Please refer to the program for the specific time and room of the session, and come prepared !
Authors Needed for "From the File" The Editorial Panel of the Arithmetic Teacher is en
couraging teachers to submit material for students in
grades K-8 that can fit on a 4 in.-by-6 in. index card in the format of "From the File." See recent issues of the
journal for examples. These items are intended to serve as a teachers' exchange of tips on bulletin-board
ideas, teaching aids, projects, games, and interesting problems, Three copies of each item should be sent to the Arithmetic Teacher, 1906 Association Drive, Reston, VA 22091.
MATH TEACHERS
PRIVATE SCHOOLS NEED YOU! Private schools across the country are searching for mathematics, science, and
computer teachers. And, they are willing to pay COMPETITIVE SALARIES for qualified teachers.
MATHFIND AGENCY specializes in the nationwide placement of math teach ers. The service is free to the teacher.
Send resume and/or call:
MATHFIND AGENCY 1630 Euclid Street
Santa Monica, CA 90404 (213) 450-1324
Ask for Sandra Lipps MATHFIND AGENCY is licensed by the California Dept. of Consumer Affairs
Visit Booth #520 at NCTM San Antonio Meeting
130- -Mathematics Teacher
This content downloaded from 129.130.252.222 on Mon, 14 Jul 2014 08:11:11 AMAll use subject to JSTOR Terms and Conditions