WEBVTT

00:00:00.000 --> 00:00:02.779
Welcome to the Deep Dive. Today we are exploring

00:00:02.779 --> 00:00:06.660
a truly fascinating Wikipedia article on a mathematical

00:00:06.660 --> 00:00:09.800
concept called Polish notation. Yes, and it is

00:00:09.800 --> 00:00:12.759
a fantastic topic. It really is. We are going

00:00:12.759 --> 00:00:15.880
on a journey today to discover how moving a single,

00:00:16.000 --> 00:00:19.039
simple math symbol from the middle of an equation

00:00:19.039 --> 00:00:22.460
to the absolute front completely revolutionized

00:00:22.460 --> 00:00:26.239
logic. Eventually built the invisible architecture

00:00:26.239 --> 00:00:28.920
for the entire field of computer science. Which

00:00:28.920 --> 00:00:30.739
is wild when you think about it, just shifting

00:00:30.739 --> 00:00:33.840
one symbol. Right. I want you to think back for

00:00:33.840 --> 00:00:35.659
a moment to your days in middle school algebra

00:00:35.659 --> 00:00:38.820
class. Have you ever looked at a long, complicated

00:00:38.820 --> 00:00:41.280
math equation on a chalkboard and just gotten

00:00:41.280 --> 00:00:44.060
completely lost in a sea of parentheses? Absolutely.

00:00:44.240 --> 00:00:46.460
Everyone has. You probably had brackets inside

00:00:46.460 --> 00:00:48.439
of brackets. You're trying to remember PEMDAS

00:00:48.439 --> 00:00:50.659
and the order of operations. The whole thing

00:00:50.659 --> 00:00:52.659
just felt incredibly cluttered and overwhelming.

00:00:53.420 --> 00:00:55.200
Well, what if there was an entirely different

00:00:55.200 --> 00:00:57.799
way to write math that deletes those confusing

00:00:57.799 --> 00:01:00.340
parentheses completely? It sounds almost like

00:01:00.340 --> 00:01:02.520
a magic trick when you first encounter it to

00:01:02.520 --> 00:01:05.180
just, you know, erase the brackets and still

00:01:05.180 --> 00:01:07.599
have the math perfectly hold together. But it

00:01:07.599 --> 00:01:10.840
is a very real, highly structured and incredibly

00:01:10.840 --> 00:01:14.069
elegant logical system. Consider this deep dive

00:01:14.069 --> 00:01:16.329
your ultimate shortcut to being well -informed.

00:01:16.629 --> 00:01:18.969
By the time we wrap up this conversation, you

00:01:18.969 --> 00:01:21.409
are going to understand the secret language that

00:01:21.409 --> 00:01:24.230
powers the calculators you use and the computer

00:01:24.230 --> 00:01:26.750
programs you interact with every single day.

00:01:27.069 --> 00:01:29.549
You will honestly never look at a simple addition

00:01:29.549 --> 00:01:32.799
problem the same way again. And beyond just math,

00:01:33.000 --> 00:01:35.079
it really forces you to change your perspective

00:01:35.079 --> 00:01:38.019
on how we communicate instructions. It highlights

00:01:38.019 --> 00:01:40.459
the massive gap between how the human brain wants

00:01:40.459 --> 00:01:42.920
to read a sentence and how a machine needs to

00:01:42.920 --> 00:01:45.500
process data. Okay, let's unpack this. The core

00:01:45.500 --> 00:01:47.900
concept here starts with how we do everyday math.

00:01:48.099 --> 00:01:50.439
The system you and I grew up learning in school

00:01:50.439 --> 00:01:53.739
is called infix notation. That word infix just

00:01:53.739 --> 00:01:55.900
means the operator, the plus or minus sign is

00:01:55.900 --> 00:01:57.799
fixed right in the middle of the numbers. So

00:01:57.799 --> 00:01:59.920
if you want to add one and two, you write the

00:01:59.920 --> 00:02:01.680
number one, then the plus sign, then the number

00:02:01.680 --> 00:02:04.480
two, one plus two. Simple enough. But then our

00:02:04.480 --> 00:02:07.480
sources introduce us to tollish notation. You

00:02:07.480 --> 00:02:09.479
might also see it referred to as normal Polish

00:02:09.479 --> 00:02:12.860
notation, Warsaw notation. Polish prefix notation,

00:02:13.159 --> 00:02:16.639
or Eastern notation. In this system, the operator

00:02:16.639 --> 00:02:19.500
actually precedes the operands. It goes right

