What math textbooks are "CS-friendly": criteria?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
206 messages Options
1234 ... 11
Reply | Threaded
Open this post in threaded view
|

What math textbooks are "CS-friendly": criteria?

kirby urner-4

As some readers know, I'm more likely to
hang out with computer scientists than math
teachers, though I used to be a high school
math teacher.  For example, with me tonight
was Steve Holden, not a PhD but with lots
of letters after his name if he wants to use
them all, and PB, of Portland Energy Strategies.[1]

So my question for them was this:  I don't
get to look at many K-12 textbooks these
days, mathematics or any other.  Lets limit
it to the place / stratum where the concept
of "function" is introduced. 

Is that still done, formally?  And if it is, what
textbooks give examples of functions with
non-numeric domains?

For example, a function upper() might take
'a' to 'A', 'b' to 'B' and so on.  It operates on
a non-numeric type, a character, in some
"alphabet" with defined lower and uppercase.

Or a function might add "s" to a word:
addS("word") -> "words".  Do we ever see
that in mathematics textbooks?

Because such functions, with a string type
input, would be what I'd call "computer science
friendly" whereas a textbooks that always / only
uses numeric types for input and output would
be what I'd call "CS-hostile" and/or "CS-unaware".

So now I'm thinking of a list of titles, textbooks
for 8th and 9th grade, and I'm asking which of
these introduce non-numeric examples when
introducing the concept of "function" -- which in
my day was contrasted with "relation". 

A function might be injective, bijective or surjective
but the New Math era texts I was exposed to had
different terms for those as I recall, but I don't recall
what they were just now, not important to this
thread.

So, to pose the question again:  of all commercial
math textbooks that introduce "function" as a
formal concept, what percentage of those include
examples of function that are not operations on
numbers?

For example + might mean "concatenation"
where strings are concerned:  "a" + "b" == "ab"
in the domain -> range of strings.  In such a
world, + is not commutative in that "a" + "b" is
not equal to "b" + "a".  [2]

Which textbooks mention that "+" (addition) has
meaning relative to the "type" that it works with? 

Any?

Mark those as CS-friendly.

Kirby

PS:  wish us luck as Portland has its first public
teacher strike in its history.  That's set to commence
on Thursday, barring any breakthroughs.

Reply | Threaded
Open this post in threaded view
|

Re: What math textbooks are "CS-friendly": criteria?

kirby urner-4
In the above essay, posted last night to math-teach / Math Forum,
I ask the question:  what K-12 math textbooks might be
considered the most computer science friendly?

http://mathforum.org/kb/thread.jspa?threadID=2620194

That brings up the question of what criteria to apply, and
the example I give is:  introduces the concept of "function"
with some examples that include operating with strings
(characters) or other non-numeric inputs.

One hallmark of CS is its algorithms are often only "semi-
numeric" i.e. numbers enter into it, but so do other types
of object.  Tradebooks like 'Godel, Escher, Bach' make it
clear that mathematics is not strictly confined to "numbers"
where concepts such as "function" are concerned.

I'm imagining a listing of mathematics textbook titles
with several columns of criteria, either with a check or
an X, measuring how friendly this textbook's way of
teaching mathematics is to computer science, meaning
it provides smooth segues, jumping off points, topics,
for going back and forth between them etc.  What else?

Another criterion:  programming and programming
languages are at least mentioned, perhaps only in a
side bar.  Actually using a programming language would
be another column.  And so on.

I'd say there are three levels of sophistication we walk students
through in early mathematics learning:

(a)  arithmetic:  operations with numbers
(b)  early algebra:  letters standing in for numbers
(c)  later algebra:  the letters may stand for things besides numbers

Obvious examples of "things besides numbers" that we do
operations on:  vectors and matrices.  But these are still numeric
in nature.  A more developed (c) introduces "string type operations"
i.e. operations on strings.  No, not the strings of string theory
but the strings as alphanumeric symbols, characters, ideograms,
anything Unicode. Reversing a string, for example. Or returning
True or False depending on the presence of some character or
even "pattern" in a string.  These  would be "CS-friendly"
examples of "operations" and/or "functions" to include in a
mathematics textbook.

New Math (1960s) introduced set operations in the early
grades (union, intersection) and sets typically had non-numeric
elements, perhaps pictures.  You could intersect "things
considered fruits" with "things considered vegetables" for
example, and maybe get a "tomato".  That's getting more
towards (c):  algorithms that are only semi-numeric or even
non-numeric. 

I think textbooks should be studied for how deeply they get
into (c)-level awareness. 

Showing how binary operators such as "+" change meaning
depending on "the type of operand" and using "concatenation"
(of strings) as an example, would be an unusually CS-friendly
topic for a high school mathematics text in 2014, don't you think? 

Most early 21st century K-12 mathematics textbooks seemed
peculiarly "CS-unaware" (or am I misguided in that assessment?).

Kirby

Reply | Threaded
Open this post in threaded view
|

Re: What math textbooks are "CS-friendly": criteria?

Robert Hansen
On Feb 19, 2014, at 10:34 PM, kirby urner <[hidden email]> wrote:

> A more developed (c) introduces "string type operations"

