THE USE OF APL IN TEACH ING

Similar documents
Trinity Christian School Curriculum Guide

Mathematics. Algebra I (PreAP, Pt. 1, Pt. 2) Curriculum Guide. Revised 2016

Finding Prime Factors

Nine Week SOL Time Allotment. A.4a, b and A.5a - Properties. A.1b and A.3c - Order of Operations. A.1b - Evaluating Expression

Solving Algebraic Equations in one variable

College Algebra. Basics to Theory of Equations. Chapter Goals and Assessment. John J. Schiller and Marie A. Wurster. Slide 1

2. Associative Law: A binary operator * on a set S is said to be associated whenever (A*B)*C = A*(B*C) for all A,B,C S.

Register machines L2 18

Math 31 Lesson Plan. Day 5: Intro to Groups. Elizabeth Gillaspy. September 28, 2011

Factors, Zeros, and Roots

Nine Week SOL Time Allotment

Algebra Summer Review Packet

Why write proofs? Why not just test and repeat enough examples to confirm a theory?

1.2 The Role of Variables

Math Review. for the Quantitative Reasoning measure of the GRE General Test

Mathematics. Algebra II Curriculum Guide. Curriculum Guide Revised 2016

Topic 17. Analysis of Algorithms

PURE MATHEMATICS AM 27

An Introduction to Tropical Geometry

Using Algebra Fact Families to Solve Equations

Elementary and Intermediate Algebra

Mapping Australian Curriculum (AC) Mathematics and VELS Mathematics. Australian Curriculum (AC) Year 9 Year 10/10A

Give algebraic and numeric examples to support your answer. Which property is demonstrated when one combines like terms in an algebraic expression?

Introducing Proof 1. hsn.uk.net. Contents

1 Introduction. 2 Solving Linear Equations. Charlotte Teacher Institute, Modular Arithmetic

Direct Proof MAT231. Fall Transition to Higher Mathematics. MAT231 (Transition to Higher Math) Direct Proof Fall / 24

Correlation: California State Curriculum Standards of Mathematics for Grade 6 SUCCESS IN MATH: BASIC ALGEBRA

300-Level Math Courses

COLLEGE ALGEBRA. Properties of Real Numbers with Clock Arithmetic

Algebra 1, Quarter 2, Unit 2.1. Linear Functions. Overview

OKLAHOMA SUBJECT AREA TESTS (OSAT )

1.1.1 Algebraic Operations

Prealgebra. Edition 5

Mathematics. Differentiation. Applying the Differentiation of Trigonometric Functions

Proofs. Chapter 2 P P Q Q

Vector Spaces. Chapter 1

Give students a few minutes to reflect on Exercise 1. Then ask students to share their initial reactions and thoughts in answering the questions.

Algebra I. Course Outline

Algebra 2 and Mathematics 3 Critical Areas of Focus

Course: Algebra 1-A Direct link to this page:

CURRICULUM CATALOG. Algebra II (3135) VA

PURE MATHEMATICS Unit 1

3 The language of proof

Checkpoint Questions Due Monday, October 1 at 2:15 PM Remaining Questions Due Friday, October 5 at 2:15 PM

COMPUTER ARITHMETIC. 13/05/2010 cryptography - math background pp. 1 / 162

UNIT 10 NUMBER SYSTEMS, NUMBER THEORY, EXPONENTS AND LOGARITHMS

Intermediate Algebra

Algebra 1 Prince William County Schools Pacing Guide (Crosswalk)

A Generalization of Wilson s Theorem

This is logically equivalent to the conjunction of the positive assertion Minimal Arithmetic and Representability

Answer the following questions: Q1: ( 15 points) : A) Choose the correct answer of the following questions: نموذج اإلجابة

PURE MATHEMATICS AM 27

San Jose Unified School District. Algebra 2 Pacing Calendar

All rights reserved. Reproduction of these materials for instructional purposes in public school classrooms in Virginia is permitted.

Quadratics and Other Polynomials

Mathematical Induction

B Elements of Complex Analysis

Algebra 2 Secondary Mathematics Instructional Guide

6.5 Dividing Polynomials

and Transitional Comprehensive Curriculum. Algebra I Part 2 Unit 7: Polynomials and Factoring

Grades Algebra 1. Polynomial Arithmetic Equations and Identities Quadratics. By Henri Picciotto. 395 Main Street Rowley, MA