00:02:19.500 --> 00:02:21.560
at the very front. Right at the front. So instead

00:02:21.560 --> 00:02:23.520
of writing 1 plus 2, you would write plus 1,

00:02:23.560 --> 00:02:26.580
2. What's fascinating here is the why behind

00:02:26.580 --> 00:02:29.560
this shift. Why bother moving the plus sign to

00:02:29.560 --> 00:02:31.680
the front at all? Because it feels completely

00:02:31.680 --> 00:02:34.080
counterintuitive to how we speak. Yeah, it really

00:02:34.080 --> 00:02:36.479
does. But the genius of the system is that as

00:02:36.479 --> 00:02:38.879
long as an operator has a fixed number of operands,

00:02:38.919 --> 00:02:41.240
meaning a plus sign always needs exactly two

00:02:41.240 --> 00:02:44.060
numbers to add together, Polish notation requires

00:02:44.060 --> 00:02:47.580
absolutely zero parentheses. None at all. Wow.

00:02:47.680 --> 00:02:50.139
You could write out the most complex, massive,

00:02:50.259 --> 00:02:52.879
multi -layered mathematical formula in the world,

00:02:52.939 --> 00:02:55.539
and you will never need a single bracket to tell

00:02:55.539 --> 00:02:58.009
you what part to solve first. That's just wild

00:02:58.009 --> 00:02:59.370
to think about. I want to make sure we're really

00:02:59.370 --> 00:03:01.870
picturing this correctly. Let's walk through

00:03:01.870 --> 00:03:03.969
a specific visualization from our source material

00:03:03.969 --> 00:03:07.129
so you, listening right now, can really see how

00:03:07.129 --> 00:03:10.330
this plays out. Let's take a standard math equation.

00:03:10.650 --> 00:03:14.349
Open parenthesis, 5 minus 6, close parenthesis,

00:03:14.389 --> 00:03:17.110
multiplied by 7. Okay, got it. In the standard

00:03:17.110 --> 00:03:20.819
infix... math, we all know, you need those parentheses

00:03:20.819 --> 00:03:22.919
around the five minus six. So, you know, to do

00:03:22.919 --> 00:03:24.879
that subtraction first, right? For multiplying

00:03:24.879 --> 00:03:26.840
the whole thing by seven. But let's translate

00:03:26.840 --> 00:03:29.159
that into Polish notation. We start with the

00:03:29.159 --> 00:03:31.800
innermost part, the five minus six. Since the

00:03:31.800 --> 00:03:34.039
operator moves to the front, that simply becomes

00:03:34.039 --> 00:03:36.300
minus five, six. And that neat little package,

00:03:36.439 --> 00:03:39.659
the minus five, six becomes the new single unit

00:03:39.659 --> 00:03:42.560
that we want to multiply by seven. Exactly. So

00:03:42.560 --> 00:03:44.819
to finish translating the equation, you take

00:03:44.819 --> 00:03:46.840
your multiplication sign and you stick that at

00:03:46.840 --> 00:03:49.340
the very front. the entire string. So the finished

00:03:49.340 --> 00:03:53.099
equation is just times minus 5, 6, 7. Or if you're

00:03:53.099 --> 00:03:55.280
looking at it on a page of symbols, a multiplication

00:03:55.280 --> 00:03:58.639
sign, a subtraction sign, a 5, a 6, and a 7.

00:03:58.719 --> 00:04:01.900
You read it, and the order of operations is perfectly

00:04:01.900 --> 00:04:05.599
clear without a single bracket. And we can contrast

00:04:05.599 --> 00:04:08.039
that by moving the parentheses in our original

00:04:08.039 --> 00:04:11.000
math problem. What if the equation was 5 minus,

00:04:11.199 --> 00:04:14.659
open parenthesis, 6 times 7, close parenthesis.

00:04:15.050 --> 00:04:17.269
In Polish notation, you just shift the operators

00:04:17.269 --> 00:04:19.949
at the front. It simply becomes minus 5 times

00:04:19.949 --> 00:04:23.529
6, 7. Just by changing the sequence of the operators

00:04:23.529 --> 00:04:26.269
and the numbers, the innermostness of the math

00:04:26.269 --> 00:04:28.670
is perfectly conveyed to the reader. It's brilliant.

00:04:28.970 --> 00:04:30.790
There is a crucial nuance here that we have to

00:04:30.790 --> 00:04:32.490
point out, though, especially when we're dealing

