Brian Clegg's Blog, page 14

May 28, 2024

Close to Death - Anthony Horowitz ****

There was a danger that by the fifth of his Hawthorne mysteries that started with The Word is Murder , Anthony Horowitz would have stretched the unusual format too far. The other books were written in the first  person, with a fictional version of Horowitz himself acting effectively as Watson to eccentric ex-cop Daniel Hawthorne. But this entry in the series starts in the conventional third person, describing the occupants of an exclusive close in Richmond on Thames and their fractious relationships with a boorish man who it feels is surely going to be the murder victim.

The setting is clever, because the small gated development effectively provides a similarly isolated group of suspects to a traditional country house murder mystery, but better suited to a modern world. And we get a classic varied group of suspects from a chess grandmaster and a 'dentist to the stars' to a pair of old ladies. But Horowitz then comes into the story as this was a past case of Hawthorne’s that Horowitz has decided to write up (despite almost universal attempts to persuade him he shouldn’t).

On the whole it all works very well with some clever twists, including a locked room mystery (despite Horowitz claiming he can’t stand them). But the particularly meta nature of the storytelling makes the reader feel more detached than usual, especially in the way that the murder is apparently solved part way through in a way that can’t really be true or there would be no book.

I enjoyed it, and continue to regard Horowitz as one of the best currently active mystery writers… but perhaps in this one he has been just a little bit too clever.

See all of Brian's online articles or subscribe to a weekly digest for free here You can buy Close to Death from Amazon.co.uk Amazon.com and Bookshop.org
Using these links earns us commission at no cost to you
1 like ·   •  0 comments  •  flag
Share on Twitter
Published on May 28, 2024 08:10

May 13, 2024

Wordsworth and sausages

For an example in a book I'm writing, I needed to get the generative AI ChatGPT to come up with a poem in a known style, and then to do something else related.

I chose to ask it for a poem on sausages in the style of Wordsworth, and the to provide a 2,000 word literary criticism of its own poem. I love what came out - and particularly as the editor rejected it from the book (philistine) I feel the need to share it. 

Read the poem, but do stay for the literary criticism - there's something wonderful about an AI doing a lit crit of its own work.

Savoring the Sausage Symphony by ChatGPT Wordsworth

In quaint kitchens where hearths did glow,

Amidst the aroma's gentle flow,

There lies a tale of savory delight,

Where sausages dance in golden light.


Oft in the sizzle of the morning's yawn,

When dew-kissed grass greets the dawn,

The humble links, with humble grace,

Fill the air, a savory embrace.


Oh, how they sway in the skillet's song,

Echoes of flavor, pure and strong,

As spices mingle in tender care,

Crafting a symphony beyond compare.


In butcher's shops, where secrets keep,

Where hands of skill and passion sweep,

They mold the meat with artisan's touch,

Creating morsels loved by much.


Through bustling streets and country lanes,

Their aroma weaves enchanting chains,

For in each bite, a tale untold,

Of flavors rich and stories bold.


So let us raise a toast, my friend,

To sausages that never end,

For in their savory, humble grace,

Lies a taste of life's enduring embrace.


And here's the literary criticism:

Title: Savoring the Sausage Symphony: A Literary Criticism of the Poem in the Style of Wordsworth

Introduction:

The poem "Savoring the Sausage Symphony," inspired by the style of William Wordsworth, evokes the essence of Romanticism through its portrayal of a seemingly mundane subject—the sausage. Drawing upon Wordsworthian themes of nature, simplicity, and the sublime, the poem celebrates the sensory experience and cultural significance of this culinary delight. Through a detailed analysis, this literary criticism will explore the poem's use of language, imagery, and structure to uncover deeper layers of meaning and illuminate its connection to Wordsworth's poetic philosophy.

Language and Diction:

The language of the poem reflects both the simplicity and the richness of its subject matter. Words such as "quaint," "gentle," and "humble" evoke a sense of pastoral charm and domestic tranquility, reminiscent of Wordsworth's emphasis on rustic life and the ordinary joys of the countryside. However, juxtaposed with these quaint descriptors are words like "aroma," "symphony," and "enchanted," which imbue the poem with a heightened sense of sensory experience and aesthetic pleasure. This blending of humble and elevated language mirrors Wordsworth's belief in the transcendent power of nature to inspire both awe and intimacy.

Moreover, the repeated use of culinary terminology such as "sizzle," "skillet's song," and "flavors" serves to elevate the subject of sausages to a realm of artistic expression, highlighting the poet's skill in transforming the mundane into the extraordinary. By infusing everyday language with poetic resonance, the poem invites readers to reconsider the significance of seemingly trivial objects and experiences, echoing Wordsworth's assertion that poetry should arise from the "spontaneous overflow of powerful feelings."

Imagery and Symbolism:

Central to the poem's evocative power is its vivid imagery, which transports readers to the sensory world of the kitchen and the marketplace. The opening lines, "In quaint kitchens where hearths did glow, / Amidst the aroma's gentle flow," conjure images of cozy domestic scenes and tantalizing scents wafting through the air. Here, the hearth symbolizes warmth and comfort, while the aroma symbolizes the sensory allure of cooking—a theme that recurs throughout the poem.

Furthermore, the image of sausages dancing in "golden light" evokes a sense of vitality and animation, suggesting a harmonious relationship between the culinary arts and the natural world. This imagery is reminiscent of Wordsworth's celebration of the dynamic interplay between humanity and the environment, wherein even the most humble objects are infused with a sense of vitality and significance.

Moreover, the poem's portrayal of sausages as both ordinary foodstuffs and transcendent symbols of cultural heritage speaks to its deeper thematic resonance. Just as Wordsworth found in nature a source of spiritual renewal and moral insight, so too does the poem find in the humble sausage a symbol of human creativity, ingenuity, and tradition. Through its rich tapestry of imagery and symbolism, the poem invites readers to contemplate the interconnectedness of food, culture, and the natural world, echoing Wordsworth's belief in the inherent unity of all living things.

Structure and Form:

In keeping with the tradition of Wordsworthian poetry, "Savoring the Sausage Symphony" adheres to a simple yet rhythmic structure, characterized by its use of regular meter and rhyme scheme. The poem consists of five quatrains, each comprising four lines of iambic tetrameter, with an ABAB rhyme scheme. This formal consistency lends the poem a sense of musicality and balance, reinforcing its thematic emphasis on harmony and unity.

Furthermore, the poem's symmetrical structure mirrors its thematic concerns, with each stanza building upon the preceding one to create a cohesive narrative arc. From the opening depiction of quaint kitchens and hearths ablaze with light, to the final toast raised in celebration of sausages and their cultural significance, the poem unfolds in a series of carefully orchestrated movements, each contributing to the overall rhythm and flow.

Conclusion:

In "Savoring the Sausage Symphony," the poet skillfully employs the language, imagery, and structure of Wordsworthian poetry to explore the sensory experience and cultural significance of a seemingly mundane subject. Through its evocative language, vivid imagery, and rhythmic structure, the poem invites readers to reconsider the ordinary world around them and find beauty in the most unexpected places. In doing so, it pays homage to the enduring legacy of William Wordsworth and his belief in the transformative power of poetry to awaken the soul to the wonders of the natural world.

Image from Unsplash by Ivan Shemereko

See all of Brian's online articles or subscribe to a weekly digest for free here


1 like ·   •  0 comments  •  flag
Share on Twitter
Published on May 13, 2024 03:55

May 6, 2024

The Ward Witch / The Book Keeper - Sarah Painter ****

I'm quite fond of Sarah Painter's Crow Investigations books - an urban fantasy series set in London featuring four magical families in the otherwise normal setting, so I was interested to see what her newish Unholy Island series, based in the same world, but located on an island with a causeway off the North East of England, just north of Holy Island, would be like.