Mathematical functions are mappings and have inverses. Most subroutines in CS, especially string manipulating subroutines, are not “mappings” or “functions” and cannot be reversed. Subroutines are a totally different animal. You would have to first thoroughly teach what a mathematical function is (in mathematics), then what a subroutine is in CS, and then discuss subroutines that model mathematical functions.

In short, you cannot gain an appreciation for mathematical functions by studying subroutines, unless those subroutines are strictly mathematical.

Bob Hansen
Reply | Threaded
Open this post in threaded view
|

Re: What math textbooks are "CS-friendly": criteria?

kirby urner-4



On Wed, Feb 19, 2014 at 7:51 PM, Robert Hansen <[hidden email]> wrote:
On Feb 19, 2014, at 10:34 PM, kirby urner <[hidden email]> wrote:

> A more developed (c) introduces "string type operations"

Mathematical functions are mappings and have inverses. Most subroutines in CS, especially string manipulating subroutines, are not “mappings” or “functions” and cannot be reversed. Subroutines are a totally different animal. You would have to first thoroughly teach what a mathematical function is (in mathematics), then what a subroutine is in CS, and then discuss subroutines that model mathematical functions.


I didn't mention "subroutine" anywhere.  I don't think it's necessary to dig up old fossil vocabulary in order to be CS friendly.  Students can unearth the meanings of such terms on their own time.

I'm talking about formal mathematics and the formal definition of a function as a set of domain and co-domain (image)  pairs, i.e. a "mapping" as you say, of (x, f(x)) tuples where x need not be a number.

{("a", "A"), ("b","B"),("c","C")} is a subset of the function {s: upper(s) -> s'} where the domain (s) and range (s') are both "the letters of the alphabet". 

This function has an inverse (reverse all the pairs) but this isn't an essential / necessary quality of a function in the formal mathematical sense, as taught in Algebra 1 and like that.

What differentiates a function from a relation is functions can't have the same domain value paired with two or more different range values.  I'm sure you know that.  Many different domain values, all of them even, mapping to the same range value:  that's not a problem (no inverse function in that case though).
 
In short, you cannot gain an appreciation for mathematical functions by studying subroutines, unless those subroutines are strictly mathematical.

Bob Hansen

I'm fine with making them "strictly mathematical", these functions, and not even using the word "subroutine" anywhere (we don't in Python, so that comes naturally to me as a teacher).

However, I still think the formal / core / basic mathematical concept of "function" can be introduced in more or less CS-friendly ways. 

The sooner we get away from purely numeric algorithms / functions / procedures and start processing semi-numerically, the better, in terms of weaning students off the notion that "mathematics" is purely about "number crunching". 

Computer science isn't either. 

Lets drive that point home in the textbooks, as we consider "best of breed" (most CS friendly).

Kirby

Reply | Threaded
Open this post in threaded view
|

Re: What math textbooks are "CS-friendly": criteria?

Robert Hansen

On Feb 19, 2014, at 11:15 PM, kirby urner <[hidden email]> wrote:

> I didn't mention "subroutine" anywhere.

Of course you didn’t. That would have made the distinction between “procedure” and “function”.

On Feb 19, 2014, at 11:15 PM, kirby urner <[hidden email]> wrote:

> The sooner we get away from purely numeric algorithms / functions / procedures and start processing semi-numerically, the better, in terms of weaning students off the notion that "mathematics" is purely about "number crunching”.

Now you are applying “subroutine” to mathematics. The mathematical notion of “function” IS mathematics. It is like gravity, always there. The very reason that a child can even learn to add is because of the notion of function. Without it, there would be no determinism.

Computers are procedural and that has its place as well.

What you are proposing here isn’t teaching mathematics through programming. It is not teaching mathematics at all, just programming. And knowing hundreds of programmers and the prevalence of mathematical topics in their high school and college careers, I don’t see teaching programming without mathematics even capable of producing decent programmers. Just the prevalence of math love in programmers should be enough of a clue that mathematical endeavor just for the sake of mathematical endeavor is highly important to programming.

You seem to have this idea of replacing mathematical endeavor (school mathematics) with programming, but without a reason. Since all of us programmers are doing so well WITH mathematics under our belt as well as programming, what is it that you think you will gain by removing mathematics from the curriculum?

Bob Hansen
Reply | Threaded
Open this post in threaded view
|

Re: What math textbooks are "CS-friendly": criteria?

Robert Hansen
In reply to this post by kirby urner-4

On Feb 19, 2014, at 11:15 PM, kirby urner <[hidden email]> wrote:

> I'm fine with making them "strictly mathematical", these functions, and not even using the word "subroutine" anywhere (we don't in Python, so that comes naturally to me as a teacher).

And how are you going to teach them to program without understanding subroutines and procedure? That would be worse than trying to teach them music without rhythm or tempo. And it isn’t the word, it is the notion. Programming involves subroutines and math involves functions. You need to spend some time un-fuzzing these two domains (mathematics and programming).

Bob Hansen
Reply | Threaded
Open this post in threaded view
|

Re: What math textbooks are "CS-friendly": criteria?

Robert Hansen
In reply to this post by kirby urner-4

On Feb 19, 2014, at 11:15 PM, kirby urner <[hidden email]> wrote:

> and not even using the word "subroutine" anywhere (we don't in Python, so that comes naturally to me as a teacher).

You realize that just because you call it a “function” it is still a subroutine, just with a different label. If I show my son an apple and say “peach” over and over, I don’t make apples into peaches. You get this, right? If I say “subroutine” or you say “function”, we are still talking about the same procedural piece of code and not a mathematical function.

Bob Hansen

Reply | Threaded
Open this post in threaded view
|

Re: What math textbooks are "CS-friendly": criteria?

kirby urner-4
In reply to this post by Robert Hansen
On Wed, Feb 19, 2014 at 8:43 PM, Robert Hansen <[hidden email]> wrote:

<< SNIP >>
 
What you are proposing here isn’t teaching mathematics through programming. It is not teaching mathematics at all, just programming. And knowing hundreds of programmers and the prevalence of mathematical topics in their high school and college careers, I don’t see teaching programming without mathematics even capable of producing decent programmers. Just the prevalence of math love in programmers should be enough of a clue that mathematical endeavor just for the sake of mathematical endeavor is highly important to programming.


You seem to be in denial that upper-casing a letter is an example of a function in a formal mathematical sense, all talk of computers and programming aside. 

Those are separate columns on my check list (whether programming is mentioned, or a language even used).

Here, I'm simply asking if functions are ever non-numeric in the examples (I'm ranking textbooks). 

It says a lot about the mindset of the authors if the answer is "no".
 
You seem to have this idea of replacing mathematical endeavor (school mathematics) with programming, but without a reason. Since all of us programmers are doing so well WITH mathematics under our belt as well as programming, what is it that you think you will gain by removing mathematics from the curriculum?

Bob Hansen


I'm sorry you have it all wired up in such a tangle and I hope as you gain in experience you gradually overcome these hobbling perspectives, or cultural baggage or whatever it is.

A function might map pebbles on a beach to balloons in a circus, it doesn't matter.  We get to isomorphism versus "lossy" or homeomorphic functions later (some functions "lose dimensions" cast shadows whereas others "encrypt" with full-restore capability (they're reversible)).

In Mathematica-based curricula, it's quite normal to introduce a JPEG picture file as an argument to a function, defined as formally and mathematically as you like, and what you get is perhaps a grayscale version of the photo.  Some algorithm was applied, not difficult to describe.  It's a function, not a "subroutine".  It's a mapping.  It's also CS-friendly to think in this way, but then we'd expect that from Wolfram.

Kirby

Reply | Threaded
Open this post in threaded view
|

Re: What math textbooks are "CS-friendly": criteria?

kirby urner-4
In reply to this post by Robert Hansen
On Wed, Feb 19, 2014 at 9:11 PM, Robert Hansen <[hidden email]> wrote:

On Feb 19, 2014, at 11:15 PM, kirby urner <[hidden email]> wrote:

