# Graphics: relationship between floor and ceiling functions

I've added a PDF version of the picture above to the Graphics page and if you're like most people, it needs an explanation. The curriculum I'm covering, along with the supporting book, talks only about the greatest integer function which is denoted by the book as $\llbracket x \rrbracket$. I find that annoying for several reasons. First, it isn't that clear from the name what the function does. Wikipedia mention that a similar looking symbol was used by Gauss and was the standard until the floor and ceiling functions were introduced in 1962. Secondly, the notation doesn't give any indication what the function does. So when you follow the book all sorts of needless confusion follows because the notation and naming aren't really intuitive. Compare that with the floor and ceiling functions with notation $\lfloor x \rfloor$ and $\lceil x \rceil$. The little "feet" at the bottom of the floor function are suggestive of rounding the values down and the "feet" at the top of the ceiling function suggest rounding the values up. The floor function is the one that occurs most naturally in the curriculum, such as in determining the number of integers less than 1,000,000 that are divisible by either 5 or 2 (using the inclusion/exclusion) but learning about just the greatest integer function causes confusion because the students aren't sure (poor naming) about how to plot it combined with where is the open circle and where is the closed circle. Students should learn about the floor and ceiling functions at the same time.

The diagram helps to make sense of the floor function and ceiling function and the relationship between them and the line $y=x$. All three functions have been plotted together and from that diagram you can see:

1. $\lfloor x \rfloor=\lceil x \rceil$ if and only if $x$ is an integer.
2. $\lfloor x \rfloor=x$ if and only if $x$ is an integer and $\lceil x \rceil=x$ if and only if $x$ is an integer.
3. when n is an integer then the intervals $(n,n+1)$ have the ceiling function above the floor function; in fact, $\lceil x \rceil-\lfloor x \rfloor =1$.
4. By visualizing the graph (or using $y=x$ as a guide) the student can construct floor and ceiling function more easily and will remember which sides gets the open and closed circles.

The drawback in changing the notation and introducing the more standard notation are students complaining that the book doesn't cover the material so they shouldn't be responsible for it. Teaching to US students has been quite an experience. It would be great if the makers of math textbooks would teach floor functions and ceiling functions rather than the greatest integer function. Half a century behind--time to change! It will make the material easier to learn and take away student excuses.

# Odds and Ends: August 6, 2014

Several odds and ends to mention:

1. I've added another problem to the Sagetex: Combinatorics/Probability page.  The problem has students determine all the divisors of number. The problem has also been added to the Problems page.
2. The NY Times has a good article: Why Do Americans Stink at Math?" and it's focus is not what you might expect from the title. One of Japan's most famous math teachers who, "once attracting 1,000 observers to a public lesson" goes to the United States to learn more about the best methods for teaching math only to find that, "The Americans might have invented the world’s best methods for teaching math to children, but it was difficult to find anyone actually using them."
3. A judge dismisses a lawsuit filed by a teacher who was fired for critical comments she made on her blog about her math class. The judge, "...ruled that the defendants were within their rights to conclude that the teacher's posts 'would erode the necessary trust and respect between Munroe and her students.' ".

# Statistics isn't really math

