Sorting Competition

Today we concluded our unit on sorting algorithms in Computing Science 12. I was very impressed by the work the class did to prepare. Students were responsible to research 2 O(n^2) and 2 O(nlgn) sorting algorithms and 1 wildcard that could be anything they like. The wildcard sort would be with integers so students could learn about sorting algorithms that are not comparison based (Radix, Bucket, Counting, etc.),  if they wanted to (not a requirement). You can read more about it here.


Students have to implement an interface (download it here) to “plug” into the competition. I built a skeleton project that looks a little cheesy but you can see visually who’s winning as each round completes. I’m not promising it’s perfect, but it added the dramatic effect that had everyone staying in a lunch to watch the results.

Get your copy here (a Greenfoot project).

You’ll probably do your own tinkering but here’s a few hints about how to setup the competition:

There are two variables to control the size of the test data generated. Depending on the speed of your computer and number of competitors you will probably want to adjust these.

  • public static final int SIZEN2 = 1000;
  • public static final int SIZENLGN = 100000;

To add your students to the competition they must load their classes into the project and add a new Object from their class to the loadCompetitors() method.

When you compile the project it will start running immediately. Click on the button at the bottom to determine which algorithm will run during the competition. Then hit the usual Greenfoot “play” button and watch the competition unfold. Once the competition is finished just click the button to indicate what the next one will be and you’re ready to go again.

Points are by placement. In a race with 10 competitors, 1st place gets 10 points, 2nd gets 9, 3rd gets 8, … In the event of a time, everyone in the tie gets the lowest amount of that group. For example if three people finished 2nd the points would be 10 for 1st, 7 for 2nd, 7 for 3rd, 7 for 4th, and 6 for fifth, … The competition checks to see if data is sorted properly (it can be either ascending or descending). When a student’s algorithm did not sort the data they are assigned a time of Integer.MAX_VALUE to place them in last.

Ratios Lab

This was a fun lab involving ratios that we did over the last couple of classes.

I guess I got tired of reading about paint mixture problems in textbooks and decided this would be a lot more fun (and it was). The supplies list is attached in the word document above, but it cost less than $10 and most of it can be reused by our math department.

What I liked about mixing the colors was students get to see how ratios maintain a proportion (otherwise the color does not match). Normally you’d have a question like:

  • “Paint is mixed in a ratio 3 parts red : 5 parts blue. How much blue paint should be added to 12L or red paint in order to produce the color?”

Students that lack understanding will typically come up with 14L (add 9L to both Red and Blue). It just doesn’t have the same punch when you try to explain as when they see it first hand.

Students at work:


The “target” colors students were comparing their mixes against:

photo 1


Success (one of the matches)!

photo 2


I feel like some feedback on the lab itself might help improve it (reducing the number of questions in the tables or omitting them altogether). If you try it let me know how it goes.



Equivalence is one of the big ideas in Mathematics. In grade 8 we work with fractions, decimals, percentages, and ratios. Basically we work with numbers a lot. Unfortunately students tend to think of these representations as being different rather than equivalent because they are taught in separate sections of a textbook and likely different units during the school year. In fact, they may never revisit the topic again once taught.

This year I have been working with the idea of equivalence since September with the hope that students will develop better number sense and become familiar with equivalence as it becomes more abstract later on (ex. convert 3x2+6x+5 to vertex form).

We looked at percentage of a number recently and students could find their own strategies for dealing with simple cases like:

  • 75% of 100 (from definition)
  • 10% of 50 (by dividing 10 by 2 or dividing 50 by 10)

Where they started to generalize percentages as a proportion was when I posed the questions like this:

  • 50% of 30
  • 25% of 80

And asked if they could change the context to something other than percentages. Most made the connection between 50% and 1/2 and then could see that 25% was 1/4 (or 25/100) and that asking for the percent of a number was equivalent to asking for the portion of a number.

The beautiful part about this was I never prompted them to multiply by the percent and divide by 100. They made their own sense of the concept and were able to apply it.

One activity I did recently with equivalence and percentages looked like this: Grouping numbers. There was a lot of excellent conversations about how the numbers were related. Give it a try!

To Calculate or Not to Calculate


In my undergrad I remember one of my professors stating that “real mathematicians use  a computer to do algebra”. The context of the statement was during very tedious algebraic work on a Calculus problem, which he made a mistake. None of us would argue that his careless mistake made him any less brilliant but rather it illustrates the fact that if the computer could do it for him faster and with greater accuracy why wouldn’t you use one? The computer can’t think through the problem solving process for you (although it can solve problems) but it certainly can make the process more efficient and allow problem solving that otherwise wouldn’t be possible/feasible by hand.

I did a Google search for: “ios app solve math equations step by step” while writing this. The top two hits were:

I’m sure quite a few teachers are frustrated by these apps, some might even be concerned about their job security (possibly also when they look at Khan Academy). Recently there was a discussion on the BC Association of Mathematics Teachers (BCAMT) email list around students using Wolfram Alpha to solve problems for them. Regardless of your position, access to and answers for the content we used to teach is now widely available. So what becomes of a mathematics education then?

This is all the buzz at the moment but also the reason there is a push to stop focusing on content and start developing skills that make successful mathematicians. If you haven’t thought about mathematics beyond the content you practiced with (solving equations, graphing functions, Calculus, etc.) I highly recommend you read about the Mathematical Habits of Mind.

As we reflect on how mathematics education is changing I think your position on calculator usage reflects where you are in that process. Do you see calculators as a tool to empower students or help them avoid learning mathematics? If you have the time, Conrad Wolfram (yes, the same as Wolfram Alpha) gave a TED talk about this:

From rockets to stock markets, math powers many of humanity’s most thrilling creations. So why do kids lose interest? Conrad Wolfram says the part of math we teach — calculation by hand — isn’t just tedious, it’s mostly irrelevant to real mathematics and the real world.



who_needs_oil_ride_the_bus_failReasoning is one of the skills that makes studying mathematics worthwhile. Lots of problems aren’t grounded in any particularly useful context but all of them can involve reasoning… if you plan for it.

That’s a pretty big if. Reasoning generally involves resolving some kind of conflict so if teach my students to master a formula or procedure, then I’m likely to reduce the chances of good reasoning skills being used.

As the Math 10 provincial approaches, lines are a part of the exam that we discussed in the math department. So, even though I’m not teaching grade 10 now, I decided to try and put together some questions to encourage discussion. You can find them here if you are interested.

There are two goals in that assignment. I want students to communicate their work with each other and to link together different 4 representations of the same concept (linear relations) to help them develop it further:

  • Symbolic
  • Numerical
  • Graphical
  • Verbal

In the first question there are many lines that can cover the points so students can discuss whether or not they have met the goal without necessarily having the same answer. They may also be skeptical of another student’s answer and start an argument to figure out if the different answer is still correct. They can also try to find out how few lines are needed to cover the points by being more strategic.


The second question puts all 4 representations together and asks students to group them. I used lines that share properties (that I hope they discuss) among their:

  • Slopes (same, perpendicular, parallel)
  • x-intercepts
  • y-intercepts
  • overlapping lines (ie. 2x+y-8=0 and y=-2x+8)groups

Finally, I like the activity book called “Get it Together”. It’s a pretty simple teaching strategy to get students talking about math. The first example is more typical, while the second is challenging.


Hope you like the idea(s)!