BT

Facilitating the Spread of Knowledge and Innovation in Professional Software Development

Write for InfoQ

Topics

Choose your language

InfoQ Homepage Podcasts Generally AI - Season 2 - Episode 2: Fantastic Algorithms and Where to Find Them

Generally AI - Season 2 - Episode 2: Fantastic Algorithms and Where to Find Them

Roland Meertens and Anthony Alford discuss their favorite algorithms, starting with the etymology of the word "algorithm". They explore the Fibonacci sequence and the many algorithms for computing it. Roland introduces the concept of probabilistic counting, focusing on the HyperLogLog algorithm, which can be used to estimate the count of unique items. Meertens also shares his own personal algorithm for estimating how many people he talks to at conferences.

Key Takeaways

  • The term "algorithm" originates from Al-Khwarizmi, a 9th-century scholar who contributed to arithmetic and algebra.
  • Fibonacci’s Liber Abaci helped popularize the word "algorithm"  in the West.
  • The Fibonacci sequence can be calculated with many algorithms, including an approximation using the golden ratio.
  • HyperLogLog is a probabilistic counting algorithm that estimates the cardinality of large data sets using minimal memory.
  • Roland shares his algorithm to estimate how many people he talks to at a conference by remembering the alphabetically lowest name and referencing a dataset of baby names.

Transcript

Roland Meertens: Welcome to Generally AI season two, episode two. As a fun fact to get started with, I discovered last week that Edsger W. Dijkstra invented his shortest path algorithm in 20 minutes, on a terrace of a cafe in the Netherlands, and he was wondering what the shortest path is from Rotterdam to Groningen, and apparently he didn't even use a pencil and paper when inventing it. And he says that that helped him avoid all the avoidable complexities, and I think that taking 20 minutes to think about a solution seems acceptable for a LeetCode code problem like this. What do you think?

Anthony Alford: I feel like most of my candidates are not in the same class as the esteemed professor, but yes, why not?

Roland Meertens: I think so too. The other fun fact I have for you, by the way, is that when he started publishing his algorithms, for the first five years, he didn't use a machine. So basically he and the other researchers would just look at the algorithm for a super long time to convince them that it was correct and would work. So that's a good unit test, I guess.

Anthony Alford: That's a good code review, anyway. So there's a similar anecdote, but I think it was a different guy who said, "I have not tested this code. I've merely proved it correct".

Roland Meertens: Well, that's the other thing: there wasn't a notion yet of proof of correctness for algorithms. And at some point he had a call for algorithms for a conference, and so many people submitted algorithms he could find a counter case for, that he just told these mathematicians, or logicians, or whatever it was at the time before computer science was computer science. He basically told them, "You have to submit your algorithm and a proof of correctness", and apparently immediately someone submitted that and then he knew it was correct.

Anthony Alford: Nice.

Roland Meertens: I will tell you one last other fun fact. The shortest sub-spanning tree algorithm was initially invented to save copper wire on a big electric panel because you want to ground all the points to the same place.

Anthony Alford: Oh.

Roland Meertens: So you want to find the shortest amount of copper which helps with that.

Anthony Alford: That's amazing. It's funny how much all this hearkens back to the hardware world.

Roland Meertens: Yes, but then, at that time, these algorithms make sense.

Anthony Alford: Yes. So I don't have a fun fact so much as a fun anecdote, and this was a blog post from a very long time ago, where a mathematician noticed that mathematicians who were specialists in algebra ate their corn on the cob one way, and the ones from analysis ate theirs in a different way.

Roland Meertens: Interesting.

Anthony Alford: With eating corn on the cob, you can basically go-

Roland Meertens: Left to right

Anthony Alford: ... raster pattern, and the other way is to go around the whole thing and then move, and then go around the whole thing. And so the algebraists eat in the raster pattern and the analysts eat in spirals.

Roland Meertens: Interesting.

Anthony Alford: Nobody's sure what that means or how general it is, but it seemed to hold true for most of the people this guy polled.

Roland Meertens: Nice. Interesting. I will also, by the way, send you the link to the interview in which Edsger Dijkstra said this.

Where Do Algorithms Come From? [03:27]

Roland Meertens: Welcome to Generally AI season two, episode two, where I, Roland Meertens, will be discussing our favorite algorithms with Anthony Alford.

Anthony Alford: Hey, Roland. Well, it's interesting. We started out with the fun facts about algorithms, and I've spent the last few weeks trying to think, what is my favorite algorithm?

