Statistical factoids which are actually true

I have often discussed with my students about the hilarity that ensues when one conflates correlation with causation. The lesson, of course, is that they should never be confused, otherwise you can conclude things like “World hunger is caused by a lack of television sets.” Get it? Our first world has lots of TV sets and not much hunger. The third world lacks TV sets and has a great deal of world hunger. So, the solution is that we can ship our TV sets to the third world, and world hunger can be eradicated. While I don’t have the numbers, I would assume the correlation exists. Whether causation exists is a whole other matter, and is much more difficult to prove.

So, to explain the title of this blog, I mean “actually true” in the sense that the correlations are for real; but not the causation necessarily.

I am proposing here to make a few (not too many) posts in honor of a website called Spurious Correlations.

Currently, its front page reassures us that while it is true that government spending on science and technology correlates positively, and strongly, with death by suicide, we ought to fall short on curbing spending on science research, as some of that science might be about how to reduce the incidents of suicide.

Further down that page, I am not sure what to make of the high correlation shown between per capita cheese consumption, and the number of people who died after being tangled in their bedsheets. Or of the relationship between the number of people who fell and drowned out of their fishing boat, and the marriage rate in Kentucky.

But one of the perks of the website is in its ability to conjure up statsistics based on user choices. Here was the result of some playing around I did on their website:

They appear to prefer to show all of their graphs in time series, which still shows the data more or less rising and falling together, but linear correlations are nicer. They offered the data that was used to plot this graph, and I was able use that data to make my own scatterplot relating the data to each other rather than against time, showing the data has the same r value:

Now I can feel confident in saying that if there are, say, a total of 84,000 deaths due to cancer on the 52 Thursdays of any given year, there will be 15,650 Lawyers practising in Tennessee that year also. I have also worked out that if you got rid of all of the Tennessee lawyers, we would save the lives of just over 20,000 cancer patients per year. Isn’t statistics great?

When you take the square root of the coefficient of determination, you get 0.971299, which agrees with the r value offered on their website. The data, according to the website, originates from the Centre for Disease Control and the American Bar Association.

The greatest advance in computer technology

HP TX-2 Bought in 2007, it sported 4 USB ports, a DVD drive, two expansion ports, a VGA port, and an IR remote control.

My three HP laptops I have serve as latter-day museum pieces of how technology has progressed. I am not trying to slag Hewlett-Packard. I like their printers, and despite their reputation, I also like their laptops. Today, I am mentioning them as a microcosm of how technology has progressed. What can be said about HP can be said across the industry. HP is nothing special in this regard. These are all full laptops with attached keyboards. They all have rotating displays with a webcam, onboard stereo mikes, stereo speakers, a touchscreen and a mousepad. Also, it is fair to say all of these laptops were purchased used (saving nearly a thousand dollars apiece off the prices when new), but all have been fully functional from the first day, and are still functional.

As you read the captions on each successive illustration going from top to bottom, what I don’t mention is that, of course, video is more advanced; and the last laptop, the Elitebook is, in my experience, the first to offer an internal SSD out of the box. The Elitebook also has nowhere near the heat problems suffered by my TX2.

HP TM-2 Bought in 2010, it removed one USB port, and one of the expansion ports. It also removed the DVD ROM and no longer has an IR remote. It also removed the VGA but replaced it with an HDMI port.

But these advances are small compared to the greatest advance the progression of these laptops show: the elimination of major features, and the marketing effort on the part of computer companies that this is a “good thing”. By the time we get to the Elitebook, we no longer have a DVD drive, and have eliminated half of our USB ports. Neither of the two USB ports that remain are USB3, either. Not mentioned in the captions, are the elimination of the spare headphone jack, and the microphone jack. The combination mike/headphone jack on the Elitebook won’t support actual microphones, supporting instead, perhaps, mikes built into the headset. My headset uses a USB connection, and wouldn’t require an eighth-inch jack connection. But microphone support is terrible, making the built-in mikes your only good option.

Elitebook Revolve 810
HP EliteBook Revolve 810 Bought in 2015, it lacks all of the features the TM-2 was lacking, except one less USB port, and no touch pen. It also has neither VGA nor HDMI, but it has something touted to be a “dual display port” which fits nothing on any equipment I have, but can be converted to HDMI with the right adapter cable. It is whisper-quiet, partly because the speakers are not that great.

