Why Can't Math Teaching Be More Like Computer Science?

In summary: They're like step-by-step instructions on how to do something, and they're invaluable for learning how something works. They're also a great way to organize information. Why can't mathematics textbooks do the same thing? In summary, I think that the way mathematics is taught in textbooks is ineffective and misguided. The notation used is difficult to understand, and the explanations of what the function does, what its arguments are and how they relate to the function, and what conditions invalidate the function are scattered all over the place. The computer science way of thinking of functions is an absolutely terrible way to approach functions in mathematics.
  • #1
Strill
6
0
From elementary to high school I've had teachers who've droned on and on trying to explain minute details about the concepts they're teaching. I've almost always found it more difficult to follow the teacher's train of thought than to just learn the concept myself, so I always just read the book during lecture. I mean "read" in the loosest sense of the word though, as I'd just skim through looking for the equations. From middle-school and upwards, the textbooks were written so as to be incomprehensibly dense to any student not three grade levels higher than the grade the book was intended for. The most peculiar aspect of this arrangement was that I always found that solving the problem always depended on only a few things. Far less than the length of the teacher's lectures would suggest.

When I got to college and took computer science classes we had to document our code. For each function we needed to present a concise explanation of:

1. What the function does
2. What the function's arguments are and how they relate to what the function does
3. What conditions the function requires in order to work properly.

And it hit me. These three things are all you need in order to use any mathematics equation. And so I'm baffled. All the math and science textbooks are designed around the author raising some question about the concept, going through a derivation, and arriving at an equation that answers the original question. Even ignoring the fact that the questions raised by the book have almost always been incomprehensible to me, you still have the fact that this form of teaching results in the important information being strewn all over the place. The explanations on what the variables are could be in any chapter, the explanation of what the function does is written in terms of its derivation and mixed all throughout the section, and the conditions on the function's use are hidden somewhere in the derivation. In the worst case, you have arguments that are only defined in tiny tables in the margins of some page in the last chapter. So this makes me wonder: What is the use in making students go through all this hullabaloo? Why can't a mathematics textbook, for each equation, provide concise summaries of what the function does, what its arguments are and how they relate to the function, and what conditions invalidate the function? I see absolutely no use in making the student skip and hunt around the book every time they want to do a homework problem. I personally find it much easier to understand mathematics by relating the equations to the concepts than trying to piece together some half-hazard imprecise English explanation, or some dense, etymologically sterilized "mathematically correct" explanation.
 
Science news on Phys.org
  • #2
The computer science way of thinking of functions is an absolutely terrible way to approach functions in mathematics. A function should not be thought of as a process you stick numbers into that computes something and then returns another number. This is the sort of thinking that leads to so much confusion over things like "0.999... = 1".

A mathematical function is just a 1-to-1 map between sets, that is all. A function doesn't have to be represented by any algorithm or process. Hell, most functions are uncomputable!

The things you write in programming code should more properly be called "subroutines", "procedures", or "methods", and it is to the great detriment of proper mathematical thinking that any programming language has co-opted the term "functions" for them.

Also, grab a dictionary and look up "haphazard".
 
  • #3
Math books actually do what you want. Behond the following notation:

[tex]f:\mathbb{R}^+\rightarrow \mathbb{R}:x\rightarrow x^2[/tex]

f is the name of the function
[itex]\mathbb{R}^+[/itex] are the possible input values and [itex]\mathbb{R}[/itex] is what you can expect as output.
The [itex]x\rightarrow x^2[/itex] is what the function does.

And they couldn't make it shorter then that.
 
  • #4
Ben Niehoff said:
The computer science way of thinking of functions is an absolutely terrible way to approach functions in mathematics. A function should not be thought of as a process you stick numbers into that computes something and then returns another number. This is the sort of thinking that leads to so much confusion over things like "0.999... = 1".

A mathematical function is just a 1-to-1 map between sets, that is all. A function doesn't have to be represented by any algorithm or process. Hell, most functions are uncomputable!
I'm not following you. What does that have to do with 0.999... = 1? As I understand, that expression is confusing because notations involving an infinite number of components are unintuitive.