> and not even using the word "subroutine" anywhere (we don't in Python, so that comes naturally to me as a teacher).

You realize that just because you call it a “function” it is still a subroutine, just with a different label. If I show my son an apple and say “peach” over and over, I don’t make apples into peaches. You get this, right? If I say “subroutine” or you say “function”, we are still talking about the same procedural piece of code and not a mathematical function.

Bob Hansen


I write:  def f(x):  return x * x  # multipy x by itself

whereas a textbook has something like:  {f: x-> x*x} or whatever notation (lots of variants).

Console conversation:

>>> def f(x):  return x * x
>>> domain = [1, 2, 3, 4, 5]
>>> map(f, domain)
<map object at 0x13d29f0>
>>> list(map(f, domain))
[1, 4, 9, 16, 25]

You say:  "oh no no, "def f(x):  return x * x" is just a 'subroutine' no matter what *you* call it whereas '{f: x-> x*x} or whatever notation' is really math and never the twain shall meet or mix?

Is that what you're saying? 

Doesn't seem that coherent. 

I'd just say "it's the same idea either way but in one case we have machine executability and in the other case we do it in our heads only, or maybe with pencil and paper or... drum role, we end up 'programming' it".  

Programming:  that's just following an algorithm, by a machine or human who cares? 

People have called that "mathematics" since Al Khwarizmi (or in his case "al jabr").  To "program" is to "work an algorithm".  They already call them "the arithmetic algorithms" what we teach in (a) (see above) e.g. the "long division algorithm"-- and that's CS-friendly by the way.

We've always followed "programs", we just didn't call it that way (except in theater, with its "programmes", and in church).

Kirby


Reply | Threaded
Open this post in threaded view
|

Re: What math textbooks are "CS-friendly": criteria?

Robert Hansen
On Feb 20, 2014, at 12:50 AM, kirby urner <[hidden email]> wrote:

> I write:  def f(x):  return x * x  # multipy x by itself
>
> whereas a textbook has something like:  {f: x-> x*x} or whatever notation (lots of variants).
>
> ...
>
> You say:  "oh no no, "def f(x):  return x * x" is just a 'subroutine' no matter what *you* call it whereas '{f: x-> x*x} or whatever notation' is really math and never the twain shall meet or mix?
>
> Is that what you're saying?

I am saying that a “program” is not the same as a mathematical “function". Just because programming uses similar notation means nothing. Rather than comparing boxes based on what is written on their outside, you should open the boxes and look inside. If you look inside the box labeled “def f(x)” you are going to find a very different set of pieces than you will find in the box labeled “f(x)”. The pieces in the former are used to create iPhone apps while the pieces in the later are used to create calculus.


> I'd just say "it's the same idea either way but in one case we have machine executability and in the other case we do it in our heads only, or maybe with pencil and paper or... drum role, we end up 'programming' it”.

Algorithm and procedure are just a facet of mathematics, unlike in programming where algorithm and procedure are the whole point. Think of mathematics as a long running drama with many characters and plots. And then think of programming as a successful spinoff from that drama, based on a couple of its interesting characters, developing their story into something much larger than just the subplot it was in the original drama. Algorithm and procedure were certainly born in mathematics but when they went off to become “programming” they pretty much started their own history at that point.

Bob Hansen
Reply | Threaded
Open this post in threaded view
|

Re: What math textbooks are "CS-friendly": criteria?

Joe Niederberger
In reply to this post by kirby urner-4
R Hansen says:
>The mathematical notion of ?function? IS mathematics. It is like gravity, always there. The very reason that a child can even learn to add is because of the notion of function. Without it, there would be no determinism.

I'm not sure exactly what you are trying to say here but the typical way functions are treated in math today has not always been around, like gravity.

http://en.wikipedia.org/wiki/History_of_the_function_concept
http://www.maa.org/sites/default/files/pdf/upload_library/22/Polya/07468342.di020738.02p00875.pdf

All this refinement was hardly needed before children could learn to add.

I assume you mean the concept of a function as a set of ordered pairs. (And what are ordered pairs? They have their own history and niggling problems!)
I agree that it should be distinguished form the concepts of step-by-step execution of algorithms, procedures, etc., in short calculation, computation, symbol crunching.

One of the problems with CS terminology is it doesn't tend to make the very subtle distinctions that can be found in math, and its terms are very often parochial or provincial. Even within CS its good to have a way to speak of the expected correspondence between inputs and outputs (more or less the function) and the procedures by which such answers are computed, which can be vastly different in complexity and efficiency, if they can be carried out at all.  

Nevertheless, Kirby seems preoccupied with injecting into the math curricula manipulations on symbols that are not to be interpreted as numbers. That would seem to be entirely appropriate if one is trying to teach the set theoretic meaning of "function", (which does not depend on the notion of "number",) as long as one is careful to distinguish the set of ordered pairs (or bubbles and arrows if you prefer) from any computational actions.

Here Kirby seems perfectly willing, or perhaps eager, to muddy the waters. I would say he even goes off the charts when he wants to include the CS notion of operator overloading into his notion of "function". (I'll say in Kirby's defense that even Keith Devlin seems so deeply bothered by inert sets of ordered pairs that he invents "process" [his word] that are the real function, and he is not the first mathematician to be drawn to that way of thinking.)

I think the "set of ordered pairs" concept will be around for a long time. The conflations that Kirby wants to attach to it will not take root, and people will enjoy for a long time the delicious ironies of "non-computable functions" and the like.

Cheers,
Joe N
Reply | Threaded
Open this post in threaded view
|

Re: What math textbooks are "CS-friendly": criteria?

kirby urner-4
In reply to this post by Robert Hansen
On Thu, Feb 20, 2014 at 5:51 AM, Robert Hansen <[hidden email]> wrote:
 
> You say:  "oh no no, "def f(x):  return x * x" is just a 'subroutine' no matter what *you* call it whereas '{f: x-> x*x} or whatever notation' is really math and never the twain shall meet or mix".
>
> Is that what you're saying?

I am saying that a “program” is not the same as a mathematical “function". Just because programming uses similar notation means nothing. Rather than comparing boxes based on what is written on their outside, you should open the boxes and look inside. If you look inside the box labeled “def f(x)” you are going to find a very different set of pieces than you will find in the box labeled “f(x)”. The pieces in the former are used to create iPhone apps while the pieces in the later are used to create calculus.



I'm saying the formal concept of function can be introduced with any two sets of things paired in the "right" way (not just a relation), however some ways are more CS-friendly than others. 

Always numbers for a domain and never letters, for example, shows a low "imaginative quotient" (MQ) and is not CS-friendly.

If I open the student's head to see what "box" is interpreting the symbols {(x, x*x) for x in [1,2,3,4]} I'll see a brain whereas inside a computer I see printed circuits.

So are you saying there are really no "function keys" on a calculator because calculators can't "really" do sin( ), cos( ), sqrt( ) and such functions, only brains can?   It's only "mathematics" if a brain does it, not a machine?

I just don't see any logic to your categories (yet). 

Computers were invented precisely to take our mathematical computations (some of which are only semi-numeric) and transfer them to printed circuits, which tend to be (a) more reliable and (b) faster than human brains (but with lower MQ).

> I'd just say "it's the same idea either way but in one case we have machine executability and in the other case we do it in our heads only, or maybe with pencil and paper or... drum role, we end up 'programming' it”.

Algorithm and procedure are just a facet of mathematics, unlike in programming where algorithm and procedure are the whole point.

I'm talking about CS, not just programming. 

CS is also about data structures, such as the set, array, matrix, table etc.  It's about boolean logic, simplification, transformations.... in fact, CS and mathematics have many seamless borders in STEM whereas it's mere quibbling to try teasing them apart.

"Computer science is the new mathematics." says Dr. Christos Papadimitriou, author of Logicomix about the life and times of Bertrand Russell.

What I'm suggesting is we can / should rank high school mathematics textbooks according to how well they prepare a student to "think like a computer scientist".  High school math is about preparing people for many walks of life. 

It is not, repeat not, the exclusive plaything of PhD mathematicians who want people to grow up in their own likeness.  Airline pilots and futures traders also get to have input into how STEM courses prepare their future people.

Clearly, at one end of the spectrum we have books like 'Mathematics for the Digital Age and Programming in Python' (used at Phillips / Andover, a college prep high school, by the authors). 

At the other end of the spectrum we have textbooks showing little-to-no-awareness of the doors one could be opening in high school, to the prospective CS major.  We can score them accordingly, and what I'm looking for is criteria.

A high school math course should open as many doors as practical and being CS-friendly in this day and age is an important criterion. I'm telling parents what they can look for, even if teachers don't seem to care.  Look for examples of functions that are non-numeric in nature.
 
Think of mathematics as a long running drama with many characters and plots. And then think of programming as a successful spinoff from that drama, based on a couple of its interesting characters, developing their story into something much larger than just the subplot it was in the original drama. Algorithm and procedure were certainly born in mathematics but when they went off to become “programming” they pretty much started their own history at that point.

Bob Hansen

I'm sooooo glad I don't think the way you do. 

Here's a college level course that might give some clues as to what a high school analog might be like:

http://www.ox.ac.uk/admissions/undergraduate_courses/courses/mathematics_and_computer_science/mathematics_and.html

Kirby


Reply | Threaded
Open this post in threaded view
|

Re: What math textbooks are "CS-friendly": criteria?

Joe Niederberger
In reply to this post by Joe Niederberger
Joe N says:
>Even within CS its good to have a way to speak of the expected correspondence between inputs and outputs (more or less the function) and the procedures by which such answers are computed, which can be vastly different in complexity and efficiency, if they can be carried out at all.

Oops! I meant to say its good to be able to *distinguish between* the abstracted correspondence per-se (or set of ordered pairs in set parlance) and any procedures used to produce values given an argument. The correspondence is one thing, the procedure, if any, another. Without that crucial distinction we can't even speak in general of different algorithms that calculate the *same* function, such as different algorithms for multiplying integers.

Cheers,
Joe N
Reply | Threaded
Open this post in threaded view
|

Re: What math textbooks are "CS-friendly": criteria?

kirby urner-4
In reply to this post by Joe Niederberger
On Thu, Feb 20, 2014 at 7:04 AM, Joe Niederberger <[hidden email]> wrote:

<< SNIP >>
 
I think the "set of ordered pairs" concept will be around for a long time. The conflations that Kirby wants to attach to it will not take root, and people will enjoy for a long time the delicious ironies of "non-computable functions" and the like.

Cheers,
Joe N

Thanks for all the culturally literate allusions e.g. to Devlin's "process" nomenclature.

Coming from a Wittgensteinian background (I was a philo major, not a CS major, not a math major, at Princeton (where we call these "areas of concentration")), I think in terms of "rule-following" where a "rule" could be anything from a "natural law" to a "human law" to anything interpretable as rule-following (such as the act of reading).

Some functions come pre-packaged, as it were, with an explicit rule that gives information over and above simply a set of ordered pairs. 

Thanks to the rule, you know how to "generate" ordered pairs yourself, by "following" that rule (assuming you are able to decipher / interpret the rule as presented -- there may be no "machine" in this picture except you).

When you talk about me conflating different notions of function, I think you're suggesting my pro-CS bias causes me to see all functions as computable i.e. rule-following, and hence your waving of the flag for "non-computable functions" and what not.

But you may remember from earlier discussions that I'm somewhat pro-Penrose in accepting our "non-computational problem solving ability" as a human trait (corresponding to what I might call "high MQ") something we (some of us) hope will be emergent in our "machine learning" ala the movie 'Her' (she's replacing HAL in the popular mindset).[1]

