The Joy of Logic

Download Subtitles

Transcript

0:00:03 > 0:00:07The world we live in can seem pretty illogical.

0:00:07 > 0:00:09The things people say,

0:00:09 > 0:00:12the ways we behave,

0:00:12 > 0:00:14the complex choices we have to make.

0:00:14 > 0:00:16HE SHOUTS

0:00:16 > 0:00:19What's the quickest way to get home?

0:00:19 > 0:00:22Can I trust any of you lot?

0:00:23 > 0:00:26Where did you all come from?

0:00:26 > 0:00:29That process of making sense of all this stuff,

0:00:29 > 0:00:32of sorting between the truth and the nonsense,

0:00:32 > 0:00:36comes down to one of the most simple and yet powerful tools

0:00:36 > 0:00:39ever created by humans - logic.

0:00:39 > 0:00:42Yes. Yes.

0:00:42 > 0:00:44There is definitely beauty in logic!

0:00:44 > 0:00:48Who would like to be bits of a computer?

0:00:48 > 0:00:49ALL CHEER

0:00:49 > 0:00:51In the building next door to me at work,

0:00:51 > 0:00:54there's a door and there's a sign on it that says,

0:00:54 > 0:00:57"This door must be kept closed at all times."

0:00:57 > 0:01:00I just look at this in amazement. Really?!

0:01:00 > 0:01:02Why did you build a door then?

0:01:02 > 0:01:05Is this sentence true or false?

0:01:05 > 0:01:08Philosophy, maths, science and language -

0:01:08 > 0:01:11logic is the engine for all of them.

0:01:11 > 0:01:15In fact, it drives the fundamental process of reasoning itself.

0:01:15 > 0:01:18I'm a professor of computer science.

0:01:18 > 0:01:22Computer scientists tend to think that logic is the bee's knees.

0:01:22 > 0:01:25So, it follows that I think logic is brilliant.

0:01:26 > 0:01:28Logic has inspired our greatest boffins.

0:01:28 > 0:01:31I'm Socrates!

0:01:31 > 0:01:33It's given us transformational technologies...

0:01:33 > 0:01:35Delta 11, report your entry point.

0:01:35 > 0:01:38..and even made us question what it means to be human.

0:01:38 > 0:01:40Off with her head!

0:01:40 > 0:01:45I want to see if there's any limit to what logic can do for us.

0:01:45 > 0:01:48So, join me - it would be terribly illogical not to.

0:01:59 > 0:02:03Logic is right at the heart of what I do.

0:02:03 > 0:02:05Around 15 years ago, kind of by accident,

0:02:05 > 0:02:08I created something that had a really big impact here -

0:02:08 > 0:02:12on the trading floors of the City of London.

0:02:12 > 0:02:15CLAMOUR

0:02:15 > 0:02:18It was a computer programme I called ZIP,

0:02:18 > 0:02:21and it used logic to replicate THIS -

0:02:21 > 0:02:24a centuries-old tradition of human traders,

0:02:24 > 0:02:26supposedly vested with very special skills,

0:02:26 > 0:02:29crammed into rooms, shouting at each other.

0:02:29 > 0:02:32SHOUTING

0:02:32 > 0:02:36It's ever so simple, just a few logical inferences - decisions -

0:02:36 > 0:02:38and a little bit of maths.

0:02:38 > 0:02:41It learns from its trading successes and failures.

0:02:41 > 0:02:46Its aim is to trade as profitably as possible in a fast-moving market,

0:02:46 > 0:02:49where levels of supply and demand are shifting rapidly.

0:02:52 > 0:02:55It turned out that ZIP, built squarely on logic,

0:02:55 > 0:02:59was impressively proficient at this trading lark.

0:02:59 > 0:03:02In fact today, in many markets,

0:03:02 > 0:03:05billions or trillions of dollars' worth of deals go through

0:03:05 > 0:03:09with no human intervention at all, which is kind of mind-boggling.

0:03:11 > 0:03:14Every day, computer programs, on their own,

0:03:14 > 0:03:16do deals that determine the cost of everything

0:03:16 > 0:03:20from our fuel and food, to the worth of our pensions.

0:03:20 > 0:03:22It's pretty important stuff!

0:03:22 > 0:03:25And, every day, scientists like me

0:03:25 > 0:03:27earn a living using logic to find solutions

0:03:27 > 0:03:30to all kinds of other real-world challenges.

0:03:32 > 0:03:35So, why am I not as rich as Bill Gates?

0:03:35 > 0:03:38Well, I gave away the ZIP software for free.

0:03:38 > 0:03:42And, looking back, that was probably NOT my most logical move.

0:03:46 > 0:03:48So what IS logic?

0:03:48 > 0:03:51What does "being logical" even mean?

0:03:52 > 0:03:54I'd like a pint of lager, please.

0:03:54 > 0:03:58Well, all you need to explain it are three logicians and a boozer.

0:04:00 > 0:04:05Logic is actually all about the "rules of correct reasoning".

0:04:05 > 0:04:07Let me tell you a joke.

0:04:07 > 0:04:09Three logicians walk into a bar.

0:04:09 > 0:04:11The barman says...

0:04:11 > 0:04:13Gents, would you three like a beer?

0:04:13 > 0:04:15And the first logician says...

0:04:15 > 0:04:17I don't know.

0:04:17 > 0:04:18The second logician says..

0:04:20 > 0:04:21I don't know.

0:04:21 > 0:04:24And then the third logician says..

0:04:24 > 0:04:28- Yes, yes, we would all like a beer. - LAUGHTER

0:04:28 > 0:04:32OK, so it's not exactly a side-splitting, laugh-out-loud gag,

0:04:32 > 0:04:34more of a chortle for nerds.

0:04:34 > 0:04:36But what went on there?

0:04:36 > 0:04:39Well, forgive me, I'm going to analyse that joke to death.

0:04:39 > 0:04:41TAPE SCROLLING

0:04:41 > 0:04:43Remember, the barman's question was -

0:04:43 > 0:04:46"Would all three of you like a beer?"

0:04:46 > 0:04:49The key here is the "all three" bit.

0:04:49 > 0:04:52If any one of those logicians doesn't want a beer,

0:04:52 > 0:04:54then he'd be able to answer "no".

0:04:54 > 0:04:59That's because if one doesn't want a beer, they don't ALL want one.

0:04:59 > 0:05:03Logician 1 does want a beer, but he can't speak for the others,

0:05:03 > 0:05:06so he HAS to say, "I don't know".

0:05:06 > 0:05:09Exactly the same goes for Logician 2.

0:05:09 > 0:05:12Then, happily for Logicians 1 and 2,

0:05:12 > 0:05:13Logician 3 ALSO wants a beer,

0:05:13 > 0:05:17and so he correctly uses logical inference

0:05:17 > 0:05:20to arrive at the right answer to the question.

0:05:20 > 0:05:23Yes, yes, we would all like a beer.

0:05:23 > 0:05:29At last! Logician 3 ends the torment because he CAN speak for everyone.

0:05:29 > 0:05:30Cheers to that!

0:05:32 > 0:05:36The important thing to understand is that logic isn't knowledge.

0:05:36 > 0:05:38Logic doesn't create knowledge -

0:05:38 > 0:05:41what it does is it give us cast-iron rules

0:05:41 > 0:05:44for how to organise and handle knowledge.

0:05:44 > 0:05:48Even so, the quality of the conclusions you get out

0:05:48 > 0:05:51depends on the quality of the ideas that you put in.

0:05:51 > 0:05:54Time, please, gents!

0:05:55 > 0:05:57ALL: 11 o'clock!

0:05:57 > 0:05:59HE SIGHS

0:06:02 > 0:06:04It'd be a funny old world

0:06:04 > 0:06:07if we followed the rules of logic all of the time.

0:06:23 > 0:06:25These days, logic is studied

0:06:25 > 0:06:28and taught in academic institutions the world over.

0:06:28 > 0:06:31Its history stretches back 2,500 years,

0:06:31 > 0:06:34to the age of the Greek philosopher, Aristotle.

0:06:34 > 0:06:38He created the first formal rules of logic

0:06:38 > 0:06:42that would govern good reasoning, clear thought and reliable argument.

0:06:43 > 0:06:48Aristotle's most famous logical tool is the syllogism.

0:06:48 > 0:06:51A syllogism is a certain simple kind of argument

0:06:51 > 0:06:54consisting of three propositions.

0:06:54 > 0:06:56And the first two propositions are the premises,

0:06:56 > 0:06:59the things that we take for granted in the argument.

0:07:12 > 0:07:15So, for example, "All men are mortal",

0:07:15 > 0:07:17"Socrates is a man".

0:07:17 > 0:07:18Those are our two premises.