Roland Meertens: What is your favorite algorithm?

Anthony Alford: Well, before I get to that, I started thinking, as I do, where do algorithms come from? The answer may surprise you. Do you have a guess where algorithms come from?

Roland Meertens: I don't know, but I have a pretty good sense of "algo-rhythm".

Anthony Alford: Nice. Well, algorithms come from Uzbekistan.

Let me explain. In the land that is today known as Uzbekistan, there's a region called Khwarazm, and this was a long time ago, the home of a man named Muhammad ibn Musa al-Khwarizmi. Actually, that's what al-Khwarizmi means, it's someone from Khwarazm.

Roland Meertens: No way.

Anthony Alford: Right? Surprise. By the way, as an aside, this is what we call a toponymic surname, a surname that comes from a place name.

Roland Meertens: Ah.

Anthony Alford: Fun fact. Anyway, today, we usually just refer to this man as al-Khwarizmi. He was born approximately the year 780, and in about the year 820, he was appointed as an astronomer and the head of the House of Wisdom in the city of Baghdad.

There was a lot going on at the House of Wisdom back then. This was during a cultural golden age. The house was a library, an academy, a research center. Scholars were translating ancient Greek texts as well as doing a lot of original work. And some of the work that al-Khwarizmi did was he wrote a book. He wrote it in Arabic, of course, a book about how to do calculations using the Hindu numerals.

As you no doubt know, ancient people like the Greeks and Romans, didn't have the place value number system that we use today. They used letters for numbers. For example, Roman numerals for one, 10, 100, 1000, those are all different letters from the alphabet.

Roland Meertens: Yes.

Anthony Alford: Whereas we just use a number one, the numeral one, and we add zeros. They didn't have zeros.

Roland Meertens: Who did not have zeros? The Greeks and the Romans?

Anthony Alford: Anybody.

Roland Meertens: Nobody had zeros.

Anthony Alford: Somebody had to invent the zero.

Roland Meertens: Once someone did extremely poorly on a math test, they had to invent a new number to grade them.

Anthony Alford: You're cracking me up. It's like that Happy Gilmore sketch. Anyway, somewhere between the first and fourth centuries, our modern numeral system was invented in India, and it spread to the Islamic world, and eventually to Al-Khwarizmi. And he wrote a very influential book on how to use these numerals and the positional system to do arithmetic. And even today, we still call these numerals, Hindu-Arabic.

Roland Meertens: Yes.

Anthony Alford: Sadly, his original text is lost, but it was translated into Latin. And in the process, Al-Khwarizmi's name was Latinized, variously to Algorismi, Algorismus, Algoritmi, and the translation of his book was called Algoritmi de Numero Indorum, or in English, Al-Khwarizmi on the Hindu Art of Reckoning. So spoiler alert, our word algorithm comes from the name, Al-Khwarizmi. So I'm sure many of you listeners knew that. I'm sure you knew that too, Roland, but-

Roland Meertens: I did not know this. So I really enjoyed this fun fact.

Anthony Alford: Right, so that's where the word comes from. Now, a brief digression, when we talk about an algorithm, what does that mean? And Wikipedia says, "It's a finite sequence of mathematically rigorous instructions, typically used to solve a class of specific problems or perform a computation".

Roland Meertens: Seems fair, yes.

Anthony Alford: Yes. So the first algorithms that most of us learn as young students are those for doing basic arithmetic: addition and subtraction. And that's what Al-Khwarizmi's book was, a book of algorithms. Originally, his Latinized name, Algorismus, became synonymous with the number system and the technique of doing arithmetic with this system was actually called algorism.

Roland Meertens: Is it like there's algorithm and algebra, right? So that is not going from the same thing.

Anthony Alford: You're getting ahead of me.

Roland Meertens: Okay, I'm speed running this podcast.

Anthony Alford: Foreshadowing. Yes, actually, we will talk about algebra. They're both Arabic words, right?

Roland Meertens: Yes.

Anthony Alford: The al, the same word in alchemy and alcohol. A lot of words that start with al-

Roland Meertens: Are Arabic.

Anthony Alford: ... are actually Arabic in origin, yes.

Roland Meertens: Okay.

Fibonacci and the Algorismists [08:19]