Re my "pro CS" bias: I'm very much in favor of replacing tiny / cramped calculator surfaces with more colorful and mentally enriching surfaces, am amazed how the decades fly by as living standards stay so stagnantly low in the average math classroom.

I tend to agree with William Bennett that our current education system is as if a hostile enemy power had us in its grip and were trying to make us a true idiocracy.  In that, the enemy hath largely succeeded. 

Taxpayers whine and complain how expensive education is, but "the gummint" seem to have a *lot* of money left over for V2s er cruise missiles.  Am I implying "the enemy" has a Nazi-like mindset?  That's for some other thread perhaps.[2]

Kirby

[1] http://www.imdb.com/title/tt1798709

[2] http://mathforum.org/kb/thread.jspa?threadID=2618955
Reply | Threaded
Open this post in threaded view
|

Re: What math textbooks are "CS-friendly": criteria?

Robert Hansen
In reply to this post by Joe Niederberger

On Feb 20, 2014, at 10:04 AM, Joe Niederberger <[hidden email]> wrote:

> R Hansen says:
>> The mathematical notion of ?function? IS mathematics. It is like gravity, always there. The very reason that a child can even learn to add is because of the notion of function. Without it, there would be no determinism.
>
> I'm not sure exactly what you are trying to say here but the typical way functions are treated in math today has not always been around, like gravity.
>
> http://en.wikipedia.org/wiki/History_of_the_function_concept
> http://www.maa.org/sites/default/files/pdf/upload_library/22/Polya/07468342.di020738.02p00875.pdf
>
> All this refinement was hardly needed before children could learn to add.