0:07:18 > 0:07:21And from them, we draw the conclusion -

0:07:21 > 0:07:22"Socrates is mortal".

0:07:22 > 0:07:26Aristotle's example is good logical reasoning.

0:07:26 > 0:07:30First, we take one premise, or thing we know -

0:07:30 > 0:07:32"All men are mortal".

0:07:32 > 0:07:33Yes, indeed.

0:07:33 > 0:07:36I'm Socrates.

0:07:36 > 0:07:38Then pair it with a second one...

0:07:38 > 0:07:40I am a man.

0:07:40 > 0:07:42Then we figure out, or infer,

0:07:42 > 0:07:46that, alas, Socrates is mortal

0:07:46 > 0:07:48That makes me sad.

0:07:49 > 0:07:51If your premises are reliable,

0:07:51 > 0:07:53and you follow Aristotle's rules,

0:07:53 > 0:07:55you get answers that are reliable, too.

0:07:58 > 0:08:01But Aristotle's theory of the syllogism

0:08:01 > 0:08:03can deal with more complicated arguments

0:08:03 > 0:08:08that don't just have "all" in them but "some" in them, and "not".

0:08:11 > 0:08:13Take all these into account,

0:08:13 > 0:08:16and you find there are lots of ways to make a syllogism.

0:08:18 > 0:08:21So, if you multiply that up,

0:08:21 > 0:08:24you find that there are 256 kinds of syllogism.

0:08:24 > 0:08:31And Aristotle identified 19 of these as being logically valid,

0:08:31 > 0:08:33so that if the premises are true,

0:08:33 > 0:08:36the conclusion has to be true as well.

0:08:36 > 0:08:39And all the others of those 256 forms,

0:08:39 > 0:08:42you can have true premises but a false conclusion,

0:08:42 > 0:08:46so arguing in that way is fallacious,

0:08:46 > 0:08:49those kind of syllogisms are fallacies.

0:08:49 > 0:08:53It's the old logical fallacy - all cats have four legs.

0:08:53 > 0:08:55My dog has four legs.

0:08:55 > 0:08:58Therefore, my dog is a cat.

0:08:59 > 0:09:02He is suffering from politicians' logic!

0:09:03 > 0:09:06This is just one of Aristotle's fallacies.

0:09:06 > 0:09:09It looks similar to good logic, the premises are both true,

0:09:09 > 0:09:11but the way they're organised

0:09:11 > 0:09:14means the reasoning is completely backwards,

0:09:14 > 0:09:16and the conclusion - bonkers.

0:09:16 > 0:09:20Something must be done. This is something, therefore, we must do it.

0:09:20 > 0:09:23But doing the wrong thing is worse than doing nothing.

0:09:23 > 0:09:25Doing anything is worse than doing nothing.

0:09:25 > 0:09:26LAUGHTER

0:09:26 > 0:09:31BELLS RING

0:09:31 > 0:09:34Such was the power of Aristotle's logic

0:09:34 > 0:09:36that scholars used and taught it,

0:09:36 > 0:09:38but actually didn't do a great deal to change it,

0:09:38 > 0:09:40for the next 2,000 years.

0:09:42 > 0:09:45But it wasn't just philosophers that were enamoured of logic.

0:09:45 > 0:09:48By the 19th Century, the public had fallen for it, too.

0:09:49 > 0:09:53For this, our thanks must chiefly go a mathematician

0:09:53 > 0:09:56who spent most of his life working at Christchurch, in Oxford.

0:09:56 > 0:09:58Charles Dodgson.

0:09:58 > 0:10:02He's much better known by his pen name, Lewis Carroll.

0:10:03 > 0:10:07The mathematics books were mainly under his real name,

0:10:07 > 0:10:09Charles Lutwidge Dodgson,

0:10:09 > 0:10:13but he chose to use his pen name, Lewis Carroll,

0:10:13 > 0:10:16for the game of logic and symbolic logic,

0:10:16 > 0:10:19clearly to give it a wider audience.

0:10:29 > 0:10:32Explain yourself, child.

0:10:32 > 0:10:35Alice's adventures may seem barmy

0:10:35 > 0:10:38but, curiouser and curiouser,

0:10:38 > 0:10:41she was actually up to her eyeballs in logic.

0:10:41 > 0:10:43In the Mad Tea-Party,

0:10:43 > 0:10:48the March Hare says, "You must say what you mean."

0:10:48 > 0:10:51And Alice replies "Well, I mean what I say.

0:10:51 > 0:10:54"It's the same thing, you know."

0:10:54 > 0:10:57The Hatter says, "You might as well say that,

0:10:57 > 0:11:01" 'I see what I eat' is the same as, 'I eat what I see'."

0:11:01 > 0:11:03Got you!

0:11:03 > 0:11:05Bottles don't talk!

0:11:05 > 0:11:10Dodgson was so keen to introduce people to the delights of logic,

0:11:10 > 0:11:15that he drafted a book initially called Logic For Ladies.

0:11:15 > 0:11:19He was very conscious that girls in particular were not heard,

0:11:19 > 0:11:22they were not given the chance to go to school,

0:11:22 > 0:11:25very few had the opportunity of going to university.

0:11:25 > 0:11:28They certainly weren't able to get a degree.

0:11:29 > 0:11:33Happily for us blokes, Dodgson had a change of heart

0:11:33 > 0:11:37and Logic For Ladies was renamed Symbolic Logic.

0:11:37 > 0:11:41Together with The Game Of Logic, it did surprisingly well.

0:11:41 > 0:11:44He felt that young people needed a tool

0:11:44 > 0:11:47to detect fallacious arguments

0:11:47 > 0:11:51that they might meet in books and magazines.

0:11:51 > 0:11:54He wanted them to have the ability to detect that.

0:11:56 > 0:12:00While Dodgson's intentions would have made Aristotle proud,

0:12:00 > 0:12:04some of his syllogisms stand out today for the wrong reasons.

0:12:04 > 0:12:07What are you meant to conclude?

0:12:07 > 0:12:08No marks for saying,

0:12:08 > 0:12:12"Victorian England was intrinsically anti-Semitic".

0:12:20 > 0:12:22I think Dodgson would have wholeheartedly approved

0:12:22 > 0:12:26of today's most popular logic game - sudoku.

0:12:26 > 0:12:28There's something captivating about the fact

0:12:28 > 0:12:31that logic tells you the answer must be in there,

0:12:31 > 0:12:34but you need to apply logical reasoning to find it.

0:12:34 > 0:12:36It can be really engaging,

0:12:36 > 0:12:39but it can also be really frustrating and annoying, too.

0:12:43 > 0:12:46Charles Dodgson had been the first person to popularise

0:12:46 > 0:12:49the idea of logical reasoning and critical thinking.

0:12:51 > 0:12:54But, for all its growing popularity,

0:12:54 > 0:12:57logic itself was due for an upgrade.

0:12:59 > 0:13:03In 1847, this ground-breaking book was published.

0:13:03 > 0:13:06It's called The Mathematical Analysis Of Logic.

0:13:06 > 0:13:09Now, this isn't logic for philosophers or puzzle fans.

0:13:09 > 0:13:11The author of this book argues

0:13:11 > 0:13:13that the real purpose of logic is mathematics.

0:13:13 > 0:13:16And this book was written by George Boole.

0:13:19 > 0:13:21Born into a poor family in Lincoln,

0:13:21 > 0:13:25Boole mastered mathematics at a fantastically young age

0:13:25 > 0:13:28and, by 20, he'd opened his own school.

0:13:30 > 0:13:32Boole's big idea was that logic

0:13:32 > 0:13:35was actually closer to mathematics than philosophy.

0:13:35 > 0:13:38All you needed to do was change the words

0:13:38 > 0:13:40in a logical argument to symbols,

0:13:40 > 0:13:43and then it could be solved just like an equation.

0:13:43 > 0:13:47He called it his "calculus of reasoning".

0:13:49 > 0:13:50DOOR SLAMS

0:13:50 > 0:13:54First, he demonstrated that the letters we use in algebra

0:13:54 > 0:13:57to represent numbers can actually be used to represent

0:13:57 > 0:14:00whole classes of things in the real world.

0:14:00 > 0:14:05So, for instance we might have the class, X, of things that are fluffy,

0:14:05 > 0:14:08and the class, Y, of things that bark.

0:14:10 > 0:14:12Second, he introduced a set of operators

0:14:12 > 0:14:15for combining these classes of things

0:14:15 > 0:14:18the three most important ones are AND, OR and NOT,

0:14:18 > 0:14:21and they're known as "Boolean operators" in his honour.

0:14:21 > 0:14:24So, if we redraw our classes so that they overlap,

