Showing posts with label Measures. Show all posts
Showing posts with label Measures. Show all posts

Sunday, July 29, 2018

How maths can help you escape the maze


                                                 Humanity’s preoccupation with mazes – and how to escape them – lives on. Can maths point you towards the exit?

Mazes are in vogue at the moment, from HBO’s Westworld, to the return of the British cult TV series, The Crystal Maze. But mazes have been around for millennia and one of the most famous mazes, the Labyrinth home of the Minotaur, plays a starring role in Greek mythology.

Which begs the question: what is the difference between a maze and a labyrinth? Although considered synonymous by some, it is generally accepted that a labyrinth contains only one path, often spiralling around and folding back on itself, in ever-decreasing loops, whereas a maze contains branching paths, presenting the explorer with choices and the potential for getting very, very lost.

While designing a maze can be a rewarding human task, computer scientists and mathematicians have a love of maze-generating algorithms. The algorithms tend to fall into two principal types: ones which start with a single, bounded space and then sub-divide it with walls (and doors) to produce ever smaller sub-spaces; and others which start with a world full of disconnected rooms and then demolish walls to create paths/routes between them.

The great escape
There are techniques for escaping from mazes, but first you need to be sure what kind of maze it is. Most methods work for “simple” mazes, that is, ones with no sneaky short-cuts via bridges or “passage loops” – circular paths that lead back to where they started.

So, assuming it is a simple maze, the method that many people know is “wall-following”. Essentially, you place one hand on a wall of the maze (it doesn’t matter which hand as long as you are consistent) and then keep walking, maintaining contact between your hand and the wall. Eventually, you will get out. This is because if you imagine picking up the wall of a maze and stretching its perimeter to remove any corners, you will eventually form something circle-like, part of which must form part of the maze’s outer boundary. This method of escape may not work, however, if the start or finish locations are in the maze’s centre.





But some mazes are deliberately designed to frustrate, such as the Escot Gardens’ beech hedge maze in Devon, which contains no fewer than five bridges, and so is far from “simple”.

Another method of maze escape, known as Trémaux’s algorithm, works in all cases.

Imagine that, like Hansel and Gretel in the fairy story, you are able to leave a trail of “breadcrumbs” behind you as you navigate your way through the maze and then remember these rules: if you arrive at a junction you have not previously encountered (there will be no crumbs already on the trail ahead), then randomly select a way to go. If that leads you to a junction where one path is new to you but the other is not, then select the unexplored path. And if choosing between a once or twice-used path, choose the path used once, then leave a new, second trail behind you. The cardinal rule is never, ever select a path already containing two trails. This method is guaranteed, eventually, to get you out of any maze.

Everyday mazes

So how is any of this maze stuff useful? Well, from the perspective of architecture and urban design, we want to avoid accidentally creating mazes. Mazes are fun, but are not necessarily something we want in our everyday lives – or in our way when we just want to get to work.

In the 1980s, the architectural theorist, Bill Hillier, observed that many of the most socially problematic housing estates were those that appeared to be somewhat “maze-like” in their layout. This begged the theoretical question: how do we actually measure the “maze-iness” of a place?




The way we solve mazes and puzzles like the Rubik's Cube could help keep older minds active and healthy (Credit: iStock)



To answer this, Hillier developed the measure of “intelligibility”, which is the relationship between what is immediately visible from a single location in a maze/housing estate/neighbourhood and how accessible that same place is from other locations in the area. The measure ranges from 0 to 1: environments that score highly (greater than 0.5) tend to be quite intelligible, easy to understand and navigate, and frequently desirable – for example Barnsbury, in London.

Conversely, places with a low intelligibility score tend to be confusing, hard to navigate and, ultimately, maze-like – London’s Barbican Estate, although architecturally lauded, is so confusing that visitors need to follow the yellow lines in order to find their way around.

The mathematics of maze design is just as applicable in modern, dementia-battling apps as it was in distant Greek mythology

It was this measure of intelligibility that we used to design the game levels in the recent Sea HeroQuest game, a game designed to measure people’s navigational skills in order to further dementia research.