Anthony Alford: Anyway, as I said earlier, his work was translated into Latin. It was introduced to the West about the 12th century, but it didn't really take the Western world by storm at first. It was probably known only to a few intellectuals. So what did help to popularize it was a 13th century book called Liber Abaci. It was written in the year 1202 by Leonardo of Pisa.

Roland Meertens: Oh.

Anthony Alford: There's another toponymic surname. He's better known to us today as Fibonacci.

Roland Meertens: Oh, interesting.

Anthony Alford: Actually, Fibonacci is short for Filius Bonacci, which means the son of Bonacci. And we would call that a patronymic surname. So-

Roland Meertens: We just became a word fun facts podcast.

Anthony Alford: Well, I love etymology. Well, it's good he's got that alias, because when I think of Leonardo and Pisa, I think about Leonardo da Vinci dropping cannonballs off the tower of Pisa. [Ed: this was Galileo, not Da Vinci].

Roland Meertens: Yes. So there were more intellectuals in Pisa.

Anthony Alford: Yes. Well, he was much later. And by the way, da Vinci is another toponymic surname, but I digress. Back to Fibonacci's book, Liber Abaci. The title is a little confusing, at least to those of us who don't speak Latin, and I'm one of those, because it sounds like it might be a book about how to use an abacus. In fact, it describes methods of doing calculation without an abacus, but with using that Hindu numeral system. So it's actually instructions on how to use al-Khwarizmi's algorithms.

Roland Meertens: So at this point in time, these people already adopted the Arabic number system, or were people still using the Roman number system?

Anthony Alford: So this book was what started the adoption of those numerals in the West.

Roland Meertens: Yes, because of the easy algorithms for addition and subtraction.

Anthony Alford: But it didn't take over completely, and according to Wikipedia, again, for centuries after this book, the people who followed it were called the algorismists, but there were also people who were called abacists, who were the traditionalists. They had that abacus, you could take it from my cold dead hands, attitude.

Roland Meertens: Yes. If you are a listener who is still holding out, please, please contact us. We will want to interview you.

Anthony Alford: Yes. Well, again, a digression, for those of you who have read the book by Richard Feynman, Surely You're Joking, Mr. Feynman!

Roland Meertens: Yes, great book.

Anthony Alford: Doesn't he have a scene where he's going head-to-head with an abacus guy, doing calculations.

Roland Meertens: Yes, indeed, indeed.

Anthony Alford: The abacus guy could beat him on some stuff, but then Feynman was a Nobel Prize-winning physicist. It would be hard to beat him in some math problems, I think.

Roland Meertens: Yes, I think the thing is that someone, there was indeed an abacus salesman, which at that time is a thing because there's no calculator yet. So you have abacus salesmen, which I think is already the first amazing thing. And then someone in a cafe starts giving their mathematics problems, and before calculators, people would be really good at simplifying the problems, right?

Anthony Alford: Yes.

Roland Meertens: So he just knows how to simplify the things, and then it's quicker than the person who is just moving all these beads around.

Anthony Alford: I wonder if he got to use a slide rule or something like that.

Roland Meertens: No. So he was just doing it in his head.

Anthony Alford: He was just doing it in his head.

Roland Meertens: Yes.

Anthony Alford: Amazing. So that's the power of the Algorismus algorism.

Roland Meertens: Yes. yes, indeed.

Algorithms for the Fibonacci Sequence [11:47]

Anthony Alford: All right, well, so back to Fibonacci. Of course, he's probably most famous for that sequence that's named after him, where the next number in the sequence is the sum of the previous two. So 1, 2, 3, 5, 8, 13.

Roland Meertens: Yes.

Anthony Alford: So if your story points are 13 or more, you probably need to break that story up...

Roland Meertens: Yes. This person did not invent the story points, but he did invent the numbering system.

Anthony Alford: So calculating the nth number in that sequence, that's often a favorite way for instructors in programming to demonstrate recursion, because you can write a very neat little recursive function that, given an input n, it will return the nth number in the sequence.

And I think it's probably a pretty popular software interview question. Now, that's probably a controversial topic on Reddit, or Hacker News, or something like that, but I think there are some nice things about it.

For example, the common recursive implementation gives you a platform to talk about complexity of that algorithm, right? By the way, do you know the complexity of the recursive Fibonacci calculation?

Roland Meertens: We talked about algorithms for this in a previous podcast.

Anthony Alford: Did we?

Roland Meertens: Yes, in the previous season, because I think we also found that there's numerical ways to approach it because you have to calculate a previous number.