0:14:24 > 0:14:26the bit in the middle,

0:14:26 > 0:14:30that's things that are fluffy or bark, X AND Y.

0:14:30 > 0:14:33If we look at the whole of the two circles,

0:14:33 > 0:14:36well, that's things that are either fluffy or they bark.

0:14:36 > 0:14:38So that's X OR Y.

0:14:38 > 0:14:40And, finally, if we think about the area outside,

0:14:40 > 0:14:43well, they're neither fluffy nor barking

0:14:43 > 0:14:45so that's NOT X AND NOT Y -

0:14:45 > 0:14:48things that aren't fluffy and don't bark. Like me.

0:14:49 > 0:14:51Boole's new mathematical logic

0:14:51 > 0:14:52reduces any logical problem

0:14:52 > 0:14:55to symbols that can be combined in new ways.

0:14:55 > 0:14:57And there was one final

0:14:57 > 0:14:58and crucial innovation.

0:15:00 > 0:15:04In Boole's new mathematical logic, everything's either in or out,

0:15:04 > 0:15:07statements are either true or false,

0:15:07 > 0:15:10everything's either a 1 or a 0.

0:15:11 > 0:15:14For example, if I were to ask my dog, Floss,

0:15:14 > 0:15:17"Are you fluffy?" AND "Do you bark?"

0:15:17 > 0:15:19she would have to bark, "Yes!"

0:15:19 > 0:15:20RUFF!

0:15:20 > 0:15:23Taking 1 to mean "yes" and 0 to mean "no",

0:15:23 > 0:15:26with Boole, we get this.

0:15:26 > 0:15:29It was an entirely new form of logical reasoning.

0:15:29 > 0:15:32Seemingly anything could be boiled down to symbols

0:15:32 > 0:15:34and just two numbers.

0:15:35 > 0:15:38And it's in my field that Boole's vision would prove transformative.

0:15:38 > 0:15:41Almost a century after his death,

0:15:41 > 0:15:44his logic would become the language of computing.

0:15:44 > 0:15:48My logical hero has to be George Boole,

0:15:48 > 0:15:54Boolean logic is so simple, yet so fundamental to explaining our world,

0:15:54 > 0:15:58and even the world today, which is full of complex systems

0:15:58 > 0:16:00that he could never have imagined,

0:16:00 > 0:16:04and Boolean logic allows us to reason about them.

0:16:04 > 0:16:06(What a guy!)

0:16:17 > 0:16:19I think the application area

0:16:19 > 0:16:22and the use of logics has changed dramatically

0:16:22 > 0:16:24in the last 20-30 years

0:16:24 > 0:16:28with the advent of computer science and software system.

0:16:28 > 0:16:32Because, fundamentally, these systems are about 0s and 1s,

0:16:32 > 0:16:36entities that map onto truth and falsity.

0:16:36 > 0:16:38And what I think is just absolutely brilliant

0:16:38 > 0:16:41is that we go back to lots of the logical ideas

0:16:41 > 0:16:45invented and conceived over 100 years ago,

0:16:45 > 0:16:49before anyone imagined the systems that they'd be applicable to.

0:16:50 > 0:16:54Boole never knew it but, thanks to him, all computers today

0:16:54 > 0:16:58process their information as binary digits or "bits".

0:16:58 > 0:17:01With binary any number can be represented

0:17:01 > 0:17:04by combinations of 1s and 0s.

0:17:06 > 0:17:09I'm going to do an experiment.

0:17:09 > 0:17:13Come on in. So the cool thing about binary numbers

0:17:13 > 0:17:16is that they're really easy for computers to manipulate,

0:17:16 > 0:17:21to add and subtract, or multiply or divide or to compare to each other.

0:17:21 > 0:17:24In fact, any time you see a computer doing anything,

0:17:24 > 0:17:26whether it's adding two numbers together

0:17:26 > 0:17:29or computing stock-market derivatives,

0:17:29 > 0:17:33inside, it's using Boolean logic to do just that.

0:17:35 > 0:17:39I want to demonstrate how Boole's logic can be used for computing.

0:17:39 > 0:17:44At their simplest, computers work by passing bits of information,

0:17:44 > 0:17:481s and 0s, through a circuit, like the one we're building here.

0:17:48 > 0:17:50The most important parts are the junctions,

0:17:50 > 0:17:55where the bits of information are combined and passed on.

0:17:55 > 0:17:57These are called Boolean logic gates,

0:17:57 > 0:17:59and the way you order them

0:17:59 > 0:18:02determines exactly what the circuit can do.

0:18:02 > 0:18:06From simple addition to calculations we could never do in our own heads -

0:18:06 > 0:18:09they can all be worked out with something like this.

0:18:10 > 0:18:13I'm going to use these guys,

0:18:13 > 0:18:15and some very simple logic gates -

0:18:15 > 0:18:19AND, NOT and OR -

0:18:19 > 0:18:22and a circuit that we've got out there in the school hall,

0:18:22 > 0:18:24and what this circuit is going to do

0:18:24 > 0:18:28is to add together two numbers to come up with one answer.

0:18:28 > 0:18:32Who would like to be bits of a computer?

0:18:32 > 0:18:34ALL CHEER

0:18:34 > 0:18:37Come on up, and I'll give you out your shirts, OK?

0:18:37 > 0:18:42This one is a number 1. Which is for Ishmael...

0:18:42 > 0:18:47'They're not just pretending - they WILL be a computer.'

0:18:47 > 0:18:49Charlie T, thank you very much for being an AND gate.

0:18:49 > 0:18:53'Normally, of course, computers work on electric currents.

0:18:53 > 0:18:55'Our computer will be powered by kids,

0:18:55 > 0:18:57'who will pass on their 1s and 0s

0:18:57 > 0:19:01'by either tagging the next kid in line for a 1 -

0:19:01 > 0:19:03'or not tagging them for 0.'

0:19:03 > 0:19:04CHEERING

0:19:04 > 0:19:08'It's time for the kids to take their places in our circuit.

0:19:08 > 0:19:12'And, for the record, I've never tried this before!'

0:19:12 > 0:19:15OK, some of you are being AND gates.

0:19:15 > 0:19:17Do you remember what an AND gate has to do?

0:19:17 > 0:19:20'The rule for ANDs is they only get a 1 to pass on

0:19:20 > 0:19:23'if they're tagged on both shoulders.'

0:19:23 > 0:19:25So, some of you are being OR gates.

0:19:25 > 0:19:30'ORs pass on a 1 if they're tagged on one or both shoulders.'

0:19:30 > 0:19:32Some of you are being NOT gates.

0:19:32 > 0:19:34'NOTs are different.

0:19:34 > 0:19:37'They get a 1 to pass on if they're not tagged.'

0:19:37 > 0:19:39Numbers - you are the most important thing,

0:19:39 > 0:19:42cos the whole circuit is about processing numbers.

0:19:42 > 0:19:44'We're going to put these four bits into the circuit,

0:19:44 > 0:19:48'which arranged like this, represent 2 and 3.'

0:19:48 > 0:19:49Off you go!

0:19:50 > 0:19:54The bits of information have been inputted.

0:19:54 > 0:19:57They're relayed on by the first set of kids.

0:19:57 > 0:20:01If they're following their rules, only some should be carrying 1s.

0:20:01 > 0:20:02While other's won't.

0:20:04 > 0:20:08At each gate, the bits are combined and passed on.

0:20:08 > 0:20:09They're nearly there!

0:20:09 > 0:20:13At last, the output numbers are either tagged or not.

0:20:13 > 0:20:17So. We've got a 1, and 0 and a 1.

0:20:17 > 0:20:194 and 1, and that makes 5.

0:20:21 > 0:20:25And the numbers we added at the start were a 3 and a 2.

0:20:25 > 0:20:27So, a 3 and a 2 moving through this circuit,

0:20:27 > 0:20:29with all of you just doing very simple things,

0:20:29 > 0:20:33being AND or OR or NOT, ended up a 5 this end,

0:20:33 > 0:20:35so you have calculated the right number!

0:20:35 > 0:20:38WILD CHEERING

0:20:41 > 0:20:45Today, all our computers are built using Boole's logic gates.

0:20:45 > 0:20:46Here we have 13,

0:20:46 > 0:20:51but a modern computer chip like this one might have 250 million.

0:20:51 > 0:20:53They're all doing exactly what these guys were doing,

0:20:53 > 0:20:56but an awful lot faster.

0:20:57 > 0:20:59We just did a simple sum here,

0:20:59 > 0:21:02but Boole heralded a new era for logic,

0:21:02 > 0:21:04in which reasoning about anything

0:21:04 > 0:21:06could be done in the language of maths.