One thing (out of many other reasons) that motivated me not to get rid of my two older laptops is the one reason anyone would buy a convertible tablet in the first place: apart from using the screen for direct windows navigation, you can also write documents in your own handwriting, or make drawings freehand on the tablet screen. I do make use of this feature, and found to my horror that the Elitebook has really terrible support of freehand writing and drawing. The other two actually have pretty good support, and it was a great disappointment to see this feature lacking in the Elitebook despite a faster CPU and graphics processor. Apart from not having a stylus, the craggy way it renders drawings of straight lines when you do use a stylus – and even if you use a ruler – has been well documented in many other blogs and video reviews.

But even with the HP EliteBook, Apple and Google have gone even further over the deep end with elimination of features, with consumers willing to pay more for equipment that can do less. It is a marketer’s wet dream, made manifest in reality. Who needs a keyboard at all, or any external connectors? Use Bluetooth for all your peripherals (nowadays, the keyboard is a peripheral), and “the cloud” as your external hard drive. And still, these pieces of crippled hardware are so popular, they almost sell themselves. Having only bluetooth restricts flexibility, since a peripheral that doesn’t use bluetooth, such as a USB drive, is no longer an option for owners of these devices. To store, I would only have “the cloud”, and I would have to hope I would have free internet access everywhere I go in order to access my data. It is quite possible that users who rely on cloud storage are paying monthly for their internet connection, and paying monthly again for “cloud” storage. Of course Apple, Google and Microsoft are happy to provide cloud services so you can store as much data as possible, and to autosave your documents in the cloud to maximize your use of their cloud services.

Update on Tex editors

Nearly three years ago, I wrote about a comparison of LaTeX editors. Soon after, I began to use a third editor which, if you are a latex expert, you almost certaintly would have heard about, and are probably in fact using TeXStudio, an editor that has been around for close to a decade, but never appeared to show up on Linux installation packages. The editors that showed up, at least for me, were LyX and TeXmacs.

TeXstudio, once I discovered it, I installed it everywhere I could: on my Windows 10 and 7 machines, on my Linux installations, and even on Cygwin, even though they already had a Windows installation. To this day I have not seen any difference in output or functionality. All invocations of TeXstudio require a lot of time and packages for an installation of enough features.

This is TeXstudio, with the horizontal toolbars shown, along with part of the workspace. There are two vertical toolbars there, also partially shown.

First thing’s first: the editor. In LyX and TeXmacs, I needed to bail out of the editor, and export the code to LaTeX whenever I needed to do any serious equation editing or table editing or the like. In contrast, TeXstudio leaves me with no reason to ever leave the editor. First of all, the editor allows for native latex code to be entered. If there are pieces of Latex code that you don’t know, or have a fuzzy knowledge about, there is probably an icon or menu item that covers it. For document formatting, a menu item leads to a form dialog where you can fill in the form with sensible information pertaining to your particular document, default font size, paper size, margins, and so on. The ouput of this dialog is the preamble section to the LaTeX source file. To the rest of that source file, you add your document and formatting codes.  It is a kind of “notepad” for LaTeX, with syntax highlighting and shortcut buttons, menus and dialogs. It comes close to being WYSIWYG, in that “compiling” the code and pressing  the green “play” button brings up a window with the output of the existing code you are editing. It is not a live update, but it saves you the agony of saving, going on the command line compiling the code, and viewing in seeminly endless cycles. Now you can view the formatted document at the press of the play button.

A Look at Geometry in Grade 10: Circles

From Handal, et al. (2013), a diagram which includes technological knowledge, also a consideration for math teachers, or any teacher using 21st century learning.

Pedagogical content knowledge is a type of knowledge that is unique to teachers, and is based on the manner in which teachers relate their pedagogical knowledge (what they know about teaching) to their subject matter knowledge (what they know about what they teach) (Cochran, Kathryn, 1997). This concern seems especially pertinent for math teachers. I attempt to show how subject matter knowledge and pedagogical knowledge are both essential in getting students to the point where they can be assessed on a circles problem in grade 10 academic math.

Teachers are reminded at the outset that while knowing the subject is one essential ingredient, so is knowing your students and your age group. Students must be known individually, to become familiar with how they see the concepts, in their own words. This means that in a normal class setting, students must be able to be able to express themselves without fear of judgement. The teacher also needs to be familiar student IEPs, the supports in their school (student success teacher, guidance counsellors, social workers, and so on).
The teacher is urged to also try some geometry problems on their own. More than informing one’s content knowledge, the teacher is also learning to anticipate problems that may arise that affect lesson planning. According to Aslan-Tutak and Adams (2015), a lack of content knowledge robs teachers of being able to properly assess students real needs and strengths in the classroom.

