I have on my phone, and several other devices, various apps (both native and Web) that provide access to several weather services. None of them are ever in complete agreement, and no matter how hard I try, I can never remember what the most recent forecast said. Perhaps the abundance of weather forecasting services has produced a kind of white noise that makes it impossible to discern what is being said. Even moments after the radio weather announcer has signed off, I find myself unable to recall any of the details. This despite the fact that the announcer has gone to the trouble of repeating the forecast in the form of overviews, summaries, detailed day-by-day predictions, plus versions for the farming community and those poor souls stuck in their boats…
Or maybe it’s because of the multitude of formats?
Whatever the reason, I am convinced that if one were to include a random weather forecast into the mêlée, nobody would notice. In fact, the random forecast might even be better than the official ones.
At least I’d have a better chance of remembering it, even if it is incorrectly predicting a typhoon for tomorrow.
It was 1981 and Ernő Rubik had a lot to answer for. The 3x3x3 cube was already driving the world crazy. By now it was commonplace for competitions to be held to see who could solve the puzzle in the fastest time. Everyone knew that every scrambled cube could be solved, since it became scrambled by starting with a solved cube and every twist can be reversed. What was more interesting was that solving a cube didn’t require one to reverse the scramble, but instead there appeared to be a systematic approach to the solution.
While Groups, Matrix Permutations, Transforms and other quirky stuff of Number Theory were largely unknown to me at the time, I did reason that a solution might be obtained through a series of refinements, gradually bringing order into the cube. Through experimentation I observed that some short sequences of moves had somewhat local effects (i.e. they moved or reoriented the smaller cubes while leaving most of the others untouched). Reversing the movement was easy, and if you go forward and back enough times you get a sense for the part of the cube that is unaffected by your twisting. Then you start wondering what would happen if you made some extra adjustment in the middle of the forward/back sequence. That’s when I discovered that these mid-sequence operations could be used to correct parts of the cube without affecting the parts you had already corrected.
My solution, based on gradual refinement, would operate as follows:
Start with a random cube.
Correct the four corners of one face.
Using various forward/reverse sequences, add operations to the middle of these sequences that will (eventually) correct the remaining four corners.
Without touching the corrected corners, ensure that the correct colour is in the top and bottom faces.
Using forward/operation/reverse sequences, keeping the eight corners in place, correct the edges of the top and bottom layers.
Finally, apply sequences to correct the middle layer.
Finding these sequences was the biggest challenge, but was made a little easier by the fact that the cube could be dismantled so that sequences could be tested with a pristine cube, which made the effect of the sequences all the more obvious. In time I could visualise these effects in my head without having to resort to the screwdriver.
One unfortunate consequence of this approach is that it was at odds with the prevailing wisdom at the time. Certainly people were using refinement algorithms to solve the cube, but everyone seemed to be doing it by first solving a top (or bottom) layer, then the middle and finally the bottom layer. Not significant, I suppose, until you realise how competitions were being devised. The first round was based on speed of solving one layer. The second round based on solving the first and middle together. The final speed test was for the full cube. I had some difficulty getting the first layer, but no hope of getting past the second round, because my technique was so different. Yet I could regularly beat anyone in solving the full cube.
I never won any competition, but I still had fun showing how I could easily solve the cube in about 45 seconds. For the record, I am going to outline my solution as I originally defined it. Now that I do have an understanding of the mathematical underpinning, I will openly admit that “my” solution is not unique because it can be mapped to bits of many other solutions, but maybe my way of describing it is unique. Anyway, here goes…
Solution to Rubik’s Cube
Like all formal systems you need some nomenclature to avoid confusion. Originally I used my own shorthand but I have since amended it to be somewhat like the more popular notations. Mine, however, is still (in my opinion) the easiest to remember.
To learn the names for the faces and twists, you must first hold the cube in a special way. Looking from above, note the small cube at the top right corner and also consider the small cube at the bottom directly beneath. This is like a stack of three small cubes. Using index finger and thumb of your right hand, hold the entire cube by this stack. This is the Anchor, and you keep it to the far right. Then, working clockwise (from above) the other three stacks are named A, B and C. The diagram below shows the anchor in grey, the three named stacks, and the Front and Right faces clearly marked.
There are only four faces you need to know. The Upper face (U) is on top. The Right face (R) is to your right. The Front face (F) is directly in front of you, and the Downward face (D) is on the bottom. Ignore the other two. My solution doesn’t require you to know about them.
A single twist is always 90 degrees. When doing a twist, most of the small cubes must stay exactly where they are. This keeps the faces from getting confused. A twist of the face clockwise is written as the name of the face in upper case. An anti-clockwise twist uses a lower case.
The term “clockwise” refers to how your wrist twists. The “F” twist is in front of you, and moves exactly like a clock would. (And the “f” twist would be going backwards.) The “U” twist on top is also quite obvious, though you should notice that it moves a piece of the Anchor. The “D” twist can be confusing, because you are approaching the face from below, so your clockwise twist of the wrist will actually turn the face in the opposite direction to that of the upper face. The diagram below should make this clear.
The “R” and “r” twists completely move the Anchor stack. But do not panic. This just positions some new small cubes into the Anchor position. Keep the rest of the cube steady!
There is only one other twist, which is called a “yaw”. This one involves moving the middle layer while keeping the upper and downward faces steady. It can be hard to do (until you realise you can do it by combining U and D). The yaw is written as Y and the direction is the same as U. (Which then means that “y” is the same direction as “u”.)
And that’s it. You just need to remember: how to recognise the Anchor; the three stacks A, B and C; the face twists U/u, D/d, F/f, R/r and the yaws Y/y.
Step 1.1: the top corners.
I don’t provide any rules for setting up the first four corners. This bit is fun and almost anybody can do it, and if you can’t have fun doing this step then you really should not be playing with a Rubik’s Cube. Go do some gardening instead… Pick any colour and twist the corners into place. The first corner is the easiest. The second one needs to go in without moving the first. This is also relatively easy. The third and fourth are the most fun for beginners. Old pros will do this bit in a blur. Hold the cube so that the correctly arranged corners are on the bottom face.
Include the face colour in this step, so that when all four corners at the bottom are in place, the middle will be the right colour. A few yaws will put this into place if you forget.
Step 1.2: arranging the remaining corners.
With the four solved corners at the bottom, perform some U twists so that the upper small cube of the anchor is now in the correct position. This should mean that two of the colours of the upper anchor are the same as those of the downward anchor. Do not worry if the small cube on the upper face is not properly aligned, as this will be fixed later.
If the middle of the downward face is the correct colour (i.e. it matches the corners) then the current upper middle must also be the correct colour. We’ll assume this is grey. (I choose grey because you don’t find that on cubes, and I don’t want to give the impression that certain colours are special.)
Consider now the upper small cube in stack A (the one near you on the right). Part of this is grey and the other two sides are (say) lilac and orange. If the cube was solved already then the corresponding small cube at the bottom of stack A would also have lilac and orange (plus whatever colour corresponded to the downward face). But mid-puzzle the matching small cube might not be in position A. It might be in position B, or C. Make a note of where it is. What you are doing is working out which stack the small cube should be in.
Now do the same for the small cube currently at the top of stack B. Make a note of which stack this small cube should be in.
Your notes should now consist of two letters. If the letters are “AB” then you are very lucky as the corresponding small cubes on the downward face are already in the stacks they should be in, though they might be a little mis-aligned. You are lucky because you don’t have to do step 1.3.
Step 1.3: re-ordering the bottom corners
If you are here then the small cubes on the top are not in their correct stacks.
There are five possible wrong orderings of the top corners, depending on the pair of letters you noted. These are AC, BA, BC, CA and CB. (Remember, AB means that you have them in the right order, so you don’t have to do this sub-step.)
Depending on the pair of letters you noted, you will need two numbers. The letter pairs and corresponding numbers are: AC-01, BA-11, BC-13, CA-21 and CB-02. Let’s refer to the two numbers as M and N.
Hold the cube by the anchor, take a deep breath and perform the following sequence:
U (M times) F R f r U (N times) R F r f
What does this all mean? Well, U means a 90 degree clockwise twist of the upper face. You do this M times. (If M is zero then you do it zero times, which means you don’t do it.) Then comes F, a 90 degree clockwise twist of the front face. Then R, a clockwise twist of the right face. Then f, an anti-clockwise twist of the front face. And so on.
So, if your top small cubes were wrongly ordered according to code BC, then the numbers would be 1 and 3, and you would perform the following twists: U F R f r U U U R F r f.
(If you are paying attention, you might notice that “U U U” is exactly the same as “u”, so you can do the same twists as: U F R f r u R F r f.)
Observe the “F R f r” and “R F r f” parts. These are my forward and backward sequences for this stage. They shift and then restore the position of the corner cubes, but mid-way you can perform a U operation, so that the restoration is not perfect. The side-effect is that the upper corner cubes don’t go back to the same positions, even though the corner cubes on the downward face are unaffected. This is exactly the kind of operation I want. Pick the right number of U twists and you affect the restoration just enough to rearrange the corner cubes into the positions they should be in. You don’t have to work out these numbers. I’ve already given them to you above.
Step 2: aligning the four remaining corners
In step 1 we ensure that all eight corners are in the right stacks. However, the operation does not guarantee that the top corner cubes are properly aligned. They should all be showing the same colour as the middle of the top face, but the face colour may be on the side instead. So now we need operations that twist just the corners. Fortunately I have a forward/reverse sequence that will twist two corner cubes without affecting the overall stack positions.
Hold the cube so that the front face contains a top corner cube whose “top” face is mis-aligned and actually on the front face instead. So if the upper face has a grey centre, then the mis-aligned top right of the front face will be grey. We are about to perform an operation that will fix this, and move the grey to the upper face. Hold the cube steady and perform the following:
r D R F D f
Now start twisting the upper face (U/u twists) so that you put another mis-aligned corner into stack A, only this time the “grey” face of the mis-aligned corner will be on the face on the right hand side. Now do the following:
F d f r d R
If you started with four mis-aligned corners, you will have to perform the procedure again to fix the remaining two.
Think carefully about this sequence. The first phase takes whatever small cube is in the top-right nearest corner and rotates it 120 degrees clockwise. The second phase reverses the procedure and rotates the top-right nearest corner 120 degrees anticlockwise. However, mid-sequence we switch in a different corner. So the overall effect is that the first corner gets rotated +120 and the second -120, and all the time the corners remain in the same stacks.
When you are finished with these sequences, perform a few U twists if necessary to ensure that all eight corners are correctly positioned.
Step 3: fill in the top and bottom layers
This is my favourite part of the solution, and yet I have never formalised it. It’s one of those things that mathematicians have a tendency to describe as “obvious”, when in fact it is anything but. The objective is to complete the top and bottom layers (the upper and downward faces), without disrupting the eight corners. This is surprisingly easy to do, if you do the small edge cubes in pairs.
We observe that if you perform a yaw operation, it has no effect on the corners. Furthermore, if you perform a twist of the front face, then do a yaw, and then untwist the front face, the corners are still unaffected. It turns out that using just yaws and twist/untwist of the front face it is possible to complete the top and bottom layers.
First arrange the cube so that the front face is not yet completed. In your mind, imagine the small cube that should be in the lower middle of this face. Let’s imagine that the bottom of this small cube should be brown (and out of sight) while the visible part of the small cube is purple. Now imagine what would happen if you vertically yawed the small cup upwards: so now the purple is on top and the brown is facing you. This condition is the first objective in the procedure. Find the small edge cube and using only twist/yaw/untwist operations, get that small edge cube into place at the top middle of the front face.
At this point, with a good spacial imagination, you should be able to see that if you vertically roll that small cube downwards it will fit neatly into its correct position. However, you need to make sure that the other small cube for the top layer will also be slotted into place. Again, using only basic twist/untwist and yaws you can put the second small cube into the middle layer. Now arrange so that the second small cube is at the back of the cube. It should be at the right or left side, depending on the colours. You want to position it so that you can twist the front face and bring its partner small cube into line with it, colours matching, then perform a yaw to slot both small cubes into the front face, before finally untwisting the front face into position. See the bottom of the diagram.
The sequence to bring a small edge cube from the back right into position would be “F Y f”, while getting it from the back left would be “f y F”. Again notice the symmetry in the sequence.
Repeat this procedure four times (picking a new front face each time) to complete the top and bottom layers.
Step 4: re-arranging the edge pieces in the middle layer
At this point you should have the top and bottom layers fully completed, but the middle layer could be a mess. Pick an anchor and yaw the middle layer until the correct edge is in the anchor stack. Don’t worry if the edge is not pointing the right way. Holding the anchor in the correct way (at the back right), observe the small edge cubes in the middle at stack positions A and B, and make a note of the stacks they should be in. If you note “AB” then all your middle edges are already in the correct stack positions. Otherwise do the following:
Use the code to get your M and N numbers.
Perform the following sequence: Y (M times) F F Y (N times) f f
Now yaw the middle layer to ensure that all the middle edges are in the correct stacks.
Step 5: flipping the edges
This is the part of the solution that I hate. It involves a long symmetric transformation sequence that really makes the cube look like it is totally messed up. After spending so long getting all the corners and edges into place, this phase seems to break everything. However, it does not. Like all the previous sequences, it just sets up a particular arrangement that allows a subtle change so that when the reverse sequence is performed, the subtle change causes the necessary correction to the orientation of the small cubes.
At this point you have the top and bottom layers completed. Turn the entire cube so that now you have the left and right sides completed. Looking at the cube now you will see that the mis-aligned edge cubes are all in the vertical middle section. Rotate the cube towards you (along the left-right axis) so that one of the mis-aligned edges is in the top middle. Hold the cube steady and perform the following operation:
u F r U f
Now, vertically yaw the middle section so that another mis-aligned edge is in the top middle, then perform the following:
F u R f U
If you started with four mis-aligned edges then you will have to perform the above sequence twice. The first part of the sequence flips an edge, but you are then able to yaw the middle section so that when the un-flip is performed it causes a different edge to be flipped. That’s two edges per sequence.
Step 6: middles
I have assumed that you have kept the middle small cube of the upper and downward faces at the correct colour, so now you may find that you still have the remaining four small middle cubes in the wrong position. This can be fixed by rolling the vertical middle 180 degrees, doing a yaw (Y) of the horizontal middle, doing another 180 degree roll and finally an un-yaw (y).
At this point the Rubik’s Cube is solved.
The following diagram will help you remember the solution. The only bits you really need to memorize are in the box at the top left. Have fun!
The rapid pace of device capabilities and HCI modalities has resulted in an ever-confusing smorgasbord of UI options. With many years to reflect on this evolutionary trend, I have the pleasure of being able to offer a glimpse of the next generation UI, one that finally deals with the confusion we have amassed over the decades. You may be surprised with the elegance and simplicity of this revolutionary advance.
We start by addressing the confusion created by pointer context, which applies to the “traditional” mouse and touch-based input. In this input model the user is presented with a vast range of possible options (clickable regions) with varying impact on the advancement towards particular goals. For example, clicking on a “menu” representation may simply reveal more clickable regions but sometimes it initiates an unstoppable action (e.g. exit). Generally the screen is populated with many more regions than will actually be required by the user for the current stage of the activity, for the entire session, or ever. While it may be possible to strictly limit the presented or available regions, the consequence of such contextual switching during interaction is just more confusion, particularly if one is sensitive to flashing images. A more radical solution is to consider the complete removal of this RSI- and fit-inducing form of interaction. In the Next Generation UI we see the end of the menu bar and drop-downs, the end of buttons and checkboxes, the end of all forms of scurrying around the screen with a pointer that changes shape as rapidly as the mouse skids along the pad.
With the right (or possibly left) hand free, this opens up more options for more efficient forms of tactile input. This requires a certain amount of retraining to remind users that the hand has more than just an index finger (and optionally a right-click finger). In time, digital input can be enhanced by as much as 1000%! Observations show that many people can enter complex expressions using just two thumbs, almost as fast as they can talk. This rate can be further improved using the “txt spk” compression algorithm, a point we will return to soon.
Digital input can be impressive, but it has competition from other tactile approaches, the most prevalent being the almost ubiquitous touch-screen. These not-quite-tactile input mechanisms generally suffer from constant finger smears, necessitating the carrying of a cloth at all times, and the tendency to use dark symbols on a bright background compounds the problem with glare. Two very direct solutions are proposed:
Do not use touch-screens.
Use bright symbols on a dark background.
A single (optionally flashing) pointer on the darkened screen will be adequately distinguished from surrounding text, and will concentrate the user’s attention. This is so effective that tests suggest a single input area will suffice for all activity, removing the need for separate windows and the means of switching between them.
With the user’s attention now totally focussed, the need for rapid entry becomes paramount. This is where the “txt spk” compression algorithm comes into its own. Like the icons of the now-defunct WIMP UI model, the words used in the proposed text-oriented tactile input mechanism need only be suggestive of their purpose, rather than being a complete description. Thus actions such as “move file X into directory Y” can be accommodated through a compressed expression: mv. Similarly, copy becomes cp, remove becomes rm, list becomes list and so on. If you ever feel the need to consult the manual, you can do so via the (yes, you guessed it) man command.
Since it is quite apparent that the adoption of “txt spk” is a global phenomenon, we expect wide adoption of compressed commands.
Un-inventing the wheel
With the removal of the mouse, we have also removed the wheel (first envisaged in 1993) and with it the urge to scroll. Scrolling is by far the greatest impediment to efficient use of computing resources. Giving the user the option of revisiting past activity merely distracts from the present. When it becomes clear to the user that one cannot reference the past, there is a heightened awareness of the need to avoid mistakes, to plan one’s actions, to use the computer with purpose.
The next generation UI, with its single point of entry, optimised digital inputs (all 10 of them), compressed command system and in-the-moment attitude will revolutionize human-computer interaction, but that is not the end of the story. Further research has revealed that almost all forms of data storage suffer from bit-decay and format-deprecation (as anyone with a VHS tape will agree) but a new approach using high-contrast fluids on a purified substrate of carbon fibres (from, of all places, trees!) has a proven lifespan measuring thousands of years. This is taking us down the road of a new operational modality where digital input is transferred directly to permanent storage (as rolls or sheets of substrate) , thus completely removing the need for a display screen. There are even rumours that the mechanical energy of the human input could be used to power the entire system, with a consequent massive saving in energy. Watch this space!
(Postscript: early versions of the next generation UI can be viewed online.)
I think it is pretty clear to everyone that location is a key concept in mobile data services today, whether you are using native apps or Web-based services. So it came as a bit of a surprise that Apple released their home-grown iOS 6 map application to replace the one based on Google’s map data. Google has spent about 7 years collecting map data, including satellite images, street images, locations of significant structures/businesses, public transport routes and timetables and much more. This made Google’s solution an excellent component in location-based services. There were a few map-related omissions in Google’s offering for the iPhone/iPad platforms, such as being unable to get a rotatable 3D perspective, or to have turn-by-turn directions spoken out load (as one might expect while driving and unable to view the screen). Nevertheless, the pre-iOS 6 map app was entirely functional and exceptionally accurate.
It is understandable that Apple would consider providing a map app of its own, particularly given that Google is now competing with Apple in the mobile phone platform space.
But what is not understandable is how Apple went about creating its alternative. In comes a rotatable 3D perspective (of a small area within a small number of selected cities) plus turn-by-turn spoken directions; out goes a noticeable subset of map data (and not just seldom used rural roads), out goes high resolution satellite imagery for much of the globe (and in some cases it is replaced by pictures of clouds!), out goes public transport routes and timetables, out goes street-level images, out goes many business markers, out goes accurate searching, even the accuracy of city locations has suffered greatly.
In short, this is a huge step backwards for location-based services.
Apart from the stand-alone map app, this will be a problem for many other map-based applications that rely on mapping being present within iOS. Any of these apps that relied on the now-removed features will be rendered useless.
So why did Apple step boldly (and perhaps blindly) into the mobile mapping world? Undoubtedly many observers will ponder this question and, given the recent bad press it is attracting, there will be many within Apple asking the same question. In the search for answers, one should consider that Apple and Google are no longer partners but have become serious competitors, so ousting Google from playing a key role in Apple’s mobile platform makes strategic sense. One should also understand that mapping is a massive revenue generator, much like Web searching, though end users often perceive these as free services. They are not free. You are paying for them with your attention, and while they have your attention they have an opportunity to sell you something. It’s an arrangement that the general public have long accepted, and it has been around long before the iPhone, long before the Web and long before technology became central to our lives.
There’s no such thing as a free lunch. (Or map.)
Now that many iOS users have upgraded to version 6, and many of them are complaining about the disappointing map app, what is likely to happen next? I don’t have a crystal ball, but here are a few scenarios:
Google releases a free map app for iOS 6. This satisfies those who use the map app in a stand-alone manner, but does nothing for the existing iOS apps that rely on the mapping API exposed by the OS.
Google tries to release a map app for iOS 6 but Apple’s strict app assessment process blocks the release long enough for iOS 6 users to get used to Apple Map’s limitations.
Apple issues a “point release” for their map app to add public transport data. However, just like the 3D flyover maps, it is restricted to high-profile urban areas, leaving much of the world ignored and increasingly annoyed.
Google enhances its Android map app to have features comparable to those introduced in iOS 6, and another patent war breaks out.
Google releases a library and API that makes it easy for iOS app developers to bind to Google’s map service, breathing new life into broken third-party apps.
Apple updates iOS 6 to allow users to select their default mapping service, opening the door to Google and other mapping providers.
Google introduces Street View for mobile browsers using familiar Google Map UI features, making the Web app as powerful as the native app that Apple recently evicted.
Google does nothing, and people switch to Android phones.
Of course, there are many more scenarios and only time will tell how this story will play out. Your guess is as good as anyone else’s.
An observation on the changing face of mathematics education in Ireland.
In my lecturing days a few years ago (OK, “few” might be an understatement) we used to complain about having to provide “remedial maths” to each fresh intake of students. It seemed to many of us, charged with the task of producing the next batch of computing experts, that for many of the raw cadets the light of mathematics just had not shone on them. Sure, there were many who had passed their second level tests quite successfully, but a lot of these seemed to have been denied enlightenment. We blamed rote learning, the pressure of the points race, strategic teaching practices (teaching designed to maximize the points but not to promote understanding), fear, a culture that was gradually lowering the value of mathematics, and societal ignorance.
Of course, many of those responsible for our children up to the second level of our education system recognized the problem and promised to do something about it. However, a look at the new “Project Maths”gives the impression that maybe an opportunity has been lost. It would seem that the new syllabus has indeed gone some way to put various branches of maths into proper context, with a strong focus on practical problem solving. This is a good thing. But instead of expanding this to cover the full breadth, some of the key elements have not just been reduced, but in some cases completely amputated.
The syllabus still has many of (what I consider) the important basics, such as 1 & 2 order derivations (linear, quadratic and cubic), rates of change, min/max, differentiation of polynomials, exp/log, trig, powers, f-1(), interval averages, prob/stats, bounded region areas and a handful of related concepts. All good stuff, and nicely couched in practical applications.
But just look at what appears to have fallen over the cliff.
Let’s start with differentiation. Only the differentiation from first principles of linear and quadratic functions is covered, so students faced with unfamiliar formulae will be completely unarmed. When it comes to integrals, only polynomials and exponentials are included. Limits seem to be ignored. Using derivatives to find tangents, gone. Forget ever seeing turning points, inflections or asymptotes. The Taylor Series has terminated! The course refinement has eliminated the Newton-Raphson method. Students will no longer experience integration by parts or substitution. The syllabus has converged on the idea that the Ratio Test is unnecessary.
But if, like me, you’re a computer scientist, then prepare yourself for more bad news. They have removed vectors. (How can any mathematician survive without vectors?) I’ll say it again: they removed vectors! And before you get a chance to recover from that, here’s another: they’ve also removed matrices!! No more funky equation solving, or cool rotations of n-dimensional solids. Shame! And they are indifferent to difference equations. Coordinate geometry has lost ellipses…
The list of casualties goes on, but it’s just too depressing to list them.
Mathematics has beauty in both its depth and breadth. Project Maths has removed much of the breadth. It does not appear to have increased the depth of what remains, but at least it is doing that remainder in a much more accessible manner. What Project Maths really needed was more time, so that the breadth could be retained.
I can see that in a few years, at third level, there will be a lot more Remedial Maths. In fact, there may be so much RM that what would normally be covered in the first year of a typical science/engineering course will have to be pushed into year 2.
It doesn’t take a mathematician to figure out where this will all lead. (Or maybe it does.)