0:21:07 > 0:21:10There are lots of different logics

0:21:10 > 0:21:12because there's lots of different kinds of systems

0:21:12 > 0:21:15or worlds that we want to reason about.

0:21:15 > 0:21:18I've been applying logic to reason

0:21:18 > 0:21:21about a wide variety of complex systems.

0:21:21 > 0:21:25I've looked at communications for air-traffic control systems,

0:21:25 > 0:21:29molecular biology, I've also looked at advanced telephony.

0:21:30 > 0:21:33But, regardless of the application,

0:21:33 > 0:21:35all logics have one thing in common.

0:21:36 > 0:21:39Amongst all these logics, the unifying property

0:21:39 > 0:21:44is they're about axioms and rules so the answer is unambiguous.

0:21:44 > 0:21:50We can automate the procedure of computing the answer in logics,

0:21:50 > 0:21:53but we still need to pose the question.

0:21:55 > 0:21:57Taking exactly those questions

0:21:57 > 0:22:00and automating the way we logically answer them

0:22:00 > 0:22:03requires what's known as an "algorithm".

0:22:03 > 0:22:06It's the province of my very own breed of nerd -

0:22:06 > 0:22:08the computer programmer.

0:22:10 > 0:22:13And there's nowhere more important for today's generation

0:22:13 > 0:22:16of up-and-coming young programmers than this -

0:22:16 > 0:22:19the annual International Olympiad of Informatics,

0:22:19 > 0:22:21held this year in Brisbane, Australia.

0:22:22 > 0:22:25We're trying to find the best and the smartest students

0:22:25 > 0:22:28when it comes to computational thinking,

0:22:28 > 0:22:29algorithms and programming.

0:22:31 > 0:22:34On each competition day, everyone is set three questions

0:22:34 > 0:22:36which must be answered within five hours.

0:22:37 > 0:22:41The easiest one, you just had a bunch of locked doors

0:22:41 > 0:22:43and you had a bunch of switches,

0:22:43 > 0:22:46each of the switches was connected to one of the doors,

0:22:46 > 0:22:50but you didn't know which switch was connected to which door.

0:22:50 > 0:22:54And what they ask for is to determine, for each switch,

0:22:54 > 0:22:58which door it's connected to and which position is the correct one.

0:22:59 > 0:23:01Johnny Ho is last year's champion,

0:23:01 > 0:23:03so there's a lot to live up to,

0:23:03 > 0:23:06but things aren't quite going his way.

0:23:06 > 0:23:08By now I've actually solved all three,

0:23:08 > 0:23:11but I didn't actually solve them during the contest

0:23:11 > 0:23:13because there's just a lot of pressure..

0:23:13 > 0:23:17We test the ability of students to come up with clever algorithms

0:23:17 > 0:23:20to solve algorithmic problems.

0:23:20 > 0:23:23They not only have to come up with the algorithms,

0:23:23 > 0:23:26but they have to write a computer program that runs the algorithm.

0:23:29 > 0:23:31Algorithms turn real-world problems

0:23:31 > 0:23:35into questions that logic can help us answer.

0:23:35 > 0:23:37If, for example, these guys wanted to spend

0:23:37 > 0:23:39their day off competition duties

0:23:39 > 0:23:43defining the group of all animals in a zoo that are marsupials,

0:23:43 > 0:23:46the first step of the algorithm could be to ask -

0:23:46 > 0:23:48"Of all the animals I see,

0:23:48 > 0:23:51"which would I find in the wild in Australia?"

0:23:52 > 0:23:54No.

0:23:54 > 0:23:55Nope.

0:23:55 > 0:23:57No.

0:23:57 > 0:23:58Yes!

0:23:58 > 0:23:59No.

0:23:59 > 0:24:01I don't know.

0:24:01 > 0:24:03Yes. Yes.

0:24:03 > 0:24:04Yes.

0:24:04 > 0:24:07Definitely not.

0:24:07 > 0:24:08Yes.

0:24:08 > 0:24:12Certainly not all of the yeses and don't-knows will be marsupials,

0:24:12 > 0:24:14so the list can then be refined

0:24:14 > 0:24:16by asking which of these animals have pouches.

0:24:16 > 0:24:18And here there are options, too.

0:24:18 > 0:24:21They could look in a book.

0:24:21 > 0:24:24They could ask Chris, he's an expert.

0:24:24 > 0:24:26Or they could crowd-source the question

0:24:26 > 0:24:28and go for the most popular answer.

0:24:28 > 0:24:31Each logical algorithm incurs a different cost -

0:24:31 > 0:24:33in effort, time or accuracy -

0:24:33 > 0:24:37but, whichever way, they'd each get to an answer eventually.

0:24:41 > 0:24:44And there are certain situations where a good logical algorithm

0:24:44 > 0:24:47can be the difference between life and death.

0:24:53 > 0:24:58This is the NATS control centre, in Swanwick, south-east England.

0:24:58 > 0:25:01At any one time, around 100 air-traffic controllers

0:25:01 > 0:25:06are responsible for 200,000 square miles of airspace over the UK.

0:25:06 > 0:25:09Delta 11, report your entry point.

0:25:09 > 0:25:12Landing over 2 million flights a year,

0:25:12 > 0:25:15it's perhaps surprising that, until very recently,

0:25:15 > 0:25:20these folk did their job using brain power alone.

0:25:20 > 0:25:21But that's all changing.

0:25:21 > 0:25:24New automated algorithms have started to take on

0:25:24 > 0:25:28some of that responsibility for guiding the planes in our skies.

0:25:30 > 0:25:33The equipment now is talking to the aircraft,

0:25:33 > 0:25:36and so whereas before the human was reacting with the human,

0:25:36 > 0:25:39and, obviously, there are sometimes mistakes made,

0:25:39 > 0:25:41the computers can now double-check that interaction

0:25:41 > 0:25:45and provide a warning to the controller if anything is amiss.

0:25:45 > 0:25:47Equally, in terms of capacity,

0:25:47 > 0:25:50because it's reduced the amount of workload for the controller,

0:25:50 > 0:25:52we've seen capacity about 40% increase on some sectors,

0:25:52 > 0:25:54because the computers are doing

0:25:54 > 0:25:56some of the logical calculations and thinking

0:25:56 > 0:25:57on behalf of the human being.

0:26:00 > 0:26:04I think logics are really crucial as a tool for reasoning

0:26:04 > 0:26:07about the systems we use in our modern world.

0:26:07 > 0:26:11We are surrounded by these complex systems like air-traffic control,

0:26:11 > 0:26:14railway signalling, the electricity grid.

0:26:21 > 0:26:24I think it's really important that we raise the next generation

0:26:24 > 0:26:29of users of these systems so that they know it's not magic,

0:26:29 > 0:26:32they also know that they have the tools of logic

0:26:32 > 0:26:34to understand and reason about the systems

0:26:34 > 0:26:38that they depend on crucially every single day of their lives.

0:26:42 > 0:26:44Back at the International Olympiad of Informatics,

0:26:44 > 0:26:47it's day two of the contest.

0:26:47 > 0:26:49The judges are looking for programs to do logic

0:26:49 > 0:26:53that aren't just right, they have to be FAST.

0:26:53 > 0:26:56So, if you have an algorithm that is technically correct

0:26:56 > 0:27:00but will take 100 million years to run, then you would score no points.

0:27:00 > 0:27:03If you have an algorithm that solves the same problem

0:27:03 > 0:27:07and runs in, say, five seconds, then you can score much higher points.

0:27:08 > 0:27:12I think the simpler an argument is, the more beautiful it is.

0:27:12 > 0:27:16So, if it can be expressed in perhaps just ten words,

0:27:16 > 0:27:19that argument would be pretty neat.

0:27:20 > 0:27:24'The competition has finished. Thank you very much for your patience.'

0:27:27 > 0:27:30It's an anxious wait for the final ranking.

0:27:32 > 0:27:38I think this competition is, in all its geeky glory, an amazing event.

0:27:38 > 0:27:41With the ability to implement their problem-solving talents

0:27:41 > 0:27:43in the language of computing,

0:27:43 > 0:27:48these kids are going to be the future of all things logical.

0:27:48 > 0:27:52'The first-place winner of IOI is...

0:27:52 > 0:27:54'Lijie Chen from China.'

0:27:54 > 0:27:59CHEERING AND APPLAUSE

0:27:59 > 0:28:02In the end, it's a Chinese one, two, three.

0:28:08 > 0:28:13'It's lucky the Brisbane competitors didn't have this problem to solve.

0:28:13 > 0:28:17'It's one that no logical algorithm can cope with.'

0:28:17 > 0:28:19All I want to know is, what do you think?