Several months ago I was reminded of how old I was. In a discussion involving numerous teachers I casually stated that "...statistics isn't really math" and the result was confusion. I quickly clarified to my position to say that although theoretical statistics is math (just analysis) a lot of the application (confidence intervals, regression, data analysis) isn't. That distinction didn't clear up the confusion. With time to think about the conversation I think it's a generational issue. The fact is I never had statistics in high school while in college the course wasn't required to major in mathematics (so I didn't take it). It wasn't until I was in graduate school that I had to take statistics and the closely related EDA (exploratory data analysis). Nowadays, however, statistics is a required part of the mathematical curriculum at the high school level so it's not so surprising that my younger colleagues have identified statistics as mathematics--they've been forced to study it in math class.

But just because statistics has a lot of mathematical calculations doesn't mean it's math. Engineering, physics, mathematical economics, and many other courses rely on mathematics yet they aren't called mathematics. You can see some of that distinction is recognized f you look at the departments of many universities. Bigger universities (such as Berkeley or Texas A&M) have a statistics department which is separate from the math department (much like engineering would be a separate department). Other schools (such as here or here or here) have a department of mathematics AND statistics; they specifically differentiate between the two subjects.

Even many people well versed in statistics/EDA recognize the difference; my EDA professor was quite vocal in telling us that EDA was more of an art than a science. He emphasized that no set of statistical measures (mean/median/mode/std/...) could do a better job at determining whether data was normally distributed than he could do by judging normal probability plots with his eyes. The behavior "in the tails" was particularly important.

There are other statistical experts who feel the same. In addition to W.M. Briggs (see his explanation of confidence intervals, regression, p-values) look at the work of statisticians George W. Cobb and David S. Moore who published among, among other articles, "Statistics and Mathematics: Tension and Cooperation". The American Mathematical Monthly 107 (7): 615–630 and "Mathematics, Statistics, and Teaching"
George W. Cobb; David S. Moore, The American Mathematical Monthly, Vol. 104, No. 9. (Nov., 1997), pp. 801-823. These articles and others can give you a more in depth, nuanced view (with plenty of examples) on why statisticians think statistics isn't math.

AMSTAT NEWS gives a quick summary:

Statistics, however, is not a subfield of mathematics. Like economics and physics, statistics uses mathematics in essential ways, “but has origins, subject matter, foundational questions, and standards that are distinct from those of mathematics” (Moore, 1988, p. 3). David Moore, statistics educator and former president of the American Statistical Association, gives the following four compelling reasons why statistics is a separate discipline from mathematics:

• Statistics does not originate within mathematics
• The aims and foundational controversies of statistics are unrelated to those of mathematics
• The standards of excellence in statistics differ from those of mathematics
• Statistics does not participate in the inter-relationships among subfields that characterize contemporary mathematics

Besides my simplistic observations that math gives exact answers while statistics will give you confidence intervals for the answer or that EDA can have multiple regression models for the data set (there isn't 1 correct model) you'll also find that people practicing statistics often get the wrong answer. The older crowd might remember "A Random Walk Down Wall Street"; the financial industry used the normal distribution for decades to model risk in the market. With decades of data showing the black swan events occur much more frequently than the normal distribution would predict, its been abandoned for "fat tailed" distributions. That doesn't sound like mathematics, does it?

Statistics is important, but it isn't really math and the spread of statistics into the math curriculum is deluding people that it is. The thinking process, as explained in the links above, is much different than the mathematical thinking process, so pushing statistics into math class is at odds with students learn the mathematical thinking process. As WM Briggs says, "Equations become a scapegoat: when what was supposed to have been true or likely because of statistical calculation turns out to be false and even ridiculous, the culprits who touted the falsity point the finger of blame at the math.....Much nonsense in the last century has been promulgated because of sloppy thinking in statistics. It is time to stop thinking about the mathematics and more on the meaning.". If we want students to get better at math we should stop the spread of statistics into math classes and replace it with math. Discrete math would be the natural candidate as it has applications to computer science.

# Sagetex: Combinatorics 10/11

I've added 2 problems to the Sagetex: Combinatorics/Statistics page.

Problem Type 10: Suppose a system has 6 independent components, each of which is equally likely to work. Now suppose the system works if and only 5 components work. What is the probability the system works?

In problem type 10 the number of independent components is random. Problem Type 11 has students calculate C(n,k) and P(n,k) for random n, k.

# Sagetex: Random Bipartite Graphs

Summer's here and I've had the luxury to just play around. I try to put extra math into the curriculum through either warm up problems, extra credit problems, or examples in the  curriculum that I follow. Discrete math figures prominently in the extra math. In my opinion, discrete math deserves a prominent place in the high school curriculum; it certainly deserves a bigger share of the curriculum. But in a top down system you can't add extra material to the curriculum that the average math teacher has never seen and expect it to be implemented properly.

Graph theory is ideal because it requires little mathematical background to understand and solve problems yet it also provides a way to introduce theorems (many of a basic nature that high school students can understand) along with counterexamples thereby providing a basic primer into the sort of considerations that mathematicians are looking at. In the past, geometry had been the topic for introducing proofs but it's dry as dust and now common core has ripped out much of the proof content so that your typical student can go through math and with very limited exposure to theorems/proofs/counterexamples.

Graph theory would be a way to get that back in a way that is much more interesting than the dry "2 parallel lines are cut by a transversal" proofs that have bored generation after generation. You can even connect to matrices through the adjacency matrix of a graph. Topics like recurrence relations and generating functions complement the curriculum of calculus (power series) and probability. Unfortunately, common core has de-emphasized proofs and matrices and upped the exposure to statistics, so I think it's my duty to undue the damage of the curriculum.

Which brings us back to the current post. Bipartite graphs which have the same number of vertices in each partite set provide a way of determining whether a suitable job can be found for each person so that everyone has a job (see the "Matching" section for the link above). One partite set with vertices, say, A,B,C,D have edges to the other partite set of vertices (a,b,c,d) representing jobs based on whether the person is qualified to do the job. The question becomes, Is there an assignment of jobs so that everyone has a job they're qualified to do? If yes, then there is a (perfect) matching for the graph. If no then there needs to be an explanation as to why no such assignment is possible (Hall's Marriage Theorem).

As a teacher the problem I usually face is finding lots of examples that can be used in the classroom or on a test/quiz. Sage/sagetex is the tool that works best for me. The code generates bipartite graphs so that the number of vertices in each partite set is equal and the probability of an edge being selected for the picture is 1/2.  The code is posted on the Graphics page along with sample output (the PDF shown above). The number of vertices is a random number set between 4 and 8 here: N = Integer(randint(4,8)). The probability of the edge being chosen is set here: if Integer(randint(0,1))==1:

It would be relatively simple to choose a larger number than 1, such as 9, and draw the edge if the number chosen is between 0 and 7 but don't draw the edge if the number chosen is 8 or 9. That would make the probability of the edge appearing to be 80%.

Through setting the parameters to your liking and repeatedly compiling the code you can generate many examples that you can use. If you're particularly ambitious you can add extra code spit out example that have (or fail to have) a perfect matching. Of course, Sage can help with that.

# Odds and Ends: July 1, 2014

A few minor changes:

1. I've added the flowchart/tree diagram (PDF and tex file) to the Graphics page. When talking about linear systems I've found students slow to pick up the vocabulary of consistent/inconsistent and dependent/independent. The flow chart helps students to remember the difference.
2. The important graph from the last post, has been posed as a problem: Find the derivative of $f(x)=x^2\sin(1/x^2)$ if $x \neq 0$ and $f(0)=0$ at 0. I think it would be well suited as a warm up problem at the beginning of class to motivate the subsequent discussion.
3. The NY Times has a good article on the difficulties with Common Core.

# A very important graph

Everyone studying mathematics needs to know some typical functions and some important characteristics. At the lowest level you need to know the trig functions and their (as applicable) domain, asymptotes, midlines, periods, etc and for exponentials and logarithms you should know the domains and asymptotes. At a slightly more advanced level, students should be aware of the  function $\frac{\sin(x)}{x}$ and how its limit exists at 0 (and is equal to 1) even though the function isn't defined there. Or that $x\sin(1/x)$ is a function whose limit at 0 exists and can be determined using the Squeeze Theorem. The graph show above is also a function that needs to filed away but, surprisingly, it isn't well known. I say that because I have trouble finding it in a typical calculus text (or the lesson it teaches). That's a shame; the function is $f(x)=x^2\sin(1/x^2)$ if $x \neq 0$ and $f(0)=0$.

Take the derivative and you'll get $f'(x)=x\sin(1/x^2)-(2/x)\cos(1/x^2)$. And the derivative at 0? Chances are overwhelming that your students will say the derivative doesn't exist at 0 because $f'(0)$ isn't defined. But that's wrong. That won't be apparent by looking at the graph of the derivative:For the typical students who dive for a calculator so they can avoid thinking for themselves, they'll get to see that the calculator isn't going to help out here. They'll have to use the definition of the derivative (and the Squeeze Theorem). That's good practice. Ultimately this function shows that derivative can exist at a point even if the formula $f'(x)$ doesn't exist there. For all these reasons, this graph should appear in every calculus book.

The PDFs have been posted on the Graphics page.

# Sagetex: Combinatorics/Probability (8/9)

I've added 2 more problems to the Sagetex: Combinatorics/Probability page. The problem above has the form:

A high school committee of 6 is to be made from 32 boys and 41 girls. Within this set of students there are 2 senior boys and 3 senior girls. How many committees of 3 boys and 3 girls are there that contain at least one senior boy and one senior girl?

It's worth noting an interesting aspect of this problem: in order to properly count, the various cases need to be listed and this means the output of the solution will be dynamic in the sense that the number of cases to be listed changes in the solution will change depending on our specific number of senior boys and girls. In the case of 2 senior boys and 3 senior girls we need to throw out committees with

• no senior boy and no senior girl
• no senior boy and 1 senior girl
• no senior boy and 2 senior girls
• no senior boy and 3 senior girls
• no senior girl and 1 senior boy
• no senior girl and 2 senior boy

Change the number of senior girls or senior boys and that list given in the solution changes.

The output of the various cases is handled in the sagesilent block. We need to avoid counting no senior boy and no senior girl twice, so no senior boy and no senior girl is calculated here:

NoSeniors = binomial(girls-Sgirls,3)*binomial(boys-Sboys,3)

and 2 FOR loops create the rest of the cases. Here the committees with 0 senior girls are all created

for i in range(1,Sboys+1):
output += r"$0$ senior girls and $%s$ senior boys: $C(%s, 3)\cdot C(%s,%s)\cdot C(%s,%s)$\\"%(i,girls-Sgirls,Sboys,i,boys-Sboys,3-i)
remove += binomial(girls-Sgirls,3)*binomial(Sboys,i)*binomial(boys-Sboys,3-i)

A similar loop handles 0 senior boys. Note that 3 is hard coded. That's the number of girls (and boys on the committee).  Increasing that number will make too many cases to enumerate for a test. Likewise

Sboys = Integer(randint(2,3))
Sgirls = Integer(randint(2,3))

keeps the problem size more reasonable as well; 6 cases is enough and, depending on the ability of your class, it might be more appropriate to decrease the number of cases; i.e., make the hard coded 3 a two.

# Sagetex: Combinatorics problems (6/7)

I've added 2 more problems (along with the solution) to the collection of randomized problems on the Sagetex:  Combinatorics/Probability page. The two new problems have the following form:

Problem Type 6: A committee will be made from 5 English teachers, 3 math teachers, and 4 history teachers. If the committee must have 2 teachers from different disciplines then how many committees are there?

Problem Type 7: How many nonnegative integers less than 100000
contain the digit 5?

# Handouts: Notes on Induction

I've added some notes on weak and strong induction; they're posted on the Handouts page. The notes are a stripped down version that you'll need to flesh out. While I've given a motivation, definitions, example problems, and then an assortment of problems, I've left out a lot that you'll probably want to fill in. A high school level induction to induction shouldn't be the clean sanitized version you'll find in the notes; it should include the process of getting to the answer. That is, rather than present the proof as given in the examples, I would explain the scratchwork that gets you to the answer which is then cleaned up into the final version given in the notes.

The notes are a hack of the LeGrand Orange book template to 1. Get an article version 2. change the color 3. add green and red boxes to highlight information.

The large assortment of problems contains problems of varying difficulty so you'll need to work them out to decide what level is best for your students.