And frankly, I see no reason why functions should not be represented as algorithms for the purpose of teaching. Algorithms explain the relationship behind the function much more clearly and precisely than someone's lecture or essay.

micromass said:
Math books actually do what you want. Behond the following notation:

[tex]f:\mathbb{R}^+\rightarrow \mathbb{R}:x\rightarrow x^2[/tex]

f is the name of the function
[itex]\mathbb{R}^+[/itex] are the possible input values and [itex]\mathbb{R}[/itex] is what you can expect as output.
The [itex]x\rightarrow x^2[/itex] is what the function does.

And they couldn't make it shorter then that.
I've never had any books that used that notation.
 
Last edited:
  • #5
micromass said:
[tex]f:\mathbb{R}^+\rightarrow \mathbb{R}:x\rightarrow x^2[/tex]

Shouldn't that be
[tex]f:\mathbb{R}\rightarrow \mathbb{R}^{+}:x\mapsto x^2[/tex]

I've never seen this exact notation, but the following is quite familiar to me:
[tex]f:\mathbb{R}\rightarrow \mathbb{R}^{+}, f:x\mapsto x^2[/tex]
I read more physics books than math books these days. They don't seem to have a consistent notation for indicating the meanings of the variables, none the less they do make it clear what the variables in an equation mean and any restrictions on those variables are also made clear.
 
Last edited:
  • #6
Jimmy Snyder said:
Shouldn't that be
[tex]f:\mathbb{R}\rightarrow \mathbb{R}^{+}:x\mapsto x^2[/tex]

not necessarily. You're the second to make that remark...
 
  • #7
Strill said:
And frankly, I see no reason why functions should not be represented as algorithms for the purpose of teaching. Algorithms explain the relationship behind the function much more clearly and precisely than someone's lecture or essay.

An example of an uncomputable function in your chosen field:

Function: domain: Turing Machine input strings; Result: 0 if Turing machine terminates eventually, 1 if it doesn't.

A function from strings to a bit value. Completely uncomputable.
 
  • #8
Actually, I agree, I feel that the problem most high school students run into is that the mathematics is too rigorous. Kids see the crap about how a function is a 1 to 1 map between sets, which of course is ultimately the right way to think about it, and freeze up because they haven't gone through enough mathematical language (they don't even care about mathematical language). If all kids get are definitions and algorithms, i.e. this is what this concept is defined as and this is how it fits into math world, they are not going to be interested. As it is taught now, math isn't interesting until calculus.

So, I have to say, I agree that math should tone down how rigorous it is to beginners and instead teach students how to reason and analyze with math. Who cares if 99% of the population doesn't think about functions in the proper, pure math way, it's a hell of a lot better than 99% of the population who can't even think about functions!
 
  • #9
Strill said:
From elementary to high school I've had teachers who've droned on and on trying to explain minute details about the concepts they're teaching. I've almost always found it more difficult to follow the teacher's train of thought than to just learn the concept myself, so I always just read the book during lecture. I mean "read" in the loosest sense of the word though, as I'd just skim through looking for the equations. From middle-school and upwards, the textbooks were written so as to be incomprehensibly dense to any student not three grade levels higher than the grade the book was intended for. The most peculiar aspect of this arrangement was that I always found that solving the problem always depended on only a few things. Far less than the length of the teacher's lectures would suggest.

When I got to college and took computer science classes we had to document our code. For each function we needed to present a concise explanation of:

1. What the function does
2. What the function's arguments are and how they relate to what the function does
3. What conditions the function requires in order to work properly.