Anthony Alford: It's exponential. Actually, it turns out the complexity is the Fibonacci number.

Roland Meertens: Oh, okay.

Anthony Alford: So anyway, and then you could talk about, well, how do you speed it up? And the answer is you can use memoization.

Roland Meertens: Yes.

Anthony Alford: Spoiler alert, I'm going to call this my favorite algorithm, right?

Roland Meertens: Yes.

Anthony Alford: So there's non-recursive implementations, such as iteratively calculating it, but my favorite way is to use the golden ratio.

Roland Meertens: Oh.

Anthony Alford: And in mathematics, the golden ratio: two quantities are in the golden ratio if their ratio to each other is the same as the ratio of their sum to the bigger of the two. So three to five should be in approximately the same ratio as five is to eight and so forth. So that golden ratio is approximately 1.618.

You can calculate the closed form of it and it's one plus the square root of five over two. And then the square root of five is 2.236, approximately. So you can approximate the nth Fibonacci number by taking that golden ratio, 1.618, raising it to the nth power and then dividing by the square root of five.

Roland Meertens: Yes, and it gives you an approximation, right? It's not exact.

Anthony Alford: It's not exact. You just basically round, but the error is very small.

Roland Meertens: Oh, interesting. How big is the error then?

Anthony Alford: It's less than 0.01, I think, once you get past the fourth or fifth Fibonacci number.

Roland Meertens: Fantastic.

Al-Khwarizmi and Algebra [14:38]

Anthony Alford: So that's my favorite algorithm, but as they say on TV, "Wait, there's more". I want to make an AI connection, and you spoiled this for me. So besides his work with the number system, Al-Khwarizmi wrote another book. The English title is The Compendious Book on Calculation by Completion and Balancing, which sounds like something that might be found in the Hogwarts library.

Roland Meertens: Yes.

Anthony Alford: But anyway, this introduced systematic methods for solving linear and quadratic equations. So the Arabic title of this book, which I am not going to try to read, but it contains the word, al-jabr, which is the part about restoring broken parts. And that is where we get the word algebra.

Roland Meertens: So it was the same person, it was the person named Algorithmus who also gave us the word, algebra.

Anthony Alford: Yes, that's correct.

Roland Meertens: Interesting.

Anthony Alford: Yes, and his approach involved standard operations. So you might say, he had algorithms for doing algebra. We have him to thank for algorithms, for the decimal system and algebra. And so the AI connection is, of course, linear algebra.

Roland Meertens: Yes.

Anthony Alford: ... that's the foundation of neural networks.

Roland Meertens: The people in the House of Knowledge must love the current AI hype.

Anthony Alford: Yes. They're well past the... What is it, the "trough of despair?" I forget.

Roland Meertens: Yes, indeed, indeed.

Anthony Alford: So that is my favorite algorithm. Actually, I have the Fibonacci sequence and also Algorism himself.

Roland Meertens: Yes, your favorite algorithm is Mr. Algorithm himself.

Anthony Alford: That's right.

Roland Meertens: I love the approximate Fibonacci algorithm.

Anthony Alford: I forgot we'd talked about that, but-

Roland Meertens: Well, we mentioned it, but we never really explained it, so I really like it.

Probabilistic Counting [17:19]

Roland Meertens: All right, so from my side, I really like that you took an algorithm to approximate the Fibonacci sequence because I want to talk with you about probabilistic counting.

Anthony Alford: That sounds like fun.

Roland Meertens: It is fun. Probabilistic counting sounds like something which shouldn't exist because either you count it or you don't. But sometimes you want to have a reasonable estimate that is good enough, like in the case of the Fibonacci sequence. And the thing I want to do today is I want to talk about an algorithm, but I also want to talk about how I modified it a bit.

So the thing is that whenever I visit a conference, I talk to a lot of people, but I always wonder how many unique people did I talk to? Because sometimes you talk to the same person again, and maybe you already forgot them.

So I came up with an approach to this problem, but I first want to talk about the algorithm which inspired this. And that is that if you are a website, like Reddit or YouTube, and you want to know how many unique people visited your website or listened to your podcast.

And it is possible that someone listens to the same podcast twice. Maybe people started listening to this and now they dropped out during the break, and they come back later, and you don't want to count them all as unique listeners, right? You don't want to say that we have, I don't know how many thousand listeners, whereas actually it's half of them. So you don't want to double count.

