计算机代写|算法分析作业代写Introduction to Algorithms代考|COSC240

相信许多留学生对数学代考都不陌生,国外许多大学都引进了网课的学习模式。网课学业有利有弊,学生不需要到固定的教室学习,只需要登录相应的网站研讨线上课程即可。但也正是其便利性,线上课程的数量往往比正常课程多得多。留学生课业深重,时刻名贵,既要学习知识,又要结束多种类型的课堂作业,physics作业代写,物理代写,论文写作等;网课考试很大程度增加了他们的负担。所以,您要是有这方面的困扰,不要犹疑,订购myassignments-help代考渠道的数学代考服务,价格合理,给你前所未有的学习体会。

我们的数学代考服务适用于那些对课程结束没有掌握,或许没有满足的时刻结束网课的同学。高度匹配专业科目,按需结束您的网课考试、数学代写需求。担保买卖支持,100%退款保证,免费赠送Turnitin检测报告。myassignments-help的Math作业代写服务,是你留学路上忠实可靠的小帮手!


计算机代写|算法分析作业代写Introduction to Algorithms代考|Hash functions for hierarchical memory models

This section illustrates an approach for designing efficient hash tables in a modern computer system having a memory hierarchy.

Because of the memory hierarchy, linear probing is a good choice for resolving collisions, as probe sequences are sequential and tend to stay within cache blocks. But linear probing is most efficient when the hash function is complex (for example, 5 -independent as in Theorem 11.9). Fortunately, having a memory hierarchy means that complex hash functions can be implemented efficiently.

As noted in Section 11.3.5, one approach is to use a cryptographic hash function such as SHA-256. Such functions are complex and sufficiently random for hash table applications. On machines with specialized instructions, cryptographic functions can be quite efficient.
Instead, we present here a simple hash function based only on addition, multiplication, and swapping the halves of a word. This function can be implemented entirely within the fast registers, and on a machine with a memory hierarchy, its latency is small compared with the time taken to access a random slot of the hash table. It is related to the RC6 encryption algorithm and can for practical purposes be considered a “random oracle.”

Let $w$ denote the word size of the machine (e.g., $w=64$ ), assumed to be even, and let $a$ and $b$ be $w$-bit unsigned (nonnegative) integers such that $a$ is odd. Let $\operatorname{swap}(x)$ denote the $w$-bit result of swapping the two $w / 2$-bit halves of $w$-bit input $x$. That is,
$\operatorname{swap}(x)=(x \gg(w / 2))+(x \lll(w / 2))$ “left shift.” Define
$f_a(k)=\operatorname{swap}\left(\left(2 k^2+a k\right) \bmod 2^w\right)$
Thus, to compute $f_a(k)$, evaluate the quadratic function $2 k^2+a k$ modulo $2^w$ and then swap the left and right halves of the result.

Let $r$ denote a desired number of “rounds” for the computation of the hash function. We’ll use $r=4$, but the hash function is well defined for any nonnegative $r$. Denote by $f_a^{(r)}(k)$ the result of iterating $f_a$ a total of $r$ times (that is, $r$ rounds) starting with input value $k$. For any odd $a$ and any $r \geq 0$, the function $f_a^{(r)}$, although complicated, is one-to-one (see Exercise 11.5-1). A cryptographer would view $f_a^{(r)}$ as a simple block cipher operating on $w$-bit input blocks, with $r$ rounds and key $a$.

计算机代写|算法分析作业代写Introduction to Algorithms代考|The wee hash function for variable-length inputs

Sometimes inputs are long-more than one $w$-bit word in length-or have variable length, as discussed in Section 11.3.5. We can extend the wee hash function, defined above for inputs that are at most single $w$-bit word in length, to handle long or variable-length inputs. Here is one method for doing so.

