Download Day 8 – Algorithms for Whole Number Addition

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts

Location arithmetic wikipedia , lookup

Algorithm characterizations wikipedia , lookup

Factorization of polynomials over finite fields wikipedia , lookup

Transcript
Section 3.2 – Algorithms for Whole Number Addition
Up to this point, we have been able to perform whole number operations simply by counting the number of items.
Counting the number of items works well when the cardinality of the sets is small in value. When the number of items
contained in the sets becomes quite large, we need an efficient algorithm to aid in the computation.
Review the definition for addition of whole numbers. Let A and B be two disjoint finite sets such that n(A) = a and n(B) = b,
then a + b = n(A  B).
Definition. An algorithm is a step by step procedure that is used to attain a particular goal.
Algorithms for Addition of Whole Numbers.
1.
Whole-group Algorithm.
The procedure is to add each column separately, then perform the necessary exchanges.
4 3 7
3 6 8
6 9 3
+ 5 2 1
+ 4 2 5
+ 4 5 8
9 5 8
7 8 13
10 14 11
7 9 3
11 15
1 1 5 1
2.
Expanded Notation Algorithm.
Write the number in expanded notation and then perform the operations.
437 = 400 + 30 + 7
368 = 300 + 60 + 8
693 = 600 + 90 + 3
+ 521 = 500 + 20 + 1
+ 425 = 400 + 20 + 5
+ 458 = 400 + 50 + 8
900 + 50 + 8
700 + 80 + 13
1000 + 140 + 11
= 958
= 700 + 80 + 10 + 3
= 1000 + 100 + 40 + 10 + 1
= 700 + 90 + 3
= 1000 + 100 + 50 + 1
= 793
= 1151
3.
Partial Sums Algorithm (Intermediate Algorithm)
One column is combined and exchanges completed before another column is added.
Note. With this algorithm it does not matter which column is completed first; i.e. the columns may be added in any
order.
4 3 7
3 6 8
6 9 3
+ 5 2 1
+ 4 2 5
+ 4 5 8
8
8 0
1 0 0 0
5 0
1 3
1 4 0
9 0 0
7 0 0
1 1
9 5 8
7 9 3
1 1 5 1
4.
Standard Addition Algorithm.
Similar to the partial sums algorithm, except a person must begin with the right-hand column and proceed to the left
one column at a time. The exchange is recorded at the top of the next column.
4 3 7
1
1
1
+ 5 2 1
3 6 8
6 9 3
9 5 8
+ 4 2 5
+ 4 5 8
7 9 3
1 1 5 1
5.
Lattice Addition Algorithm
This is basically the whole-group algorithm recorded in a different format.
3 6 8
6 9 3
4 3 7
+
4
2
5
+
4 5 8
+ 5 2 1
0
0
1
1 1
1
0 0 0
7 8 3
0 4 1
9 5 8
7 9 3
1 1 5 1
9 5 8
Homework and Practice Exercises
1.
Use each of the five algorithms to find the sum for each exercise:
whole-group, expanded notation, partial sums, standard, and lattice.
(a)
2.
37
+69
(b) 784
+46
(d)
548
+736
(e)
8076
9704
357
+4210
(b) base four
2301
+3123
(c) base five
2403
+2423
(d) base six
3524
+1453
(e) base eight
5727
+6754
Examine each problem carefully and determine the base that was used to work the problem.
(a)
4.
2058
+6583
Use each of the four algorithms to find the sum for each exercise in the indicated base:
whole-group, partial sums, standard, and lattice.
(a) base three
1201
+2112
3.
(c)
32
+24
111
(b)
4571
+2457
7250
(c)
2134
1425
+2221
10224
(d)
2131
+4233
11414
(e)
4263
3543
+2455
11372
Correct each student’s quiz. Identify any errors that have occurred. If a student has made an error, state whether or not
the errors are consistent with the student’s work on other problems. Also, describe how the student is solving the
problems and state why the student’s work may seem reasonable to that student.
Rodney
(a)
3
8
1
1
8
9
4
3
7
(b)
+
1
Matilda
(a)
+
1
3
8
1
1
8
9
4
3
7
(b)
Maeling
(a)
+
1
3
8
1
1
8
9
4
3
7
(b)
3
8
1
1
8
9
4
3
7
(b)
Tyrone
(a)
+
1
+
9
+
+
1
+
7
2
8
2
6
1
6
7
3
(c)
7
2
9
2
6
8
6
7
3
(c)
9
3
2
2
8
0
9
3
2
(d)
+
1
+
1
2
8
2
9
3
1
2
8
0
1
1
9
3
0
2
2
(c)
1
3
7
2
0
2
6
1
6
7
1
7
2
9
2
6
8
1
9
6
7
0
3
3
9
1
2
8
1
(d)
+
0
+
1
1
+
(d)
2
(c)
+
6
4
2
1
6
8
4
5
3
8
4
2
6
6
8
4
5
3
8
4
2
0
6
8
1
5
3
8
4
2
6
1
7
6
8
0
4
4
5
3
0
8
8
4
+
1
(d)
+
Note that an incorrect method will often give correct solutions on some problems. This is the reason
a teacher needs to ask a variety of types of questions.
Examples of Language of the Blocks in Base Four Addition
Whole-Group Algorithm
LB
+
1
B
2
1
3
10
0
F
1
3
10
11
1
L
3
3
12
13
3
U
3
2
11
1
(First, we must translate the problem into the language of the blocks.)
I take out base four blocks and a place-value card. On the top row of the place-value card, I will put out 2 blocks, 1 flat, 3
longs, and 3 units. On the second row of the place-value card, I will put out 1 block, 3 flats, 3 longs, and 2 units.
(Now translate the plus sign.)
I am trying to find out, how much wood I have altogether on the place-value card. I am going to move all the blocks
straight down to the bottom row of the card. On the bottom row of my card, I now have 3 blocks, 10 flats, 12 longs, and
11 units.
(Next, play the exchange game.)
I must play the exchange game. I exchange four units for 1 long that gives me 13 longs leaving me with 1 unit. I
exchange four longs for 1 flat that gives me 11 flats leaving me with 3 units. I exchange four flats for 1 block that gives
me 10 blocks leaving me with 1 flat. I exchange four blocks for 1 long block that gives me 1 long block leaving me with
no blocks.
(Summarize)
The long block cannot be exchanged for a flat block, so on the bottom row of my place-value card, I now have 1 long
block, no blocks, 1 flat, 3 longs, and 1 unit.
Standard Addition Algorithm
LB
1
+
1
B
1
2
1
0
F
1
1
3
1
L
1
3
3
3
U
3
2
1
(First, we must translate the problem into the language of the blocks.)
I take out base four blocks and a place-value card. On the top row of the place-value card, I will put out 2 blocks, 1 flat, 3
longs, and 3 units. On the second row of the place-value card, I will put out 1 block, 3 flats, 3 longs, and 2 units.
(Now translate the plus sign.)
I am trying to find out, how much wood I have altogether on the place-value card.
(Next, combine the columns and play the exchange game.)
I bring all the units straight down to the bottom of the card. I exchange four units for 1 long; I place the 1 long at the top
of the longs column leaving me with 1 unit. I bring all the longs straight down to the bottom of the card. I exchange four
longs for 1 flat; I place the 1 flat at the top of the flats column leaving me with 3 longs. I bring all the flats straight down
to the bottom of the card. I exchange four flats for 1 block; I place the 1 block at the top of the blocks column leaving me
with 1 flat. I bring all the blocks straight down to the bottom of the card. I exchange four blocks for 1 long block; I place
the 1 long block at the top of the long block column leaving me with no blocks. I bring all the long blocks straight down
to the bottom of the card.
(Summarize)
The long block cannot be exchanged for a flat block, so on the bottom row of my place-value card, I now have 1 long
block, no blocks, 1 flat, 3 longs, and 1 unit.
Base Four – Addition of Whole Numbers
Directions. Use the base four multibase blocks to complete the following problems using the indicated algorithm. Complete
a step physically and state verbally, then record the results of the step before proceeding to the next step.
Whole-group Algorithm
2
+ 1
1
1
0
2
2
1
+
1
1
3
2
2
2
1
3
+
3
2
1
Standard Addition Algorithm Repeat the above three problems.
More Practice. Make up several problems and complete using each of the above two algorithms.
2
3
0
0
1
3
3
3
1
Base Five – Addition of Whole Numbers
Directions. Use the base five multibase blocks to complete the following problems using the indicated algorithm. Complete
a step physically and state verbally, then record the results of the step before proceeding to the next step.
Whole-group Algorithm
2
+ 1
1
1
0
2
2
1
+
1
1
4
2
2
3
1
4
+
4
2
1
Standard Addition Algorithm Repeat the above three problems.
More Practice. Make up several problems and complete using each of the above two algorithms.
2
4
0
0
2
3
4
3
1
Base Six – Addition of Whole Numbers
Directions. Use the base six multibase blocks to complete the following problems using the indicated algorithm. Complete a
step physically and state verbally, then record the results of the step before proceeding to the next step.
Whole-group Algorithm
2
+ 1
1
1
0
2
2
1
+
1
1
5
2
3
3
1
5
+
5
2
1
Standard Addition Algorithm Repeat the above three problems.
More Practice. Make up several problems and complete using each of the above two algorithms.
3
4
0
0
1
5
4
4
1