00:04:32.490 --> 00:04:36.050
with non -commutative operations. Non -commutative,

00:04:36.149 --> 00:04:38.329
meaning? Operations where the order of the numbers

00:04:38.329 --> 00:04:40.410
completely changes the answer, like division

00:04:40.410 --> 00:04:43.829
or subtraction. 5 minus 6 is very different from

00:04:43.829 --> 00:04:46.129
6 minus 6. minus 5. So you have to coordinate

00:04:46.129 --> 00:04:48.269
the sequential arrangement perfectly. Right.

00:04:48.329 --> 00:04:50.670
The order really matters. Exactly. In Polish

00:04:50.670 --> 00:04:53.110
notation, reading left to right, if you see the

00:04:53.110 --> 00:04:55.990
division symbol followed by a 10 and a 5, so

00:04:55.990 --> 00:04:59.490
a division sign, then 10. Then 5, that strictly

00:04:59.490 --> 00:05:02.529
means 10 divided by 5. The number to the left

00:05:02.529 --> 00:05:04.509
is the dividend. The number to the right is the

00:05:04.509 --> 00:05:07.930
divisor. Got it. Similarly, a minus sign followed

00:05:07.930 --> 00:05:11.149
by 7, then 6 strictly means 7 minus 6. You are

00:05:11.149 --> 00:05:13.930
subtracting the 6 from the 7. The structure leaves

00:05:13.930 --> 00:05:18.009
zero room for ambiguity. It's so incredibly rigid,

00:05:18.089 --> 00:05:20.649
but in the best possible way. Now, let's talk

00:05:20.649 --> 00:05:22.129
about where this came from, because the history

00:05:22.129 --> 00:05:24.689
outlined in the article is fantastic. The Polish

00:05:24.689 --> 00:05:27.189
in Polish notation refers to the nationality

00:05:27.189 --> 00:05:29.910
of a brilliant logician named Jan Jukasiewicz.

00:05:30.129 --> 00:05:32.230
A very influential figure. He invented the system

00:05:32.230 --> 00:05:36.029
in 1924. But here's the historical detail I absolutely

00:05:36.029 --> 00:05:39.129
love. He wrote a paper in 1931 where he casually

00:05:39.129 --> 00:05:41.610
stated that he actually first used this revolutionary

00:05:41.610 --> 00:05:45.110
parenthesis free notation tucked away in a mere

00:05:45.110 --> 00:05:48.129
footnote. A footnote. Yes, specifically a footnote

00:05:48.129 --> 00:05:50.670
on page 610 of a lithographed report he published

00:05:50.670 --> 00:05:54.069
in 1929. Just imagine inventing a whole new way

00:05:54.069 --> 00:05:56.550
to write math, a system that would go on to fundamentally

00:05:56.550 --> 00:05:59.589
shape modern computer science. And you debut

00:05:59.589 --> 00:06:02.310
it in a footnote on page 610. It really speaks

00:06:02.310 --> 00:06:05.370
to how these monumental shifts in academic thought

00:06:05.370 --> 00:06:07.370
sometimes enter the world with a whisper rather

00:06:07.370 --> 00:06:09.709
than a shout. But to provide some broader historical

00:06:09.709 --> 00:06:12.889
context, Yukasiewicz wasn't operating in a total

00:06:12.889 --> 00:06:14.949
vacuum here. Right, there were others working

00:06:14.949 --> 00:06:17.790
on it. This was a time of immense exploration

00:06:17.790 --> 00:06:21.370
and debate in mathematical logic. A German mathematician

00:06:21.370 --> 00:06:24.329
named Heinrich Biemann actually had a somewhat

00:06:24.329 --> 00:06:26.970
similar idea for eliminating parentheses and

00:06:26.970 --> 00:06:29.610
logic formulas right around the same time in

00:06:29.610 --> 00:06:32.329
1924. Interesting. And if we look even further

00:06:32.329 --> 00:06:35.629
back into the sources, the famous logician Gottlob

00:06:35.629 --> 00:06:39.790
Friedge proposed his own heavily structural parenthesis

00:06:39.790 --> 00:06:42.310
-free notation called the Begriffschrift way

00:06:42.310 --> 00:06:45.980
back in 1879. The desire to get rid of the clunky

00:06:45.980 --> 00:06:48.160
brackets had been brewing in the academic community

00:06:48.160 --> 00:06:52.300
for quite a while. Precisely. However, Lukasiewicz's

00:06:52.300 --> 00:06:54.500
system was a massive breakthrough because it