Suppose that an input $k$ has length $t$ (measured in bits). Break $k$ into a sequence $\left\langle k_1, k_2, \ldots, k_u\right\rangle$ of $w$-bit words, where $u=\lceil t / w\rceil, k_1$ contains the least-significant $w$ bits of $k$, and $k_u$ contains the most significant bits. If $t$ is not a multiple of $w$, then $k_u$ contains fewer than $w$ bits, in which case, pad out the unused high-order bits of $k_u$ with 0-bits. Define the function chop to return a sequence of the $w$-bit words in $k$ :
$\operatorname{chop}(k)=\left\langle k_1, k_2, \ldots, k_u\right\rangle$
The most important property of the chop operation is that it is one-toone, given $t$ : for any two $t$-bit keys $k$ and $k^{\prime}$, if $k \neq k^{\prime}$ then $\operatorname{chop}(k) \neq$ $\operatorname{chop}\left(k^{\prime}\right)$, and $k$ can be derived from $\operatorname{chop}(k)$ and $t$. The chop operation also has the useful property that a single-word input key yields a singleword output sequence: $\operatorname{chop}(k)=\langle k\rangle$.

With the chop function in hand, we specify the wee hash function $h_{a, b, t, r}(k)$ for an input $k$ of length $t$ bits as follows:
$h_{a, b, t, r}(k)=\operatorname{WEE}(k, a, b, t, r, m)$,
where the procedure WEE defined on the facing page iterates through the elements of the $w$-bit words returned by chop $(k)$, applying $f_a^r$ to the sum of the current word $k_i$ and the previously computed hash value so far, finally returning the result obtained modulo $m$. This definition for variable-length and long (multiple-word) inputs is a consistent extension of the definition in equation (11.7) for short (single-word) inputs. For practical use, we recommend that $a$ be a randomly chosen odd $w$-bit word, $b$ be a randomly chosen $w$-bit word, and that $r=4$.

Note that the wee hash function is really a hash function family, with individual hash functions determined by parameters $a, b, t, r$, and $m$. The (approximate) 5 -independence of the wee hash function family for variable-length inputs can be argued based on the assumption that the 1-word wee hash function is a random oracle and on the security of the cipher-block-chaining message authentication code (CBC-MAC), as studied by Bellare et al. [42]. The case here is actually simpler than that studied in the literature, since if two messages have different lengths $t$ and $t$ ‘, then their “keys” are different: $a+2 t \neq a+2 t{ }^{\prime}$. We omit the details.

计算机代写|算法分析作业代写Introduction to Algorithms代考|COSC240

算法分析代考

计算机代写|算法分析作业代写Introduction to Algorithms代考|Hash functions for hierarchical memory models

本节说明了一种在具有内存层次结构的现代计算机系统中设计高效哈苃表的方法。
由于内存层次结构,线性探测是解决冲突的不错选择,因为探测序列是连续的并且倾向于保留在缓存块 中。但是当散列函数很复杂时(例如,定理 $11.9$ 中的 5 -独立),线性探测是最有效的。幸运的是,拥 有内存层次结构意味着可以高效地实现复杂的哈㳍函数。
如第 11.3.5 节所述,一种方法是使用加密哈布函数,例如 SHA-256。这样的函数对于哈㹷表应用来说是 复杂且足够随机的。在具有专门指令的机器上,加密功能可能非常有效。
相反,我们在这里提供了一个简单的哈布函数,该函数仅基于加法、乘法和交换单词的两半。此功能可 以完全在快速寄存器内实现,并且在具有内存层次结构的机器上,与访问哈抪表的随机槽所花费的时间 相比,它的延迟很小。它与 RC6 加密算法有关,出于实用目的,可以将其视为“随机预言机”。
让 $w$ 表示机器的字长 (例如, $w=64$ ),假定为偶数,令 $a$ 和 $b$ 是 $w$ – 位无符号(非负) 整数,使得 $a$ 很奇 怪。让swap $(x)$ 表示 $w$ – 交换两者的位结果 $w / 2$-位的一半 $w$ 位输入 $x$. 那是, $\operatorname{swap}(x)=(x \gg(w / 2))+(x \lll(w / 2))^{\prime \prime}$ 左移。”定义 $f_a(k)=\operatorname{swap}\left(\left(2 k^2+a k\right) \bmod 2^w\right)$
因此,要计算 $f_a(k)$ ,计算二次函数 $2 k^2+a k$ 模块 $2^w$ 然后交换结果的左右两半。
让 $r$ 表示计算散列函数所需的“轮数”。我们将使用 $r=4$ ,但是散列函数对于任何非负数都有很好的定义 $r$ . 表示为 $f_a^{(r)}(k)$ 迭代的结果 $f_a$ 总共 $r$ 次 (即 $r$ rounds) 从输入值开始 $k$. 对于任何奇数 $a$ 和任何 $r \geq 0$ ,功能 $f_a^{(r)}$ ,虽然复杂,却是一对一的(见习题 11.5-1) 。密码学家会查看 $f_a^{(\tau)}$ 作为一个简单的块密码操作 $w$ 位 输入块,与 $r$ 回合和关键 $a$.