This article takes a look at geometry in grade 10 and is written to raise awareness of the possible connectedness of aspects of geometry to other parts of the math program, and to also discuss implications for the learner.

In the Analytic Geometry strand, the Ministry (2005) gives as two of its overall expectations for the course MPM2D (Academic 10 Math):

  1. By the end of the course, students will model and solve problems involving the intersection of two straight lines;
  2. By the end of the course, students will solve problems using analytic geometry involving properties of lines and line segments.

Addressing both circles and the activity here involving them, the specific expectations look like this:

  1. By the end of the course, students will develop the formula for the midpoint of a line segment, and use this formula to solve problems.
  2. By the end of the course, students will  develop the formula for the equation of a circle with centre (0, 0) and radius r, by applying the distance formula for the length of  a line segment, d^2 = (x_2 - x_1)^2 + (y_2 - y_1)^2.
  3. By the end of the course, students will determine the radius of a circle with centre (0, 0), given its equation; write the equation of a circle with centre (0, 0), given the radius; and sketch the circle, given the equation in the form x^2 + y^2 = r^2.

Grade 10 appears to be the first and last time circles are covered as a relation. I would also tell students about a circle centred at the point (h, k), whose equation, (x - h)^2 + (y - k)^2 = r^2 is not that different from the distance formula shown above.

Student maturation. The chidren in this grade would generally be between 15-16 years old, and in most cases, maturationally ready to tackle math questions of some degree of complexity, even though impusivity is still an issue for most students at that age (Price, 2005). According to Price (2005), while impulsivity can be seen as a problem for adolescents of this age group regardless of their proficiency in math, she would also say that it can be regarded as an asset, that adolescent passion should be taken advantage of, and directed toward productive ends.

A task such as the three-point circle described below takes advatage of this passion, by subjecting a well-known property of circles to scrutiny. Beginning a rich task with a question starting with “Is it always true that three points always make a circle?” invites the student to try and make the idea fail. And of course, it does, sometimes. The student can then be asked, under what conditions does the idea fail, and can we re-state the conjecture that “three points make a circle” into something that is always true?

Big idea: Any three points can be used to form a circle if they are not on the same line. A rich task or rich assessment built on this will take with it a substatntial amount of the analytic geometry strand, and can wind up being among the last topics covered in a unit. The idea of three points making a circle is an old geometry problem. A much simpler, but less interesting, circle problem would be to have 3 points all some distance r from the origin to make a circle, which still loses none of the grade 10 content. Whenever I teach grade 10, I aim for a circle with an arbitrary centre, since so much of grade 10 math is embedded in it.

Rich problems such as this can be considered along the way as the result of a series of lessons. The sequence must be determined by the teacher

This can be either performed by the student using either geometry software, or using pencil and paper. It has been my experience that the latter option requires more time for the student, and more instructional time for the teacher, especially if the circle is not at the origin, which it likely won’t be given the prior requirement of “any three points”. This almost always requires the equation (x - h)^2 + (y - k)^2 = r^2, since the centre will be at some arbitrary point (h, k) rather than the point (0, 0).

It has been my experience that some learners take very well to this problem, while others are in need of assistance. If time is too tight, and students generally did well in the Quadratics strand, you might consider letting your students use Geometer’s Sketchpad to help solve the problem. Below, is a video where I demonstrate and discuss the use of Sketchpad for this problem.

Mostly, I will emphasize the benefits of a pencil-and-paper solution. And in the next video below, I demonstrate the use of an old fashioned geometry set and paper. The background music in this video is public domain, and there is no dialog, so feel free to turn off the volume (or turn it up). Since I was emphasizing technique in this video, I did not use graph paper.