0:28:19 > 0:28:21Is this sentence true or false?

0:28:21 > 0:28:23Is it true or false?

0:28:23 > 0:28:24You can have this if it's false.

0:28:26 > 0:28:30'The point is, if the sentence is false, then it's true.

0:28:30 > 0:28:33'But if it's true, then it must be false.

0:28:33 > 0:28:35'It's a paradox.'

0:28:35 > 0:28:37But if it's false, it's true.

0:28:37 > 0:28:40'My sign is inspired by the first known logical paradox,

0:28:40 > 0:28:45'from around 600 BC, by the Cretan Epimenides of Knossos.'

0:28:45 > 0:28:49Well, if you read the sentence that this sentence is false,

0:28:49 > 0:28:52as its true meaning, then, yes, it is false.

0:28:52 > 0:28:56'Epimenides wrote, "All Cretans are liars,"

0:28:56 > 0:28:58'but he was a Cretan - so was he lying?

0:28:58 > 0:29:01'If so, then all Cretans aren't liars,

0:29:01 > 0:29:05'in which case, he would be telling the truth.'

0:29:05 > 0:29:07It's a paradox.

0:29:07 > 0:29:09A paradox! Well done!

0:29:09 > 0:29:12'Paradoxes are fundamental contradictions

0:29:12 > 0:29:15'that logicians have puzzled over for centuries.

0:29:15 > 0:29:16'They've been described as

0:29:16 > 0:29:19' "Truth standing on her head to get attention" -

0:29:19 > 0:29:22'and for good reason.

0:29:22 > 0:29:24'In the late 19th Century,'

0:29:24 > 0:29:27round about the same time that George Boole was developing

0:29:27 > 0:29:29logical deduction as a branch of mathematics,

0:29:29 > 0:29:34paradoxes exactly like this became a really deadly serious matter.

0:29:34 > 0:29:36In fact, they came to threaten

0:29:36 > 0:29:39the very foundation of mathematics itself.

0:29:50 > 0:29:52The Austrian capital, Vienna,

0:29:52 > 0:29:58renowned for its music, elegance, legendary cafes and exquisite cakes.

0:30:00 > 0:30:02But, at the turn of the 20th Century,

0:30:02 > 0:30:06it was also THE place to be if you were interested in logic.

0:30:08 > 0:30:11Despite its grace and gentility,

0:30:11 > 0:30:15Vienna can lay justifiable claim, perhaps more than any other city,

0:30:15 > 0:30:17to being the birthplace of the modern.

0:30:17 > 0:30:21For it was here in art, design, philosophy,

0:30:21 > 0:30:24science and psychology, that people most boldly challenged

0:30:24 > 0:30:28the tired conventions and assumptions of the 19th Century.

0:30:31 > 0:30:33But what was "modern"?

0:30:33 > 0:30:35Was it about replacing religion and tradition

0:30:35 > 0:30:38with logical empiricism and pure reason?

0:30:38 > 0:30:41Or was it about admitting to a new uncertainty -

0:30:41 > 0:30:43the limits of our perceptions

0:30:43 > 0:30:46and the moral vacuum of the Freudian subconscious?

0:30:47 > 0:30:49Until this point, it could be argued

0:30:49 > 0:30:53that logic wasn't exactly a topic on everybody's mind

0:30:53 > 0:30:57but, here, it was at the forefront of this titanic clash.

0:30:59 > 0:31:03From the city's coffee houses to the University of Vienna itself,

0:31:03 > 0:31:05the struggle for modernity played out.

0:31:07 > 0:31:10In 1894, the university commissioned a great ceiling painting

0:31:10 > 0:31:12for their ceremonial hall.

0:31:12 > 0:31:15The theme was "The Victory Of Light Over Darkness",

0:31:15 > 0:31:19and it had separate panels celebrating the great achievements

0:31:19 > 0:31:21of the university's faculties of jurisprudence,

0:31:21 > 0:31:24of medicine and of philosophy.

0:31:24 > 0:31:27Given the subject matter, it was perhaps unfortunate

0:31:27 > 0:31:30that the artist they commissioned for these paintings

0:31:30 > 0:31:31was Gustav Klimt.

0:31:35 > 0:31:39In 1900, he presented them with Philosophy,

0:31:39 > 0:31:44a depiction of naked men and women drifting trance-like in empty voids.

0:31:44 > 0:31:48It expressed anything but victory, certainty or optimism.

0:31:50 > 0:31:53Klimt's proto-modernist vision of philosophy

0:31:53 > 0:31:55was shocking to the people of Vienna,

0:31:55 > 0:31:59and deeply unsettling to the professors at the university.

0:32:00 > 0:32:03He was attacking everything they stood for,

0:32:03 > 0:32:06and Klimt's paintings were rejected outright.

0:32:11 > 0:32:13Hidden away for 40 years,

0:32:13 > 0:32:16the original works were destroyed by the Nazis.

0:32:16 > 0:32:18These replicas were finally installed

0:32:18 > 0:32:20on the centenary of their rejection.

0:32:22 > 0:32:25Klimt's dark vision had seriously offended

0:32:25 > 0:32:27the growing academic aspiration,

0:32:27 > 0:32:30that science and mathematics would provide us with complete knowledge,

0:32:30 > 0:32:34founded on absolute, provable truth.

0:32:35 > 0:32:39This was something it was hoped logic could provide.

0:32:40 > 0:32:43In mathematics, this problem of definitive truth,

0:32:43 > 0:32:47of certainty, had recently become all too real.

0:32:47 > 0:32:52No-one yet had proven the most basic rules of mathematics.

0:32:52 > 0:32:55Those rules might say that 1 + 2 is 3.

0:32:55 > 0:32:59But, without proof, that they will never lead to a contradiction,

0:32:59 > 0:33:03you can never say for sure that 1 + 2 might not also equal 20.

0:33:03 > 0:33:07Or anything else for that matter.

0:33:07 > 0:33:11In the grip of uncertainty, a logic fever took hold.

0:33:13 > 0:33:15Boole's logic had already been adopted

0:33:15 > 0:33:19by the greatest logicians of the day, but there was a problem.

0:33:19 > 0:33:23His method was simply insufficient to describe all of maths.

0:33:24 > 0:33:28The race was on for a new, and more complex, logic.

0:33:30 > 0:33:32Over 20 years earlier,

0:33:32 > 0:33:34a German mathematician called Gottlob Frege

0:33:34 > 0:33:36had studied exactly this problem.

0:33:36 > 0:33:40Frege's work ensured that logic was up to this search for certainty

0:33:40 > 0:33:42which was unfolding right here.

0:33:44 > 0:33:48# If I had it in my power... #

0:33:49 > 0:33:53It was in Jena, Germany, in the late 19th Century

0:33:53 > 0:33:57that Gottlob Frege opened a new chapter in the story of logic.

0:33:57 > 0:34:01For him, there should be nothing - whether numbers or ideas -

0:34:01 > 0:34:04that could not be described and analysed

0:34:04 > 0:34:07using his new logical quantifiers.

0:34:07 > 0:34:10# Everybody loves somebody sometime... #

0:34:10 > 0:34:13So, with his new mathematical logic,

0:34:13 > 0:34:17he could express ideas like, "Everybody loves Frege",

0:34:17 > 0:34:20"Everybody loves somebody",

0:34:20 > 0:34:23"There is somebody whom everybody loves",

0:34:23 > 0:34:27"There is somebody whom no-one loves",

0:34:27 > 0:34:32and, alas, "There is somebody whom Frege does not love".

0:34:32 > 0:34:35# If I had it in my power... #

0:34:36 > 0:34:39That somebody whom Frege probably did not love

0:34:39 > 0:34:41was British philosopher Bertrand Russell,

0:34:41 > 0:34:45who independently was engaged in exactly the same project -

0:34:45 > 0:34:49using logic to firm up the foundations of mathematics.

0:34:49 > 0:34:52In 1902, Frege was just days

0:34:52 > 0:34:56from publishing the second volume of his magnum opus on logic

0:34:56 > 0:34:59when he received a letter from Russell -

0:34:59 > 0:35:03and it was the kind of letter any logician dreads receiving.

0:35:05 > 0:35:08Russell had spotted a big problem.

0:35:08 > 0:35:10Both men's logic relied

0:35:10 > 0:35:13on consistently describing sets of things.

0:35:13 > 0:35:15You can have the set of all even numbers.

0:35:15 > 0:35:21Or, for that matter. the set of all mums, or the set of all dogs.

0:35:21 > 0:35:25Almost all sets aren't members of themselves.

0:35:25 > 0:35:28The set of dogs isn't itself a dog.

0:35:28 > 0:35:30So, if you take the dog set