计算机代写|算法分析作业代写Introduction to Algorithms代考|The wee hash function for variable-length inputs

有时输入很长 – 不止一个 $w$-长度为位字或具有可变长度,如第 $11.3 .5$ 节所述。我们可以扩展上面为最多 单个输入定义的 wee hash 函数 $w$ 位字长度,用于处理长或可变长度输入。这是这样做的一种方法。
假设一个输入 $k$ 有长度 $t$ (以位为单位)。休息 $k$ 进入一个序列 $\left\langle k_1, k_2, \ldots, k_u\right\rangle$ 的 $w$ – 位词,其中 于 $w$ 位,在这种情况下,填充末使用的高阶位 $k_u$ 有 0 位。定义函数 chop 返回一个序列 $w$ 中的位字 $k:$ $\operatorname{chop}(k)=\left\langle k_1, k_2, \ldots, k_u\right\rangle$
chop 操作最重要的特性是它是一对一的,给定 $t$ : 对于任意两个 $t$ 位密钥 $k$ 和 $k^{\prime}$ ,如果 $k \neq k^{\prime}$ 然后 $\operatorname{chop}(k) \neq \operatorname{chop}\left(k^{\prime}\right)$ , 和 $k$ 可以从 $\operatorname{chop}(k)$ 和t. chop 操作还有一个有用的属性,即单字输入键产生单 字输出序列: $\operatorname{chop}(k)=\langle k\rangle$.
有了 chop 函数,我们指定 wee hash 函数 $h_{a, b, t, r}(k)$ 对于输入 $k$ 长度 $t$ 位如下: $h_{a, b, t, r}(k)=\mathrm{WEE}(k, a, b, t, r, m)$ ,
其中对开页面上定义的过程 WEE 遍历了 $w$ 由 chop 返回的位字 $(k)$, 申请 $f_a^r$ 到当前单词的总和 $k_i$ 和之前计 算的哈布值到目前为止,最后返回取模得到的结果 $m$. 可变长度和长 (多字) 输入的定义是等式 (11.7) 中短 (单字) 输入定义的一致扩展。对于实际使用,我们建议 $a$ 是一个随机选择的奇数 $w$-位字, $b$ 是一个 随机选择 $w$-位字,那 $r=4$.
请注意, wee 哈苃函数实际上是一个哈苃函数族,各个哈苃函数由参数决定 $a, b, t, r$ ,和 $m$. 可以基于 1 字 wee 哈布函数是随机 oracle 的假设以及密码块链接消息身份验证的安全性来争论可变长度输入的 wee 哈㹷函数族的 (近似) 5 独立性代码 (CBC-MAC),正如 Bellare 等人研究的那样。[42]。这里的情况实际 上比文献中研究的要简单,因为如果两条消息的长度不同 $t$ 和 $t^{\prime}$ ,那么它们的 “键”是不同的: $a+2 t \neq a+2 t^{\prime}$. 我们省略细节。

统计代写|运筹学作业代写operational research代考|

myassignments-help数学代考价格说明

1、客户需提供物理代考的网址,相关账户,以及课程名称,Textbook等相关资料~客服会根据作业数量和持续时间给您定价~使收费透明,让您清楚的知道您的钱花在什么地方。