A suggested lesson sequence to get to this point of the course (each of these could be one or more periods of lessons, covering other Big Ideas along the way):

  1. Solving lines and linear systems — point of intersection: a) Solve by substitution; b) Solve by elimination (this could take several periods)
  2. Midpoint of a line segment (can teach length of a line segment during this time to help confirm what we obtain from the formula \left( \frac{x_2 - x_1}{2}, \frac{y_2 - y_1}{2}\right) is really the midpoint) (1-2 periods)
  3. Solving quadratic systems (in Quadratic relations, the part on expansion of factors and solving is essential; however, the quadratic formula is not needed for this activity). (a couple of weeks)
  4. The equation of a circle a) centred at the origin (x^2 + y^2 = r^2) and b) centred at (h, k): (x - h)^2 + (y - k)^2 = r^2. Remind students of some properties of circles. For example, the circle is a collection of all points which are the same distance r from a centre point. (this can be 2-3 periods)
  5. A look at chords, along with major and minor arcs (optional, but is helpful in establishing a terminology for the three point/circle problem). Don’t spend a lot of time on this — it is not in the Ministry, but it is in some Ministry-approved grade 10 texts for the current curriculum.
  6. Students would need to play with trying to get three arbitrary points to make a circle for about 1 period to agree on what steps they would need to confirm the point/circle problem. They would either use software such as Sketchpad or a geometry set, but the decision must be made for the whole class. Students consolidate on what the steps ought to be to solve this problem. If software is used, I would add to the problem: find the full equation for the circle, its radius, and the centre point. If pencil and paper is used, after students have struggled, and an algorithm is decided upon, you might consider demonstrating a complete solution either on the board or using a document camera.
  7. Once the class agrees to an algorithm, 1-2 periods would be spent on a rich task (possibly a summative). If pencil and paper is used, the question is still do-able by grade 10 students, but I find not everyone can identify the centre with algebra, and usually end up estimating the position of the centre from the graph drawn. Thus, the there would also be a loss of accuracy in computing radius. (I would give a level 4 for the algebra; level 3 for estimating).

For the latter topic, that is, the algebraic solution to finding the centre from three points on a circle, I would suggest a PDF I wrote for my students, which demonstrated a sample calculation as they were working on their problem, given to them, or demonstrated the some days before the assessment, especially if anyone is having problems. Not all steps are shown in this handout, and the student is advised to perform the steps themselves. They would also be given a worksheet to practice on. It is from the PDF above mentioned that students began to point out the resemblance between the general circle equation and the distance formula, because both are used in the activity.

Supporting the teaching and learning of mathematics.

Going though with the pencil-and-paper method teaches students several things which would not be seen on a computer system:

  • Students see that there is now a broader use for expanding and solving quadratics, that isn’t part of the strand on quadratic relations, but uses techniques that are not foreign to it.
  • It is one opportunity to prepare students for the kind of math they may encounter in grade 11 Functions, grade 12 Advanced Functions, and Calculus and Vectors.
  • This is the last treatment students get with circle relations before university. It is no longer covered in grades 11 and 12, but such relations (and much more) are covered in first-year university texts.
  • Students see that there are parallels that can now be drawn between solving for a linear system and solving for a quadratic system — you still need two equations with the same two unknowns, for one thing.
  • What has preceeded shows that the unit must be very carefully planned to do this activity. But once done, the reward is an activity that captures a substantial part of grade 10 academic math.

Supporting high teacher efficacy.

In this page, I have covered most of the high points of this sort of lesson, and described in some detail much of the most difficult parts of it through videos and external documents.

In this page, I have told teachers how to prepare themselves and their students with suitable content knowledge, as well as what pertinent expectations are covered in the analytic geometry strand, as well as informing teachers of the maturational readiness of students, and how impusivity, re-directed as passion, can be used as an asset to student learning.

What I have not mentioned is that it is crucial that teachers must constantly assess their students in the “for” and “as” learning phases, through observations, conversations, as well as products. Most periods should not end without some kind of assessment of this nature. This is because, with this math, finding out where your students are in their learning is critical to understand next steps for planning. The consolidation phase could be a math congress where students share their findings, ask each other questions, and, with some guiding questions and information from the teacher, come to an agreement as to their general findings.

For teachers to be successful  in this strand, they would be best off with problem-based learning (PBL), using problems of varying degrees of open-endedness. This would be done for all or most lesson on the way to this one. PBL should be in the “Action” part of the 3-part lesson. Each lesson should not go without a consolidation phase (Ministry, 2010), where students share and explain their work, while answering questions.

Another aspect of geometry is covered by another video I did, one on quadrilaterals, with the question being: “Is it always true that midpoints on a quadrilateral make a parallellogram?” To see the answer, you have to accept rectangles and squares as special cases of parallellograms:


Aslan-Tutak, Fatma, and Thomasenia Adams. “A Study Of Geometry Content Knowledge Of Elementary Preservice Teachers.” International Electronic Journal Of Elementary Education, vol 7, no. 3, 2017, pp. 301-318.

Cochran, Kathryn (1997). Pedagogical Content Knowledge: Teachers’ Integration of Subject Matter, Pedagogy, Students, and Learning Environments [online] Available at: [Accessed 24 Jul. 2017].

