Mathematics In CP
文章平均质量分 93
notes for number theory concepts in competitive programming
Layomiiety°
这个作者很懒,什么都没留下…
展开
-
Combinatorial Game Theory - More examples
Combinatorial Game Theory - More examplesCatalogCombinatorial Game Theory - More examplesExample 1Problem StatementProblem AnalysisCode ImplementationExample 2Problem StatementProblem AnalysisCode ImplementationExample 3Problem StatementProblem AnalysisCo原创 2021-07-27 19:55:42 · 252 阅读 · 0 评论 -
Combinatorial Game Theory
Combinatorical Game TheoryCatalogCombinatorical Game TheoryIntroductionNim's GameSprague-Grundy TheoremCorollaryLemma about Nim with increasesApplication of the theoremPatterns in Grundy valuesIntroductionfrom wikipediaCombinatorial game theory (CGT)原创 2021-06-23 11:17:40 · 242 阅读 · 0 评论 -
Pólya Enumeration Theorem(II)
Pólya Enumeration Theorem(II)Link to Part ICatalogPólya Enumeration Theorem(II)Orbit and stablizerOrbit-Stablizer TheoremBurnside's LemmaPólya Enumeration TheoremImplementationOrbit and stablizerLet us go back to our necklace with 6 beads. We can now a原创 2021-06-04 00:32:55 · 115 阅读 · 0 评论 -
Pólya Enumeration Theorem(I)
Pólya Enumeration TheoremCatalogPólya Enumeration TheoremIntroductionPreliminary knowledgePermutation GroupFixed PointsLagrange's Theorem in Group TheoryIntroductionIn high school combinatorics, we often encounter problems that require us to count the d原创 2021-05-29 10:40:21 · 173 阅读 · 0 评论 -
Baby-step Giant-step and its extension
from wikipediaIn group theory, a branch of mathematics, the baby-step giant-step is a meet-in-the-middle algorithm for computing the discrete logarithm or order of an element in a finite abelian group due to Daniel Shanks. The discrete log problem is of原创 2021-05-19 09:53:58 · 179 阅读 · 2 评论 -
Primitive Root(Part II)
from wikipedia:In modular arithmetic, a number g is a primitive root modulo n if every number a coprime to n is congruent to a power of g modulo n. That is, g is a primitive root modulo n, if for every integer a coprime to n, there is some integer k for原创 2021-05-08 23:37:16 · 296 阅读 · 0 评论 -
Primitive Root(Part I)
from wikipedia:In modular arithmetic, a number g is a primitive root modulo n if every number a coprime to n is congruent to a power of g modulo n. That is, g is a primitive root modulo n, if for every integer a coprime to n, there is some integer k for原创 2021-04-26 20:01:41 · 236 阅读 · 0 评论 -
Max Flow-Min Cut Theorem
Max Flow-Min Cut Theoremfrom wikipediaIn computer science and optimization theory, the max-flow min-cut theorem states that in a flow network, the maximum amount of flow passing from the source to the sink is equal to the total weight of the edges in a原创 2021-04-17 00:33:55 · 245 阅读 · 0 评论 -
Fast Fourier Transform
Fast Fourier TransformThis is a classic problem in CS – to multiple two degree-n polynomials. The brute force way is obvious, but would cost us O(n2) time. Using the idea of FFT would enable us to do this in O(nlogn) time.In this blog entry, I will be fo原创 2021-04-11 23:08:50 · 137 阅读 · 0 评论 -
Möbius Inversion
Mobius InversionThis is an especially important method when dealing with functions that are difficult to sum, often it reduces the time complexity of the algorithm used from at least quadratic to linear(and even faster).In this blog entry, I will be focu原创 2021-03-31 23:23:52 · 185 阅读 · 1 评论