Going on the first two books in the series, the concept and setting is great, but the plot development is initially somewhat glacial. The idea is that Unholy Island has its own, magical nature - unless you are wanted by the island, you will never stay more than two nights and you will forget about any experiences there when you leave. It's a great setting into which Painter deposits a newcomer, Luke, who gets a mixed welcome from around a dozen residents, each a remarkable character, ranging from BandB owner (and ward witch) Esme to the mysterious (and unnerving) three sisters.

The first book, The Ward Witch, sets up the scene, but relatively little happens beyond Luke arriving and introducing the location and characters. Okay, that's not entirely true: there is a murder to be solved, but considering this, it is all surprisingly low key and slow. It's necessary to read it to continue with the rest of the series, but as a standalone novel, it's weak. 

Thankfully considerably more happens in the second book, The Book Keeper, the title referring to Luke who takes over the island bookshop after the death in the previous novel. Here the bookshop's magical nature really comes into its own, relationships develop and the island as a whole is under threat. Although it still has a very sedate pace and could, frankly do with a bit more energy - this second book feels significantly better than its predecessor.

Overall, the setting and concept are great and I will certainly read on - I just hope that Painter can inject a bit more of the drive that's at the heart of the Crow novels to stop this series feeling quite so lethargic.

See all of Brian's online articles or subscribe to a weekly digest for free here You can buy The Ward Witch from Amazon.co.uk and Amazon.com and also The Book Keeper from Amazon.co.uk and Amazon.com
Using these links earns us commission at no cost to you
1 like ·   •  0 comments  •  flag
Share on Twitter
Published on May 06, 2024 02:26

April 29, 2024

Toasty surprise

A while ago, I wrote a book on misconceptions in science (called Lightning Often Strikes Twice ). In it, I mentioned the inverted misconception that toast doesn't really fall butter side down. It feels like it should be a myth. But it is a real thing.

Entertainingly, this myth was 'disproved' by the BBC in 1991, using a device that flipped a slice of toast in the air, rather like flipping a coin. Although it wasn't quite 50:50, not entirely surprisingly, on the whole the buttered and non-buttered sides ended up downwards roughly evenly. 

But what the producers seemed to have missed is that there isn't much toast flipping going on in our kitchens. What usually happens is either that toast slips off a plate in our hands, or off a worktop. Both of these tend to occur at around waist height. And without a forced spin to get them going, the chances are high that the toast will only have time to revolve half a turn in the fall. It usually starts butter side up (that's certainly how my toast goes on the plate)... so it ends up butter side down.

To accompany my talk based on the book I made a very short video demonstration of this. It seemed a shame to limit this to those who had a chance to come along and see the talk - so, for your delectation, here it is...


Image from Unsplash by Seriously Low Carb

See all of Brian's online articles or subscribe to a weekly digest for free here

1 like ·   •  0 comments  •  flag
Share on Twitter
Published on April 29, 2024 01:55

April 27, 2024

A Death in the Parish - Richard Coles *****

In reviewing the first of Richard Coles' murder mysteries, Murder before Evensong , I remarked 'I just hope that with practice Coles can make the detective aspect more engaging'. He doesn't. In fact, although a murder is a thread running through this book, it's almost incidental - yet I didn't care because the murder mystery aspect is not really the point. 
A Death in the Parish gives us two things that Coles does brilliantly: exploring the nature of British village life in the 1980s, when the country was going through a significant culture change as the old respect for authority was dying out, and giving us a novel with a realistic vicar as a central character, as opposed to the clumsy stereotypes we usually seen in fiction.

I don't know if this was Coles' conscious intent, but the 'cosy murder' part feels like little more than a way to get more readers, because there is far less of a market for a novel about the realities of village life and the Church of England. And as my personal fictional matter is largely limited to police procedurals, science fiction and fantasy, I would be unlikely to pick up such a book. But I'm so glad I did.