We “reverse-engineered” intelligibility in order to produce game levels that were more, or less, maze-like, to ensure a range of challenges for the players. Therefore, the mathematics of maze design is just as useful for modern, dementia-battling apps as it was for distant Greek story-telling.

This article originally appeared on The Conversation, and is republished under a Creative Commons licence.

The measures that don't need maths



Our world is ordered with rigid measurements - but alongside them are much more human ways to scale such things as the ferocity of storms and the strength of chills.

How much spicier is a Scotch Bonnet chili pepper than a Bird’s Eye? How much harder is diamond than quartz? If a jiffy is quick, is a shake even quicker, and a Warhol the quickest of all?

Scales help us measure the physical world. To compare quantities, we mostly rely on quantitative scales – numerical measurements that tell us something about frequency and quantity. Inches, feet, yards and miles; ounces, quarts, litres and gallons; seconds, minutes, centuries and lightyears are all quantitative scales. But what about qualitative scales?

These are yardsticks that measure observable, but not necessarily numerical, properties – and we use them all the time. Qualitative scales are sometimes humorous and often downright bizarre, but they are just as valuable as quantitative scales for imagining relationships between properties and standardising ideas.

They range from chili pepper heat to mineral hardness to ocean breezes to something called the Mother Cow Index (formerly used in real estate transactions in the American Southwest, the MCI was the number of pregnant cows an acre of a given plot of land could support). Qualitative scales allow us to label variables with little or no quantitative information. These unusual units of measurement are often colloquial: guesstimations and “as-the-crow-flies” rules of thumb that allow for quick assessments and comparisons.





The Mother Cow Index calculated the value of land based on the number of pregnant cows it could sustain (Credit: Alamy)



Yet qualitative scales prove their usefulness time and again. Without them, we would struggle to conceptualise ideas of pain (a doctor might ask a patient to rank his symptoms) or grade the severity of weather conditions (like the Beaufort Scale does).

Date, when measured from an arbitrary epoch such as BC or AD, helps us understand time, while direction measured in degrees from true or magnetic north orients us in physical space.

Quantitative scales are much easier to evaluate, since they are effectively comparisons to a known standard. A square-kilometre, a teaspoon of sugar or an hour-long lecture are basically unchanging measurements. Qualitative scales are more subjective. Neither quantitative nor qualitative scales, however, are ever 100% accurate: they are each limited by the uncertainty baked into the definitions of units themselves.

Beaufort may have developed the first modern qualitative scale

Any true measurement, when you get down to it, is arbitrary. Yet the very human urge to appraise, quantify, and compare persists, and so we continuously seek new ways to describe our experience of the world.

In 1805, Rear Admiral Sir Francis Beaufort, an Irish hydrographer in the Royal Navy, wanted a way to more accurately measure ocean breezes. Each day aboard the HMS Woolwich, he recorded in his diary wind force and sea conditions, from eerie calm to violent gales. Today, a “Beaufort 0” means an ocean as smooth as glass, while a "Beaufort 12" indicates crashing waves, hurricane-force wind, whitecaps and greatly reduced visibility.

In between these extremities are gentle breezes and fresh breezes and moderate breezes (yes, these are all different breeze strengths). Beaufort may have developed the first modern qualitative scale: a ranking in which the order of values is significant, but the difference between each value is not really known.

By and large, qualitative scales fall into one of two categories: Ordinal measurements (in which values can be arranged in a meaningful order), or Interval measurements (in which values can be arranged in a meaningful order, and the difference between two values matters). For example, an earthquake that measures 6.0 on the Richter scale is many orders of magnitude greater than a small trembler of 3.0. So the order of quake size matters, and the interval is also fixed, meaning that Richter’s scale is an Interval scale.





'As the crow flies' is an elegant way of describing the shortest route between places (Credit: Alamy)



Grades such as beginner, intermediate and advanced, by contrast, are Ordinal. Who can say what the exact difference is between a novice and an expert, or where one classification ends and the other begins? Another way to put it: Ordinal scales allow for the difference among items, but not the ratio between them.

