Today I subbed in my old district -- believe it or not. Thus it really is Day 23 in this district. (In my new district, today is Day 15.)
It's a special ed class -- in fact, it's for the exact same teacher whose class I covered the last time I subbed in this district -- which was May 18th. Thus you can refer back to my May 18th post in order to recall some information about this class. Again, I won't bother to do a "Day in the Life" for this special ed class (since I didn't do one for May 18th either).
Notice that May 18th was a Friday, while today is Monday. This school has a block schedule, with all classes on Fridays (which are also late days) so that the schedule aligns with days of the week. Then Mondays become odd period days. Thus first, third, and fifth periods meet today.
Also, this is a new school year, so the teacher's schedule is slightly different -- though many of the special ed students are the same as last year. But like last year, first period is observing (co-teaching) Algebra I -- which marks only the second time I've been in a math class in this district (with the first being observing this same class in May)!
And as it turns out, the resident teacher for this class is also out with a sub. He informs me that he's not a math teacher, and so I help out with the math while he takes attendance, passes out the worksheets, and collects them. The worksheets are labeled as Lessons 2-1 and 2-2 -- but recall that this text isn't exactly the same as the Glencoe text. In particular, Chapter 2 of Glencoe is on solving equations while second chapter of this text is on inequalities.
One student in particular struggles with graphing simple inequalities and converting English sentences into inequalities. I believe that I'm able to help him understand the material better. One of the questions ask the student to set up the inequality for "For an upcoming marathon, the qualifying time for males age 18-34 is three hours." I inform him that yesterday, a world record was set in the marathon -- 2:01:39, set by Eliud Kipchoge of Kenya. (By the way, another world record was also set yesterday -- Kevin Mayer of France scored 9,126 points in the decathlon.)
In this class, I see vertical non-permanent surfaces (VNPS) -- three small whiteboards are mounted on the walls. But I suspect that the whiteboards are for fifth period AVID meetings, not math class -- though more often than not, the subject the AVID tutors help the students out with is math. (Some math problems are still written on each VNPS.) The students also have Interactive Notebooks in which to cut and paste their notes.
The other two blocks are both Academic Enrichment. Another teacher is supposed to come in for a special 30-minute lesson, but she doesn't show. So instead, the classes just study independently for the entire time. A special aide is there -- she keeps the students working the whole block. I help out any students who are working on math.
One senior is enrolled in Algebra II -- yes, it's a rarity when a special ed student makes it that far. And most of the other students are enrolled in an Algebra I class spread out to two years. The senior is working on graphing parabolas in vertex form. He must also identify the transformations to obtain each parabola starting from the parent function y = x^2.
In some ways, it might have been more logical for me to sub for the actual math teacher while the other non-math sub covered my Academic Enrichment. But actually, on odd days it makes little difference, since the math teacher has third period conference and fifth period AVID. If today had been an even block day, then yes -- I really should have been assigned the math class.
As far as classroom management is concerned, I notice that the non-math sub -- since the math teacher doesn't leave a seating chart -- takes attendance by writing each student's name on a little makeshift chart of his own. This is a lot of work, but he must think it's worth it -- the chart helps him manage the class better. Thus I decide to do the same in the Academic Enrichment classes -- great classes to try it out in, since they're small special ed classes with about ten students each. I also notice that my regular teacher writes each name on the board along with the subject (math, English, etc.) the student claims to be working on during the entire block, so this fits with my list of names.
Good news -- my copy of Eugenia Cheng's newest book indeed arrived over the weekend. And so let's start our side-along reading! (This is another reason why I didn't make Ruth Parker's Number Talks the side-along reading book -- I'd already known by then that Cheng's book was forthcoming!)
By the way, many traditionalists might not like what Cheng has to say in her book. And as I warned earlier, she also gets into politics -- including race -- as well. I've said in the past that I avoid race and politics in school-year posts unless the "traditionalists" label appears. Today, I'll extend that to the "Eugenia Cheng" label as well. Traditionalists who prefer to skip these controversial subjects should avoid all "Eugenia Cheng"-labeled posts -- and stay away from this blog for the next three weeks.
When we read her first two books, I skipped around and covered only some chapters. My goal this time is to discuss her entire book during the three-week library loan period. So let's dive right in:
Chapter 1 of Eugenia Cheng's The Art of Logic in an Illogical World is called "Why Logic?" It's the first chapter of Part I, "The Power of Logic." Here's how it begins:
"The world is a vast and complicated place. If we want to understand it we need to simplify it. There are two ways to make something simpler -- we can forget parts of it, or we can become cleverer so that things that used to seem incomprehensible become clear to us."
Cheng tells us that logic involves both aspects of making something simpler. She continues:
"Anyone can make claims about what they think is true, but unless they back up their claims in some way, maybe no one will believe them, and rightly so. So different subjects have different ways of accessing truth."
But she points out that many people believe their arguments are logical when they really aren't:
"Instead of simply lamenting the misunderstanding of logic and mathematics, I choose to address it, in the hope that their power might actually be used to good purpose. That's why I've written this book."
The author explains that logic establishes clear rules so that the same conclusions can be arrived at by different people:
"This is wonderful in theory, and perhaps here 'in theory' means in the abstract world of mathematics. Mathematics has a remarkable ability to make progress."
She tells us that its logical grounding is the reason that, while science is always being updated, math remains a constant. The Pythagorean Theorem is just as valid now as it was when the ancient Greek mathematician first devised it:
"We are going to show that accessing the logical abstract world enables us to get further in the real world, just as flying through the sky enables us to travel further and faster in real life. In essence, this is the whole point of mathematics."
First, Cheng seeks to define what math is -- and isn't. Her ideas here echo the big traditionalists' debate that has heated up in recent weeks. This example hits home, since it's a Geometry example:
"Show that angle A is half of angle B."
The diagram shows a bunch of lines drawn at random, with two angles marked A and B. The author warns -- or reassures -- us that this example is a spoof and can't be solved. She tells us that math is:
"Not a series of hoops to jump through, not an attempt to get the 'right answer,' but a world to explore, discover and understand: the logical world. At this point some people realize that the thing they liked about 'math' up until then was jumping through hoops and getting the right answer."
And those people are called "traditionalists." Anyway, here is Cheng's definition of mathematics:
"Mathematics is the logical study of how logical things work."
Anyway, logic has rules, just as sports have rules:
"One problem with logic, as with sport, is that the rules can be baffling if you're not very used to them. I am pretty baffled by the rules of American football."
And Cheng points out that her being British has nothing to do with it -- she's confused by the rules of soccer as well.
Similarly, many people are confused by the rules of logic. Part of the confusion has to do with the meaning of the word "theory":
"In science, a 'theory' is an explanation that is rigorously tested according to a clear framework, and deemed to be statistically highly likely to be correct. In mathematics, though, a 'theory' is a set of results that has been proved to be true according to logic."
While math is all about certainty, the real world is uncertain:
"Some of the disagreement around arguments in real life is unavoidable, as it stems from genuine uncertainty about the world. But some of the disagreement is avoidable, and we can avoid it by using logic."
And indeed, the real world isn't completely logical. Cheng gives a real-world example:
"If you give a child a cookie and another cookie, how many cookies will they have? Possibly none, as they will have eaten them."
(Yes, it's only Chapter 1 and Cheng has already mentioned her favorite example -- baked foods.) Now she compares this to the world of the abstract:
"If I add one and one under exactly the same conditions in the abstract world repeatedly, I will always get 2. (I can change the conditions and get the answer as something else instead, but then I'll always get the same answer with those new conditions too.)
The author tells us that math is all about searching for the similarities between different things:
"When we look for similarities between things we often have to discard more and more layers of outer details, until we get to the deep structures that are holding things together. This is just like the fact that we humans don't look extremely alike on the surface, but if we strip ourselves all the way down to our skeletons we are all pretty much the same."
In her next example, Cheng writes about the newly painted green lines near subway tracks in London:
"The aim was to try and improve the flow of people and reduce the terrible congestion, especially during the rush hour. This sounds like a good idea to me, but it was met with outcry from some regular commuters."
And this is because they liked the "competitive edge" they'd gained from knowing exactly where to stand so that the doors opened right in front of them. Now those green lines gave away their secrets!
Here's the first of many references to politics and race in Cheng's book:
"This complaint was met with ridicule in return, but I thought it gave an interesting insight into one of the thorny aspects of affirmative actions: if we give particular help to some previously disadvantaged people, then some of the people who don't get help are likely to feel hard done by."
Cheng tells us that logic is all about the inherent, not the coincidental:
"The inherentness means that we should not have to rely on context to understand something. We will see that our normal use of language depends on context all the time, as the same words can mean different things in different contexts, just as 'quite' can mean 'very' or 'not much.'"
Because of this, if we start with ambiguous concepts, we end up with ambiguous results:
"We can use extremely secure building techniques, but if we use bricks made of polystyrene we'll never get a very strong building. However, understanding mathematical logic helps us understand ambiguity and disagreement."
At this point Cheng summarizes the contents of her third book:
"In the first part of this book we are examining what logic is as a discipline for building arguments, and as a piece of mathematics. In the second part we'll see what the limitations of logic are. And in the third part we'll see how important it is, given those limitations, to take our emotions seriously."
But the English language contains many ambiguities -- after all, it's being spoken by humans, not the super-logical Vulcans of Star Trek:
"As adults we develop the ability to become more relaxed about figurative language, and more relaxed about how precise we need things to be in order to get on with our lives. This is a bit like how accurately you need to measure things."
(And here comes Cheng's second baking example already!) The author tells us how she can be a little off in measuring sugar to bake a cake, but when she's making macaroons she must be more precise.
In conclusion, Cheng tells us that the purpose of logic is to shine a light on something:
"In all cases the aim should be illumination of some kind. First we need some light, and then we can decide where, and how, to shine it."
It's perhaps fitting that our reading of Cheng's book on logic lines up with Chapters 2 and 3 of the U of Chicago text. After all, these chapters focus on the logical foundation of Geometry. (In my old Second Edition, Chapter 13 also contains some logic, but in the modern Third Edition, much of the logic from Chapter 13 has been moved to Chapters 2-3.)
Lesson 2-3 of the U of Chicago text is called "If-then Statements in Computer Programs." It does not appear in the modern Third Edition of the U of Chicago text, and we can see why when we look a little at what I wrote last year on the subject:
Lesson 2-3 of the U of Chicago text discusses computer programs written in BASIC. We must remind ourselves that this book was written over 20 years ago, back when BASIC was a popular language. But now, BASIC has been derided as "spaghetti code" and isn't as widely used anymore.
And so the Third Edition avoids this issue by leaving out this lesson entirely. Two years ago, I changed the lesson to use TI-BASIC, the language of the TI graphing calculator, instead. But today I have do access to something that runs BASIC programs -- the emulator of my old 1980's computer:
http://www.haplessgenius.com/mocha/
[2018 Update: Whereas human languages such as English are illogical, computer languages are supposed to be logical. Yet according to Cheng, even her computer doesn't always act logically.]
So for today, I'll post the old TI-BASIC worksheets from last year. But I'm actually going to write about BASIC itself using the emulator.
Let's start by writing the four BASIC programs used in the U of Chicago text. All four of these programs run on the emulator:
Program #1: Number of Diagonals in Polygon
10 PRINT "COMPUTE NUMBER OF DIAGONALS IN POLYGON"
20 PRINT "ENTER THE NUMBER OF SIDES"
30 INPUT N
40 IF N>=3 THEN PRINT "THE NUMBER OF DIAGONALS IS "; N*(N-3)/2
50 END
Program #2: Inventory of Electro-Robots
10 PRINT "INVENTORY OF ELECTRO-ROBOTS"
15 PRINT "ENTER THE NUMBER OF ELECTRO-ROBOTS"
20 INPUT N
25 PRINT "PROFIT EQUALS";5*N-1500
30 IF N<300 THEN PRINT "ORDER MORE ELECTRO-ROBOTS."
35 END
Program #3: Area of Circle
10 INPUT R
20 LET A=3.14159*R*R
30 IF R>0 THEN PRINT R,A
40 END
Program #4: Diagonals in Many Polygons
10 PRINT "NUMBER OF DIAGONALS IN POLYGONS"
20 FOR N=3 TO 20
30 PRINT "THE NUMBER OF SIDES IS";N
40 PRINT "THE NUMBER OF DIAGONALS IS";N*(N-3)/2
50 NEXT N
60 END
All of these programs work on the emulator. Actually, my computer doesn't require the last line of the program to be END -- we could omit each of those final lines. Also, my computer doesn't require line 20 of Program #3 to begin with LET -- just 20 A=3.14159*R*R is sufficient. Don't forget to type in NEW to erase the old program before entering the new one.
Now let's write some programs of our own. Earlier when we were reading Ogilvy, there was mention of a GCD algorithm. Let's try to write it in BASIC.
The main problem here is that BASIC doesn't do long division with quotient and remainder -- instead it only does decimal division (or "floating-point division"). Remainders, as we see above, are critical to the algorithm. But it's possible -- though not easy -- to use floating-point division for remainders.
Let's go back to the example above -- the GCD of 30 and 108. We need the remainder of 108/30, but if we ask BASIC to find 108/30, it calculates it as 3.6. We need to convert 3.6 into a remainder.
The key function is the INT function. INT represents the ceiling function in mathematics (as in the greatest-integer function). So INT(3.6)=3. Well, this gives us the quotient, but we need the remainder.
Hmmm, the part that relates to the remainder is the fraction part. We can find this by subtracting the integer part from the original number: 3.6-INT(3.6)=.6. This fractional part is 18/30, so we must multiply it back by 30 to obtain the remainder -- 18.
Theoretically, this should work. The problem is that all this division produces rounding errors -- and such rounding can lead to incorrect answers. For example, let's go back to Program #3 that calculates the area of a circle. If we try entering a radius of 4 or 5, there is a rounding error that becomes obvious after trying a radius of 1, 2, or 3 first:
r Area (as given by emulator)
1 3.14159
2 12.56636
3 28.27431
4 50.2654401
5 78.5397501
That "01" at the end of the areas for 4 and 5 stick out like a sore thumb. And no, the "01" has nothing to do with using pi to more accuracy, since it would be 50.2654825 instead (and besides, we never gave the program those extra digits of pi).
The reason for the inaccuracy is that computers work in binary, not decimal. The decimal 3.14159 actually means 3+14159/100000, but fractions with a denominator of 100000 (or anything other than a power of two) can't be expressed exactly in binary. The difference between 3.14159 and whatever binary fraction the computer uses is small enough not to appear when multiplying by 4 or 9, but when we multiply by 16 or 25 it appears. This problem never occurs if we only use binary fractions such as .5, .125, and so on.
And this is just multiplication -- in division, we're even more likely to have rounding errors. We know that fractions like 1/3 trip us up in both decimal and binary. Here, we must multiply .6 by 30 to obtain our remainder 18, but .6 isn't a binary fraction. Therefore, we'll obtain something like 17.9999999 or 18.0000001 instead of 18 as the remainder. This will trip up the algorithm -- it's supposed to stop when the remainder is zero, but it'll never reach zero if we have 17.9999999 or 18.0000001.
Using INT will work if we have 18.0000001, but INT(17.9999999)=17 instead of the desired 18. To solve this problem, we implement 4/5 rounding by adding .5 to the number before taking INT. This works, since both INT(18.4999999) and INT(18.5000001) are equal to 18.
Here is our GCD program, written in BASIC:
10 PRINT "INPUT TWO NUMBERS"
20 INPUT A,B
30 IF B=0 THEN PRINT "THE GCD IS";A: END
40 Q=A/B
50 R=INT((Q-INT(Q))*B+.5)
60 A=B
70 B=R
80 GOTO 30
You may notice a few things about how this program is written:
-- The program doesn't end with END. In fact, END appears at the end of line 30, because we really want the program to end after printing the GCF rather than proceed to line 40.
-- LET is omitted, as my computer allows.
-- INPUT A,B allows us to enter both numbers using a comma.
-- The strange part is that the IF statement (which is the subject of Lesson 2-3) appears near the start of the program. Actually, most GCD programs are written this way, in order to safeguard against the user entering 0 as one of the numbers. The program ends before reaching line 40 and thus avoids division by zero.
-- After the division, if the remainder R=0, then the final answer is in B. But the values in B and R have moved to A and B before we reach the GOTO and IF statements. Therefore B is the value that we test for zero, and A contains the final answer.
Notice that in TI-BASIC, we have a fPart function that gives us the fractional part directly without needing int. To avoid rounding error, we use the round function -- 0 here means no decimal places (nearest integer):
PROGRAM:GCD
:Disp "2 NUMBERS"
:Input A
:Input B
:While B
:round(fPart(A/B)B,0)->R
:B->A
:R->B
:End
:A
In this program, both Goto and If are avoided because we used a While loop instead. The While loop does the testing -- the loop is executed while B is true (nonzero) and stops when it is false (0). Here the word End ends the While loop, not the program.
In other languages, such as C++, there is a % operator that gives us remainder directly. Here is how we'd write the gcd function:
int gcd(int a, int b) {return b ? gcd(b, a%b) : a;}
Here we replaced "if" with the ternary operator ?: -- it means "If b is true (nonzero), then recursively call gcd on b and a%b (the remainder), else the answer is a."
OK, let's get back to BASIC. It's a shame that I didn't stumble onto the emulator back when I was writing about music over the summer on the Pappas music pages. Now that I have the emulator, I can't help but try to play microtonal music using the SOUND command in BASIC.
In an earlier post, we discovered that the most important number when making music using SOUND on the computer is 261. As it turns out, SOUND is based on EDL, or equal divisions of length, where the length of the string is the number of steps it takes to get to 261, the "bridge." For example, Sound 61 is 200 steps away from the bridge, while Sound 161 is 100 steps away from the bridge. Thus the interval between Sounds 61 and 161 is 200/100 or 2/1, which is an octave. (To make it easier to understand, the word "Sound" refers to the actual number used in the SOUND command, while "Degree" refers to the number of steps from away from Bridge 261.)
[2018 Update: Obviously, last year I used today's BASIC post as an excuse to go back to Mocha music written in BASIC. Since then I've written too many Mocha music posts. So let me cut most of this out except for the part that actually relevant to today's lesson -- using the IF command.]
10 INPUT "EDO";N
20 DIM R(N), D(N)
30 FOR S=0 TO N
40 R(S)=2^(S/N)
50 NEXT S
60 M=N
70 FOR L=12 TO 260 STEP 2
80 PRINT "TESTING EDL";L
90 E=0
100 FOR S=0 TO N
110 D=L/R(S)
120 E=E+ABS(D-INT(D+.5))
130 NEXT S
140 IF E>=M THEN 190
150 FOR S=0 TO N
160 D(S)=INT(L/R(S)+.5)
170 NEXT S
180 M=E
190 NEXT L
200 CLS
210 PRINT "PLAYING SCALE"
220 FOR S=0 TO N
230 PRINT "DEGREE";D(S);"SOUND";261-D(S)
240 SOUND 261-D(S),4
250 NEXT S
261 END
(Note: Line 40 requires an up-arrow where you see the ^ caret.)
Here's how the program works -- the user inputs the desired EDO in line 10. Lines 30-50 set up the correct ratios for your EDO -- so if you choose 12EDO, then the ratios are 2^(0/12), 2^(1/12), 2^(2/12), all the way up to 2^(12/12).
Lines 70-190 set up a loop to test every EDL, from the shortest (12EDL) to the longest (260EDL). It calculates the error E between the correct ratio and closest possible degree available (notice how INT(D+.5) is used to round D to the nearest degree). The IF statement in line 140 is used to see whether E is less than the minimum error M encountered so far. If E>=M, then we skip to line 190 and check the next EDL. If E<M, then we have a new "best EDL so far," and lines 150-170 set up a loop to replace the list of "degrees of the best EDL so far" with the new list.
Afterwards, the final loop from lines 220-250 actually play the best scale on the computer. (Don't forget to click the "Sound" box in order to hear the sound!) I decided to make the length 4 because just as the magic number for pitch is 261, the magic number for duration is 32 (whole note). As today's the start of the second quaver, let's make it play quavers, so 32/8 = 4. The final END line isn't needed, but I include it just as an excuse to honor Bridge 261 with a line 261.
Here are the best possible scales the computer found for some EDO's:
5EDO: use 256EDL (Degrees 256, 223, 194, 169, 147, 128 -- Sounds 5, 38, 67, 92, 114, 133)
7EDO: use 156EDL (Degrees 156, 141, 128, 116, 105, 95, 86, 78)
10EDO: use 256EDL (add Degrees 239, 208, 181, 158, 137 in between 5EDO)
12EDO: use 232EDL (Degrees 232, 219, 207, 195, 184, 174, 164, 155, 146, 138, 130, 123, 116)
16EDO: use 214EDL (Degrees 214, 205, 196, 188, 180, 172, 165, 158, 151, 145, 139, 133, 127, 122, 117, 112, 107)
I actually recommend not going past 12EDO, since the error E rises sharply. If you must try a higher EDO, then use 16EDO as it has the least error. Other multiples of 4 (20EDO, 24EDO, 28EDO) have lower errors for their size, while 22EDO and 31EDO (mentioned in earlier posts) also have lower errors for their size. Beyond 31EDO, all scales are about equally bad (with the odd EDO's marginally better than the even EDO's).
It's interesting that 232EDL is the best for 12EDO, since the EDL link I mentioned in an earlier post recommended 120EDL and 196EDL (among others) to make a 12EDO scale.
But to me, making EDO scales is such a waste. The computer uses EDL's, which are based on exact divisions of length, so we should be playing sounds in just intonation, not EDO's.
[2018 Update: OK, let's skip to the end of this old music post.]
We can go on and on with 11- and 13-limit scales, but this post is getting long enough.
Anyway, I decided to go back to Tall Kite's website for any updates on his color notation for the 11- and 13-limit scales. Recall that Kite is now using "to-"/"fu-" -- topaz and fuchsia -- for the otonal and utonal 11-limit. For the 13-limit he uses "jo-"/"ku-" for otonal and utonal, but he never actually specifies any colors for the 13-limit.
http://www.tallkite.com/forum/index.php/topic,86.195.html
The only color starting with "j" mentioned in this thread is "jade" -- but notice that "jade" is Kite's old name for the 11-limit, not the 13-limit. He also mentions that it might not be important to have separate names for otonal/utonal in the 11-limit, since these sound very similar (with each being about a quarter-tone away from the corresponding white notes). On the other hand, we might need to distinguish between otonal/utonal in the 13-limit, as these notes sound distinct.
To me, it would have been more logical to use "jo-"/"ku-" for 11-limit and "to-"/"fu-" for 13-limit. If we did this, then "jade" could remain 11-limit under both the old and new names, while "ku-" doesn't need a color since 11-limit otonal/utonal are difficult to distinguish. And for 13-limit where otonal and utonal are more easily distinguished, we have the colors "topaz" and "fuchsia" ready for us.
But that would be too logical. Music -- like most human endeavors -- isn't logical.
No comments:
Post a Comment