Math 3 Unit 5: Polynomial and Rational Representations and Modeling

1. Prove that the number cannot be represented as a 2 +3b 2 for any integers a and b. (Hint: Consider the remainder mod 3).

LIVE Online Math Algebra Scope and Sequence

ALGEBRA II CURRICULUM MAP

Algebra II Syllabus CHS Mathematics Department

Vance County Schools NC MATH Pacing Guide

Algebra II Standards of Learning Curriculum Guide

SHOW ALL YOUR WORK IN A NEAT AND ORGANIZED FASHION

On the learning of algebra

Chapter 2 - Relations

1 Numbers. exponential functions, such as x 7! a x ; where a; x 2 R; trigonometric functions, such as x 7! sin x; where x 2 R; ffiffi x ; where x 0:

Discrete Mathematics. Kishore Kothapalli

MATH 115 Concepts in Mathematics

8 Appendix: Polynomial Rings

Algebra II. Math Curriculum Guide

INFINITE SEQUENCES AND SERIES

Fairfield Public Schools

1.1 Simple functions and equations Polynomials and polynomial equations

1 Introduction. 2 Solving Linear Equations

WUCT121. Discrete Mathematics. Numbers

A MODEL-THEORETIC PROOF OF HILBERT S NULLSTELLENSATZ

GRE Quantitative Reasoning Practice Questions

Definition For a set F, a polynomial over F with variable x is of the form

ALGEBRA CLAST MATHEMATICS COMPETENCIES

Patterns & A Relations/Functions based approach to Algebra

Automata Theory and Formal Grammars: Lecture 1


Provide Computational Solutions to Power Engineering Problems SAMPLE. Learner Guide. Version 3

* 8 Groups, with Appendix containing Rings and Fields.

1. Revision Description Reflect and Review Teasers Answers Recall of Rational Numbers:

Notes for Science and Engineering Foundation Discrete Mathematics

CURRICULUM CATALOG. Algebra I (2052) WA

042 ADDITIONAL MATHEMATICS (For School Candidates)

1. Introduction to commutative rings and fields

Practice Test III, Math 314, Spring 2016

Fall 2017 September 20, Written Homework 02

Analysis of California Mathematics standards to Common Core standards Algebra I

2 Lecture 2: Logical statements and proof by contradiction Lecture 10: More on Permutations, Group Homomorphisms 31

1. Introduction to commutative rings and fields

Transcription:

THE USE OF APL IN TEACH ING Dr. K. E. Iverson I.B.M. Scientific Centre, P.O. Box 28, Yorktown Heights, New York, 0598, U.S.A. Abstract: A new approach to teaching algebra using the formal notation of A.P.L. is discussed. Students are introduced to ideas by means of examples, and are encouraged to investigate by themselves. Rapporteurs: Mr. T. Anderson Mr. J. C. Knight 63

I'

main points. Dr. lverson began by saying that he intended to illustrate three. An approach to introducing notation. 2. Some characteristics of the APL language. 3. A style of use of computers in teaching. An approach to introducing notation The use of computers in teaching appears to fall into two distinct categories.. CAI which is generally programmed instruction, e.g. Coursewriter, and may be regarded as drill. 2. Unrestricted use, where a student considers the computer as a tool to help solve his problems. Teaching courses u sing computers generally degenerate to teaching programming or problem solving, losing sight of their original curriculum because of the difficulty of programming languages. It is interesting to note that there are no courses in mathematical notation, this is merely introduced as needed i n conjunction with the concept being discussed. This seems to be the "ideal way of teaching with computers. introduce some topic, and a well-designed language would not be an obstruction. A careful use is to be made of a formal notation which can b e run on the computer, an advantage which ordinary mathematical notation does not have. Characteristics of the APL language There are three initial concepts to establish. language can be introduced as needed. and they are:. Writing an expression. We Thereafter, the These concepts are straightforward ( 3 +4 )x(5+ G) 77 2. Assigning a nam e to the result of an expression. Y Y+3+4 may now be used in any expression. 4 9 65