An “extremely satisfied” response on a customer service ranking is not triple the satisfaction of “somewhat dissatisfied”; even the difference between 10C and 20C, while quantitative, is not an intuitive measurement. Some argue that these limitations make qualitative scales inherently less functional.

There are things that we can measure and things we can’t – Andrew Hanson

Indeed, while proper measurement ascribes value to the physical world, our perception of the physical world varies widely. “There are things that we can measure and things we can’t,” says Andrew Hanson, senior research scientist at the National Physical Laboratory (NPL) in the UK. “But even what we canmeasure, we can only do to a degree.”

Hanson works in soft metrology: he studies measurements that relate to sensory scales like colour and light, which are quantitative but also subjective. No human can see ultraviolet or infrared light, but even shades on the visible spectrum appear differently from person to person – a difference that has real-world implications.

Think about traffic signals, which must appear red, amber, or green. The way we perceive the brightness of these coloured lights is non-linear: numerical changes in input (watts) don’t always translate to the naked eye, or to human experience.





Temperature follows defined gradations, but it's hard to visualise the changes between degrees (Credit: Alamy)



“For a scale to become legitimate, everyone must agree on its units and intervals,” Hanson explains. Despite the fact that they aren’t always linear or mathematical, qualitative scales still seem to get the international greenlight.

Take the Scoville scale. Named after its creator, American pharmacist Wilber Scoville, this scale ranks chili pepper spiciness. But the Scoville doesn’t actually measure the amount of spice, or capsaicin, in a pepper; rather, it notes the number of dilutions needed to put out a capsaicin-fueled fire.

A habanero pepper, for example, must be diluted 3,500 to 8,000 times, while a garden variety bell pepper needn’t be diluted at all. Because no two tongues experience capsaicin the same way, the American Spice Trade Association came up with measuring pepper heat in Scoville Heat Units (SHU), a method standardized in 1998. The spiciest pepper in the world is tied between the Carolina Reaper and the Dragon’s breath, which tops out at a blistering three-million SHU.

Lord Kelvin, who had a unit named after him, reasoned “when we cannot measure a thing in numbers, our knowledge is of a meagre and unsatisfactory kind”

After all that heat, a cold drink might be in order. Metrologists beware: your glass of whiskey may not be the same size from one pub to the next, or even the same strength. The shot is a liquid volume measure that varies from country to country and state to state depending on legislation, while a spirit’s proof has only recently been standardised (until the 20th Century, alcoholic spirits were assessed by mixing them with gunpowder and testing the mixture to “prove” that it would ignite).

The shot is routinely used for measuring strong liquor or spirits when the amount served and consumed is smaller than the more common measures of alcoholic “drink” and “pint” – each themselves qualitative measures.





The Royal Albert Hall has become shorthand for a large space - because it is easy to visualise (Credit: Alamy)



Lord Kelvin, who had a unit named after him, reasoned “when we cannot measure a thing in numbers, our knowledge is of a meagre and unsatisfactory kind”. But sometimes numbers don’t quite hit the spot, and that’s where qualitative scales come in.

These scales are what allow us to express the size of a sinkhole as a Double Decker Bus (DDB). They give us a Royal Albert Hall’s worth of rubbish in a landfill (the volume of the famous London auditorium is between 3 and 3.5 million cubic feet). They even help us to measure beauty. One Helen is enough to launch one thousand ships (a milli-Helen launches but one), while a sapphire’s absolute Mohs is a perfect 10 (the Mohs Scale of Hardness measures a mineral’s resistance to being scratched). Measurement – whether qualitative or quantitative – underpins virtually all aspects of human activity.

“Measurement is the comparison of something unknown against something known,” says Hanson. Better measurement enables better science, less waste, and greater precision in fields like engineering and healthcare, which in turn means a better quality of life. Someday, we might be able to put numbers to ideas like pain or happiness, turning qualitative measurements into true quantitative scales.

At present, qualitative measurements help us translate ideas that are almost poetically incalculable: the length of a city block or the Grand Canyon, the pitch of a teakettle or a lightning strike or a whisper in the dark.f chilis.