And it hit me. These three things are all you need in order to use any mathematics equation. And so I'm baffled. All the math and science textbooks are designed around the author raising some question about the concept, going through a derivation, and arriving at an equation that answers the original question. Even ignoring the fact that the questions raised by the book have almost always been incomprehensible to me, you still have the fact that this form of teaching results in the important information being strewn all over the place. The explanations on what the variables are could be in any chapter, the explanation of what the function does is written in terms of its derivation and mixed all throughout the section, and the conditions on the function's use are hidden somewhere in the derivation. In the worst case, you have arguments that are only defined in tiny tables in the margins of some page in the last chapter. So this makes me wonder: What is the use in making students go through all this hullabaloo? Why can't a mathematics textbook, for each equation, provide concise summaries of what the function does, what its arguments are and how they relate to the function, and what conditions invalidate the function? I see absolutely no use in making the student skip and hunt around the book every time they want to do a homework problem. I personally find it much easier to understand mathematics by relating the equations to the concepts than trying to piece together some half-hazard imprecise English explanation, or some dense, etymologically sterilized "mathematically correct" explanation.

Any decent mathematics book should do what you are saying.

Sometimes the definitions themselves are found in the Appendix or in part of the preamble of the textbook.

I do agree though that a lot of mathematics books do gloss over things and they do not retain the context that is required for a more intuitive understanding.

Having said this there are, nowadays, a lot more resources and people are realizing that there are people who need the extra context and explanation that is usually stripped out of many textbooks.

If you find a book that outlines all the structural definitions in set notation, as well all the constraints, then that should be sufficient to understand the question completely.

As for working out mathematical problems, that is not so clear cut. Everyone has problems for using results in creative ways, even the mathematical experts. I don't know if there is an optimal way to do this, and I have not come across a universal approach in my readings.

George Polya wrote on this topic in his book "How to Solve It", but I am unaware of any other sources that analyze heuristics in a more general way.
 
  • #10
PAllen said:
An example of an uncomputable function in your chosen field:

Function: domain: Turing Machine input strings; Result: 0 if Turing machine terminates eventually, 1 if it doesn't.

A function from strings to a bit value. Completely uncomputable.

What do you mean by "Completely uncomputable"? Do you mean that it cannot be computed for all Turing machines, that it cannot be computed for some Turing machines, or that it cannot be computed for a specific Turing machine? Because for a Turing machine without a rule to terminate, this function would always equal 1.

I get the feeling that this is only uncomputable because it's been defined so as to exclude some of the variables on which its result depends.

chiro said:
As for working out mathematical problems, that is not so clear cut. Everyone has problems for using results in creative ways, even the mathematical experts. I don't know if there is an optimal way to do this, and I have not come across a universal approach in my readings.

Certainly, but the purpose of most classes is to give the students a general or at least satisfactory understanding on the current topic, not to teach them every possible way of manipulating an equation. I would argue that teaching students an algorithm provides a base from which they can later understand the more creative ways of working the equations, just as teaching first graders algorithms for arithmetic provides them a base from which they can later understand more complex math concepts.
 
Last edited:
  • #11
Strill said:
What do you mean by "Completely uncomputable"? Do you mean that it cannot be computed for all Turing machines, that it cannot be computed for some Turing machines, or that it cannot be computed for a specific Turing machine? Because for a Turing machine without a rule to terminate, this function would always equal 1.

I get the feeling that this is only uncomputable because it's been defined so as to exclude some of the variables on which its result depends.

I was slightly imprecise, because I thought the context was obvious. I mean a Universal Turing Machine with at least one FINAL state.

That it is uncomputable, in principle, by any algorithm, is a fundamental result in computer science. I assumed you would be familiar with this - the example was meant to show you already knew an example of an uncomputable function, that is never the less well defined.
 
  • #12
Strill said:
Certainly, but the purpose of most classes is to give the students a general or at least satisfactory understanding on the current topic, not to teach them every possible way of manipulating an equation. I would argue that teaching students an algorithm provides a base from which they can later understand the more creative ways of working the equations, just as teaching first graders algorithms for arithmetic provides them a base from which they can later understand more complex math concepts.

This is already done in mathematical teaching, at least in the university environment that I am familiar with.

Having said this, the algorithmic approach needs to be complemented with the mathematical approach. You can not just present an algorithm with no theoretical background.