3. Assigning a name to an expression \j'tj-+-f X [lj Z+(X-3)x(X-5)V F may now be used to evaluate the above expression for any value of X 8 F 7 A style of use of computers in teaching The behaviour of }' can be explored for a set of values,2,3, etc.: F 2 3 If S 6 7 3 o o 3 This shows the mapping concept of a function and introduces the student to the concept of vectors, which may also be given names. tors. (j 3 $ <- ;> J 4 5 G 7 P S o o 3 B Tables are a useful aid to the exploration of elementary opera Thus we have /t:+ i..j O. -s M 0 0 :< 3 2 If 3 5 4 G 5 2 3 4 2 3 0 2 U 2 0 3 2 4 J 2 5 6 4 5 3 If 2 3 2 0 0 a subtraction table which has been given a name. Such a table may be used to demonstrate the concept of commutativity by comparing its transpose with itself U=Q;; u 0 0 0 0 0 0 0 0 0 0 0 () 0 li 0 0 0 0 0 0 0 lj 0 0 li 0 0 0 0 0 0 0 0 CJ lj 0 U 0 0 0 0 The table shows that the operation of subtraction.does not commute. N.B. The use of the integers 0 and for logical results enables their use in further arithmetic operations. 66

APL enables commutativity to be investigated easily for many other less familiar operators, e.g. O+Q<-S o. r s '2 3 'I " 6 'I '2 '2 3 4 S (j 7 3 J 3 ' c L 'I I, " 4 'I 'I 5 G -, 5 " 5 c 5 L 7 " G 6 6 L U G 7 7 7? 7 'I 7 "I 0. =< 0. L Similarly set closure may be demonstrated (not 2roven) for various operators, using the set membership operator. QE;; It is easily seen that multiplication is not closed for finite sets. ( :'; 0. XS)Ef.;' 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 The above has dealt with expression evaluation. Equations and their roots can also be tackled with the APL notation and approach. Using the function F previously defined and the vector :; it is possible to look for the zeros of F, O=F ;; o 0 0 00 67

or indeed, more general values of F may be explored. R+!3 7 6 5 4 3 2 0 Ro. =F 5' '" 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ' 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 G This table gives a rough graph, in fact an incidence matrix. A more pleasing graph is obtained by using the character handling facilities of the notation., *'[ l +R o.=l' S ] * * f ' * * * * * Any useful technique such as this may be defined as a function. 'VZ + Gl I! [ ) g+' *'[l+h)'v The study of algebraic relations tends to be dull in conventional texts but by using arrays students can see relations as patterns. This i s an important and useful teaching aid. I S o. ~:';' 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Th e execution of a function which u se s iteration to compute its result can be followed by means of the APL trace facility. 68

6 <-'( G Y [l J ;; <-X [2 J X<-,(IY [3J Y<- Z [4J +X,,- Oll 2' n G<- '). 3 G[ LJ G[3 J G[L] G[3J G[ L] G[3] G[L] G[3J G[ 2 ] G[3j 6 ',U G 7 U 3 0 l, U 8 30 2 ~ G 2 o G N.B. Branching is introduced with the minimum of new notation and uses the arithmetic capabilities already specified. Evaluation of an APL expression proceeds from right to left. This is equivalent to the structuring of sentences in English and results in the expressions being easy to read from left to right -- compare mathematicians f(g(h(x))). Also we gain the useful features - IX, which is the alternating sum, and fi X. which is the alternating product. Professor Page raised the question of execution times and efficiency of programs and asked Dr. Iverson to comment. Dr. Iverson suggested that efficiency at th.e level of individual instructions has been overstressed, and that overall efficiency is of greater importance. APL facilitates obtaining overall efficiency by its communicability and compactness. Professor Page recalled Professor Knuth's comment that in some programs just a small percentage of the code is executed for a very large amount of the time and hence needs to be efficient. Dr. Iverson agreed and said that once the algorithm and system have been developed the parts which have to be efficient can be reprogrammed by someone with expert knowledge. determined easily. APL enables these critical areas to be 69