Anthony Alford: Maybe you do and maybe you don't.

Roland Meertens: Yes, depending on how good you want to feel, you do or you don't. And also, in this case, for our podcast, I don't really care about the exact number. I do want to know a rough estimate.

Anthony Alford: Right.

Roland Meertens: And the naive way to solve this problem is that every time someone listens to our podcast, we add a name to a list, and then we turn that into a set, removing all the duplicates. Then we just count the cardinality of the sets. So we count the number of people in the sets, and that will take a lot of compute, and that will have a lot of memory. Hopefully we need a lot of memory to count all the listeners.

Anthony Alford: For this podcast, absolutely. We're going to need several terabytes.

HyperLogLog [19:48]

Roland Meertens: If you have more than five people. So the algorithm which people have there is called HyperLogLog and does probabilistic counting. Do you know HyperLogLog?

Anthony Alford: I've heard of it, so obviously I'm interested in the etymology. Can you explain the name?

Roland Meertens: Oh, so I think at some point someone made an algorithm called HyperLog, and then people improved and called it HyperLogLog. And I think there's even HyperLogLog++.

Anthony Alford: Oh my goodness.

Roland Meertens: At some point, I was on a holiday in Portugal and I started reading all these papers, but this was five years ago, so I forgot the intricate details.

Anthony Alford: Interesting.

Roland Meertens: But yes, so it's probabilistic counting. So it's not actually counting, but you're using probabilities to estimate the count of the size of a set.

Anthony Alford: Got it.

Roland Meertens: And in the case of our website, imagine we have a website. Actually, the Reddit blog is how I first found this algorithm, because they are using this to estimate things. And the approach is as follows: imagine that each person who is browsing Reddit has a unique ID and that's somehow encoded by their browser IP, I don't know, hardware.

So everybody has a unique thing to them. So we can track them on Reddit. So if they visit the same post twice, they have the same unique name. And for ease, let's just say it's their name, right? So their computer's named Anthony or Roland. So what you do is you can take the hash of that number. So you take the ID someone has, you take a hash of that number, and I'm not going to explain what a hash function is, but this hash, when viewing it as a binary number, has an equal probability of a one or a zero in each location.

Anthony Alford: Oh, interesting.

Roland Meertens: Hopefully. If you have a good hash function  it's equally likely that if you look at the binary representation, there's a one or zero in each response.

Anthony Alford: Got it.

Roland Meertens: Now, the interesting thing is that you can treat this hash, this 0, 1, 0, 1, 1, 0, 1, you can treat this as a dice roll or you can treat it as consecutive coin flips. So if you do this, you can start counting the number of leading zeros.

And for example, if you have a number, there's a one in two chance that your hash starts with one leading zero, and a one in four chance you have two leading zeros. And one in eight that you have three leading zeros, and you can see where this going. If you see that someone has eight leading zeros, the chance was one in 256, and 16 leading zeros, you only have a chance of one in 65,536.

Anthony Alford: Buy a lottery ticket.

Roland Meertens: Yes, so the nice thing is that, as a website, the only thing you have to keep count of is the maximum number of leading zeros which you saw someone have.

Anthony Alford: Oh.

Roland Meertens: So if you had a lot of people visit your website, you don't know exactly how much, but you do know that you saw someone with eight leading zeros, you've had 256 people. The mathematical expectation is that 256 people listen to your podcast.

Anthony Alford: That's cool.

Roland Meertens: If you just saw all these numbers flip by, right? And you saw, at some point, someone with 16 leading zeros, you expect that to have been around 65,536 people.

Anthony Alford: Right.

Roland Meertens: Yes, so the only memory you need is one number. You only need four bits, or eight bits, or whatever, how many people you expect.

Anthony Alford: Well heck, let's go 32.

Roland Meertens: Yes. You only need 32 bits to count an estimate of the number of people.

Anthony Alford: So are you going to tell us about how much the error band is there?

Roland Meertens: Yes, and this is also where algorithms like, I think, this the idea of something like HyperLog. I'm not entirely sure which algorithm introduces what concept, but you could also of course take a look at what's the number of leading zeros for different hash functions. What's the number of leading zeros at different places in the same hash?

So what you can start doing is you can start making buckets. So you take the first four zeros and then have different buckets, and then you count the rest of leading zeros for the rest of the number. And that way you can already get way better approximations, and you can take the harmonic mean of these numbers to guess-