As a real example, I am doing a course on Bayesian Inference, and we have different MCMC techniques that will simulate the distribution of a set of parameters using specific models and the MCMC algorithms.

Now if you look at some of these MCMC and other similar algorithms, it doesn't make sense intuitively. These algorithms use very powerful and modern theorems to guarantee that they actually work. At least for me, the intuition was not there, and I will be reading these theorems later on to actually understand why you actually get convergence to true distributions and not take it on faith alone.
 
  • #13
PAllen said:
I was slightly imprecise, because I thought the context was obvious. I mean a Universal Turing Machine with at least one FINAL state.

That it is uncomputable, in principle, by any algorithm, is a fundamental result in computer science. I assumed you would be familiar with this - the example was meant to show you already knew an example of an uncomputable function, that is never the less well defined.
Nope, they taught us about Turing machines, but never about universal Turing machines.
 
  • #14
Strill said:
Nope, they taught us about Turing machines, but never about universal Turing machines.

A Universal Turing Machine is simply one that is general enough to emulate any other Turing Machine, therefore able to solve any computable problem. It doesn't take much. There is an example of a cellular automaton with a few simple rules that can function as a Universal Turing Machine.

See http://en.wikipedia.org/wiki/Halting_problem for a description of the famous result. However, if interested, read one of the references at the bottom. The one I studied was:

https://www.amazon.com/dp/020102988X/?tag=pfamazon01-20

However, a colleague recommends Roger Penrose "Emperor's New Mind" as having a fully adequate, more accessible treatment (you may ignore his quantum theory of consciousness; or not; as you choose; not mainstream, but Penrose is no crank).
 
  • #15
Mindscrape said:
Actually, I agree, I feel that the problem most high school students run into is that the mathematics is too rigorous. Kids see the crap about how a function is a 1 to 1 map between sets, which of course is ultimately the right way to think about it, and freeze up because they haven't gone through enough mathematical language (they don't even care about mathematical language). If all kids get are definitions and algorithms, i.e. this is what this concept is defined as and this is how it fits into math world, they are not going to be interested. As it is taught now, math isn't interesting until calculus.

So, I have to say, I agree that math should tone down how rigorous it is to beginners and instead teach students how to reason and analyze with math. Who cares if 99% of the population doesn't think about functions in the proper, pure math way, it's a hell of a lot better than 99% of the population who can't even think about functions!

One of the biggest problems I see is the disconnect that occurs between some of the foundational math concepts and the application. I'm reminded of this in our tutoring center every year. Students are taught identities like 1*x = x, but don't understand why they're taught it (and are having problems conceptualizing the operations to find lowest common denominators).

So, I'm partially agreeing with you but only in the fact that rigor is often being used as a substitute for the instructor connecting the dots between concepts. IMO the foundational concepts are being tossed aside for parroting problems in pre-college math.
 
  • #16
Strill said:
From elementary to high school I've had teachers who've droned on and on trying to explain minute details about the concepts they're teaching. I've almost always found it more difficult to follow the teacher's train of thought than to just learn the concept myself,
I can relate to what you say. In my own experience I always found theory and practice to be almost two different things.
Practice, that is solving problems and exercise, require the use of formulas that can be used in the way you describe, just like computer "functions". About those functions you just need to know basically what do they take as an input, how to treat the output and their limitations, how to use them.
By doing that, you can really ignore the theory which is behind those formulas, you use them just as tools, and just like any tool, you really can ignore how they've been built, what they are made of, etc.
Quite surprisingly, I have discovered in my school years that in general people find more difficult to solve a problem than to learn pages and pages of theory. That is, I suppose, because people in general learn things by memorizing them to heart, without much understanding the purpose of what they're learning.
 
  • #17
Ben Niehoff said:
A mathematical function is just a 1-to-1 map between sets, that is all.
You're not talking about 1-to-1 functions, are you? That's what it sounds like, where exactly one input is paired with exactly one output. If so, then that's not correct, because not all functions are 1-to-1.
 
  • #18