00:06:54.500 --> 00:06:57.500
was the first linearly written, incredibly compact

00:06:57.500 --> 00:07:00.980
version. Friedge's older system was two -dimensional.

00:07:01.259 --> 00:07:02.959
What do you mean by two -dimensional? It looked

00:07:02.959 --> 00:07:05.540
almost like a massive sprawling family tree with

00:07:05.540 --> 00:07:07.800
branches going up and down, and it took up a

00:07:07.800 --> 00:07:09.939
huge amount of physical space on the page. You

00:07:09.939 --> 00:07:11.779
couldn't just easily type it out. Oh, I see.

00:07:12.060 --> 00:07:13.980
Ukasevich gave the world something you could

00:07:13.980 --> 00:07:16.240
just type out sequentially on a single line of

00:07:16.240 --> 00:07:19.970
paper. In fact, his notation was so highly regarded

00:07:19.970 --> 00:07:23.350
that the legendary logician Alonzo Church specifically

00:07:23.350 --> 00:07:25.889
praised it in his classic book on mathematical

00:07:25.889 --> 00:07:29.170
logic. Church called it worthy of remark and

00:07:29.170 --> 00:07:31.889
contrasted it favorably with the incredibly dense,

00:07:31.970 --> 00:07:34.670
complicated notation used by Alfred North Whitehead

00:07:34.670 --> 00:07:37.370
and Bertrand Russell in their massive foundational

00:07:37.370 --> 00:07:40.230
work, the Principia Mathematica. Here's where

00:07:40.230 --> 00:07:43.399
it gets really interesting. Lukasiewicz didn't

00:07:43.399 --> 00:07:45.699
actually invent this just to do basic arithmetic

00:07:45.699 --> 00:07:48.639
like addition and subtraction. He was a logician

00:07:48.639 --> 00:07:51.720
first and foremost. He used this system to map

00:07:51.720 --> 00:07:54.259
out complex philosophical and logical arguments.

00:07:54.560 --> 00:07:57.199
And because he was working in Poland, the letters

00:07:57.199 --> 00:07:59.480
he used in his notation actually stood for specific

00:07:59.480 --> 00:08:02.220
Polish words. It creates a wonderful collision

00:08:02.220 --> 00:08:04.839
of linguistics and pure mathematics. Let's walk

00:08:04.839 --> 00:08:07.060
through some of the vocabulary he created. Instead

00:08:07.060 --> 00:08:09.500
of using traditional math symbols, he used capital

00:08:09.500 --> 00:08:12.259
letters as his operators. So he used the letter

00:08:12.259 --> 00:08:15.480
N for negation, because the Polish word is negacja.

00:08:15.620 --> 00:08:18.240
Makes perfect sense. He used C for the material

00:08:18.240 --> 00:08:21.439
conditional, which is a fancy way of saying if

00:08:21.439 --> 00:08:23.620
this, then that, because the Polish word for

00:08:23.620 --> 00:08:27.339
implication is implicacja. He used K for conjunction.

00:08:27.930 --> 00:08:30.889
meaning the word and, from the Polish word koniokcia.

00:08:30.970 --> 00:08:33.590
Right. He even ventured into modal logic, which

00:08:33.590 --> 00:08:36.250
deals with philosophical concepts like possibility

00:08:36.250 --> 00:08:39.389
and necessity. So he used M for possibility,

00:08:39.649 --> 00:08:42.509
from the Polish word muliwosz, and he used L

00:08:42.509 --> 00:08:45.190
for necessity, from the Polish word konieczność.

00:08:45.610 --> 00:08:47.649
And whenever you have different brilliant academics

00:08:47.649 --> 00:08:50.409
building on a single system, you inevitably get

00:08:50.409 --> 00:08:52.889
some quirky historical contradictions. Oh, of

00:08:52.889 --> 00:08:55.330
course. Another prominent logician named Bocheski

00:08:55.330 --> 00:08:57.789
came along later and loved this system so much

00:08:57.789 --> 00:09:00.210
that he expanded it. He introduced a version

00:09:00.210 --> 00:09:03.850
of Polish notation that named all 16 binary connectives.

00:09:03.909 --> 00:09:05.950
To break that jargon down a bit for you listening,

00:09:06.129 --> 00:09:08.529
a binary connective is just a way to logically

00:09:08.529 --> 00:09:11.769
link two ideas together. Things like Andy, REO,

00:09:11.889 --> 00:09:15.820
or IFNN. Exactly. Bocheski mapped out all 16