Handal, Boris et al. (2013). “Technological Pedagogical Content Knowledge Of Secondary Mathematics Teachers – CITE Journal.” Citejournal.Org,

King, P. (2015). “Draw A Circle With Any Three Non-Collinear Points.” Youtube, 2015,

King, P. (2017). “Grade 10 Academic – Is It Always True That 3 Noncollinear Points Make A Circle?” Youtube, 2017,

Ontario Ministry of Education, Office of the Secretariat. (2010). Communication in the Mathematics Classroom (Vol. 13, Capacity Building Series). Toronto, ON: Queen’s Printer.

Ontario Ministry of Education (2005). The Ontario Curriculum Grades 9 and 10 Mathematics (Revised, 2005). Toronto: Queen’s Printer, Ontario.

Price, L. F. (2005). The Biology of Risk-Taking. Educational Leadership, April(2005), 22-26. Retrieved July 22, 2017.

Eterm on Windowmaker

This is Eterm, running under X-Windows in Cygwin. The root desktop image is an image of an Emacs Quick Reference, made for the desktop. Nice reason to have a transparency feature on a terminal window.
This is Eterm, running under X-Windows in Cygwin. The root desktop image is an image of an Emacs Quick Reference, made for the desktop. Nice reason to have a transparency feature on a terminal window.

There is always something to have to consider when bringing an app into Cygwin that is not part of the Cygwin distro. I wish to make note of this here in case anyone else has this problem.

Modern window managers are configurable, but only through windows and dialogs. I prefer to configure a bit closer to the metal, so I prefer to edit scripts. The chosen X-window manager was WindowMaker, which is somewhat “modern” while still being nicely configurable, through scripts you can edit under ~/GNUstep/Library/WindowMaker along with graphics files for things such as background images and border tiles. It was nice that WindowMaker still comes with Cygwin, along with FVWM2, another favourite window manager of mine.

I noticed that Cygwin lacked a transparent terminal. You might be thinking that I forgot “mintty”, but I didn’t, since it actually runs as a process directly under Windows, not under Cygwin. Even if I execute mintty from an xterm, the terminal that comes up is not a child of X-Windows, it is a child of MS-Windows, and thus cannot be managed under X-windows.

So, Eterm at first could not compile under Cygwin, and for hours I was racking my brain as to what the problem might be, and looking through the output of the command “configure --help“, I found what solved my problem. What seemed to stop compilation were references to “utmp” and associated header files. The configure script allowed for compilation without utmp support. Utmp is used for access to system logs. This was considered not a big deal in Cygwin, since MS-Windows still has such logs. So my configure command for Eterm was:

./configure --enable-trans=yes --enable-utmp=no

From then I was able to successfully compile Eterm with the eye candy that one associates with the Enlightenment window manager, but under WindowMaker.

Mathematica: Piecewise functions and shortcuts

I work with piecewise functions a lot in the courses I teach, and sometimes to do a quick reality check I would enter a piecewise function on Mathematica. Mathematica (the old version 5 I have) can do piecewise functions by declaring a function beginning with a replaceable parameter:


After this, I press <ESC>pw<ESC><CTRL+ENTER> and I get:

piece_startwith four placeholders for math expressions and their restrictions, which can be added by pressing CTRL+ENTER. I can add more by pressing CTRL+ENTER again. If I want an exponent, I type the base, then CTRL+6 then my exponent. Mathematica 5 makes it only partially clear what keyboard shortcuts to use for math expressions so that you don’t have to go to the pallette each time, but they are there.

Also the hints are not always there if you glide your mouse on the palette, so you will need to look for “keyboard shortcuts” in the documentation.

Here is a table of some shortcuts you might frequently use:

Character Keypress Comments
x3 Ctrl+6 Superscript or exponent
Ctrl+/ Fraction
square root Ctrl+2
x3 Ctrl+_ Subscript
Ctrl+Spacebar Moves cursor out of a formula by 1 level
Ctrl+Enter Adds another matrix row or creates a 2×2 if one does not exist
α ESC+a+ESC Greek alpha
β ESC+b+ESC Greek beta
π ESC+pi+ESC Greek pi
ESC+\infty+ESC One of many TEX-style ways of getting special characters
Δ ESC+D+ESC Greek capital delta

YALD (yet another linux distro) Knoppix 7.4.2

Linux Pro Magazine, featuring GIMP in its Winter 2015 Edition.