eumyang said:
You're not talking about 1-to-1 functions, are you? That's what it sounds like, where exactly one input is paired with exactly one output. If so, then that's not correct, because not all functions are 1-to-1.

All functions are 1 - 1. They are not all bijective. Two elements of the domain may be mapped to the same element of the range; but never one element of the domain to two elements of the range.
 
  • #19
Okay, it's a misunderstanding of the vocabulary, then. When I read "1 to 1" in Ben's previous post I assumed he was referring to a "1 to 1 correspondence," that all functions are bijective.
 
  • #20
Thanks to Bourbaki we actually have real vocabulary for these things. Personally I hate the terms "1 to 1" and "onto" because they are easily confused.

A function must be "Well Defined" but it is not necessarily injective or surjective.

Injective (1 to 1) does not mean the same thing as Well-Defined. Take a version of the simple function mentioned by micromass:
[tex]f: \mathbb R \to \mathbb R, \qquad f(x) = x^2[/tex]

http://en.wikipedia.org/wiki/Well_defined
http://en.wikipedia.org/wiki/Bijection,_injection_and_surjection

Edit: The terms "functional relation" or "right-unique" are sometimes used instead of where I am saying "well-defined."
 
Last edited:
  • #21
this sort of reminds me of a song sung by rex harrison in my fair lady: "why can't a woman be more like a man?"
 
  • #22
Strill said:
From elementary to high school I've had teachers who've droned on and on trying to explain minute details about the concepts they're teaching. I've almost always found it more difficult to follow the teacher's train of thought than to just learn the concept myself, so I always just read the book during lecture. I mean "read" in the loosest sense of the word though, as I'd just skim through looking for the equations. From middle-school and upwards, the textbooks were written so as to be incomprehensibly dense to any student not three grade levels higher than the grade the book was intended for. The most peculiar aspect of this arrangement was that I always found that solving the problem always depended on only a few things. Far less than the length of the teacher's lectures would suggest.

When I got to college and took computer science classes we had to document our code. For each function we needed to present a concise explanation of:

1. What the function does
2. What the function's arguments are and how they relate to what the function does
3. What conditions the function requires in order to work properly.

And it hit me. These three things are all you need in order to use any mathematics equation. And so I'm baffled. All the math and science textbooks are designed around the author raising some question about the concept, going through a derivation, and arriving at an equation that answers the original question. Even ignoring the fact that the questions raised by the book have almost always been incomprehensible to me, you still have the fact that this form of teaching results in the important information being strewn all over the place. The explanations on what the variables are could be in any chapter, the explanation of what the function does is written in terms of its derivation and mixed all throughout the section, and the conditions on the function's use are hidden somewhere in the derivation. In the worst case, you have arguments that are only defined in tiny tables in the margins of some page in the last chapter. So this makes me wonder: What is the use in making students go through all this hullabaloo? Why can't a mathematics textbook, for each equation, provide concise summaries of what the function does, what its arguments are and how they relate to the function, and what conditions invalidate the function? I see absolutely no use in making the student skip and hunt around the book every time they want to do a homework problem. I personally find it much easier to understand mathematics by relating the equations to the concepts than trying to piece together some half-hazard imprecise English explanation, or some dense, etymologically sterilized "mathematically correct" explanation.

Because we don't like the blue screen :biggrin:

Now more serious... documentation of code is just a descriptive task. Science is not just descriptive but also ask why.
 
  • #23
Ben Niehoff said:
The computer science way of thinking of functions is an absolutely terrible way to approach functions in mathematics. A function should not be thought of as a process you stick numbers into that computes something and then returns another number. This is the sort of thinking that leads to so much confusion over things like "0.999... = 1".

A mathematical function is just a 1-to-1 map between sets, that is all. A function doesn't have to be represented by any algorithm or process. Hell, most functions are uncomputable!

The things you write in programming code should more properly be called "subroutines", "procedures", or "methods", and it is to the great detriment of proper mathematical thinking that any programming language has co-opted the term "functions" for them.