I didn’t mean the formal notion of function.

My point is that some essences, like functions and gravity, are so prevalent and intrinsic to their particular domain that when we operate in that domain, we cannot but become acutely and intuitively aware of these essences, whether we formally recognize them or not.

For example, one does not require a formal understanding of gravity to have a very good intuitive understanding of gravity. The reason being is that gravity is everywhere and affects everything. Our thoughts and experiences are shaped by gravity whether we understand gravity or not.

Likewise, everything we attempt to do in mathematics, starting all the way back at the beginning with counting, is based on mapping numbers in a particular, repeatable and deterministic way. Even though we don’t call this “mapping essence" out till later (high school algebra) it is always there, part and purpose of every step, and always shaping our intuition.

Bob Hansen
Reply | Threaded
Open this post in threaded view
|

Re: What math textbooks are "CS-friendly": criteria?

kirby urner-4
In reply to this post by Joe Niederberger



On Thu, Feb 20, 2014 at 8:22 AM, Joe Niederberger <[hidden email]> wrote:
Joe N says:
>Even within CS its good to have a way to speak of the expected correspondence between inputs and outputs (more or less the function) and the procedures by which such answers are computed, which can be vastly different in complexity and efficiency, if they can be carried out at all.

Oops! I meant to say its good to be able to *distinguish between* the abstracted correspondence per-se (or set of ordered pairs in set parlance) and any procedures used to produce values given an argument. The correspondence is one thing, the procedure, if any, another. Without that crucial distinction we can't even speak in general of different algorithms that calculate the *same* function, such as different algorithms for multiplying integers.

Cheers,
Joe N

I'm fine with this and it matches what I'm talking about
when I distinguish between functions that follow a rule,
and functions for which there may be no rule or for
which the rule is unknown.

Having been a high school mathematics teacher and a
student before that, I know exactly what was done in
the 1960s -1980s to introduce "function", and I'm not
thinking much has changed in terms of formal definitions
for students at that level.

If your math notation is executable, then you have the
option of having a machine follow the rule, so if you want
to know the number of balls in layer L of a cuboctahedron,
starting with Layer 0 = a single ball, Layer 1 = 12 around
it, Layer 2 having 42 balls and so on, then the rule is:

def balls_in_layer(L):  return 1 if L==0 else 10 * L * L + 2

Now we can talk about restricting the domain to positive
integers and so on.  Nothing is lost from the mathematics
curriculum, yet we've added another feather to our cap,
another function to our module, and may build on that later. 
We're being CS-friendly at no cost to the mathematics.

Like tomorrow maybe we wanna know the *cumulative*
number of spheres.

There's an obvious loop we can do...

def cumulative(L):  return sum(balls_in_layer(x) for x in range(L+1))

(show also with sigma notation:

N = 1 +SIGMA(10x2+ 2) ; x = 1,2,3... L

)

otherwise we can derive a closed form formula with a 3rd
power term and prove it with mathematical induction or
whatever. 

N = (10/3)L3+ 5L2+(11/3)L + 1  (code as an exercise)

# not sure if exponents come across on the web, try:

N = (10/3) * L**3 + 5 * L**2 + (11/3) * L + 1  (Python)

Again, nothing is lost, math-wise (this is an important
series in chemistry / crystallography check OEIS). 

But we're also getting used to writing code and that's
CS-friendly, economically speaking a good idea, an
efficient / practical way of opening more doors.

But I'm not trying to get us all the way to that far distant
future in all textbooks, such that a real coding language
is actually used.  I recognize that day is not now and
only children of the 1% can afford such private school
privileges.

All I'm suggesting to start with, is that we recognize
{('a', 'A'), ('r', 'R'), ('s', 'S')... ('t', 'T')} could be construed as
a set of ordered pairs derived from "following a rule" and
that functions with non-numeric domains are OK.

Console conversation:
 >>> domain = 'abcdefghijklmnopqrstuvwxyz' 
 >>> pairs = { (c, c.upper()) for c in domain }
 >>> pairs
 {('m', 'M'), ('z', 'Z'), ('k', 'K'), ('c', 'C'), ('r', 'R'), ('i', 'I'), ('s', 'S'),
('v', 'V'), ('p', 'P'), ('b', 'B'), ('q', 'Q'), ('l', 'L'), ('g', 'G'), ('u',  'U'),
('w', 'W'), ('f', 'F'), ('d', 'D'), ('e', 'E'), ('h', 'H'), ('o', 'O'), ('n', 'N'),
('t', 'T'), ('a', 'A'), ('x', 'X'), ('y', 'Y'), ('j', 'J')}

What's so off-the wall about exploring the function concept
in this way? 

Sure, you can use the same notation to express relations,
not just functions, but we want that for contrast anyway. 