0:35:30 > 0:35:33and bundle it up together with all the other ones like it,

0:35:33 > 0:35:39you get the set containing all sets that are not members of themselves.

0:35:39 > 0:35:41But this is the set of all sets

0:35:41 > 0:35:43that DON'T contain themselves,

0:35:43 > 0:35:45and it DOESN'T contain itself.

0:35:45 > 0:35:48So this set SHOULD include itself.

0:35:48 > 0:35:51But then, if it DOES, then this is no longer

0:35:51 > 0:35:54the "set of all sets that DON'T contain themselves".

0:35:54 > 0:35:56So, it CAN'T be part of itself.

0:35:59 > 0:36:02It's one of those logical paradoxes.

0:36:03 > 0:36:05Frege immediately wrote back to Russell.

0:36:05 > 0:36:08"Dear colleague. Your discovery of the contradiction

0:36:08 > 0:36:12"has surprised me beyond words and, I should almost like to say,

0:36:12 > 0:36:15"left me thunderstruck, because it has rocked the ground

0:36:15 > 0:36:18"on which I meant to build arithmetic.

0:36:18 > 0:36:21"Your discovery is, at any rate, a very remarkable one,

0:36:21 > 0:36:24"and it may perhaps lead to a great advance in logic,

0:36:24 > 0:36:27"undesirable as it may seem at first sight."

0:36:29 > 0:36:33Russell now took on Frege's project with an even greater zeal,

0:36:33 > 0:36:36to develop an even more outrageously complex logic

0:36:36 > 0:36:39that would get round this problem with sets,

0:36:39 > 0:36:42and so be free of paradox.

0:36:42 > 0:36:44After nine years of toil,

0:36:44 > 0:36:48the monumental Principia Mathematica was published.

0:36:48 > 0:36:53It took over 360 pages to logically prove

0:36:53 > 0:36:55that 1 + 1 = 2.

0:36:55 > 0:36:57CHEERING, APPLAUSE, FIREWORKS POP

0:36:57 > 0:36:59It was never going to a best-seller,

0:36:59 > 0:37:02but, here, it had a huge impact.

0:37:03 > 0:37:07It was magnificent, a whopping great bucketload of logical concrete

0:37:07 > 0:37:11poured right into the foundations of mathematics.

0:37:11 > 0:37:14Definitely a triumph, not a trauma, for philosophy.

0:37:21 > 0:37:25But the final word on logic would not come from Bertrand Russell.

0:37:30 > 0:37:34It was here that that project came to a dramatic conclusion,

0:37:34 > 0:37:37centred on a group of thinkers called the "Vienna Circle".

0:37:40 > 0:37:44They were firmly pro-logic.

0:37:44 > 0:37:48For them, Russell's Principia Mathematica was manna from heaven.

0:37:48 > 0:37:52The Vienna Circle had people who inspired them,

0:37:52 > 0:37:53they were their idols.

0:37:53 > 0:37:57One was Albert Einstein, one was Bertrand Russell.

0:37:57 > 0:38:02And these were the most prominent scientists of the day.

0:38:14 > 0:38:18Their interest shifted almost imperceptibly at first

0:38:18 > 0:38:24from the foundations of physics to the foundations of mathematics

0:38:24 > 0:38:25and to logic.

0:38:25 > 0:38:28It came almost against their will

0:38:28 > 0:38:34that this became the most prominent topic of the Vienna Circle.

0:38:37 > 0:38:42Once every two weeks, they would meet here, in this actual room.

0:38:47 > 0:38:50It's now a working physics lab

0:38:50 > 0:38:52but, when they met here, they had one aim

0:38:52 > 0:38:54and that was to purge philosophy

0:38:54 > 0:38:57of anything that was neither directly observable

0:38:57 > 0:39:01through scientific experiment, or derivable through the laws of logic.

0:39:03 > 0:39:07This logical analysis of the meaning

0:39:07 > 0:39:09was an essential first step.

0:39:09 > 0:39:13Therefore, it was forbidden to talk about

0:39:13 > 0:39:17such concepts like God, for instance,

0:39:17 > 0:39:20or metaphysical statements.

0:39:20 > 0:39:23about thinking itself or whatever,

0:39:23 > 0:39:26because you could never find a sentence

0:39:26 > 0:39:29that could be verified in a scientific way.

0:39:29 > 0:39:34In fact, the Vienna Circle loathed the idea of metaphysics so much

0:39:34 > 0:39:39that when they met here, Rudolf Carnap, a former pupil of Frege,

0:39:39 > 0:39:41appointed someone to shout "M!"...

0:39:41 > 0:39:42M!

0:39:42 > 0:39:47..during their discussions, at the hint of any illegitimate sentence.

0:39:47 > 0:39:48M stands for metaphysics.

0:39:48 > 0:39:50M!

0:39:50 > 0:39:54It's the logician's equivalent of saying, "Bollocks!"

0:39:54 > 0:39:57Now the thing is, he was saying "M!" so much...

0:39:57 > 0:39:58M!

0:39:58 > 0:40:00..that they got sick of it.

0:40:00 > 0:40:03Instead, they had him shout "Non-M"

0:40:03 > 0:40:06any time that someone actually said something that was legitimate.

0:40:06 > 0:40:07Nicht M!

0:40:09 > 0:40:12Despite the purity of their logical methods,

0:40:12 > 0:40:16the problem of uncertainty that had plagued logic,

0:40:16 > 0:40:18likewise stalked the Vienna Circle.

0:40:19 > 0:40:23Something that may have also imprinted

0:40:23 > 0:40:26this young generation of Austrian scientists

0:40:26 > 0:40:30was a scandal that happened in 1913

0:40:30 > 0:40:34when it was discovered that the head, practically,

0:40:34 > 0:40:37of the Counter Espionage Service was a spy.

0:40:37 > 0:40:43And, you see, the task of a counter-spy service

0:40:43 > 0:40:47is actually to make sure that there are no spies around.

0:40:47 > 0:40:52But what happens when the head of that organisation is a spy himself?

0:40:52 > 0:40:55This is a fundamental uncertainty.

0:40:55 > 0:40:58Yes, yes, the secret service can work very well,

0:40:58 > 0:41:02but can you be sure that the secret service is not infected?

0:41:02 > 0:41:06And something similar is happening in mathematics.

0:41:06 > 0:41:11You make sure that there exists no contradictions,

0:41:11 > 0:41:15you build up big walls against uncertainty or so,

0:41:15 > 0:41:20but maybe, within these big walls, there is a contradiction sitting.

0:41:22 > 0:41:27Contradiction bothered one man more than most. Kurt Godel.

0:41:29 > 0:41:33Kurt Godel was the most reclusive member of the Vienna Circle.

0:41:33 > 0:41:37He'd had the finest logical training that you could imagine.

0:41:40 > 0:41:45It was in one of Vienna's famed coffee houses, in August 1930,

0:41:45 > 0:41:48that 24-year-old Godel first revealed a discovery

0:41:48 > 0:41:52that would end, for ever, the logical quest

0:41:52 > 0:41:55that Frege, Russell and the like had set themselves.

0:41:57 > 0:42:00Godel was one of the few who definitely had read

0:42:00 > 0:42:03all of Russell's Principia.

0:42:03 > 0:42:07He knew that, for any logical system to be the foundation of mathematics,

0:42:07 > 0:42:10it had to be both complete and consistent.

0:42:12 > 0:42:15Godel told Carnap that, by studying the Principia,

0:42:15 > 0:42:19he had come to the conclusion that, in any logical system,

0:42:19 > 0:42:22you could either be consistent or complete,

0:42:22 > 0:42:25but you couldn't have both at the same time.

0:42:25 > 0:42:27In Russell's masterpiece,

0:42:27 > 0:42:29Godel had discovered a contradiction

0:42:29 > 0:42:33that became known as "incompleteness".

0:42:33 > 0:42:36This means that, in mathematical logic,

0:42:36 > 0:42:39there are going to be some truths which, although true,

0:42:39 > 0:42:42can never be proven to be so.

0:42:42 > 0:42:44This result of Kurt Godel

0:42:44 > 0:42:49about the limitations of mathematics and logics

0:42:49 > 0:42:54was a terrible blow to the optimism of the Vienna Circle,

0:42:54 > 0:42:59and some of the members took a long time to come to grips with it.

0:43:00 > 0:43:04The grand search for "absolute, provable truth"

0:43:04 > 0:43:06had hit the buffers.

0:43:10 > 0:43:13By the mid-1930s, the Vienna Circle was over.

0:43:14 > 0:43:17The rise of fascism and the looming threat of war

0:43:17 > 0:43:19meant its members fled,

0:43:19 > 0:43:22were expelled, or killed.