00:09:15.820 --> 00:09:18.840
possible ways to do that. But here's the funny

00:09:18.840 --> 00:09:21.779
part. Bocheski and Yukasiewicz ended up using

00:09:21.779 --> 00:09:24.580
the exact same letters, specifically L and M,

00:09:24.740 --> 00:09:27.759
to mean completely incompatible things in their

00:09:27.759 --> 00:09:30.960
respective systems. Oh, wow. I can only imagine

00:09:30.960 --> 00:09:33.480
the absolute chaos that must have caused at mathematics

00:09:33.480 --> 00:09:36.019
conferences in the 1930s. It sounds like the

00:09:36.019 --> 00:09:38.940
academic equivalent of saving over someone else's

00:09:38.940 --> 00:09:41.139
shared spreadsheet and ruining all their formulas.

00:09:41.419 --> 00:09:44.299
It probably caused quite a few headaches. Lukasiewicz

00:09:44.299 --> 00:09:46.899
was using L and M for modal logic necessity and

00:09:46.899 --> 00:09:49.600
possibility. But Bocheski was using L and M in

00:09:49.600 --> 00:09:51.820
classical logic to represent non -implication

00:09:51.820 --> 00:09:54.840
and converse non -implication. It's a great example

00:09:54.840 --> 00:09:57.259
of how even perfectly logical systems can get

00:09:57.259 --> 00:09:59.340
a little messy when different human beings start.

00:09:59.470 --> 00:10:01.330
adapting them for their own specific overlapping

00:10:01.330 --> 00:10:04.169
needs. So what does this all mean? We have this

00:10:04.169 --> 00:10:07.669
elegant, linear, parenthesis -free system born

00:10:07.669 --> 00:10:10.350
in the 1920s in Poland. It makes a big splash

00:10:10.350 --> 00:10:12.330
in the world of formal logic. But our sources

00:10:12.330 --> 00:10:14.470
note that today, Polish notation is actually

00:10:14.470 --> 00:10:16.750
no longer used very much in formal logic itself.

00:10:17.029 --> 00:10:19.669
No, not really. The logicians largely went back

00:10:19.669 --> 00:10:21.909
to using infix notation and all those parentheses.

00:10:23.019 --> 00:10:25.279
But the notation didn't die. It found its true

00:10:25.279 --> 00:10:28.340
home, its ultimate destiny in the realm of computer

00:10:28.340 --> 00:10:30.360
science. If we connect this to the bigger picture

00:10:30.360 --> 00:10:32.659
of the 20th century, the invention of Polish

00:10:32.659 --> 00:10:35.759
notation perfectly predated the dawn of the computing

00:10:35.759 --> 00:10:38.980
age. And it solved a massive foundational problem

00:10:38.980 --> 00:10:41.860
for early computer engineers. Think about how

00:10:41.860 --> 00:10:45.539
a machine actually reads information. Explaining

00:10:45.539 --> 00:10:48.259
the human order of operations to a computer using

00:10:48.259 --> 00:10:50.840
parentheses is incredibly difficult. Right, because

00:10:50.840 --> 00:10:53.980
of the nesting. Exactly. If you feed a computer

00:10:53.980 --> 00:10:56.740
an equation with brackets inside of brackets,

00:10:57.100 --> 00:10:59.340
you have to program the computer to scan all

00:10:59.340 --> 00:11:01.639
the way ahead, find the deepest set of brackets,

00:11:01.940 --> 00:11:04.360
hold all the other ignored information in its

00:11:04.360 --> 00:11:07.080
temporary memory, do the deepest math, and then

00:11:07.080 --> 00:11:09.779
work its way backward. It takes a ton of memory

00:11:09.779 --> 00:11:11.860
and processing power, which early room -sized

00:11:11.860 --> 00:11:14.600
computers simply did not have. I was reading

00:11:14.600 --> 00:11:16.919
about this in the source material, and they mentioned

00:11:16.919 --> 00:11:21.240
that Polish notation... solves this by allowing

00:11:21.240 --> 00:11:23.220
computers to use something called an evaluation

00:11:23.220 --> 00:11:26.580
algorithm or a stack algorithm. But I want to

00:11:26.580 --> 00:11:28.120
make sure I am picturing this correctly because

00:11:28.120 --> 00:11:30.159
the technical descriptions get pretty dense.

00:11:30.659 --> 00:11:33.139
If I am the computer reading a string of Polish