Plus we get the bigger more colorful screen, so when we
finally *do* get to more geometric stuff, it will be spatial /
perspectival / rotatable, not just the flat stuff the silly
grownups (?) all think is the bee's knees today -- because
they're too cheap to go 3D in the math classroom (or 4D or
whatever).

Kirby

Reply | Threaded
Open this post in threaded view
|

Re: What math textbooks are "CS-friendly": criteria?

Robert Hansen
In reply to this post by kirby urner-4
On Feb 20, 2014, at 10:33 AM, kirby urner <[hidden email]> wrote:

> What I'm suggesting is we can / should rank high school mathematics textbooks according to how well they prepare a student to "think like a computer scientist".  High school math is about preparing people for many walks of life.

That’s simple. All of the rigorous honors books. That is the common thread you will find with top notch programmers and computer scientists. Most of them love math. I have been interviewing candidates for 10 years and you learn which subjects they cherish. But that isn’t what you want to know because you could have easily just went to Google, Facebook, Microsoft, Apple etc and asked real programmers and computer scientists what courses they cherished. Your approach to math education reform is like every other reformer’s approach.

Q: When have you ever seen a study devoted to high achieving mathematics students as a means to understand how math education really works?
A: Never

That is because math education reform is not about how math education works. It's about other agendas.

Bob Hansen
Reply | Threaded
Open this post in threaded view
|

Re: What math textbooks are "CS-friendly": criteria?

kirby urner-4



On Fri, Feb 21, 2014 at 11:29 AM, Robert Hansen <[hidden email]> wrote:
On Feb 20, 2014, at 10:33 AM, kirby urner <[hidden email]> wrote:

> What I'm suggesting is we can / should rank high school mathematics textbooks according to how well they prepare a student to "think like a computer scientist".  High school math is about preparing people for many walks of life.

That’s simple. All of the rigorous honors books. That is the common thread you will find with top notch programmers and computer scientists. Most of them love math. I have been interviewing candidates for 10 years and you learn which subjects they cherish. But that isn’t what you want to know because you could have easily just went to Google, Facebook, Microsoft, Apple etc and asked real programmers and computer scientists what courses they cherished. Your approach to math education reform is like every other reformer’s approach.


OK then, progress.  You may have just made my job a lot easier.  All I have to do is sort textbooks by which are considered "honors books".  Is that an emblem on the cover, like a stylized badge or decal?
 
Q: When have you ever seen a study devoted to high achieving mathematics students as a means to understand how math education really works?
A: Never

That is because math education reform is not about how math education works. It's about other agendas.


For the sake of argument, lets cast me as a high powered lobbyist for the Silicon Forest, charged with "scaring up" (OK, unfortunate choice of words) a work force of the future. 

The local Intel (big) is only 19% staffed by Oregonians, meaning 89% had to be "bussed in" (by jet or whatever), meaning the local school system is hardly up to the job of feeding the region's appetite, Intel but a drop in the bucket (see ONAMI web site for another view of our "forest" (ecosystem)).

Short story (all true):

When I worked with Hillsboro Police (HPD), West Precinct, where Intel is situated (in nearby Aloha), the police were feeling angry at the public schools which were being puppets of intellectual property lawyers and just scaring kids about not using Napster or downloading copyright movies or the FBI would hunt 'em down. 

The police were invited in by the schools to follow this script of scaring and bullying the kids about copying, but never ever were the kids told about open source and free software, where it's simply OK, legal, encouraged, to copy everything! 

The police had to find out about this free world all by themselves, given how the public schools were not sharing this knowledge. 

The police used their new knowledge to set up their own open source access points in the projects, even opened a school at West Precinct itself (that's where I came in). 

If the public schools are so incompetent, we'll just teach 'em ourselves, the police were thinking (this one exFBI guy in particular, formerly NORAD).

We're talking Latino kids, not such great English.  And Asian kids too.  Not especially rich or privileged, like the spoiled brats who get CS as an elective in their high property tax Trader Joe's neighborhood.  That's suburban spoiled rich country, and always gets what it needs in undemocratic post-USA America (just kidding, they're not *all* spoiled).