I've lived in a village off and on through my life, and Coles really gets into the spirit of such a place with both its petty playing off of characters against each other and its unmatched sense of community and continuity, however faded it might be. I'm also very familiar with the Church of England (Anglican/Episcopalian for those who haven't come across it), an institution that may be dying, but that is so central to the English cultural heritage. 

As a retired vicar, Coles is ideally placed to understand the niceties of church politics - particularly when he pits his traditionalist, Anglo-catholic central character against a colleague whose ideas are far too evangelical and Bible-literalist for his liking.

You don't expect cosy murder mysteries to be un-put-downable, but I rushed through this book, soaking up the atmosphere and revelling in Coles' understanding of the sense of place and the impact on institutions of culture change. The cover quote saying 'Best of the new cosy crime writers' totally misses the point. It's very average crime writing, but it's an excellent novel.

See all of Brian's online articles or subscribe to a weekly digest for free here You can buy A Death in the Parish from Amazon.co.uk Amazon.com and Bookshop.org
Using these links earns us commission at no cost to you
1 like ·   •  0 comments  •  flag
Share on Twitter
Published on April 27, 2024 07:30

April 22, 2024

The Night in Question - Susan Fletcher ***(*)

This is a bit of an oddity - it was given to me on the assumption that it is a mystery so I would like it, and there is a mystery element, but the main focus (and certainly the best part) involves an 87-year-old woman looking back over her life.

Florence Butterfield is a woman from an ordinary background, but who has an extraordinary life, which is dipped into through her memories in a non-linear fashion. Susan Fletcher is clearly adept at this kind of writing, handling it well and giving Florrie some remarkable events to remember, through to the point when due to an unlikely accident with mulled wine she ends up losing a leg, in a wheelchair and moving into the assisted living part of a care home, where the key event of the mystery takes place at midsummer. The manager of the home, Renate, plummets from her third floor window with Florrie as the only witness. The manager's life is on a thread in a coma, and the assumption is made that it was a suicide attempt. But Florrie is not sure.

Here's where the mystery element comes in - or at least one of the two mystery elements. The other is that there is something nasty in the woodshed from when Florrie was 17 that is hinted at every few pages for nearly all of the 400-page book. Frankly, this teasing of what happened gets tedious. The main mystery is more interesting - was Renate pushed, by whom and why? But I'm afraid this part of the book does not play to Fletcher's strengths. The two key twists in the plot were reasonably obvious: in the first case, Florrie and her Dr Watson-like friend draw entirely the wrong conclusion from a clue, even though the reality is readily apparent. In the second, they fail to notice a totally straightforward possibility. As far as I can see, the only reason for the apparently bright Florrie missing these points for so long is that the book wouldn't be long enough to fit in all the reminiscing otherwise.

I quite enjoyed The Night in Question, though during some of the diving into the past I did feel 'Please, let's get back to the mystery.' - but if you enjoy an 'extraordinary and unexpected life slowly revealed' novel and aren't too worried about the mystery side, this would very satisfactorily hit the spot.

See all of Brian's online articles or subscribe to a weekly digest for free here You can buy The Night in Question from Amazon.co.uk Amazon.com and Bookshop.org
Using these links earns us commission at no cost to you
1 like ·   •  0 comments  •  flag
Share on Twitter
Published on April 22, 2024 06:43

Monte Carlo or bust (Monte Carlo Method, part 4)

This is the final post on the mathematical approach known as the Monte Carlo method, following 'Generating random numbers.'

We have seen in previous posts why the method is named Monte Carlo, how it was first used and the difficulties of obtaining a stream of truly random numbers. This approach is now used across the sciences, as well in engineering, economics, AI and more. It's an technique that comes in useful when there is a complex mathematical problem solve, where taking repeated random samples of weighted possible outcomes will give a better understanding of a real world situation.

There are far too many applications to go into detail here (you can find a length set of possibilities in the Wikipedia entry). To see a simple one in action, take a look at this Monte Carlo-based pi generator. But I just want to pick out another application that I'm particularly familiar with from using it to help understand queues in an airport terminal. I've always thought that queuing is one of the most fascinating aspects of Operational Research, which I worked in for a good few years. Apart from anything, this is because queues involve people, and the way that people interact with each other.

Anyone who has visited theme park rides in different countries may well have experienced varying cultural approaches to dealing with a conventional single line queue, from polite fairness to 'cram in and try to get in front'. But things get more interesting when there are multiple servers. Once upon a time there would typically be an individual queue for each server. This is still often the case, for example, with supermarket trolley checkouts and airport passport checks. But in many cases, it is more effective to have a single queue feeding all the servers, where the person at the front goes to the first available server.

It's not long ago that such queuing systems were treated with suspicion: since the single queue is much longer than any one of the individual queues it replaces, it looks like it will make waiting time longer. But it doesn't in many circumstances. Usually when we want a single queue multiple server setup we corral people to make it easier to see what's happening. With no enforced structure, for example, at a row of several busy cash machines you usually see a queue forming behind each dispenser - though I was delighted a few years ago (when I used to use cash) to see a spontaneously formed single queue, multiple server arrangement developing as people held back from cashpoints and let the first person go to whichever became free.

There are times, though, when the intuitive setup may not be the most effective - and this is where a form of Monte Carlo Method comes in, in the form of simulation. (Some pedants don't include simulation as Monte Carlo, but I disagree, and it's one of the easiest examples to get your head around.) When I did this, I manually coded it, though for many years now you have been able to use off the shelf simulation packages. After collecting data on the distribution of times a transaction takes, which depends on the complexity of the interaction (e.g. the number of items in a shopping trolley, the number of bags and options in a check-in, or the complexity of a bank transaction ranging from a simple deposit to setting up a new account) plus the flows of customers at various times, the simulation makes use of random number generation to control both the availability of servers, the arrival of customers with different transactions, and their queue selection if there is more than one queue.

This is then run as a simulation, a bit like a self-playing video game, churning through a virtual day over and over to build up an effective picture of what is likely to happen. The same approach can then be taken with variations in the queuing layout, making it possible to provide the best structure of queue(s) for the particular requirement.

I had many a happy hour looking at queuing possibilities for Heathrow's Terminal Four (don't blame me if the queues don't work now - this was many years ago and the queuing structures/airline usage have changed several times since). It was a delight to be putting (pseudo-) randomness to good use.

Image from Unsplash by Lisanto

See all of Brian's online articles or subscribe to a weekly digest for free here
1 like ·   •  0 comments  •  flag
Share on Twitter
Published on April 22, 2024 04:19

April 19, 2024

A week of fantasy TV

Having recently had a week with sole charge of the TV remote, I've taken the opportunity of catching up on a couple of new series in my favourite fantasy sub-genre. I'm not a fan of swords and sorcery (with the noble exception of Lord of the Rings), but I love what you might call real-world fantasy. This is pretty much the same as urban fantasy, but doesn't have to be in a city. You could also see it as magical realism without the pretentiousness. 

The idea, then, is to incorporate fantastical occurrences in the normal world. The first example of this was ITV's Passenger. This sets what should be a normal police procedural story in a weird village (Chadder Vale) in Lancashire. There are strange occurrences, some sort of unexplained dangerous creature and a cast of misfits. As such, you can see it as a mix of Twin Peaks, Stranger Things and Happy Valley.

Perhaps the weirdest decision by Andrew Buchan, the man behind the series, is to set the show in the present, but to emphasise Chaddar Vale's oddness by having various aspects of life there stuck in the past. The the police use a Mini Metro patrol car, the computer game we see, played on a console, is blockily retro, and mobile phones are of the ancient variety. Perhaps influenced by Twin Peaks, there are also some decidedly American aspects to the look of the place (even though the natives speak broad Lancashire). For example, the police uniforms look to be from the wrong side of the Atlantic. Standout performance is from Wunmi Mosaku as the police detective whose boss is more interested in her finding stolen wheelie bins than solving a murder.

The series develops a good sense of dark, brooding atmosphere and attempts a touch of humour, mostly in the dialogue and the incompetence of some of the characters. This all works well, but I'd argue that it's too slow to get anywhere - and it ends in a way that demands a second series, which I'm not sure it will get. Admittedly, if there is going to be one, then the ending is okay, but it does leave everything open and much unexplained. It would have been better to have tied it up more, while still leaving room for new directions. I'm glad I watched it, but I can understand why some were frustrated by the ending. Take a look on ITVX.

The second new series on the block was Disney+'s Renegade Nell by the excellent writer Sally Wainwright. This is a different form of the genre - it could only be called real-world fantasy if Bridgerton can be considered to reflect historical reality (hint - it doesn't). Set in England in the early 1700s, it doesn't attempt period speech, and the cast is colour blind - it works fine, but the result is to reduce the cognitive dissonance of the clash between the fantasy element and the normal world (because the world isn't normal for 1700), which is why real-world fantasy works so well.