00:11:33.139 --> 00:11:36.159
notation from right to left, what exactly am

00:11:36.159 --> 00:11:38.179
I doing with these numbers? How does the stack

00:11:38.179 --> 00:11:40.600
actually work? it is beautifully simple when

00:11:40.600 --> 00:11:43.519
you break it down imagine the computer is a worker

00:11:43.519 --> 00:11:46.620
in a cafeteria and the stack is literally one

00:11:46.620 --> 00:11:49.460
of those spring -loaded plate dispensers okay

00:11:49.460 --> 00:11:51.940
picture that the computer reads the equation

00:11:51.940 --> 00:11:54.659
from right to left every time it sees a number

00:11:54.659 --> 00:11:56.919
it writes that number on a plate and pushes it

00:11:56.919 --> 00:11:59.419
down onto the stack so if the equation is a plus

00:11:59.419 --> 00:12:02.960
sign then a two then a three reading right to

00:12:02.960 --> 00:12:06.399
left It sees the three, puts it on a plate, and

00:12:06.399 --> 00:12:09.200
pushes it down. Then it sees the two, puts it

00:12:09.200 --> 00:12:11.559
on a plate, and pushes it down on top of the

00:12:11.559 --> 00:12:13.539
three. Okay, so I have a two sitting on top of

00:12:13.539 --> 00:12:16.259
the three. Correct. The magic happens the moment

00:12:16.259 --> 00:12:18.120
the computer reads an operator, like a plus sign.

00:12:18.419 --> 00:12:21.340
It knows a plus sign needs two numbers. It doesn't

00:12:21.340 --> 00:12:23.799
look around. It doesn't scan ahead. It simply

00:12:23.799 --> 00:12:27.450
pops the top two plates off the stack. the two

00:12:27.450 --> 00:12:29.190
and the three adds them together to get five

00:12:29.190 --> 00:12:31.809
writes the number five on a brand new plate and

00:12:31.809 --> 00:12:34.350
pushes that single new plate back onto the stack

00:12:34.350 --> 00:12:36.190
and then it just moves on to the next symbol

00:12:36.190 --> 00:12:39.049
in the string that completely eliminates the

00:12:39.049 --> 00:12:42.309
need for parentheses it just keeps stacking plates

00:12:42.309 --> 00:12:45.570
and every time an operator shows up it consolidates

00:12:45.570 --> 00:12:47.629
the top plates into a single new number there's

00:12:47.629 --> 00:12:50.559
no scanning ahead And no backtracking. And crucially,

00:12:50.639 --> 00:12:52.600
there is no need for what computer scientists

00:12:52.600 --> 00:12:55.700
call arbitrary stack inspection. Which means?

00:12:56.019 --> 00:12:58.039
That is just a fancy way of saying the computer

00:12:58.039 --> 00:12:59.840
never has to dig around in the middle of the

00:12:59.840 --> 00:13:02.039
pile of plates. It only ever looks at the plate

00:13:02.039 --> 00:13:04.419
sitting right on the very top. The sheer efficiency

00:13:04.419 --> 00:13:07.480
of that is beautiful. A simple push down stores

00:13:07.480 --> 00:13:10.220
all you need to implement this parsing. It saves

00:13:10.220 --> 00:13:13.259
a massive amount of computational memory. Because

00:13:13.259 --> 00:13:16.370
it is so lightweight and efficient. This concept

00:13:16.370 --> 00:13:19.450
actually lives on in the real world today. It

00:13:19.450 --> 00:13:21.309
isn't just a museum piece of early computing

00:13:21.309 --> 00:13:24.370
history. For instance, there is a very famous,

00:13:24.450 --> 00:13:26.690
very influential programming language called

00:13:26.690 --> 00:13:29.629
Lisp. It uses something called S -expressions,

00:13:29.649 --> 00:13:33.049
which rely heavily on prefix notation. Yes, Lisp

00:13:33.049 --> 00:13:35.789
is a classic example. Now, it is kind of ironic

00:13:35.789 --> 00:13:37.889
because if you look at Lisp code, it actually

00:13:37.889 --> 00:13:40.950
does use a ton of parentheses. Our sources explain

00:13:40.950 --> 00:13:43.690
that this is because in Lisp, the functions act

00:13:43.690 --> 00:13:46.519
as data. And they are variadic. To translate

00:13:46.519 --> 00:13:48.720
that jargon for you listening, variadic just

00:13:48.720 --> 00:13:51.100
means a function can take any number of inputs.

