k790alex's blog

By k790alex, 12 years ago, In English

Hi, I read this Topic and I was thinking about its applications in contest but I couldn't get any.

I only know that this algorithm is useful for cryptography but I worder how it could be used in contests.

If you could provide me an example I would be grateful and a problem would be useful too.

Thanks in advance.

UPDATE: thanks to all, i continue reading and I found this link, it is another application.

  • Vote: I like it
  • +9
  • Vote: I do not like it

»
12 years ago, hide # |
 
Vote: I like it +1 Vote: I do not like it

For example that or that. Both of them are quite common sub-tasks.

»
12 years ago, hide # |
Rev. 2  
Vote: I like it +9 Vote: I do not like it
»
12 years ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

Try to solve Chinese remainder problem using extended Euclidean algorithm.

»
12 years ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

Extend-gcd will give you one solution to the equation ax+by=gcd(x,y). That is a very basic thing when you are trying to deal with linear modular equations and something related to that.

Chinese Remainder Theorem is also a useful tool in solving modular problems as NotImplemented mentioned. You can combine extend-gcd algorithm with CRT to get the result.