The central character, Nell, is a poor inkeeper's daughter who gets her own back on the toffs by becoming a highwaywoman, attempting to avenge her father's murder and getting embroiled in various plots while trying to keep her younger sisters safe. So far, so straightforward pseudo-historical. But Nell is helped out by a fairy-like character who can give her superhuman strength, while the dodgy lord-of-the-manor's dim son and scheming daughter hook up with a magician lord in the Privy Council, played magnificently by Adrian Lester. And why not throw in Herne the Hunter too?

Nell is played well by Irish actress Louise Harland, while comedian-turned-actor Nick Mohammed employs his trademark naivety to provide an entertaining turn as the fairyoid, Billy Budd. In one sense this is a natural step forward by Wainwright from her Victorian series Gentleman Jack - it's another show with a strong female lead who thwarts the convention of her period and Harland is more effective than the usually excellent Suranne Jones who is far too mannered as Gentleman Jack, seeming to spend half her time running from one place to another. 

Renegade Nell is an oddity for Wainwright who, as a writer, is steeped in the North of England, but here the setting is primarily the Thames Valley, featuring key locations of London (including the village of Tottenham), Slough and Uffington - but it's necessary because of the need to bring in Queen Anne and her key advisors. Despite the pseudo-historical setting, I enjoyed it more than Passenger because there was considerably more action, significantly more plot development and more of a sense of fun, despite the dark context. Worth catching up with if you have Disney+ (though probably not worth subscribing just to watch it).