So yes, in this role, I have an agenda:  help Intel raise that from 19% to say 30%, but then include all of Cascadia, not just Oregon, as the HR pool (it's not just about Portland obviously). 

OK, so lets take a look at those ultra-critical required math textbooks.  Picture me with a stack on my desk.  Roughly junior high to high school in level.  The stuff I used to teach, not the stuff I teach today.

I go to the index and look up "function, formal concept" pg. x, and I turn to that section.  Are there, or are there not, examples of functions with non-numeric input and output? 

Is "concatenation" mentioned for example?  Do they use the term "binary operator" at any point? 

Concatenation makes a great non-commutative addition example.  In New Math, field and group properties were introduced that early -- they got dumber in the 70s (I agree with Alan Kay) so maybe no longer.

Any string ops *at all*?  None? 

Put an X in a certain column, and move on to the next ranking criterion. 

Are computer languages ever mentioned, even if only in a sidebar? 

And so on. 

I used to work at McGraw-Hill (Rockefeller Center, Avenue of the Americas, 28th floor, Nola Hague my supervisor, Ray Simon my co-worker), a textbook company.  Ranking and checklists... not a new idea.

Kirby Urner

Bob Hansen

Reply | Threaded
Open this post in threaded view
|

Re: What math textbooks are "CS-friendly": criteria?

Robert Hansen
On Feb 21, 2014, at 2:54 PM, kirby urner <[hidden email]> wrote:

> For the sake of argument, lets cast me as a high powered lobbyist for the Silicon Forest, charged with "scaring up" (OK, unfortunate choice of words) a work force of the future.

I am fine with that, but as I said, if that was your mission then you would have started with asking successful computer scientists which courses they cherished.

On Feb 21, 2014, at 2:54 PM, kirby urner <[hidden email]> wrote:

> Are computer languages ever mentioned, even if only in a sidebar?

They were until the languages became object orientated and the namespaces gigantic. Unfortunately, the only common denominator in all this was and still is the programmable calculator. What I mean by “common denominator” is that the devices are accessible by all (almost all) students and the infrastructure is there to support them (poorly).

It is unfortunate that BASIC disappeared, and Python, sans the objects, would be a suitable replacement but unfortunately there is and never was an infrastructure to support either of them. I cut my teeth on programming at a local community college that had a remote terminal to a mainframe (1977) and a TI-58 programmable calculator. At the college I attended (1979), a PDP-11. By 1983 I had my own computer(s), first a VIC-20, then a Radio Shack Color Computer, and then a Commadore-64. By this time (1986) I was working in CS and had access to PCs. Macs, Minis, and Mainframes. My poor C64 sat in the closet. My first “PC” (IBM Clone) was 1987, and since then I can’t count the number of PC’s, notebooks, tables, phones, etc I have owned nor the languages/paradigms I have programmed/worked in.

My point of all that is that computers and programming were exploding even when I first used them almost 40 years ago. It would be great if we could standardize on a basic computer language for students to use at the appropriate time to translate algorithms and procedures into computers. Right now, the only thing that fills that bill are the shitty graphing calculators.

I believe we would have had all of this on PCs which have been ridiculously prevalent for some time now, but every time the idea was and is raised, it is floored because there is a percentage of students without access to PCs or iPads at home. And I grew up in that percentage and I have to agree 100%, even with all of my brains, I would have been so far out of the social standard of “school work” if school work meant access to things that cost money. I was out of the social standard even then, but at least math class only required the provided text book. Even if they gave me these things, I would have had no place to plug them in or set them up. BUT, should that define the range of our schools? The middle class students could afford such things. And the rich students not only could afford such things, they went on and obtained such things. And even when we want to make them available to the poor, we hesitate, for good reason, because many will trash them. Because of this, public school has been marginalized, more so in some areas than others. Even middle class school, which was a door opener in my day, is marginal now.

Now I am on the other extreme. My son has already went through 2 computers, 2 iPod touches, an iPad and 3 video game consoles. He is 11. The happy medium is somewhere in between those two extremes.

But back to your original question. In an “achieving” math class, translating mathematical algorithms and procedure to a computer or a calculator doesn’t take much teaching at all. Other than a quick summary of features and where they are located, there isn’t a lot of training involved. It is like teaching a musician how to use an electronic instrument. You don’t have to teach them music. That is why even the current emphasis on graphic calculators is depressing. The fact that the teacher first teaches the students the math and then teaches them how to do the math on a calculator indicates a complete failure.

But I don’t think you would be happy with students merely translating the mathematics they are learning into computers. You want SQL, HTML and CSS. You want a CS class and not alongside math classes, instead of math classes. I think the majority of programmers and computer scientists would not agree with you.

Bob Hansen
Reply | Threaded
Open this post in threaded view
|

Re: What math textbooks are "CS-friendly": criteria?

Joe Niederberger
In reply to this post by kirby urner-4
R Hansen says:
>My point is that some essences, like functions and gravity, are so prevalent and intrinsic to their particular domain that when we operate in that domain, we cannot but become acutely and intuitively aware of these essences, whether we formally recognize them or not.

I pretty much agree, except I don't know how acute the awareness has to be. If you asked a kid who knows how to add why one gets one answer instead of two or more, he probably look at you like you were nuts, or trying to trick him.

The histories I referenced (and there are other good ones) show just how much math can be done without having the modern definition in hand. Likewise I don't think introducing the ordered pairs definition or any other definition is at all necessary until much later in a math sequence of study. Again likewise, I think if one were learning to program in grade school one could remain blissfully unaware of any connection, or detailed comparison and contrasting of mathematical and CS uses of the word "function".

Like Kirby, I remember little pictures of "function machines" littering my grade school textbooks. (But they never reappeared in high school!) Unlike Kirby, I don't think they really added a whit to my understanding of arithmetic at the time. Perhaps later, when I began studying math in earnest, that early exposure made me a bit more comfortable, but I can't really see it as a big deal. The real reason for the modern definition, is that such definitions are an essential part of formally (semi-formally, really) proving things in the modern style. Like I said, one can do a whole lot of math *and* CS without formalizing it.

Rather than delving into definitions of functions and what-not, I think it would be far more valuable to begin naive set theory and some kind of intro to symbolic logic in grade school. Come to think of it, while I did also get exposure to set theory terminology and Venn diagrams and such in 4th grade and up, and function machines, those two "modern math" concepts were never brought together, as far as I can remember.

Cheers,
Joe N
1234 ... 11