00:13:51.259 --> 00:13:53.580
It isn't fixed. Right. Unlike standard addition.

00:13:53.940 --> 00:13:56.720
Exactly. Simple addition takes exactly two numbers.

00:13:56.899 --> 00:13:59.200
But a variadic addition function is like throwing

00:13:59.200 --> 00:14:01.100
ingredients into a blender. You can throw in

00:14:01.100 --> 00:14:03.919
two numbers or five numbers or 50 numbers and

00:14:03.919 --> 00:14:06.360
it will add them all up. Because the operator

00:14:06.360 --> 00:14:08.940
doesn't have a fixed number of operands, Lisp

00:14:08.940 --> 00:14:10.899
has to use parentheses to show the computer where

00:14:10.899 --> 00:14:13.039
the list of ingredients finally ends. It has

00:14:13.039 --> 00:14:15.340
to have some way to know it's done. Right. But

00:14:15.340 --> 00:14:17.620
the core Polish structure, putting the operator

00:14:17.620 --> 00:14:20.659
at the very front, remains the absolute foundation

00:14:20.659 --> 00:14:23.100
of the language. Lisp is certainly one of the

00:14:23.100 --> 00:14:26.159
most famous examples, but the influence of Jukasiewicz's

00:14:26.159 --> 00:14:28.879
work goes far beyond that. I was amazed at the

00:14:28.879 --> 00:14:31.919
list of applications. The TCL programming language.

00:14:32.539 --> 00:14:34.820
uses Polish notation for its math operations.

00:14:35.440 --> 00:14:38.179
There is a language called Ambi that uses it

00:14:38.179 --> 00:14:41.179
for arithmetic and program construction. If you

00:14:41.179 --> 00:14:43.340
work in corporate IT, you might have wrestled

00:14:43.340 --> 00:14:46.179
with LDAP filter syntax that uses Polish prefix

00:14:46.179 --> 00:14:49.139
notation to search directories. Oh, definitely.

00:14:49.360 --> 00:14:51.919
Even more modern web -focused tools like CoffeeScript

00:14:51.919 --> 00:14:54.500
allow functions to be called using this prefix

00:14:54.500 --> 00:14:57.320
notation we also absolutely have to mention the

00:14:57.320 --> 00:14:59.539
very famous sibling of this system which the

00:14:59.539 --> 00:15:01.940
article covers in detail if you can move the

00:15:01.940 --> 00:15:04.200
math operator to the absolute front of the equation

00:15:04.200 --> 00:15:06.480
you can logically also move it to the absolute

00:15:06.480 --> 00:15:09.720
end that variation is called reverse polish notation

00:15:09.720 --> 00:15:12.940
or rpn it is also known as post fixed notation

00:15:12.940 --> 00:15:15.899
post fix meaning after exactly so instead of

00:15:15.899 --> 00:15:17.539
writing plus one two you would write one two

00:15:17.539 --> 00:15:20.179
plus and i imagine the cafeteria plate stack

00:15:20.179 --> 00:15:22.259
algorithm works exactly the same way you just

00:15:22.259 --> 00:15:24.059
process this string from left to right instead

00:15:24.059 --> 00:15:25.779
of right to left. You hit the nail on the head.

00:15:25.940 --> 00:15:28.639
The mechanics are identical, just mirrored, and

00:15:28.639 --> 00:15:31.259
reverse Polish notation powers a massive amount

00:15:31.259 --> 00:15:34.059
of technology that we rely on. It is the basis

00:15:34.059 --> 00:15:36.860
for stack -oriented programming languages like

00:15:36.860 --> 00:15:39.240
PostScript, which is the hidden language used

00:15:39.240 --> 00:15:41.960
in desktop publishing to tell your printer exactly

00:15:41.960 --> 00:15:45.440
how to draw fonts and graphics on a page. I had

00:15:45.440 --> 00:15:47.740
no idea. It is the foundation of the programming

00:15:47.740 --> 00:15:50.519
language Forth. It was heavily used in the architecture

00:15:50.519 --> 00:15:53.799
of Burroughs' large systems mainframes back in

00:15:53.799 --> 00:15:56.379
the day. The article also points out an application

00:15:56.379 --> 00:15:58.720
that everyday consumers might actually recognize,

00:15:59.000 --> 00:16:01.279
especially if they work in finance or engineering.

00:16:01.850 --> 00:16:05.549
Reverse Polish notation is the chosen default

00:16:05.549 --> 00:16:08.629
notation for high -end calculators, most notably