To add to the distros I have already reviewed in terms of their suitability for running on the Hewlett-Packard TX2 or TM2 tablets, I had not said anything about the Knoppix distribution specifically. I saw one sold in a special edition of Linux Pro Magazine, and in a fit of irrational impulse purchasing, ponied up my 20 bucks with tax, and tried it on my laptop.

Linux Pro Magazine was using the Knoppix CD to actually showcase GIMP, but with pretty close to the most recent versions of GIMP installed on all my windows and Linux installations (I do run a blog after all), I do not need to be sold on GIMP. It’s a great free open-source package for editing and manipulating photos, in the way of Photoshop. It would have been nice if they could have an article on how to write your own scripts for the script-fu feature in GIMP. This ever elusive and mysterious feature remains largely shrouded in secrecy except for the few websites to post a page or so on it.

But I wanted to see how the latest Knoppix ran on my laptop. Indeed, version 7.4.2 of Knoppix is the latest version, according to the website. Knoppix is the Linux distribution that is known for having a live operating system on it, so if you want to try Knoppix, there is no installation needed. My HP TM2, in the grand tradition of “modern” computers having fewer and fewer media inputs than ever before, comes without a built-in DVD-R drive. So, I plugged a USB2 one in (the TX2 has no USB3 inputs, not that it would matter for a DVD-R anyway) and booted into Knoppix.

And I was pleasantly surprised to find that just about everything seemed to work. It recognized my wi-fi, and I found I could use pen, mouse, and screen touch without any lag. I was able to see and hear videos on YouTube. And of course, GIMP ran. On a live DVD, GIMP took about 40 seconds to start (starting from an installation on my hard disk on my PC took under 5 seconds in Ubuntu Studio).

Back to Knoppix. As expected, the screen rotation key is not mapped. However, I can see no Linux program that does this. Postings to many fora on the topic go unanswered. There was one discussion on rotation with the Nvidia chipset, but the TM2 uses Intel for video, so I was out of luck. Since I need to rotate the screen frequently in my work, this has been the one limitation that has stopped me from using Linux on my laptops.

The Programmatic Side of Mathematica XI: Gaussian Elimination

Inspired by Gaylord, Kamin, et al. (1993). Introduction to Programming with Mathematica. Springer-Verlag. Older postings I wrote on this software over the past two or so years: 1 2 3 4 5 6 7 8 9 10 11

Gaussian elimination is a means of finding a solution to a linear system of equations in many unknowns. The pencil-and-paper method of choice is to use matrices to perform such eliminations in a process which terminates in all equations being arranged in reduced row-echelon form. There is not enough room to do justice to giving a beginner’s interpretation of matrices. But fortunately, there are many resources that can be Googled which introduce you to matrices and finding solutions to linear systems with them.

The basic idea is that n equations in n unknowns are always solvable. If no unique solution is found, it is either because there isn’t one, or there are infinitely many. So that means that matrices are as reliable as algebra. In the simple case, suppose you had a system of lines written in standard form:

*** QuickLaTeX cannot compile formula:
\begin{matrix}2x & + & 3y & = & -7\\-x & + & y & = & 12\end{matrix}

*** Error message:
Fatal Package fontspec Error: The fontspec package requires either XeTeX or
leading text: \msg_fatal:nn {fontspec} {cannot-use-pdftex}
Emergency stop.
leading text: \msg_fatal:nn {fontspec} {cannot-use-pdftex}

 If you enter the two x coefficients and two y coefficients as a 2-dimensional array, and the constants {-7, 12} as a separate array, then you can use LinearSolve[{{2, -1},{3,1}},{-7,12}] to get the point of intersection of the two lines and thus the solution to the system (in this case, the point (1, 9)). These built-in functions don’t always work, and so a programmatic solution is in order. The above example is analogous to the matrix system where

*** QuickLaTeX cannot compile formula:
\begin{bmatrix} 2 & 3 & -7\\-1 & 1 & 12\end{bmatrix} = \begin{bmatrix}1 & 0 & 1\\ 0 & 1 & 9 \end{bmatrix}

*** Error message:
Fatal Package fontspec Error: The fontspec package requires either XeTeX or
leading text: \msg_fatal:nn {fontspec} {cannot-use-pdftex}
Emergency stop.
leading text: \msg_fatal:nn {fontspec} {cannot-use-pdftex}

where the matrix on the right hand side is in reduced row-echelon form. Yes, I left out a number of steps between the two matrices, but the one on the right is the kind of matrix we want. We want only ones and zeroes in all but the last column in an arragment so that the ones always occupy the diagonal from the first row first column to the last row, second last column. Using proper notation, if t1,1 is a term in the first row and first column (upper left corner) of an