0:43:22 > 0:43:24Kurt Godel left Vienna for Princeton,

0:43:24 > 0:43:29where his own search for certainty also came to a tragic end.

0:43:32 > 0:43:36Godel became convinced that someone might try to poison him.

0:43:36 > 0:43:38The only person that he would trust to cook

0:43:38 > 0:43:42and, indeed, to taste his food was his wife.

0:43:42 > 0:43:46And when she fell ill and was hospitalised, he starved.

0:43:47 > 0:43:50He literally reasoned himself to death.

0:43:57 > 0:44:01The fact that all systems of mathematical logic were limited,

0:44:01 > 0:44:04that we could never have complete certainty,

0:44:04 > 0:44:07signalled the end of an era for logic.

0:44:09 > 0:44:12But for one British logician, Alan Turing,

0:44:12 > 0:44:16Godel's work was the inspiration he needed to launch,

0:44:16 > 0:44:22inadvertently, a new and entirely more practical logic revolution.

0:44:26 > 0:44:29Alan Turing was just 23 years old

0:44:29 > 0:44:32when he imagined something extraordinary.

0:44:32 > 0:44:35He called it a "universal machine".

0:44:36 > 0:44:41The universal machine is an entirely imaginary, hypothetical device,

0:44:41 > 0:44:45and yet, it's one of the most influential machines ever

0:44:45 > 0:44:46in human history.

0:44:48 > 0:44:52The device Turing imagined could tackle any mathematical problem

0:44:52 > 0:44:57using a logical algorithm encoded in its own limitless memory.

0:44:57 > 0:45:02In 1936, Alan Turing published a paper in which he demonstrated...

0:45:02 > 0:45:06He proved that you couldn't decide beforehand

0:45:06 > 0:45:09which mathematical problems the machine would be able to solve,

0:45:09 > 0:45:12and which would just cause it to run on and on and on for ever.

0:45:12 > 0:45:16That there are some problems that are simply "uncomputable"

0:45:16 > 0:45:20was startling, and yet another blow for mathematics.

0:45:20 > 0:45:24But it was also the beginning of something entirely unexpected

0:45:24 > 0:45:29and destined to cement logic's role in the modern world.

0:45:30 > 0:45:34It's an extraordinary, almost exquisite, paradox

0:45:34 > 0:45:37that, in demonstrating that some things can't be proved

0:45:37 > 0:45:41using a logical machine, what Alan Turing did

0:45:41 > 0:45:45almost single-handedly launched a technology revolution.

0:45:45 > 0:45:51Turing's universal machine is what we today call the "computer".

0:45:52 > 0:45:57While stationed here at Bletchley Park, during the Second World War,

0:45:57 > 0:45:59Turing began to implement his abstract ideas

0:45:59 > 0:46:03as real logical hardware.

0:46:03 > 0:46:05Working with Gordon Welchman,

0:46:05 > 0:46:09Turing developed this machine, it's called the "Bombe".

0:46:09 > 0:46:11THE BOMBE WHIRRS AND CLICKS

0:46:11 > 0:46:13It's a bit loud!

0:46:13 > 0:46:16It's a form of electromechanical computer,

0:46:16 > 0:46:19and its logical function was to decode the messages

0:46:19 > 0:46:24that the Germans were sending, using their Enigma encryption machines.

0:46:28 > 0:46:33But then Turing's colleague, Tommy Flowers, went a step further.

0:46:38 > 0:46:41This is Colossus.

0:46:41 > 0:46:43It was built to crack another German encryption machine

0:46:43 > 0:46:45called the Lorenz,

0:46:45 > 0:46:48and, for the men and women who built and operated it,

0:46:48 > 0:46:49it was an astonishing achievement.

0:46:49 > 0:46:51It shortened the war.

0:46:52 > 0:46:55But I think it's special for another reason.

0:46:55 > 0:47:01You see, this is the world's first programmable electronic computer.

0:47:01 > 0:47:03It used digital information - binary -

0:47:03 > 0:47:06the streams of 1s and 0s that are in all modern computers.

0:47:06 > 0:47:09And these vacuum tubes down here,

0:47:09 > 0:47:11they're wired together to be our Boolean logic gates,

0:47:11 > 0:47:15which perform Boolean operations and calculations.

0:47:17 > 0:47:20Colossus might not look hi tech to us,

0:47:20 > 0:47:24but it's hard to express just how important it was.

0:47:27 > 0:47:30This significance of all this, as a piece of human engineering,

0:47:30 > 0:47:32is on a par with the Pyramids,

0:47:32 > 0:47:35or the printing press or steam power,

0:47:35 > 0:47:38and yet it was all top secret.

0:47:38 > 0:47:41All these developments of electronic programmable computers

0:47:41 > 0:47:44here at Bletchley Park were classified

0:47:44 > 0:47:48and the details were only declassified in the late 1970s.

0:47:51 > 0:47:53After the war, Turing went on to help build

0:47:53 > 0:47:58some of the world's first stored-program computers.

0:47:58 > 0:48:01At their core, it all comes back to logical reasoning.

0:48:08 > 0:48:11Think about this, we're all surrounded by things

0:48:11 > 0:48:15that rely on some kind of logical machine or code.

0:48:15 > 0:48:16The failure of logic

0:48:16 > 0:48:20to deliver foundational answers for mathematics

0:48:20 > 0:48:24nonetheless gave rise to one of the most significant achievements

0:48:24 > 0:48:26in all of science and engineering.

0:48:29 > 0:48:33It started with those huge, secret, single-purpose computers,

0:48:33 > 0:48:35and yet, right from the very beginning,

0:48:35 > 0:48:39some folk were already imagining the next big thing.

0:48:41 > 0:48:43'We're still finding out what Logics will do,

0:48:43 > 0:48:45'but everybody's got 'em.

0:48:45 > 0:48:47'You got a Logic in your house.

0:48:47 > 0:48:50'It looks like a vision receiver used to,

0:48:50 > 0:48:52'only it's got keys instead of dials

0:48:52 > 0:48:55'and you punch the keys for what you want to get...'

0:48:57 > 0:49:02In 1946, science fiction writer Murray Leinster imagined

0:49:02 > 0:49:06an impressive specimen of interconnected technology.

0:49:06 > 0:49:08He named it a Logic.

0:49:08 > 0:49:12'Relays in the tank take over and whatever vision-program

0:49:12 > 0:49:16'SNAFU is telecasting comes on your Logic's screen.

0:49:16 > 0:49:19'Or you punch "Sally Hancock's Phone"

0:49:19 > 0:49:23'and you're hooked up with the Logic in her house.

0:49:23 > 0:49:25'Also, it does math for you, and keeps books,

0:49:25 > 0:49:28'and acts as consulting chemist, physicist, astronomer

0:49:28 > 0:49:32'and tea-leaf reader, with an "Advice To Lovelorn" thrown in.

0:49:33 > 0:49:35'It's very convenient.'

0:49:37 > 0:49:39Well, that's extraordinary!

0:49:39 > 0:49:43It's a great characterisation of the web that wasn't yet born!

0:49:55 > 0:49:58The digital world we live in, the computers that surround us,

0:49:58 > 0:50:02at their base, are running Boolean logic.

0:50:02 > 0:50:04I mean, they're running actually electrical currents,

0:50:04 > 0:50:071s and 0s are the product of those electrical currents,

0:50:07 > 0:50:11but on top of that, there are layers on layers on layers of complexity -

0:50:11 > 0:50:14operating systems, machine code,

0:50:14 > 0:50:16applications that we use every day,

0:50:16 > 0:50:19from word processors to spreadsheets,

0:50:19 > 0:50:22to the browsers we use. And, when you have your Skype conversation

0:50:22 > 0:50:25with your aunt in Australia, you don't think of that interaction

0:50:25 > 0:50:28in terms of those 1s and 0s but, without them,

0:50:28 > 0:50:32without the underlying processing, none of this would work.

0:50:33 > 0:50:36Not only did logic launch the digital revolution,

0:50:36 > 0:50:39but it's also the tool we use to sort,

0:50:39 > 0:50:44search and retrieve the information we want online.

0:50:44 > 0:50:46The World Wide Web we have today

0:50:46 > 0:50:50represents the largest information construct humanity has ever created.

0:50:50 > 0:50:52It's 20 years old, barely,

0:50:52 > 0:50:56and yet we have billions and billions of pages

0:50:56 > 0:50:58encapsulating knowledge and information

0:50:58 > 0:51:02from all of human culture and all of human history.

0:51:03 > 0:51:06The challenge is to organise this mass of information,

0:51:06 > 0:51:07this complexity,

0:51:07 > 0:51:10and logic gives us some of the perfect tools to do that.