Anthony Alford: Not the golden mean?

Roland Meertens: It's not the golden ratio.

Anthony Alford: The golden ratio.

Roland Meertens: No, it's the harmonic mean. I will also admit that I don't know exactly what all the possible mathematical means are. So you can use different tricks to get to better approximations of these numbers.

Anthony Alford: That's pretty cool. I really love that. Just counting the number of zeros, super simple. And it's probably not extremely accurate, but like you said, is it good enough? Might be.

Roland Meertens: For just giving someone a quick estimate of how well their post is doing, it's probably good enough. And as I said, the error band is lower, as you add more of these  buckets, then you start having a larger memory footprint, but your memory footprint is still insanely small for counting millions of people.

Anthony Alford: Yes, exactly. So it sounds like you need a couple of things. One, you need a way to uniquely identify each person, and then you need one or more hash functions that meet this criterion that they're balanced like that.

Roland Meertens: Well, yes, so you need one. I think Bloom filters work on the, it's some kind of structure for your data. There's again, probabilistic, where you can check whether an element is in your Bloom filter by using multiple hash functions.

Anthony Alford: Gotcha.

Roland Meertens: In this case, you would just assume that you have one and that that gives you a probabilistic one or zero for all the numbers.

Anthony Alford: Okay.

Roland Meertens: Nice. So not all the hash functions work, right? But some do.

Anthony Alford: Right, well, we could probably do, we probably won't, but we could do an entire episode on the different types of hash functions.

Roland Meertens: That sounds like something for the next season.

Anthony Alford: What's your favorite hash function?

Roland Meertens: I really don't know. I spent a lot of time trying to explain the concept of a hash function to non-technical people, and I have not found a good way to do it. So if you have one and find one, if you find the way to explain a hash function to non-technical people, please let me know.

Anthony Alford: I don't think I've ever had the need. I guess you can maybe do it, it's for a product manager.

Roland Meertens: As you can see, I'm a lot of fun at parties, but I also like to go to parties and I ask people what their favorite algorithm is.

Anthony Alford: What do you get for answers?

Roland Meertens: Well, I always tell them about HyperLogLog.

Anthony Alford: Oh, okay.

Roland Meertens: But someone last week told me they liked a stable matching algorithm.

Anthony Alford: Okay.

Roland Meertens: Which is a way of making pairs of people using preferences, where both people want to go for a different preference.

Anthony Alford: Okay.

Counting Conference Encounters [27:00]

Roland Meertens: Long story. Anyways, coming back to my original question.

Anthony Alford: Yes, please.

Roland Meertens: How many people did I talk to at a conference? What I figured is that, instead of remembering every name, I can simply remember the alphabetically lowest name and then afterwards I can look at the probability someone has that name or alphabetically lower, and see what the estimated people is which I needed to talk to find someone named like that.

So if I go to a conference and I talk to one person, when you're sorting all the possible names and the number of people who were born in the UK, there's a 50% chance that their name is lower than the name Keith.

Anthony Alford: Really?

Roland Meertens: Yes, but only 25% is alphabetically lower than Divian. So I downloaded the data set of baby names from 1996 till 2021, which I will also put in the show notes. At the 12 and a half percentile, so one eighth chance, is the name Babukar. And then if we have that again, we get to the name Alvin.

So I figured this is a great way of, you only have to remember one name, then you look it up in your data set of baby names, and then you can have an estimate of how many people you talk to. And I think you can improve it by remembering alphabetically the lowest name for each letter, if you're talking to a lot of people, and then you take  the harmonic mean, and then you have a better estimate for how many people you talk to.

Anthony Alford: So what was your number?

Roland Meertens: I never do this. I always think it would be fun to try this with a crowd, but just asking in the crowd, what is the alphabetically lowest name you all have? So maybe if we ever do QCon live.

Anthony Alford: Well, I was going to say, at your next party you should do that.

Roland Meertens: Yes, so you can estimate the cardinality of your party.

Anthony Alford: So you have to have ground truth. I was going to say, I would just do like they do voting in some countries where I make everybody I talk to, I would dip their finger and paint and then I would know if I talked  to them again.

Roland Meertens: I'm mostly wondering if I start estimating cardinality of my parties, I can soon count it on the one hand. So I don't even need my abacus.

Anthony Alford: Put a turnstile at the door.

Roland Meertens: Yes, indeed.

Anthony Alford: That's pretty fun. I love that algorithm.

