I'm very pleased that he agreed to come down to Hammersmith to give you a little bit of maths, so please welcome to the stage Matt Parker!

Alright.

Oh yeah. Okay.

Give me a cheer if you're ready to do some number theory!

Ah Hammersmith you've made my night already

That's so few audiences are up for number theory the comedy store one of them

I've checked, but we are actually going to do some number theory. My name is Matt I am a mathematician or

number Ninja and I'm

If you're laughing at that you're in for a treat in a moment

I'm here because not only can you not do science without maths, but you couldn't even have a science show

Without numbers in fact our modern civilization wouldn't be possible without number patterns

This is kind of the numbers of universe section

And to start that we are actually going to do some maths so could everyone who bought a calculator with them get that out now

Oh come on. This is your chance to shine nerds

Come on

Really sir don't get my hopes up

Are you disposing of your chewing gum?

I've lost it. Are you getting a calculator?

you, of, okay

calculator or universal Turing machine

Could you switch your iphone in calculator mode and could you put any four-digit number you fancy in?

We're going to start with a fairly straightforward maths trick

What I want you to do sir is to multiply that by nine and hit equals and we're going to dispense a microphone for you

You are doing this, right?

Feels like your texting your mates.

You're not going to believe how this show is starting.

Have you got a four or five digit answer on your phone man?

Five digit, okay. Here's what we're going to do

Have we got a mic for this poor man?

Okay, you're going to have to yell really loud. I'm going to get you to read out the first four digits slowly

I'll say yep after each one, and I'll predict the final fifth digit if I get it correct

Can you shout yes very, very loudly? Are you ready?

Here we go, here we go. You're about to be amplified guy in the green

Well the guy who stopped it

He looks mildly more nervous now okay? What's the first a digit sir?

Four. To keep persist with the microphone.

Four. Hey!

There just one four okay. Four. Yep, three three seven yep three

Last digit is a one.

Correct.

Don't patronize me.

Did you feel that wave of disappointment just come crashing down? It's because there is a fairly straightforward master

it's not

Alarmingly difficult all I'm doing is adding the digits as you call them out and any

Multiple of nine if you add the digits the answer is another multiple of nine

Not alarmingly difficult, so let's let's amp this one up a notch, right?

And so I give you those of you who are unimpressed this. Now.

What

Not the CD the barcode

Had you worried for a second there, though

The only reason I have this CD right I listen to with all the dangerous high frequencies removed as a kind of way

inoculating myself against his tunes.

It is a fever going around town

What we're going to do with the-actually is anyone

Close to smilers over here got a product like a bottle of water or chewing gum or something you've purchased

Which has a okay miss has got a bottle of water. Can you pass the mic down to her?

Okay miss what you're going to do very similar to before is read the digits out one and time very slowly

I will predict the last digit. Before you start

Can you see the numbers here start just to the left of the line? Do you all start just to the left or underneath?

Have you got a barcode?

You're gonna have to invest in some actual words.

It starts with a letter

What? It starts with a letter. Okay. Could we get a different product there?

If you can't recognize numbers I've lost an awful lot of confidence.

Has anyone else- I've only got a finite amount of time here- got, okay. Yes, right have you got a barcode with numbers

Yes, Brilliant. Good, good. Does the first number start just to the left or underneath. It's just to the left. Brilliant, okay?

Here's what you're gonna do. You're going to read out those digits to me very slowly

I'll say yep after each one and don't tell me the last one. I'll predict it you shout "yes"! Everyone will go suitably wild

Five. Oh, okay five. Yep. Yep. Zero. Yep. One. Yep. Two. Zero. Woah woah woah woah

Okay, pick it up. Okay from, from five. Oh wait.

No after two.

Five.

Okay that's after the zero, right? Okay yeah good yeah.

Eight.

Yep. Zero. Yep. Zero. Yep. Three.

Yep. Zero. Yep. Zero. Yep. Last digit is a six.

Yeah.

Now I'm using a different pattern this time and it is a much more difficult pattern

If the front row was the barcode what I need to do is memorize every second digit as it's called out add

them together and then go back and add to get the

in-between digits as a second totals if you then multiply the first total by 3 add to

the second total the answer for a barcode if there are no letters

Always be a multiple of 10 and the reason that works is because of the last digit you sir

The rest of the barcode is like the product number and your what's called a redundant piece of information

Since you seem to call someone your you're the link click the bar

You don't actually do anything

But you're required to make the system work

And the reason you're there is wherever you scan a barcode the cash register performs that check to make sure there were no mistakes

The problem is if you detect a mistake you, you can see that something's gone wrong

But you can't do anything about it again. You're the nuclear bomb

Where's that first I could recreate the missing information in we were multiplying by nine, and when you send any information

You use more complicated versions of that pack in fact whenever you send a text message

your phone takes what you type in takes it as

Numbers puts it in a grid there's an extra digit for every single row an extra one for every single column splits

into sections and does a third mathematical pattern and converts it into

Well basically a Sudoku.

And so maybe you send a text message

It's sent as a complete sudoku

and if the receiving phone gets it and there are huge bits of information missing it can use the patterns to

Recreate and some of you are probably already doing this

To recreate all the missing information and without that kind of robust data transfer our modern society simply wouldn't be possible

Which is why that is my all-time second favorite use for Sudoku?

my all-time

Favorite use I do recommend this the next time you're on a train and it's really crowded everyone's around you get a paper out flip through the Sudoku

Just start filling in random numbers

Like you care. It really pisses everyone else

If you get someone hooked, right?

Put in a whole row of sevens

Put a twelve in that square. You guys have been lovely. Thank you very much