*** QuickLaTeX cannot compile formula:
m \times n

*** Error message:
Fatal Package fontspec Error: The fontspec package requires either XeTeX or
leading text: \msg_fatal:nn {fontspec} {cannot-use-pdftex}
Emergency stop.
leading text: \msg_fatal:nn {fontspec} {cannot-use-pdftex}

matrix, and tm,n is the term in the last row, last column (low right corner). tm,3 contain all of the constants that are supposed to appear on the left hand side of the original equations. These are the numbers -7 and 12.

2048 still unsolved, but I beat 16384 on my first try

Below, the obligatory screenshot to show what my board looked like well past the time of the win.

Winning at 16384 has now been declared “possible”, but it did take a long time. Note that, IMO, the board looks pretty sloppy if you know what a “good board” is supposed to look like. And I still won.

I won this game on my first attempt, played off and on over two days. Warning: This is one hell of a long, repetitive game.

The original game 2048, and other similar games, are from open source, and have been placed on GitHub. The Java program seems to run from a large number of different websites.  Some allow you to save and reload, and others don’t. Google Chrome has both 2048 and 16384 as an app that the user can run from the browser.

The original 2048 game, played on a 4×4 game board, is a much quicker game, but in my opinion, exponentially more difficult to win. I have been trying over the past 4 or so days, no luck. Some web sites allow you to save a favourable board in mid-play so that if you lose, you can pick up from that point later. Even with that feature, it would still take several tries to get past my first “1024” tile, saving several times, just in case luck runs against me early on.

Now that I have won the game, I don’t exactly feel that euphoric about it. There is an element of luck, and what strategy there is, is repetitive. The screen you see above would likely lose the game on 2048. But the strategy I used is supposed to work in both.

Strategy used. This strategy was influenced by a website blog article whose name escapes me, which suggested that one keeps all their high numbers in a contiguous group and avoid trapping “2”s and other low numbers inside of high numbers, the theory being that it will be difficult to combine the “2” with another tile, being so surrounded. On my screen, the two “4”s at the top of the board are vulnerable, and have been there for quite a while and are indeed hard to get rid of. The checkerboarding of 2s and 4s on the right side was also an emerging problem, as the checkerboarding prevents the tiles from being matched and combined.

The blog article suggests that to prevent isolated low tiles and checkerboarding, the player should sweep in one direction (say, left) repetitively until you can’t sweep anymore, then sweep in the opposite direction (right). This might work the first couple of times, but then you might find you missed some tile combinations by not sweeping up or down. But the general effect, if luck works with you, that the high numbers accumulate in the layers toward the edge, and the low numbers are away from the edge toward the center of the board, waiting to be added to new-coming tiles.

Ideally, you are supposed to have the highest tiles in one of the corners. The further away from the corner, the lower-value the tiles should be. You risk losing this if you do a 90-degree change in direction of your arrow keypresses (or sweeping gesture if you are on an android).

This game goes on, I think, as long as you want it to. This one, played off and on over 2 days with a nice-looking (but not great-looking) tile arrangement has a score of 1.5 million with no end in sight.

Many bloggers and video bloggers have said to go down and to the left until you get no more new tiles. Then, switch to down and right for a move, then down and left again. For a lengthy game like 16384, this is utterly tedious, and I believe it is in the tedium that mistakes are made. And it doesn’t take much to get the tiles all out of order.

Because randomness is involved in the value and placement of new tiles, every decision has risks involved, with the potential of making your tiles less than optimal.

An ideal strategy is demonstrated by an AI algorithm better than I can describe it, at:  While this is done on a board for 2048, the strategy for 16384 would be the same, although, the large board means that mistakes are less fatal.

If you want to save key moments of the game for you to continue from later, this link gets you to the only version of the game I know of that can do that:

Using OpenShot for making video

OpenShot video editor

OpenShot is a software used in making videos, and I use them for making YouTube videos which extend my existing math lessons. It is likely to be the most intuitive software out there right now, and it is open source, running under Linux. Rendering video was one of the reasons I put up extra money for a fairly high-powered computer.

OpenShot is very stable, although if used for a long time, I noticed that it tends to freeze at strange times, or crash completely. I own copies of Lightworks, Pinnacle Studio HD 16 Ultimate, and Adobe Premier Elements 11 and have experience using all three video editing software. While OpenShot is quite useable in the league of these top-selling softwares, and is quite user-friendly, it has some drawbacks that might make it prohibitive to serious video editors.