One thing Disney+ would also give you is access to the the greatest urban fantasy TV show of them all, Buffy the Vampire Slayer - to top off the fantasy week, I watched two of the classic Buffy episodes, Hush and Once More with Feeling

More than half of Hush (from Season 4) has no speaking at all as a spell renders everyone in Sunnydale speechless to enable horrific attacks without the victims being able to cry for help. Despite the distinctly nasty baddies, this provides for some excellent humour, particular during a briefing using overhead projector slides and some unfortunate mime.

Once More with Feeling seems like it should be a much lighter episode, as it's a musical where characters repeatedly burst into song to expound various feelings - though unlike traditional musicals, there is a logical explanation for this random song and dance in the form of a meddling demon with a nefarious purpose.  There is still a surprising amount of humour, despite this being from the mostly miserable-toned series 6 (the reason for the misery is finally explained to the rest of the cast in a song performed by Sarah Michelle Gellar featuring some interesting atonality). I'd forgotten the ending, which as often is the case with Buffy defies expectations.

Although now 20 or so years old, Buffy still holds up surprisingly well - especially when revelling in the cleverness of these episodes. What comes across immediately is the sharp dialogue and the depth of humour. (One specific delight I'd forgotten is Anya's suggestion that the cause of the musical outbreaks might be bunnies.) The whole point of the series is to subvert the horror show stereotype by having a strong female character as the vampire slayer, rather than the female lead being a helpless victim - and these two episodes make good use of this feature. Although Passenger and Renegade Nell both had a degree of subversion, neither came close to Buffy's ability to combine a continuous thread of humour with dark topics.

