- 1、本文档共32页,可阅读全部内容。
- 2、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
- 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
数论、组合数学、具体数学
2888 一条项链,n个珠子,m种颜色,给定k对颜色不能相邻,循环同构,求方案数? * 数论、组合数学、具体数学 李 寅 Euclidean algorithm Gcd( a , b ) = gcd( b*(a/b)+(a%b) , b ) = gcd( b , a%b ) = … Extended Euclidean algorithm The iterative method The recursive method The iterative method Recursive method Miller Rabbin BASIS: a^p mod p = a That is , a^(p-1) mod p = 1 TOOLS: power_product Cycle detection Rho How to calculate : HASH? Floyds cycle-finding algorithm The key insight in the algorithm is that, whenever i 0 is a multiple of λ that is greater than μ, xi = x2i (and conversely). Thus, we need only check for repeated values of this special form to find a period ν of a repetition that is a multiple of λ. Once ν is found, we may retrace the sequence from its start to find the first repetition of length ν; since λ divides ν, xν + μ = xμ, the start of the first repetition. Finally, from xμ it is trivial to find the length of the shortest repeating cycle, xμ + λ = xμ. Brents algorithm X1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13 x14 Pollard Rho – factorize bigint The rho algorithm is based on Floyds cycle-finding algorithm and on the observation that (as in the birthday paradox) two numbers x and y are congruent modulo p with probability 0.5 after numbers have been randomly chosen. If p is a factor of n, the integer we are aiming to factor, then since p divides both and n. Note that this algorithm will return failure for all prime n, but it can also fail for composite n. In that case, use a different f(x) and try again Practice POJ 1811 modular_linear_equation ax mod n = b ax = ny + b ax – ny =b d = gcd(a, n) If( b % d !=0 ) :: no solution else solve ax0 – ny0 = d X = (x0 * b/d + n) % n Euler Function (1) (2) (3) (4) (5) pku2480 Solution: Euler递推式 若(N%a==0 (N/a)%a==0) 则有: 若(N%a==0 (N/a)%a!=0) 则有: The Farey Sequence Fn for any integer n with n = 2 is the set of irreducible rational numbers a/b with 0 a b = n and gcd(a,b) = 1 arrang
您可能关注的文档
- 数学课件:三角函数的图象变换和性质复习课.ppt
- 数学课堂观察与访谈.ppt
- 数学课件 第九章 解析几何 专题四 直线与圆锥曲线.ppt
- 数学课教育行业模板.ppt
- 数学软件 Matlab矩阵运算.ppt
- 数学软件Maple概述.ppt
- 数学青岛版七年级下115一次函数的图像与性质课件P.ppt
- 数学:22《变量与赋值》课件.ppt
- 数学选修251.ppt
- 数学领域课程教学-以扑克牌为媒介的智趣数学活动.ppt
- 中国行业标准 GM/T 0126-2023HTML密码应用置标语法.pdf
- 《JJF 2121-2024恒转速源校准规范》.pdf
- 餐饮服务中20条处理要点.docx
- 《GM/T 0011-2023可信计算 可信密码支撑平台功能与接口规范》.pdf
- 《JJF 2134-2024旋转流变仪校准规范》.pdf
- JJF 2121-2024恒转速源校准规范.pdf
- 计量规程规范 JJF 2121-2024恒转速源校准规范.pdf
- 《JJF 2118-2024压力式六氟化硫气体密度控制器校验仪校准规范》.pdf
- JJF 2134-2024旋转流变仪校准规范.pdf
- 计量规程规范 JJF 2134-2024旋转流变仪校准规范.pdf
文档评论(0)