Skip to playerSkip to main contentSkip to footer
  • 6/11/2025
searching for constant time formula for greatest common divisor
Transcript
00:00:00Hello friends, welcome to Human Allergy episode 2251.1. Happy Tuesday night, Wednesday morning.
00:00:15Okay. Yeah, I woke up from the nap and then did some running outside. Yeah, good running
00:00:21outside. Joking. Nice. Okay. Now, let's do some stretching.
00:00:51Okay.
00:01:15Okay.
00:01:21Okay. Yeah. I had an interesting dream. In my dream, I was watching some kind of brand
00:01:43new Star Wars movie in my dream. But it was not a bad. Yeah, new Star Wars movies, they
00:01:50were bad, right? But this new Star Wars movie that I saw in my dream, that was a good one.
00:01:55Okay. So, good like special effects and all this CGI, computer generated imagery and stuff,
00:02:04it was good. Okay.
00:02:08Basically, Chewbacca was holding C-3PO in that movie that I watched, Star Wars movie that
00:02:16was in my dream. So, Chewbacca was holding C-3PO and showing outside of this spaceship.
00:02:25And Chewbacca asked C-3PO, hey, do you think that will be nice to us? And C-3PO said something
00:02:32like, well, maybe, but at least we can learn some advanced technology from them.
00:02:38Something like that. Okay. Yeah, like spaceships. Very nice.
00:02:45Very nice. Okay.
00:02:57Okay.
00:03:02Okay.
00:03:11Ah.
00:03:41Oh, okay.
00:03:58Cool.
00:04:11Wow.
00:07:16Yeah.
00:07:17Yeah.
00:07:19Acrobatis, yeah, fantastic.
00:07:30Okay.
00:07:44Okay.
00:07:49Okay.
00:08:19Okay.
00:08:50Let's see.
00:09:20So first track, yeah, some setting was filmed in Australia, great interaction with animals.
00:09:31They were fantastic.
00:09:32Under the water, that was fantastic.
00:09:36Yeah.
00:09:37Well done.
00:09:38Yeah.
00:09:39Very memorable.
00:09:43Okay.
00:09:48Okay.
00:09:49Now, first exercise.
00:09:55Okay.
00:09:56Oh.
00:11:16And...
00:11:22Okay.
00:11:38Okay, good, good.
00:11:52Okay.
00:11:54Okay.
00:11:58Okay.
00:12:00Okay.
00:12:02Okay.
00:12:10Okay.
00:12:12That's good.
00:12:14Okay.
00:12:16Now...
00:12:18Let's do this.
00:12:26Let's do jump punch, okay?
00:12:28Like uppercut, for example.
00:12:30Okay.
00:12:32Okay.
00:12:34Good.
00:12:36Okay.
00:12:38Okay.
00:12:40Okay.
00:12:42Okay.
00:12:44Good.
00:12:46Good exercise.
00:12:48Yeah.
00:12:49Five is back, please.
00:12:52Good exercise.
00:12:54Okay.
00:12:56Okay.
00:12:58Okay.
00:13:00Okay.
00:13:06Okay.
00:13:08Who knows...
00:13:10And...
00:13:12Okay.
00:13:14Okay, good.
00:19:16So, basically, what we have here is this, okay, so, uh, I wrote down many things here.
00:20:01base number here, we have 11, that is what B is, okay? And is equal to 1 because 3 and 11,
00:20:1111 is prime number, right? All the numbers less than 11, all the positive integers less than 11,
00:20:19they are co-prime with 11 because 11 is a prime number, okay? So we're going to generalize with
00:20:24only delta with primes and co-primes, right? We're going to generalize to non-primes and non-co-primes,
00:20:30okay? So yeah, that would be our next step. And then it is already known that what's the best
00:20:37coefficient? Yeah, given two numbers, the linear combination like ax plus by is equal to, create
00:20:44this common divisor. In this case, 1, right? If it's not 1, we just multiply that number to this linear
00:20:51combination, ax plus by, okay? For example, if this is multiplied by 2, here we have x is equal
00:21:01to 2, minus 7, y is equal to 2. We just multiply to get x is equal to minus 14, and y is equal to 4, okay?
00:21:13Yeah, yeah. Which is, okay, so this table give us the minimum, the smallest coefficient, okay?
00:21:21Yeah, for that we have,
00:21:25for 2, which is the second last row, okay? We have
00:21:36minus 3, x is minus 3, y is equal to 1, when k is 0. When k is 1, yeah, minus 14,
00:21:43and then 4, okay? So it's the next level example. So that's how it works, okay?
00:21:51Okay. Okay. Okay. And, um,
00:22:07So, yeah, cheers.
00:22:15Yeah.
00:22:16And, uh, let us do this. Okay, let's take five minutes break, and after that, uh, grab a new
00:22:36whiteboard to erase, and we construct this remainder table for base number 10, which is not a prime number.
00:22:46Okay? So, and see how it does, what works. Okay? Yeah.
00:22:53Basically, non-co-prime pairs. Okay?
00:22:59Uh, one way to do this is this, okay? Here, for base coefficient, uh, formula, what we did was, uh,
00:23:11we only looked at the co-prime pairs,
00:23:14and then we found formula for it.
00:23:18Co-prime pairs, okay? Now, how about non-co-prime pairs?
00:23:23Let's find formula for that, too. Okay? Uh, we kind of have it already,
00:23:28but non-co-prime pairs is just, uh, you know, if the co-prime pair is something,
00:23:35ax plus by is equal to one, uh, multiply by some number, and there will be the greatest common
00:23:40device of those non-co-prime pairs, okay? It's kind of variation of this, okay?
00:23:45Yeah.
00:23:51So, but let's see, remain the matrix table for base number 10, which is non-prime number, okay?
00:24:06Okay. And see how it behaves, and, uh, we'll go from there, okay? Yeah.
00:24:17Yeah. Five minutes break, okay? Nice.
00:24:23Okay.
00:24:23Okay.
00:24:33Let it go.
00:24:41Okay.
00:24:53All right.
00:28:43Okay, let's switch the whiteboard.
00:28:55Yeah, I think I can erase that one, I think.
00:29:04Yeah.
00:29:14And some whiteboard.
00:29:26Yeah, let's do it this one, okay?
00:29:34Okay.
00:29:36Okay, let's do it this one, okay?
00:29:46Okay.
00:29:50Okay.
00:29:51Okay.
00:30:00Okay.
00:30:03Okay.
00:30:04Okay.
00:30:15Okay.
00:30:17Okay.
00:30:18Oh, okay.
00:30:20Okay.
00:30:26Let's do it.
00:30:28Okay, let's do it.
00:30:30Okay.
00:30:32Let's do it.
00:30:34Okay.
00:30:36Okay.
00:30:40so let's see what today is it's Wednesday morning okay all right Tuesday night Wednesday morning
00:31:04what time is actually a Wednesday morning okay yeah no I'm unemployed so yeah all right I get a job some
00:31:17point okay so same remainder matrix
00:31:33now base 10
00:31:47uh-huh it's kind of light let me use another one
00:32:17again element times column J row 10 is equal to I row index column index matrix element okay so
00:32:37that part is the same like seven times one row 10 is seven okay yeah that part is the same now
00:32:59or no one number get some number times two row 10 is one such number does not exist
00:33:09why so some numbers times two has to be even number and even number row 10
00:33:17it cannot be odd number it has to be even number okay so
00:33:22okay two yeah six six times two twelve twelve row 10 two okay
00:33:37or it could be like 11 but 11 is more than 10 so yeah
00:33:52now some number times two row 10 is three yeah okay yeah all this r number nope does not exist
00:34:03four okay yeah two two times two
00:34:09and also yeah seven yeah seven times two okay
00:34:17six six yeah three yeah three also eight
00:34:28three plus five okay yeah five being uh the two times five ten right yeah okay
00:34:37eight four nine four nine okay
00:34:48uh three times
00:34:54four nine okay okay okay so that's that's that's that's that's that's that's that's that's that's that's that's that's that's that's that's that's that's that's that's that's that's that's that's that's that's that's that's that's that's that's that's that's that's that's that's that's that's that's that's that's that's that's that's that's that's that's that's that's that's that's that's that's that's that's that's that's that's that's that's that's that's that's that's that's that's that's that's that's that's that's that's that's that's that's that's that's that's that's that's that's that's that's that's that's that's that's that's that's that's that's that's that's that's that's that's that's that's that's that's that's that's that's that's that's that's that's that
00:35:24Sometimes there's just one, eight, cheers.
00:35:52So, because three and ten, they are co-primes, yeah, it behaves just like our remainder matrix
00:36:04for the prime numbers, okay?
00:36:06Yeah, okay.
00:36:08So, yeah, one number appears only once, right?
00:36:22Okay.
00:36:25Number four.
00:36:26Again, all the odd numbers cannot exist.
00:36:35Because even number times, like four, even number times odd number, that's even number.
00:36:41So, even number remains the ten, row ten, it cannot be an odd number, okay?
00:36:47So, we have three.
00:36:56Eight.
00:36:59Yeah.
00:37:01Eight.
00:37:05Yeah, like three plus five, okay, okay?
00:37:11Five being the other factor of ten, okay?
00:37:14So, okay.
00:37:15Good.
00:37:16So, there is some pattern there.
00:37:17Okay.
00:37:18Good.
00:37:18Okay.
00:37:19Good.
00:37:20Okay.
00:37:21Okay.
00:37:22Okay.
00:37:23Okay.
00:37:24Five being the other factor of ten, okay?
00:37:27So, okay.
00:37:28Good.
00:37:29So, there is some pattern there.
00:37:30Okay.
00:37:31Good.
00:37:32Okay.
00:37:33Good.
00:37:34Okay.
00:37:35Good.
00:37:36Okay.
00:37:37Good.
00:37:38Okay.
00:37:39Good.
00:37:40Good.
00:37:41Good.
00:37:42Good.
00:37:43Good.
00:37:44Good.
00:37:45Good.
00:37:47Good.
00:37:48Good.
00:37:49Good.
00:37:50Good.
00:37:51Good.
00:37:52Good.
00:37:53Good.
00:37:54Good.
00:37:55Good.
00:37:56Good.
00:37:57Good.
00:37:58Good.
00:37:59Good.
00:38:00Good.
00:38:01Good.
00:38:02Good.
00:38:03Good.
00:38:04Good.
00:38:05Good.
00:38:06Good.
00:38:07Good.
00:38:08Good.
00:38:09Good.
00:38:10Good.
00:38:11Good.
00:38:12Good.
00:38:13Good.
00:38:14Good.
00:38:15Good.
00:38:16Good.
00:38:17One, two, three, five, seven.
00:38:47For number five, the one, two, five times something, remainder ten is five, okay, so all the odd numbers, below ten, okay, so that's that, six, seven, eight, nine does not exist, okay.
00:39:15Okay, so we have that.
00:39:33Let's paste this one right.
00:39:45One, two, three, five, seven, nine, okay, all right, six.
00:39:54Again, all the odd number, nope.
00:39:59Nope, two, seven, four, nine, one, six, three, eight.
00:40:29Okay.
00:40:32Oh, cheers.
00:40:37Seven.
00:40:39One, two, three, four, five, seven, all right.
00:40:59Okay, two more, five, eight.
00:41:29Okay, now I need to.
00:41:59Okay, now let's make some observation.
00:42:29There should be one more here, I think, yeah, one and six.
00:42:36Okay.
00:42:43Okay.
00:42:45Okay.
00:42:52Okay.
00:42:59Okay.
00:43:06Okay.
00:43:08Okay.
00:43:09How interesting, huh?
00:43:15Okay.
00:43:16For all the even numbers, all the eight numbers appear.
00:43:22So five does not appear.
00:43:24Okay.
00:43:25So, okay.
00:43:26Basically, one, two, three, four, six, seven, eight, nine.
00:43:30They all appear for even numbers.
00:43:31Okay.
00:43:32And for five, all the odd numbers appear.
00:43:36Five of them.
00:43:37Okay.
00:43:38Good.
00:43:39Mm-hmm.
00:43:40For numbers, there's co-prime with 10.
00:43:49Yeah.
00:43:50All the numbers appear only once.
00:43:52Good.
00:43:53Good.
00:43:54Interesting.
00:43:55Yeah.
00:43:56So, what I'm hoping for is this.
00:44:02Okay.
00:44:03For this, like, known prime numbers, like composite numbers.
00:44:08Maybe there's a pattern, and then pattern of this matrix.
00:44:14And then, if you find a pattern, then we make, we can make formula.
00:44:21Okay.
00:44:22Yeah.
00:44:23Just like in those, the remainder matrix for prime numbers.
00:44:31We can call it, like, prime remainder matrix.
00:44:33Okay.
00:44:34Now, composite remainder matrix.
00:44:36Maybe there's also a formula for it.
00:44:38Okay.
00:44:39For elements.
00:44:40And if so, yeah, we want to, we can, uh, formularize that.
00:44:47Hopefully, it's a constant time.
00:44:49And then there will be, one of them would be the formulas for graded common defizer.
00:44:56Okay.
00:44:57So.
00:44:58Okay.
00:44:59Sure.
00:45:00It may be possible.
00:45:01It may be possible.
00:45:02It may not be possible.
00:45:03But, uh, if it is possible, we want to find it.
00:45:06Okay.
00:45:07So.
00:45:08There's some uncertainty here.
00:45:10Okay.
00:45:11Yeah.
00:45:12Cheers.
00:45:13We'll see.
00:45:14Okay.
00:45:15Okay.
00:45:16Yeah.
00:45:17Okay.
00:45:18Yeah.
00:45:19Okay.
00:45:20Yeah.
00:45:21Okay.
00:45:22Yeah.
00:45:23Let's take five minutes.
00:45:24Okay.
00:45:26Let me continue to cook my breakfast.
00:45:33Hmm.
00:45:34Huh.
00:45:35No.
00:45:36No.
00:45:37Yeah.
00:45:38Go.
00:45:39Yeah.
00:45:40Go.
00:45:41Okay.
00:45:42Okay.
00:45:43Okay.
00:45:44Okay.
00:45:45Okay.
00:45:46Okay.
00:45:47Okay.
00:45:48Okay.
00:45:49Okay.
00:45:50Okay.
00:45:51Okay.
00:45:52Okay.
00:45:53Okay.
00:45:54Okay.
00:45:55Okay.
00:45:56So, one more question.
00:45:57Okay.
00:45:58Okay.
00:45:59Great.
00:46:01Okay.
00:46:03Okay.
00:46:04So, one more question, CO equals, D,
00:46:05did youomb心, is that your way, if you come back in your mind.
00:46:09Okay.
00:46:09Again.
00:46:10Okay.
00:46:11Okay.
00:46:12Good, okay.
00:46:13Okay.
00:46:14Okay.
00:46:15Okay.
00:46:15Go and answer.
00:46:16Okay.
00:46:17Okay, mate.
00:46:18Wait, what is it?
00:46:19Okay.
00:46:20Okay.
00:46:21Next, let's me say one more question.
00:51:24Okay.
00:51:25Now let's look at some pattern here.
00:51:29Okay.
00:51:30Okay.
00:51:37Well, we have some pre-knowledge where 10 is small enough for numbers, so we know what factor, multiplicative factors 10 has is 2 and 5.
00:51:54Okay?
00:51:55Okay.
00:51:56Yeah.
00:51:57So, and for the numbers that are co-prime with 10, like 1, 3, 7 and 9, it does follow that pattern in the prime remainder table.
00:52:21Okay.
00:52:22Okay.
00:52:23Okay.
00:52:24Okay.
00:52:25Remember the table for the table.
00:52:28Okay.
00:52:29Okay.
00:52:30Okay.
00:52:31Okay.
00:52:32Okay.
00:52:33So, okay.
00:52:37Okay.
00:52:40Okay.
00:52:50So, okay.
00:53:02We have 2, 4, 5, 6, and 8.
00:53:08And let's look at how they behave, okay?
00:53:12We have 1 and 6, which is 1 plus 5.
00:53:18Okay, yeah, they are the core problem number 5, okay?
00:53:21And that's always the case, so 1 and 3, 2, 4.
00:53:32Uh-huh.
00:53:36Going down, 1, 2, 3, 4, 3, 1, 4, 2.
00:53:462, 4, 1, 3.
00:53:494, 3, 2, 1.
00:53:53Interesting pattern there.
00:54:01Uh-huh.
00:54:15Isn't it like this?
00:54:17So 1, 2, 3, 4.
00:54:21And then 1, skip 2.
00:54:31Skip 3, skip 4.
00:54:38Then 1.
00:54:48Skip 2, skip 3, skip 4.
00:54:53So it's the same pattern as prime remainder table there.
00:54:58Okay.
00:54:59Okay.
00:54:59Good, good.
00:55:03Okay.
00:55:04It's good to know.
00:55:06Same principle.
00:55:18For number 5, maybe like 1, skip, skip, skip, skip, skip, skip, skip, skip, skip, skip, skip,
00:55:27skip, skip, skip, skip, skip, okay?
00:55:29Maybe it's like that.
00:55:30Something like that.
00:55:31Okay.
00:55:32Okay.
00:55:33So 1, 2, 3, 4, 6, 7, 8, 9.
00:55:42Okay.
00:55:431, skip.
00:55:452, skip.
00:55:463, skip.
00:55:474, skip.
00:55:494, skip.
00:55:514, skip.
00:55:534, skip.
00:56:021, skip.
00:56:032, skip.
00:56:053, skip.
00:56:074, skip.
00:56:084, skip.
00:56:09Skip, then let's say five, five, skip, six, skip, seven, skip, eight, skip, nine, something
00:56:30like that.
00:56:31Okay.
00:56:32So, okay.
00:56:39One, skip, skip, two, skip, skip, three, skip, skip, four, skip, skip, five, skip, skip,
00:57:01six, skip, skip, seven, skip, skip, eight, one, skip, skip, skip, two, skip, skip, skip,
00:57:17skip, skip, skip, skip, skip, skip, skip, skip, skip, skip, skip, skip, skip, skip, skip, skip,
00:57:24skip, skip, skip, skip, skip, skip, skip, skip, skip, skip, skip, skip, skip, skip, skip, skip,
00:57:335, skip, skip, skip, skip, 6, skip, skip, skip, 7, skip, skip, skip, skip, 8, skip, skip, skip, skip, 9.
00:57:46Okay, okay.
00:57:47So, he's following the same pair of kinder, okay?
00:57:49Yeah, cheers.
00:57:50Okay, okay.
00:57:51Okay.
00:57:55Ah.
00:57:57Mm-hmm.
00:58:00Mm-hmm.
00:58:03Hu-yah.
00:58:33So, it looks like it's not going to be an easy problem, okay?
00:58:36Because we have a different situation here.
00:58:39And, but let's explore, continue to explore, okay?
00:58:50Because if we find the formula, it's something really big, okay?
00:58:55So, and if there is constant time formula for created common divisor, if there is one, I
00:59:14don't think it will take cost too long to find it, okay?
00:59:19If there is one, okay?
00:59:23If there is none, then at least we can understand why there is none, okay?
00:59:32Why it's not possible, are we sure?
00:59:38Now, time check.
00:59:44It's been one hour, okay.
00:59:53All right.
00:59:53Uh-huh.
01:00:09Uh-huh.
01:00:09Uh-huh.
01:00:09Uh-huh.
01:00:10Uh-huh.
01:00:23Uh-huh.
01:00:53Let's take five minutes for it, okay?
01:00:55Yeah.
01:00:56Okay.
01:00:58Okay.
01:01:00We ventilate the room.
01:01:06We go.
01:01:07We go.
01:01:07We go.
01:01:07We go.
01:01:07We go.
01:01:07We go.
01:01:07We go.
01:01:07We go.
01:01:08We go.
01:01:08We go.
01:01:20We go.
01:03:53Let's see how we can approach this.
01:03:58Let's design the approach methodology, okay?
01:04:01So if we have the best coefficient formula, that means for composite numbers, okay?
01:04:14Let's say ax plus by is equal to gamma, okay?
01:04:26Great is common divisor.
01:04:28Okay, so, and then let's say we call it a prime, b prime, okay?
01:04:38So, and let's say ax plus by is equal to 1, okay?
01:04:50And so we multiply by gamma on both sides, and then a prime is equal to a gamma.
01:05:05Gamma is great common divisor, okay?
01:05:07And b prime is equal to b gamma.
01:05:11So a is equal to a prime over gamma.
01:05:18And b is equal to b is equal to b prime over gamma, okay?
01:05:24Okay.
01:05:25And also I found a very interesting rho algebra formula where a rho b times m is equal to ma rho mb.
01:05:53So this multiplication is actually distributive, okay?
01:05:58So proof of this, yeah, we'll do that later, okay?
01:06:02So, yeah.
01:06:04Yeah.
01:06:08This is very interesting.
01:06:12Yeah.
01:06:13It could be useful at some point, okay?
01:06:14Yeah.
01:06:15Yeah.
01:06:16Yeah.
01:06:17Yeah.
01:06:18Basically, we can plug in this to our existing base coefficient formula for this.
01:06:39But our base coefficient formula works when this is not just one, it could be two, it could
01:06:49be whatever, okay?
01:06:50So let's take a break from mathematics, okay?
01:07:05Because past several weeks, we worked on mathematics so much, right?
01:07:11Yeah.
01:07:12Yeah.
01:07:13It makes sense to take a break from it, okay?
01:07:14So let's talk about something else, okay?
01:07:17So, yeah, I'm getting unemployment benefit and it really helps.
01:07:23And they require me to have re-employment training, okay?
01:07:30Yeah.
01:07:31So I need to compile this job search log.
01:07:36Basically, basically, employer name, their contact information, and then what date I applied.
01:07:46Yeah.
01:07:47The list of those, list of job applications for past three weeks, okay?
01:07:53Yeah.
01:07:54Yeah.
01:07:55I'm going to have an appointment.
01:07:56I'll make an appointment with them later today and meet the employment professionals who
01:08:06help re-employment this Friday morning, okay?
01:08:10So, yeah.
01:08:11I can do that, yeah.
01:08:12Sure.
01:08:13Okay.
01:08:14Yeah.
01:08:15Yeah.
01:08:16That's nice.
01:08:17Oh, yeah.
01:08:18And, yeah, my breakfast is about ready, so I'm going to continue to watch Project A.
01:08:37There's, like, Jackie Chan, Yuan Pao, Samo Hong.
01:08:41Yeah.
01:08:42Old-school, like, Golden Harvest Productions, like, Hong Kong Chinese major movie, okay?
01:08:47So, yeah.
01:08:48I'm going to enjoy that, okay?
01:08:50So.
01:08:51Okay.
01:08:52I'll see you later today, okay?
01:08:53Yeah.
01:08:55Yeah.
01:08:56Have a wonderful day.