If you have never seen Buffy, it has yet to be toppled from its top spot.

See all of Brian's online articles or subscribe to a weekly digest for free here
 •  0 comments  •  flag
Share on Twitter
Published on April 19, 2024 02:21

April 15, 2024

Expecting the unexpected - generating random numbers (Monte Carlo method, part 3)

This is the third of four posts on the mathematical approach known as the Monte Carlo method, following 'Where did those neutrons go'.

As we saw in the previous post, the Monte Carlo method depends on having a stream of random numbers. Unfortunately, randomness is not easy to generate. Ask someone for a series of random choices between 1 and 10 and they will not do well - for example, there won't be sufficient repeated values for a true random stream. In another extract from my book Dice World, let's take a look at what appears to be random whether we use a spreadsheet or a more sophisticated source:

In Excel I have two random number functions, RAND, which gives me a random value between 0 and 1 (I just got 0.61012053) and RANDBETWEEN to choose a random number in a range. (My value for between 1 and 10 came out as 4.) Job done. Unfortunately, what Excel gives us is not random numbers, but pseudo-random numbers. Numbers that are random enough for, say, making a prize draw, but that aren’t good enough if you want a good long sequence of numbers that are truly random.

That is because the pseudo-random number generator is not genuinely picking between the options with equal probabilities, nor is any value in a sequence of numbers it generates totally independent of what came before. That has to be the case or we can’t calculate the random number using some sort of computer algorithm. A spreadsheet’s pseudo-random generator usually starts with a ‘seed’, an initial value which is often taken from the computer’s clock, and then repeatedly carries out a mathematical operation, typically multiplying the previous value by a constant, adding another constant and then finding the remainder when dividing by a third constant. So, for instance, a crude pseudo-random number generator would be something like:

New value = (1,366 × Previous Value + 150,899) modulo 714,025

where ‘modulo’ is the fancy term for ‘take the remainder when you divide it by ...’ The output of the pseudo-random number generator wanders off away from the seed value and can be reasonably convincing in appearance, but it will always produce the same values given the same seed, and can’t match a true random number generator for effectiveness of results. Although my Excel RANDBETWEEN function can produce two repeated values, because it is rounding a wide range of real number values to get to the same figure, the pseudo-random generator will still always be limited because it can never produce the same exact value twice in a row or it would get locked into repeating that value over and over.

Those who want to be more careful about their randomness look for a better way of producing their outputs. Most large lotteries rely on machines with a series of balls in them, which are randomised by stirring them up before balls are drawn. This is not the best way of getting a random number by any means. It’s still a pseudo-random number generator. The chances of the balls being drawn in a perfectly random fashion are very low. But in this particular example, visibility is more important than perfection. It is considered more important for players to see the draw happening than it is to approach the perfection of true randomness.

This isn’t the case for all lotteries, though. In the UK, for instance, we have an unusual kind of lottery known as premium bonds. These are government bonds that allow the buyer to have a little flutter, instead of providing a predictable return for all purchasers, as is traditional with bonds. Most premium bonds will return no ‘interest’ (though unlike a lottery ticket they can be cashed in to get the initial stake back). But 1 in 24,000 of the £1 units wins a prize in each draw*. Some bonds will produce this cash return, which can vary from a few pounds to £1 million.

To make the draw fair, the people behind premium bonds were among the first in using electronic random number generation with a device known as ERNIE, a contraction of Electronic Random Number Indicator Equipment. This device was introduced in 1957, designed by Tommy Flowers, the man behind the world’s first electronic programmable computer, the Colossus, at the World War II code-cracking centre, Bletchley Park.

