 Let's take a look at another Pollack-Hellman example. And so I want to solve the discrete logarithm problem, 7 to the power x, congruent to 26 mod 41. And again, 41 happens to be prime, so I can factor it as 8 times 5. And I'm going to start off by letting x be a0 plus a multiple of 8. And so this 7 to x, 7 to a0 plus a multiple of 8. If I raise it to the fifth power, both sides, then I'll get my multiple of 40, a phi of n, here, and then whatever's left over. So going through the algebra there, that's 7 to this. And applying the rules of algebra, simplify, simplify, simplify. I know what 7 to the fifth is. I know what 26 to the fifth is. And again, this to the 40th, congruent to 1. So that term drops out. And my problem simplifies to this. And I try out different values of a0 from 1 up to as much as 7 to see what works. And again, we can see that 0 doesn't work, 1 doesn't work. So I'll start by trying out different values, and it turns out that 7 does finally work. And so x is congruent to 7 mod 8, and it'll take an end to that. Likewise, I'm going to let x be b0 plus 5 times something. And so again, with that substitution, the factor that I'm missing to get phi of n is going to be 8. So if I raise both sides to the 8th, I'm going to get 40 b1, phi n times something, and then whatever's left over. So rules of exponents still apply, and so that gives me 7 to 8 b0, 26 to the 8th. And again, I can rewrite this and that. And again, I can try out different possible values of b0 from 0 up to 4. And again, I can see 0 doesn't work, 1 doesn't work. So I might as well start with 2. And by trial and error, I find that x is congruent to 3 mod 5, and I can now solve this Chinese remainder problem. And one solution is 233, but I'll reduce that by 8 times 5. I'll reduce that by 40s to get 23 as my solution to the problem. Now, one way that is worth noting is I can actually change the approach in the following manner. 8 is 2 to the power 3. And so what I can do is I can think about x being this sum, a0 plus 2a1 plus 2 squared a2 plus 2 cubed a3. And what this does is whereas I used to have x being something plus a multiple of 8, well, I've broken up that something into individual powers of 2. And the reason that that's useful is if we think about this v of n equal to 40 as being missing some factors in our expansion, what we can do is we can supply those missing factors one at a time and simplify our problem. As with everything in life, simplification does come at a price. In this particular case, we get an easier problem to solve, but there are more problems that we do need to solve. So let's go and work our way through that. So 7 to that mess going to be congruent to 26. And so now my missing factor, 40 is the target. And notice if I raise everything to the 20th power, that's going to get me a 40. That's going to get me a 40 times 2 and that's going to get me a 40 times 4. So all these extra pieces are going to fall out of our congruence if I raise everything to the 20th power. Now I'll go ahead and distribute that 20 into all of the separate pieces there. And again, rules of exponent allow me to rewrite that expression. So that's 7 to the 20th to the a0, 7 to the a1 to the 40th, 7 to the 2a2 to the 40th, 7 to the 4a3 to the 40th. And each one of these, because it's being raised to v of n, each one of these factors is going to be 1 and those are all going to go away. Likewise, this 7 to the 20th, well that's just a number. I can figure out what that is. And this 26 to the 20th, that's just a number. So I can figure out what those are. So dropping the extra terms and evaluating those powers, I get 40 to something congruent to 40 and I have to sit down and think about what that value is going to be. How about 1? So that tells me that a0 is 1. Now if you want to read it this way, this tells me that x is congruent to 1 mod 2. But I don't want to go quite there yet because I want to have a Chinese remainder problem, but I don't want to have a horribly complicated one. I'll just use the fact that I know that a0 is 1. And that tells me that x is 1 plus 2a1 plus 2 squared a2 plus 2 cubed a3. So I then have the following expression. Again, still 7 to power x, but this time I know what a0 is. And now I want to find the second term a1 here. So again, I'm missing 10. If I raise everything to the 10th power, this gets me a 40 and this gets me a 2 times 40. So I'll raise everything to the 10th power. And if I distribute that 10 inwards, notice I'm going to have 7 to the 10th, 7 to the 20a1, 70 to the 40a2, which is going to be 1, 7 to the 80a3, that's going to be 1 as well. So the only thing I'll have left, 7 to power 10, 7 to power 20a1. And again, I know what 7 to the 10th is, or I can find it. I can find this and I can find that. And so that gives me the much simplified congruence there. And once again, we have a problem that we can solve by trial and error. So I'll try out different values of a1. And it turns out that 9 times 40 raised to power 1 is already congruent to 32. So I know that a1 is 1. And so that tells me that x is a01 plus 2a1. That's 2. It's going to be 3 plus a mess of stuff. So I know a0 and a1 and I can continue. Once again, 7 to power x. I want this term here, this 4a2. If I raise everything to power 5, this last term is going to drop out. So I'll raise everything to power 5. And again, I'll distribute that 5 inwards. So that's going to be 3 times 5. There's going to be a 7 to the 15th. 7 to the 5 times 4, 20a2. And 7 to the 40a3 with 7 to the 40a3 dropping out. And so that simplifies my expression. And again, I know what 7 to the 15th is. Or I can find it, I know what 26 to the 5th is. I know what 7 to the 20th is. So my congruence can be simplified to something much easier. And again, by trial and error, I'm going to find that 1 is the exponent that works. So I know that a2 is congruent to 1. And if I put that all together, that tells me x is equal to 7 plus 8 times something. Which gives us the same congruence we had, x congruent to 7 mod 8. And 5 can't be expressed as a product of smaller numbers. So I'm just going to end up with the same two congruences I had before. And unsurprisingly, I'm going to end up with exactly the same solution.