Professor Wirth pointed out that if one knows exactly how a machine works and represents its data then frequently one completely r e designs an algorithm to take account of this. Dr. Iverson agreed but said that in general this level of detail is not necessary. sidered. When it is, then of course it must be con- Professor Perlis commented that neat looking one line APL programs using the power of the notation may not use the best method of computation. He cited an example. When the best method is used the APL becomes inelegant. Dr. Iverson disagreed and claimed that the example could have been written efficiently and elegantly using different APL features. An example of APL use is in finding the depth of nesting in a parenthesised expression. E +'«3+X)x(Y- Q ))*«Y ~Q )-)' 222222200 2222 0 This may be done as follows:, ( '= E 000 0 0 o o o 0 o o 0 o 0 o U 0 0 o, ), =E o 0 0 0 0 o o o o o 0 o 0 '()'o. =/i: o 0 0 0 000 00 000 0 0 0 000 000 0 o 000 0 0 0 0 0 0 000 0 0 0 00 -l+. x '()'o.= E 000 0 o o o o o o o o 0 + \ -l+. x '()'o.= E 2 L 22 2 2 2 o o 2 2 2 2 and this expression can be defined as a function. Professor Randell asked whether the young students being taught by this system would display such ability in solving this nesting problem. Dr. Iverson said that it was his experience that they did and have no difficulty with array manipulation when it is introduced this way. 70

Furt her examp l es wer e gi ven covering Polish notation, Statistics, Geometry and the method of f alse posi t i on for sol ving equations. Returning to t h e t eaching aspect, " hen children are taught natural language this i s done i n t he order -- meani ng, correct structure and finally equivalence, i. e. cons iderations of style. Unfortunately, this last topic i s dealt with first when teaching algebra and programming languages. It would be bes t left until a familiarit y with the f eatures of the language has been ga i ned and should be done at an el ementary level such as observing patterns. In line with this the concept of the power function may be introduced numerically, rather than by its formal definition. S+,7 <. " 2 3 4 6 7 2 * :'; 2 4 8 6 32 5 4 28 and the student can see how this extends to the right ' 2*.J', u 9 0 2 Li 8 6 32 6 4 2 8 256 5 2 02 4 and by the same rule, to the left - 2* 2 0, 5,8 9 0 O. 25 0.5 2 4 8 6 32 b If 28 256 5:L 024 Using the previously described graphing capability it i s po ssi ble to introduce the notion of linear equations and their solutions. To construct methods for determining prime numbers their properties can be investigated. Clearly the property of being prime has something to do with divisibility, so a table of remainders is calculated. D+ 2 S o. IS 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 G 2 0 2 0 2 0 L 0 2 3 0 2 3 0 L 3 0 2 3 4 0 2 3 Li 0 2 2 3 4 5 0 2 3 If 5 0 2 3 4 5 6 0 2 3 ' I 5 2 3 If 5 6 7 0 -;, 3 Ij 2 3 4 5 6 7 e 0 2 3 2 3 'I 5 6 7 8 ~ 0 L 2 3 4 5 6 7 8 ~ 0 0 L 3 'I 5 G 7 8 9 0 0 7

The real concern is with divisibility, i.e. a remainder of zero. 0=5 0. 5 ::::: column number. 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 The columns of this table indicate which numbers divide the A prime is recognised as having exactly two distinct divisors and this is determined by equating the column sums to two. 2= +/[ JO =.5' 0. Is 0 0 0 0 0 0 0 Compressing this over S gives the primes in S ( 2 =+/[] 0 =5' 0. 5 )/5 2 3 5 7 Another way of looking at primes is that they have something to do with multiplication. 5++ - 5' o. x5 Therefore, construct a multiplication table 4. 6 8 0 2 4 6 8 20 22 24 6 9 2 5 0 2 24 27 30 33 36 8 2 6 20 24 28 32 36 40 44 48 0 5 20 25 30 35 40 45 50 55 60 2 8 24 30 36 42 48 54 60 66 72 4 2 28 35 42 49 56 6 3 70 77 04 6 24 32 4 0 48 56 64 72 80 80 96 8 27 36 45 5 4 63 72 8 90 99 00 20 30 40 50 60 70 00 90 00 0 20 22 33 44 55 66 77 00 99 0 2 32 24 36 4 8 60 72 84 96 00 20 32 44 The primes are those numbers which do not occur in this table (-5.50. x5)/5 2 3 5 7 The sieve of Eratosthenes can be programmed very efficiently (both in space and execution time) as an iterative APL program. 72

Similarly, polynomials may be considered and their multiplicat ion and differentiation studied. This can be extended quite easily to the consideration of infinite series -- exponential, logarithmic, etc. In conclusion, it can be said that children find this approach helpful s ince they can be given concrete examples of the notions t hey are being taught. Additionally, they can experiment and investigate for themselves. 73