2、数学代写一般每篇报价约为600—1000rmb,费用根据持续时间、周作业量、成绩要求有所浮动(持续时间越长约便宜、周作业量越多约贵、成绩要求越高越贵),报价后价格觉得合适,可以先付一周的款,我们帮你试做,满意后再继续,遇到Fail全额退款。

3、myassignments-help公司所有MATH作业代写服务支持付半款,全款,周付款,周付款一方面方便大家查阅自己的分数,一方面也方便大家资金周转,注意:每周固定周一时先预付下周的定金,不付定金不予继续做。物理代写一次性付清打9.5折。

Math作业代写、数学代写常见问题

留学生代写覆盖学科?

代写学科覆盖Math数学,经济代写,金融,计算机,生物信息,统计Statistics,Financial Engineering,Mathematical Finance,Quantitative Finance,Management Information Systems,Business Analytics,Data Science等。代写编程语言包括Python代写、Physics作业代写、物理代写、R语言代写、R代写、Matlab代写、C++代做、Java代做等。

数学作业代写会暴露客户的私密信息吗?

我们myassignments-help为了客户的信息泄露,采用的软件都是专业的防追踪的软件,保证安全隐私,绝对保密。您在我们平台订购的任何网课服务以及相关收费标准,都是公开透明,不存在任何针对性收费及差异化服务,我们随时欢迎选购的留学生朋友监督我们的服务,提出Math作业代写、数学代写修改建议。我们保障每一位客户的隐私安全。

留学生代写提供什么服务?

我们提供英语国家如美国、加拿大、英国、澳洲、新西兰、新加坡等华人留学生论文作业代写、物理代写、essay润色精修、课业辅导及网课代修代写、Quiz,Exam协助、期刊论文发表等学术服务,myassignments-help拥有的专业Math作业代写写手皆是精英学识修为精湛;实战经验丰富的学哥学姐!为你解决一切学术烦恼!

物理代考靠谱吗?

靠谱的数学代考听起来简单,但实际上不好甄别。我们能做到的靠谱,是把客户的网课当成自己的网课;把客户的作业当成自己的作业;并将这样的理念传达到全职写手和freelancer的日常培养中,坚决辞退糊弄、不守时、抄袭的写手!这就是我们要做的靠谱!

数学代考下单流程

提早与客服交流,处理你心中的顾虑。操作下单,上传你的数学代考/论文代写要求。专家结束论文,准时交给,在此过程中可与专家随时交流。后续互动批改

付款操作:我们数学代考服务正常多种支付方法,包含paypal,visa,mastercard,支付宝,union pay。下单后与专家直接互动。

售后服务:论文结束后保证完美经过turnitin查看,在线客服全天候在线为您服务。如果你觉得有需求批改的当地能够免费批改,直至您对论文满意为止。如果上交给教师后有需求批改的当地,只需求告诉您的批改要求或教师的comments,专家会据此批改。

保密服务:不需求提供真实的数学代考名字和电话号码,请提供其他牢靠的联系方法。我们有自己的工作准则,不会泄露您的个人信息。

myassignments-help擅长领域包含但不是全部:

myassignments-help服务请添加我们官网的客服或者微信/QQ,我们的服务覆盖:Assignment代写、Business商科代写、CS代考、Economics经济学代写、Essay代写、Finance金融代写、Math数学代写、report代写、R语言代考、Statistics统计学代写、物理代考、作业代写、加拿大代考、加拿大统计代写、北美代写、北美作业代写、北美统计代考、商科Essay代写、商科代考、数学代考、数学代写、数学作业代写、physics作业代写、物理代写、数据分析代写、新西兰代写、澳洲Essay代写、澳洲代写、澳洲作业代写、澳洲统计代写、澳洲金融代写、留学生课业指导、经济代写、统计代写、统计作业代写、美国Essay代写、美国代考、美国数学代写、美国统计代写、英国Essay代写、英国代考、英国作业代写、英国数学代写、英国统计代写、英国金融代写、论文代写、金融代考、金融作业代写。

发表评论

您的电子邮箱地址不会被公开。 必填项已用*标注

Scroll to Top