Also, grab a dictionary and look up "haphazard".

I would agree in a general sense, but functional languages as LISP are based in the concept of function. Are not?
 
  • #24
Strill said:
the textbooks were written so as to be incomprehensibly dense to any student not three grade levels higher than the grade the book was intended for.

This is my biggest problem when learning math...
 
  • #25
Ben Niehoff said:
The computer science way of thinking of functions is an absolutely terrible way to approach functions in mathematics. A function should not be thought of as a process you stick numbers into that computes something and then returns another number.

I think the computer science way is quite good. There is no requirement that what you put in is a number or what you get out is a number. You put in something, you get out something.

Also most modern languages define function interactions in ways that are mathematically rigorous (i.e. lambda calculus).

A mathematical function is just a 1-to-1 map between sets, that is all. A function doesn't have to be represented by any algorithm or process.

And in modern computer languages, you don't have to put in the algorithm or process. One reason I think the computer science concept of functions is so powerful is that often you do not define the function that you are using until later, which means that you have to get incredibly abstract.

And then you have functions that take functions and convert them into other functions. And functions that that function-functions and turn them into function-functions, all of which without defining that those function-functions are. Or you could have a function that takes a level-n function and turns it into a level-n+1 or level-n-1 function.

The things you write in programming code should more properly be called "subroutines", "procedures", or "methods", and it is to the great detriment of proper mathematical thinking that any programming language has co-opted the term "functions" for them.

No in any sort of modern computer language (C++ or lisp or python and not Fortran) they are really are functions, and you can do anything with them that you can with the mathematical definition of functions.
 
Last edited:
  • #26
As an educator who spent most of my life in industry, I agree with the general tone of the OP, in that dry numeracy is, to me, not practical in an education sense, especially with teens, and especially with textbooks often written so poorly. My HS math was so abysmal that I thought I had no aptitude, but later in college when I did an engineering qual, I came top of the class, and loved calculus. Relevance, interest and fun are often absent in HS numeracy, perhaps because there is so much to cover that there's little time to have some fun with it. This year I'm trying to add science into how I teach numeracy, knowing that at least I can spark a little relevance and fun. Bottle rockets anyone?
 

FAQ: Why Can't Math Teaching Be More Like Computer Science?

1. Why can't math teaching be more like computer science?

Math teaching and computer science are two distinct subjects with different goals and methods of instruction. Math is a fundamental subject that teaches problem-solving skills and critical thinking, while computer science focuses on programming and algorithmic thinking. Additionally, the way students learn and understand math concepts may differ from how they learn computer science. Therefore, it may not be feasible or beneficial to merge the two subjects in teaching.

2. Can computer science concepts be applied to math teaching?

Yes, certain computer science concepts can be applied to math teaching, such as the use of technology and coding to solve math problems. These tools can enhance the learning experience and make it more interactive and engaging for students. However, the core principles of math teaching should still be centered around understanding and solving mathematical problems.

3. How can math teaching benefit from computer science?

Computer science can provide valuable tools and techniques that can aid in teaching math. For example, using programming languages and data analysis software can help students visualize and analyze complex math problems. Additionally, computer science concepts such as algorithms and logical thinking can be applied to solving math problems, promoting a deeper understanding of mathematical concepts.

4. What are the challenges of incorporating computer science into math teaching?

One of the main challenges is the lack of resources and training for teachers to effectively incorporate computer science into their math teaching. Additionally, some students may not have access to technology or may struggle with programming, which could hinder their learning. Another challenge is finding a balance between using technology and traditional teaching methods to ensure that students are still developing their fundamental math skills.

5. Is there a demand for integrating computer science into math teaching?

Yes, there is a growing demand for incorporating computer science into math teaching as technology continues to shape our world. Many jobs in the future will require a combination of math and computer science skills, and integrating these subjects in education can better prepare students for the workforce. However, it is essential to carefully consider the best approaches and methods for incorporating computer science into math teaching to ensure its effectiveness.

Similar threads

Back
Top