ERNIE worked by using the noise in the signal produced by a series of valves (vacuum tubes). All elec- tronic devices produce a degree of noise due to thermal variations in the materials, interference and other effects. Although not truly random, because the outcome could in principle be predicted if you had all the available data, no one has access to that data and the effect is sufficiently chaotic that it is impossible to have any idea what will come next. Because of this, it is a safer way to generate pseudo-random numbers than a software-based approach. More recent variants of ERNIE (they are on to Mark IV) make use of thermal noise in transistors.

True random values can be produced using quantum effects, and true random generators are now available to plug into electronic devices if required. For example, if you have a radioactive source, where atoms occasionally spontaneously emit part of their nucleus, you can predict how often an atom will undergo such a decay on average, but the decay of a specific atom is truly random: it is not just impractical to predict but is impossible because there literally is no cause. The modern-day ERNIE could be based on such a system, but the approach taken is equally good in terms of being unpredictable and is easier to produce.

With random numbers fed in, we will look at more modern uses of the Monte Carlo method in the final post.

* Since Dice World was written, the chances of winning with a premium bond increased to 1 in 21,000.

Image from Unsplash by Dylan Nolte

See all of Brian's online articles or subscribe to a weekly digest for free here You can buy Dice World from Amazon.co.uk Amazon.com and Bookshop.org
Using these links earns us commission at no cost to you
 •  0 comments  •  flag
Share on Twitter
Published on April 15, 2024 03:06

April 8, 2024

Where did those neutrons go? (Monte Carlo method, part 2)

This is the second of four posts on the mathematical approach known as the Monte Carlo method, following 'Breaking the bank...'

Moving from the bank being broken at a casino to a mathematical method occurred as the Second World War came to a close. A number of scientists on the US nuclear programme were attempting to model neutron diffusion from a nuclear bomb. This was because a conventional nuclear explosion is effectively the trigger for the (then theoretical) thermonuclear explosion of a fusion bomb - and a major factor in its effectiveness is how neutrons travel out from the primary fission stage.

Like his colleague John von Neumann, the Polish-American physicist Stanislaw Ulam had an interest in the game of poker and the probabilistic nature of games. The new possibility of electronic calculation using the ENIAC computer made it possible to consider a novel approach to modelling neutron diffusion. At the heart of nuclear fission is the idea of a chain reaction. A neutron hits a nucleus, which splits, giving off more than one neutron. Each of these then has the opportunity to do the same. But predicting how such a process would occur, given the probabilistic nature of particle interactions, was a problem.

The idea behind the Monte Carlo method is to use the output of a (pseudo-) random number generator combined with known distributions of the chance of various interactions taking place to effectively simulate what is happening. By making many multiple runs of the model, an an accurate probability-driven picture is built up. This approach became widely used in a whole range of simulation applications - for instance predicting what would happen over time in complex queuing systems.

Ulam claimed to have come up with the idea while recovering from a serious illness, playing a variant of the card game solitaire (patience). He realised that it would take considerable mental effort to work out the chances of succeeding in any particular attempt. But if, instead, the game was repeatedly played - say 100 times - the percentage of successful plays would converge on the actual probability. He described this idea to von Neumann and began work on it with him.

Perhaps surprisingly, neither of these enthusiastic game players thought up the name. Greek-American physicist Nicholas Metropolis claimed to be responsible, writing 'It was at that time [early 1947] that I suggested an obvious name for the statistical method - a suggestion not unrelated to the fact that Stan had an uncle who would borrow money from relatives because he "just had to go to Monte Carlo." The name seems to have endured.' Initially it was a code name, but it became one of mathematics' more entertainingly named methods.

To make such simulations effective there needs to be a source of random(ish) numbers - but how was that to be achieved? We will look into those in more detail in the next, penultimate post.

Main source The Beginning of the Monte Carlo method by Nicholas Metropolis in the 1987 Los Alamos Science special issue.

Image from Unsplash by Hal Gatewood

See all of Brian's online articles or subscribe to a weekly digest for free here
1 like ·   •  0 comments  •  flag
Share on Twitter
Published on April 08, 2024 08:11