First, the PROS: OpenShot is free and open source, and there is little to beat that. While Lightworks is also free, OpenShot can decode nonfree codecs such as MP3 and MP4 formats. The free version of Lightworks usually took several workarounds to get even the most mildly proprietary video and audio formats to play together. For the record, if you are willing to spend the money, Lightworks does support nearly all existing video and audio formats.

It goes without saying that OpenShot supports also the open-source codecs OGG Vorbis (audio) and OGG Theora (video), enabling you to live out your open-source puritanism to the fullest.

Video rendering seems to be well-done in OpenShot. I found that it took about 10 minutes to render a 15-minute video, although that could be because of the machine I am using to render it in, which has 32 gigs of RAM, 1 gig of video ram, and sporting an Intel Quad Core Haskell processor. I guess I have to factor that in. I have been previously accustomed to this operation taking hours on an older computer that I used to have, and is now sitting in a corner of the living room, partially disassembled.

The operations of the parts of the OpenShot interface are smooth and editing and deleting clips is intuitive. I hardly needed to consult the manual after editing and processing 5 videos so far. This was not true of the other software mentioned in this article. I found LightWorks to be the most unwieldy. To be fair, LightWorks is a professional-grade software. To use LightWorks to any degree of effectiveness required me to consult their manual, and several videos regarding rendering and editing.

Audacity, an open-source audio editor, which I use in tandem with OpenShot.

Other blogs have complained about Linux’s arcane audio system. I am aware that audio/video issues are as old as Linux, and has been a weak point in the operating system for a long time. Over the past two decades, Linux audio and video has improved in leaps and bounds compared with Windows and Apple. Linux’s mildly dysfunctional A/V has been a key reason why most people still use Windows and have not moved over to Linux in any large numbers. The system I am using is Ubuntu Linux Studio 13.10, which is optimized for all manner of audio and video. However, I have avoided using the sound editor in OpenShot by recording my voice tracks separately using Audacity, which detects my microphone and headset, and offers me to use them as options in a dropdown menu. Audacity, another open-source software for audio recordings, can render my voice in many common formats, including MP3 and OGG Vorbis. I then include the MP3 file into my OpenShot project then add it to my timeline as a separate track. Audacity is a great audio editor, allowing me to edit out my “uh’s” and other awkward pauses with a great deal of precision, while adding silence to help synchronize my voice to the video. By using the two software together, I have had few problems with audio drivers.

Now, the CONS: One drawback to OpenShot that is immediately apparent is in my lack of ability to edit on the level of frames. This was a big advantage of LightWorks, Pinnacle, and Adobe software I own. The free version of LightWorks was especially adept at “marking and parking” the video pointer on an exact frame and allowing for precise cutting of video. OpenShot tries to compensate for this by using a sliding scale on its interface which allows the timeline to expand up to a point, but never to the point where the places between one frame and the next become distinct. By the way, this is never a problem for marking editing points, that seems to be precise, it is rather a problem for cutting at those points, which appears to involve eye-hand-mouse coordination to get the cuts exactly where you marked the video for cutting. Somtimes video gets cut a fraction of a second too early or too late, and this is noticeable when viewing the video.

Once you have your series of cuts all placed together on the timeline, OpenShot does not seem to have a way of making these cuts into a unit. So that if you make another cut somewhere in the middle, you need to move the individual edits back in place, one at a time.

Another problem which makes things a bit annoying in OpenShot became apparent when it became necessary to film a video upside-down. While OpenShot easily has a way of turning the footage rightside-up, it seems to “forget” my settings the moment I perform an edit. That is, the footage before the edit is still in proper orientation, but the footage after the cut is upside-down again. So, each time I made a cut I found I had to repeatedly re-set the orientation each time.

Finally, while the documentation is fine and pretty extensive, it appears as though the discussion forums are rather modest. Of course, with a software whose project budgets are supported by donations, one cannot expect the forums to be run by paid employees and other participants who like to give free advice as is often the case for large commercial operations like Adobe and Pinnacle. However, this is more than made up for by the easy-to-use interface, which allows you to learn by using the software.

Conclusion: The use of OpenShot and Audacity together allow me to edit audio and video using entirely open-source software, allowing me, if I want, to record, edit, and save entirely using open-source formats. Like Adobe Premier and Studio 11 Ultimate, it allows me to upload to video sites like Vimeo and YouTube directly from the software if I choose. If you are on a tight budget, then you can’t beat OpenShot.