00:16:08.629 --> 00:16:11.009
the scientific and financial calculators manufactured

00:16:11.009 --> 00:16:13.899
by Hewlett Packard. Those HP calculators have

00:16:13.899 --> 00:16:16.279
an incredibly loyal cult following for a very

00:16:16.279 --> 00:16:19.539
specific reason. Engineers and finance professionals

00:16:19.539 --> 00:16:21.919
swear by them because once your brain gets used

00:16:21.919 --> 00:16:24.480
to thinking in reverse Polish notation, you can

00:16:24.480 --> 00:16:27.600
punch in massive, complex calculations significantly

00:16:27.600 --> 00:16:30.419
faster than you ever could on a standard calculator.

00:16:30.679 --> 00:16:32.860
Because of the keystrokes. Exactly. You never

00:16:32.860 --> 00:16:35.019
have to waste keystrokes manually typing out

00:16:35.019 --> 00:16:37.440
open and close parentheses. And you never have

00:16:37.440 --> 00:16:38.860
to worry about the calculator misunderstanding

00:16:38.860 --> 00:16:41.379
the order of operations. You just type the numbers.

00:16:41.710 --> 00:16:44.830
type the operator, and the internal stack handles

00:16:44.830 --> 00:16:47.929
the rest instantly. It is amazing to wrap up

00:16:47.929 --> 00:16:49.950
this journey and look at the vast trajectory

00:16:49.950 --> 00:16:53.710
of this one single idea. We started with Jan

00:16:53.710 --> 00:16:56.809
Jukasiewicz, a Polish logician in the 1920s,

00:16:56.809 --> 00:16:59.190
who was simply trying to clean up his logic equations

00:16:59.190 --> 00:17:01.809
to make them a little easier to type out on a

00:17:01.809 --> 00:17:04.309
single line of paper. Just a pragmatic solution.

00:17:04.710 --> 00:17:07.990
And he drops this parenthesis -free idea in a

00:17:07.990 --> 00:17:12.319
footnote on page 610. a 1929 report. And by doing

00:17:12.319 --> 00:17:14.799
that, he accidentally created the invisible,

00:17:15.059 --> 00:17:17.759
highly efficient mathematical architecture that

00:17:17.759 --> 00:17:19.779
allowed early computers with terrible memory

00:17:19.779 --> 00:17:22.549
to process complex math. An architecture that

00:17:22.549 --> 00:17:24.670
still powers incredibly sophisticated programming

00:17:24.670 --> 00:17:27.230
languages, printers, and calculators today. It's

00:17:27.230 --> 00:17:29.529
incredible. So the next time you use a computer

00:17:29.529 --> 00:17:31.789
to crunch some numbers or you hit print on a

00:17:31.789 --> 00:17:34.930
PDF document, remember that a version of Ukasiewicz's

00:17:34.930 --> 00:17:38.170
elegant parenthesis -free stack is quietly stacking

00:17:38.170 --> 00:17:40.450
plates behind the scenes to make it all happen.

00:17:40.569 --> 00:17:43.089
It serves as a brilliant testament to the lasting

00:17:43.089 --> 00:17:46.009
power of pure logic. And looking at all of this,

00:17:46.089 --> 00:17:47.750
this raises an important question, something

00:17:47.750 --> 00:17:49.829
for you to think about long after this deep dive

00:17:49.829 --> 00:17:51.940
is over. Let's hear it. We've seen today that

00:17:51.940 --> 00:17:55.039
prefix and postfix notations are incredibly elegant.

00:17:55.279 --> 00:17:57.880
They are completely unambiguous. They are hyper

00:17:57.880 --> 00:18:00.519
-efficient for computers to process. They completely

00:18:00.519 --> 00:18:03.440
eliminate the need for arbitrary rules like PEMDAS

00:18:03.440 --> 00:18:06.299
or messy confusing brackets. But humans inherently

00:18:06.299 --> 00:18:08.859
think in a subject -verb -object pattern. We

00:18:08.859 --> 00:18:11.819
want to say 1 plus 2. So what does our stubborn

00:18:11.819 --> 00:18:13.960
attachment to writing in -fix notation fixing

00:18:13.960 --> 00:18:15.920
that plus sign in the middle say about how the

00:18:15.920 --> 00:18:17.799
human brain instinctively categorizes the world

00:18:17.799 --> 00:18:20.380
versus the ruthless, mechanical, efficient...

00:18:20.329 --> 00:18:21.950
of a perfectly logical machine.