Words of Wisdom [29:36]

Roland Meertens: Thanks. It's my favorite algorithm. Words of wisdom, did you learn anything recently? Did you dive into something?

Anthony Alford: Just Al-Khwarizmi and the House of Wisdom. Definitely a lot of interesting scholarship there.

Roland Meertens: Yes, are there other famous things which have come out of the House of Wisdom?

Anthony Alford: I think Al-Khwarizmi did some work on astronomy. So he did some catalogs of stars and things like that.

Roland Meertens: Yes, interesting. Did he also ever treat it as a clock, like we discussed in one episode last season?

Anthony Alford: That I do not know.

Roland Meertens: Because I have seen more people referencing using Jupiter as a clock. So it's getting more and more settled in my brain that this used to be a normal way of counting time.

Anthony Alford: Interesting.

Roland Meertens: Yes.

Anthony Alford: We're on Jupiter time.

Roland Meertens: Well, I don't know, and to what extent people kept track of that. Methods of keeping and tracking time really intrigue me somehow. The one thing which I learned last week, a couple of days ago, at night, at some moment I couldn't sleep anymore because I had to answer the following question. You know that the eyesight of an eagle is way better than that of a human, right? Like four to eight times better.

Anthony Alford: Right.

Roland Meertens: How do they measure this?

Anthony Alford: They have the eagle read off the eye chart? I don't know.

Roland Meertens: Yes. It used its wing to indicate, it's pointing left, pointing up, pointing right.

Anthony Alford: You're going to tell me.

Roland Meertens: Well, yes, indeed. So I spent a bit of time trying to figure this out when I should have gone to bed. So I was thinking, how do they do this? Can they mathematically calculate this? Is there something intrinsic to the eye where you can treat it as a lens and you can do something with that? Or do they do an eye test? But then how do they do this?

I have gone quite far. So what I figured out they do is they have a long tunnel and they teach the eagle that they put something on the specific screen. So if a screen has a specific pattern, it can fly through the tunnel and land on that screen. So the pattern could be, I don't know, let's just assume that the pattern would be a photo of a mouse. I don't know what the actual pattern is. Maybe they do something else.

Let's say that the eagle flies through a tunnel, there's two screens at the end. One screen shows a mouse, the other screen shows a fire truck. If it lands on top of the screen with the mouse, it gets the treats, it gets food.

And what they do is that they have the eagle fly through the tunnel towards the screens, and then they show different sizes of this pattern on the screen. And then they look at when the eagle starts deviating towards the correct screen, and then they know that at that distance they have perceived the pattern correctly.

Anthony Alford: Okay, whereas a person has to get a lot closer before they get their treat.

Roland Meertens: Well, yes, we can easily communicate with a human and ask them to name letters.

Anthony Alford: I definitely want them to use grad students in this experiment, to make them work for treats.

Roland Meertens: Yes, so what I tried to do, after I found this, I thought, "I really want to see how they conduct such an eye test for eagles, and if there's something which they do regularly". I could not find this on YouTube. So that's my other request for listeners. If you know someone who is conducting eye tests on eagles, please reach out to us and send us a video. I'm very interested in this.

Anthony Alford: So we can estimate how many people know this by: we figure out the name of the person who emails us…

Roland Meertens: Yes, if you now listen to this podcast, and so sometimes I think, "Oh, I know more about this than the podcast maker. Should I email them? No, they probably get a lot of emails". Don't be like that. Please do send us an email. I really want to see this, and I will put a link to the webpage where I learned about this in the show notes.

Anthony Alford: I may have to go spend the rest of my evening looking that up.

Roland Meertens: Please tell me what you find. If you find a video, that's what I would love to see. If I can conduct an eye test on any kind of different animals, I would love to see that.

Conclusion [33:45]

Roland Meertens: Thank you very much for listening to this episode, and if you like this podcast, please tell your friends about it. Share it with the world. Thank you Anthony for joining again.

Anthony Alford: It was a lot of fun. I learned a lot.

Roland Meertens: Perfect.

Mentioned:

About the Authors

More about our podcasts

You can keep up-to-date with the podcasts via our RSS Feed, and they are available via SoundCloud, Apple Podcasts, Spotify, Overcast and YouTube. From this page you also have access to our recorded show notes. They all have clickable links that will take you directly to that part of the audio.

Previous podcasts

Rate this Article

Adoption
Style

BT