0:51:14 > 0:51:17With the World Wide Web of information,

0:51:17 > 0:51:21logic means we're all more interconnected and informed.

0:51:21 > 0:51:25But, back in the City, the march of logical machines has come at a cost,

0:51:25 > 0:51:30and I don't mean all the traders are spending too much time on Facebook.

0:51:30 > 0:51:32In the year that I was born,

0:51:32 > 0:51:35there were 22 separate stock exchanges in the UK,

0:51:35 > 0:51:37and THIS is how business was done.

0:51:38 > 0:51:41Now, this place, the London Metal Exchange,

0:51:41 > 0:51:44is the last venue where traders still go face to face.

0:51:48 > 0:51:53First, technology squeezed out the need for traders to meet in person.

0:51:53 > 0:51:56And now it's the traders themselves who may be heading for extinction.

0:51:58 > 0:52:00Not long after I wrote it,

0:52:00 > 0:52:04IBM did some tests of the ZIP trading algorithm,

0:52:04 > 0:52:06and not only did they confirm that it worked,

0:52:06 > 0:52:09they showed that it out-performed human traders.

0:52:16 > 0:52:18When it comes to pure logical reasoning,

0:52:18 > 0:52:20the computers tend to beat us, hands down.

0:52:22 > 0:52:24It's an old adage,

0:52:24 > 0:52:26but people in this business joke

0:52:26 > 0:52:29that soon the only things you'll find on a trading floor

0:52:29 > 0:52:34will be a big computer, a man and a dog.

0:52:35 > 0:52:39The big computer is there to do all the trading.

0:52:39 > 0:52:43The dog's there to make sure that no-one touches the computer.

0:52:43 > 0:52:45And the man's job?

0:52:45 > 0:52:46On the trading floor of the future,

0:52:46 > 0:52:49the man's job is to feed the dog.

0:52:54 > 0:52:57Mind you, despite my role in inventing these black boxes,

0:52:57 > 0:53:00I'm grateful that there's still a human around

0:53:00 > 0:53:01to pull the plug sometimes.

0:53:01 > 0:53:03DOG BARKS

0:53:03 > 0:53:05The thing is, computers still need

0:53:05 > 0:53:08their logical algorithms to be written for them,

0:53:08 > 0:53:13so they might take our jobs, but we still have the upper hand.

0:53:13 > 0:53:15Yet, ever since their invention,

0:53:15 > 0:53:18the question as to whether this will always be the case

0:53:18 > 0:53:21has been a matter of fierce debate.

0:53:28 > 0:53:31When the digital revolution was in its infancy,

0:53:31 > 0:53:35the possibility of computers developing human-like intelligence

0:53:35 > 0:53:38was the hottest topic in town.

0:53:38 > 0:53:43Could a machine ever think, using the rules of logic alone?

0:53:43 > 0:53:45Or is there more to US than that?

0:53:47 > 0:53:51In 1950, Alan Turing published another visionary essay.

0:53:51 > 0:53:54In it, he predicted that, by the end of the century,

0:53:54 > 0:53:57a computer would be able to converse with a human,

0:53:57 > 0:53:59and the human wouldn't know the difference.

0:54:01 > 0:54:02In trying to achieve this,

0:54:02 > 0:54:07people in my field have created some truly amazing computing machines.

0:54:10 > 0:54:14This is my university's supercomputer.

0:54:14 > 0:54:17Although it's bigger and noisier than Colossus,

0:54:17 > 0:54:21for every one Lorenz cipher that machine could solve,

0:54:21 > 0:54:23this can solve over 2 million.

0:54:25 > 0:54:26It's takes up the whole room!

0:54:28 > 0:54:31Machines like this are the workhorses

0:54:31 > 0:54:33of today's data-centric research.

0:54:33 > 0:54:35All the switches, wires and logic gates

0:54:35 > 0:54:38have long since disappeared under the hood

0:54:38 > 0:54:41meaning that, for TV, we have a habit of trying to pretend

0:54:41 > 0:54:44that this doesn't all look like a load of...

0:54:44 > 0:54:46well, cupboards.

0:54:47 > 0:54:48Or a launderette.

0:54:52 > 0:54:54Turing thought that,

0:54:54 > 0:54:57by the time we'd developed computers as powerful as this,

0:54:57 > 0:55:00we would also be capable of programming a machine

0:55:00 > 0:55:02with sufficient rules of logical reasoning

0:55:02 > 0:55:06that its intelligence would rival that of us humans.

0:55:07 > 0:55:11That was then, and remains now, a very controversial idea.

0:55:13 > 0:55:17We like to think of our intelligence as raising us

0:55:17 > 0:55:20to a level above the rest of the creation.

0:55:20 > 0:55:25We associate it with the idea perhaps of an immaterial soul,

0:55:25 > 0:55:29being not just one amongst other animals, but special.

0:55:29 > 0:55:33And what Turing was suggesting was that this special quality

0:55:33 > 0:55:37could belong to a lump of computing machinery,

0:55:37 > 0:55:42and it could reason just as well as we could,

0:55:42 > 0:55:44maybe even better.

0:55:46 > 0:55:47At Bletchley Park,

0:55:47 > 0:55:51Turing had sketched out algorithms for playing chess.

0:55:51 > 0:55:53At that time, the chessboard was dominated

0:55:53 > 0:55:56by some of the world's most brilliant strategic,

0:55:56 > 0:55:59logical, mathematical brains.

0:55:59 > 0:56:01And so it became the battle ground

0:56:01 > 0:56:06for an entirely new challenge for logic - artificial intelligence.

0:56:08 > 0:56:12In 1997, the most famous public battle

0:56:12 > 0:56:15between man and machine took place.

0:56:15 > 0:56:18Garry Kasparov, the reigning chess world champion,

0:56:18 > 0:56:23had previously trounced IBM's chess-playing computer, Deep Blue.

0:56:23 > 0:56:25During their rematch,

0:56:25 > 0:56:28for the first time ever, he was beaten.

0:56:29 > 0:56:32Kasparov has resigned!

0:56:32 > 0:56:33APPLAUSE

0:56:33 > 0:56:36When I see something that is well beyond my understanding,

0:56:36 > 0:56:41I'm scared. And that was something well beyond my understanding.

0:56:41 > 0:56:44It was front-page news the world over.

0:56:44 > 0:56:46People demanded answers.

0:56:46 > 0:56:49Was this purely logical intelligence equivalent,

0:56:49 > 0:56:52or even superior, to the human brain?

0:56:53 > 0:56:58In the past, people have tended to compare humans

0:56:58 > 0:57:00to the latest technology.

0:57:00 > 0:57:02So maybe the brain is like a clock,

0:57:02 > 0:57:05or maybe it's like a steam engine,

0:57:05 > 0:57:08now, maybe it's like an electronic computer.

0:57:10 > 0:57:14What Turing would want to say, and, I think, correctly,

0:57:14 > 0:57:16is that there's something different

0:57:16 > 0:57:19about the equation of the brain with a computer.

0:57:20 > 0:57:23He put it that both a brain and a computer

0:57:23 > 0:57:27are information processing systems, governed by logical rules.

0:57:29 > 0:57:33In theory, there should be logical rules out there

0:57:33 > 0:57:36that would capture the way we think.

0:57:39 > 0:57:43This was a very big idea, with profound -

0:57:43 > 0:57:45even troubling - implications.

0:57:45 > 0:57:49If we knew those rules, then one day, theoretically,

0:57:49 > 0:57:54we could code a logical rendering of ourselves into a computer.

0:57:54 > 0:57:58All we'd need to reproduce all of human thought is logic.

0:58:00 > 0:58:05My view is that there remain uniquely human characteristics,

0:58:05 > 0:58:11arguably the best ones, like altruism or creativity or love,

0:58:11 > 0:58:14that computers aren't even close to having programmed

0:58:14 > 0:58:17within their repertoire of logical reasoning.

0:58:17 > 0:58:22No-one has yet created a logical machine that's just like us.

0:58:22 > 0:58:25And, arguably, that could take a very, very long time,

0:58:25 > 0:58:27if indeed it's possible at all.

0:58:29 > 0:58:34And yet, surely, we should marvel at what we have achieved with logic.

0:58:34 > 0:58:38Remember WE created the rules of logic to pin down the truth

0:58:38 > 0:58:42and certainty that otherwise would so easily evade us.

0:58:42 > 0:58:45We harnessed logic in machines

0:58:45 > 0:58:48and, in doing so, we placed the power of pure reason

0:58:48 > 0:58:49at our fingertips.

0:58:51 > 0:58:54Mind you, I'm still no good at sudoku...

0:59:21 > 0:59:24Subtitles by Red Bee Media Ltd