Hyperbolic discounting: Difference between revisions

From formulasearchengine
Jump to navigation Jump to search
No edit summary
en>John of Reading
m Typo/general fixing, replaced: vice-versa → vice versa using AWB
 
Line 1: Line 1:
In arithmetic computation, '''Montgomery reduction''' is an [[algorithm]] introduced in 1985 by [[Peter Montgomery (mathematician)|Peter Montgomery]]
== Ray Ban Sunglasses  The Music ==
<ref>[[Peter Montgomery (mathematician)|Peter Montgomery]].
[[:doi:10.1090/S0025-5718-1985-0777282-X|Modular Multiplication Without Trial Division]],
''[[Math. Computation]]'', vol. 44, pp.&nbsp;519–521, 1985.
</ref>
<ref>
Martin Kochanski, [http://www.nugae.com/encryption/fap4/montgomery.htm Montgomery Multiplication] A colloquial explanation.
</ref>
that allows [[modular arithmetic]] to be performed efficiently when the modulus is large (typically several hundred bits).


A single application of the Montgomery algorithm (henceforth referred to as a "Montgomery step") is faster than a "naive" modular multiplication:
Most of this issue depicts a tense poker game between our hero and also the three sons of Trigon. This really is territory that would normally be better suited for a guy like John Constantine. As well as if you don't use sun protection (bad girl!), it's tough to catch the right rays. The daylight you're most likely to get on a daily basisin the early morning and late afternoonis too weak to generate enough D. <br><br>Again, the internet can be your best friend or worst enemy about this matter. Looking for tools can be time consuming in that you have to find the best ones for you, the ones that are legitimate and those with the good reputations. ABM Resources NL (ASX:ABU) Chairman's Address to Shareholders ABN Newswire  Sat, Nov 23, 2013 8:18 PM AEDTThis gave the organization the confidence to push ahead with permitting and planning mining and gravity processing of a 10,000 tonne bulk sample, as allowed under Northern Territory exploration licence conditions.  In February, the organization announced a resource estimation upgrade for the Old Pirate Project and resource update focussing on the higher grade portions of the Buccaneer project. <br><br>There no inexpensive revoaml which safe. You would have to get a bigger, darker tattoo to do that. Apps opened quickly, multitasking was fast and efficient and swiping through your home screen live tiles is smooth and slick. Inside a direct comparison with an apple iphone 5, the Lumia [http://www.chalmerswine.com.au/ChalmersWines/media/ImagesMain/form.asp Ray Ban Sunglasses] 920 launched the camera app from standby quicker than Apple's flagship. <br><br>The episode features covers of "For He's a Jolly Good Fellow", "This Is when We Do It" by Montell Jordan, "Poison" by Bell Biv DeVoe,[10] "Mercy" by Duffy,[11] "Bust Your Windows" by Jazmine Sullivan,[12] "I Wanna Sex You Up" by Color Me Badd and an instrumental performance of "La Camisa Negra" by Juanes.[13] Studio recordings of "Bust Your Windows" and "Mercy" were released as singles, readily available for digital download. "Bust Your Windows" also features on the album Glee: The Music, Volume 1, having a studio recording of "I Wanna Sex You Up" included like a bonus track on discs purchased in Target.[14]. <br><br>Soft ticks convey more rounded bodies and do not possess the hard [http://www.airliebeachhotel.com.au/about/base.asp Air Jordan Shoes] scutum found in hard ticks. [https://www.lawinorder.com.au/includes/class.php Cheap Nike Roshe Australia] These [http://www.airliebeachhotel.com.au/about/base.asp Jordan Shoes] ticks usually feed for less than one hour. We tried All of the infusion sets, from all the pump companies and she/we such as the one from the mini med company, it is a quick infusion, you place it where you want it and then squeeze a little with button on both sides, it inserts it for you personally, no pushing needed! We absolutely love it. Kacey does it on her own now, but didn't prior to this.<ul>
 
  <li>[http://skwlkr.s18.23dns.net/forum/forum.php?mod=viewthread&tid=633360&fromuid=15133 http://skwlkr.s18.23dns.net/forum/forum.php?mod=viewthread&tid=633360&fromuid=15133]</li>
 
  <li>[http://www.xiongmaoche.com/bbs/forum.php?mod=viewthread&tid=1845656 http://www.xiongmaoche.com/bbs/forum.php?mod=viewthread&tid=1845656]</li>
 
  <li>[http://adtrp.com/index.php?page=item&id=113686 http://adtrp.com/index.php?page=item&id=113686]</li>
 
  <li>[http://www.510mg.com/news/html/?72438.html http://www.510mg.com/news/html/?72438.html]</li>
 
  <li>[http://mjkcos.egloos.com/3391465/ http://mjkcos.egloos.com/3391465/]</li>
 
</ul>


:<math>c \equiv a \times b \pmod n. \, </math>
== Polo Shirts ==


Because numbers have to be converted to and from a particular form suitable for performing the Montgomery step, a single modular multiplication performed using a Montgomery step is actually slightly less efficient than a "naive" one. However, modular exponentiation can be implemented as a sequence of Montgomery steps, with conversion only required once at the start and once at the end of the sequence. In this case the greater speed of the Montgomery steps far outweighs the need for the extra conversions.
I am passionate about my work. I spend a lot of time thinking about children and how to better enable them to.. (KAB). Don understand that litter has a real and serious economic impact on a community, in addition to the environmental fallout. Appreciate sending me the best man within the whole word. (I was a widow and that he was widowed twice and we found one another with help from our angels in heaven!) I would suggest your site to everyone and anyoneespecially lonely seniors (I am 70 and Bill is 68 so we both were on your site) we only lived 22 miles from one another and grew up in Chicago and also have a lot in commonunreal. <br><br>Set yourself up with a few help ahead of time, find an IBCLC (particularly [http://www.airliebeachhotel.com.au/about/img/list.asp Polo Shirts] if your insurance covers several visits, call her and hang a tentative appointment when ever baby is a couple of days old). Or at best La Leche League . Single dating sitesSingles dating realizes that it can be difficult to meet likeminded people; so we can help. This dating site gives you opportunities to connect and meet singles online. <br><br>Website around the 4003g and you would be like ok its the grizzly 4003g hands down thats the one im getting . Not that its a better machine however the website is so much better !! Yet i think that the 2 machines are virtually the same . Between pay per click advertising and the search engine marketing, it is more important than ever to keep the online public conscious of the services and goods you provide. Whether you decide to hire out these tasks to a web design or marketing company or get the job done yourself, it [http://www.visitportlincoln.net/css/fonts/base.asp Oakley Sunglasses] is the most important factor to getting your website awareness out there towards the [http://www.airliebeachhotel.com.au/about/img/list.asp Polo Ralph Lauren] public.. <br><br>Our friendly, qualified and experienced staff are able to assist [http://www.airliebeachhotel.com.au/about/img/list.asp Polo Shirts Australia] you in finding the next property to call home, whether you are a professional, a young family or indeed a student looking for accommodation close to the universities. If you are a landlord and want to ensure that your rentals are let you fully referenced tenants and looked after by inbranch property management teams only then do we are the lettings specialists to speak to. <br><br>Chlorophyll benefits the immune system by enhancing the bone marrow that is the site of origin for that cells of the immune system. Additionally, it plays an active role in detoxifying the body. Toddler toilet phobia can originate from the fear of falling off or falling in. If it's causing problems, try sitting your son or daughter on it backwards so she will hold onto the tank to steady herself, or convey a step in front of the toilet so she has something to rest her feet on..<ul>
 
 
== Formal statement ==
  <li>[http://wikidiplo.com/Main_Page http://wikidiplo.com/Main_Page]</li>
Let ''N'' be a positive integer, ''R'' and ''T'' be integers such that <math>R>N</math>, <math>\gcd(N,R)=1</math>, and <math>0\leqslant T<NR</math>,
 
and let <math>R^{-1}</math> be the [[modular inverse|multiplicative inverse]] modulo ''N'' of ''R''. The ''Montgomery reduction'' of ''T'' modulo ''N'' with respect to ''R'' is defined as the value
  <li>[http://nicheprofitclassroom.carolasmith.com/forum/profile.php?id=1294 http://nicheprofitclassroom.carolasmith.com/forum/profile.php?id=1294]</li>
: <math>TR^{-1} \pmod{N}. \, </math>
 
 
  <li>[http://www.468bet.com/forum.php?mod=viewthread&tid=3185968&fromuid=89901 http://www.468bet.com/forum.php?mod=viewthread&tid=3185968&fromuid=89901]</li>
A systematic interpretation of Montgomery reduction and the definition of Montgomery multiplication operation is based on the 2nd generalized division algorithm; see [[Euclidean division#Generalized_division_algorithms]].
 
 
  <li>[http://segupedia.com/index.php?title=User:Semwlef4#Air_Jordan_Australia_I_hadn.27t_previously_realised_this http://segupedia.com/index.php?title=User:Semwlef4#Air_Jordan_Australia_I_hadn.27t_previously_realised_this]</li>
The algorithm used to calculate this reduction is much more efficient than the classical method of taking a product over the integers and reducing the result modulo&nbsp;''N''.
 
 
  <li>[http://frank1908.com/news/html/?33890.html http://frank1908.com/news/html/?33890.html]</li>
== Use in cryptography ==
 
Many important cryptosystems such as [[RSA (algorithm)|RSA]] and [[Digital Signature Algorithm|DSA]] are based on arithmetic operations, such as multiplications, modulo a large number.
</ul>
<ref>
Chapter 14 of [[Alfred J. Menezes]], Paul C. van Oorschot, and [[Scott A. Vanstone]]. [http://www.cacr.math.uwaterloo.ca/hac/about/chap14.pdf Handbook of Applied Cryptography]. CRC Press, 1996. ISBN 0-8493-8523-7.
</ref>
The classical method of calculating a modular product involves first multiplying the numbers as if they were [[integer]]s and then taking the [[Modulo operation|modulo]] of the result. However, modular reduction is very expensive computationally—equivalent to dividing two numbers.
 
The situation is even worse when the algorithm requires modular exponentiation. Classically, <math>a^b \pmod {N}</math> is calculated by repeatedly multiplying ''a'' by itself ''b'' times, each time reducing the result modulo ''N''. Note that taking a single modulo at the end of the calculation will result in increasingly larger intermediate products—infeasible if ''b'' is very large.
 
== Rationale ==
We wish to calculate ''c'' such that
:<math> c \equiv a \times b \pmod {N}</math>.
Rather than working directly with ''a'' and ''b'', we define the ''residue''
:<math>
\begin{align}
\bar a & \equiv aR \pmod {N} \\
\bar b & \equiv bR \pmod {N} \\
\end{align}
</math>
The number <math>R</math> is chosen both greater than and [[relatively prime]] to ''N'', such that division and remainder operations are easy.  A power of two is generally chosen so that these operations become shifts and bitwise masks respectively. The numbers ''R'' and ''N'' are guaranteed to be relatively prime if ''N'' is odd and ''R'' is a power of two, as is typical in cryptographic applications.
 
<!-- It can be easily shown that there is a one-to-one mapping between numbers <math>a, b, \cdots</math> and residues <math>\bar a, \bar b, \cdots</math>. -->
Addition and subtraction operations are the same:
:<math>xR + yR \equiv zR \pmod{N}</math>
if and only if
:<math>x + y \equiv z \pmod{N}.</math>
 
This is important because converting between natural and residue representations is expensive, and we would prefer to work in one representation as much as possible and minimise conversions.
 
To define multiplication, define the [[modular inverse]] of ''R'', <math>R^{-1}</math> such that
:<math>RR^{-1} \equiv 1 \pmod {N}</math>
in other words
:<math>RR^{-1} = kN + 1</math>
where ''k'' is a positive integer.
Bezout's identity theorem claims such a R^{-1} and k exist and can be calculated by the Extended Euclidean algorithm.
Now if
:<math>c \equiv a \times b \pmod {N}</math>
then
:<math> \bar c \equiv cR \equiv (a \times b)R \equiv (aR \times bR) R^{-1} \equiv (\bar a \times \bar b) R^{-1} \mod{N}</math>
and then
:<math> c \equiv \bar c R^{-1} \mod{N}</math>.
 
It turns out that this is easy to calculate using the following algorithm.
 
== Description of Algorithm ==
The Montgomery reduction algorithm <math>Redc(T)</math> calculates <math>TR^{-1} \pmod{N}</math> as follows:
:<math>m := (k (T \bmod R))\bmod {R}</math>
:<math>t := (T + mN)/R</math>
:if <math> t \ge N</math> return <math>t - N</math> else return <math>t</math>.
 
Note that only additions, subtractions, multiplications, and integer divides and modulos by ''R'' are used – all of which are 'cheap' operations.
 
To understand why this gives the right answer, consider the following:
* <math>mN \equiv TkN \pmod{R}</math>. But by the definition of <math>R^{-1}</math> and <math>k</math>, <math>kN + 1</math> is a multiple of <math>R</math>, so <math>TkN \equiv -T \pmod{R}</math>. Therefore, <math>(T + mN) \equiv 0 \pmod{R}</math>; in other words, <math>(T + mN)</math> is exactly divisible by <math>R</math>, so <math>t</math> is an integer.
* Furthermore, <math>tR = (T + mN) \equiv T \pmod {N}</math>; therefore, <math>t \equiv TR^{-1} \mod{N}</math>, as required.
* Assuming <math>0 \le T < RN</math>, <math>t < 2N</math> (as <math>m < R</math>). Therefore the return value is always less than <math>N</math>.
 
Therefore, we can say that
:<math>\bar c = \mbox{Redc}(\bar a \times \bar b).</math>
 
Using this method to calculate <math>c</math> is generally less efficient than a naive multiplication and reduction, as the cost of conversions to and from residue representation (multiplications by <math>R</math> and <math>R^{-1}</math> modulo <math>N</math>) outweigh the savings from the reduction step. The advantage of this method becomes apparent when dealing with a sequence of multiplications, as required for modular exponentiation (e.g. [[exponentiation by squaring]]).
 
==Examples==
 
===The Montgomery step===
 
Working with ''n''-digit numbers to base ''d'', a Montgomery step calculates <math>a \times b \div d^n\pmod r</math>. The base ''d'' is typically 2 for microelectronic applications, 2<sup>8</sup> for 8-bit firmware,<ref name="kizhvatov" /> or 2<sup>32</sup> or 2<sup>64</sup> for software applications.
For the purpose of exposition, we shall illustrate with ''d''&nbsp;=&nbsp;10 and ''n''&nbsp;=&nbsp;4.
 
To calculate 0472&nbsp;&times;&nbsp;''a'' ÷ 10000:
 
<ol><li>Zero the accumulator.</li>
<li>Starting from the last digit; add 2''a'' to the accumulator.</li>
<li>Shift the accumulator one place to the right (thus dividing by 10).</li>
<li>Add 7''a'' to the accumulator.</li>
<li>Shift the accumulator one place to the right.</li>
<li>Add 4''a'' to the accumulator.</li>
<li>Shift the accumulator one place to the right.</li>
<li>Add 0''a'' to the accumulator.</li>
<li>Shift the accumulator one place to the right.</li>
</ol>
 
It is easy to see that the result is 0.0472 &times; ''a'', as required.
 
To turn this into a modular operation with a modulus ''r'', add, immediately before each shift, whatever multiple of ''r'' is needed to make the value in the accumulator a multiple of 10.
 
The result will be that the final value in the accumulator will be an integer (since only multiples of 10 have ever been divided by 10) and equivalent (modulo ''r'') to 472 &times; ''a'' ÷ 10000.
 
Finding the appropriate multiple of ''r'' is a simple operation of single-digit arithmetic. When working to base 2, it is trivial to calculate: if the value in the accumulator is even, the multiple is 0 (nothing needs to be added); if the value in the accumulator is odd, the multiple is 1 (''r'' needs to be added).
 
The Montgomery step is faster than the methods of "naive" modular arithmetic because the decision as to what multiple of ''r'' to add is taken purely on the basis of the least significant digit of the accumulator. This allows the use of [[carry-save adder]]s, which are much faster than the conventional kind but are not immediately able to give accurate values for the more significant digits of the result.
 
===Modular multiplication===
 
Consider the following pair of calculations:
 
: 24 &times; 73 = 1752
 
: 240000 &times; 730000 &divide; 10000 = 17520000
 
It can be seen that if we choose to represent integers by 10000 times themselves (let us temporarily call this a "Montgomery representation") then the result of a Montgomery step on the Montgomery representation of ''a'' and the Montgomery representation of ''b'' is the Montgomery representation of ''a'' &times; ''b''.
 
Thus we can use a Montgomery step to perform a modular multiplication by "Montgomeryizing" both operands before the Montgomery step and "de-Montgomeryizing" the result after it.
 
To "de-Montgomeryize" a number—in other words, to take it from its representation as "12340000" to a conventional representation as "1234"—it suffices to do a single Montgomery step with the number and 1: 12340000&times;1÷10000=1234.
 
To "Montgomeryize" a number—in other words, to take it from its conventional representation to a representation as "12340000"—it suffices to do a single Montgomery step with the number and 100000000: 1234&times;100000000÷10000=12340000.
 
The value of 100000000&nbsp;modulo&nbsp;''r'' can be precomputed, since the same modulus ''r'' is usually used many times over.
 
The total budget for a single modular multiplication is thus two Montgomery steps: the first, on <math>a</math> and <math>b</math>, yields <math>ab/R</math>, and the second, on this product and <math>R^2</math>, yields <math>(ab/R)\cdot R^2/R = ab</math>.
 
Usually, this is not a favorable trade-off for a single multiplication, as a conventional modular multiplication is faster than two Montgomery steps. However, Montgomery reduction is easier to make resistant to side-channel attacks, so in some circumstances the Montgomery technique may be preferable.
 
===Modular exponentiation===
 
Raising a number to a ''k''-bit exponent involves between ''k'' and 2''k'' multiplications. In most applications of modular exponentiation the exponent is at least several hundred bits long.
 
To fix our ideas, suppose that a particular modular exponentiation requires 800 multiplications. In that case 802 Montgomery steps will be needed: one to Montgomeryize the number being exponentiated, 800 to do the exponentiation, and one to de-Montgomeryize the result.
 
If a Montgomery step is even slightly faster than a conventional modular multiplication, the Montgomery algorithm will produce a faster result than conventional modular exponentiation
.<ref>
[[Cetin K. Koc]], [[Tolga Acar]], {{cite paper | id = {{citeseerx|10.1.1.26.3120}} | title = Analyzing and Comparing Montgomery Multiplication Algorithms | year=1996|volume=16|number=3|pages=26–33}}
</ref>
 
===Side channel attacks===
When using it as a part of a cryptographically secure algorithm, unmodified Montgomery reduction is vulnerable to [[side channel attack]]s, where the attacker can learn about the inner workings of the algorithm by studying the differences in time, power-consumption or any other parameter affected by the fact that the algorithm performs very different actions depending on the input. However it is simple to modify the algorithm or the hardware to make it resistant to such attacks.<ref>
Marc Joye and Sung-Ming Yen.
[http://cr.yp.to/bib/2003/joye-ladder.pdf "The Montgomery Powering Ladder"].
2002.
</ref><ref name="kizhvatov">
Zhe Liu, Johann Großschädl, and Ilya Kizhvatov.
[http://www.caad.arch.ethz.ch/noolab/files/external/conferences/IoT2010_proceedings/pdf/WS1/WS1_6.%20seciot2010_submission_12_final_v0.pdf "Efficient and Side-Channel Resistant RSA Implementation for 8-bit AVR Microcontrollers"].
</ref>
 
== References ==
{{reflist}}
 
{{DEFAULTSORT:Montgomery Reduction}}
[[Category:Computer arithmetic]]
[[Category:Cryptographic algorithms]]
[[Category:Modular arithmetic]]

Latest revision as of 10:28, 5 January 2015

Ray Ban Sunglasses The Music

Most of this issue depicts a tense poker game between our hero and also the three sons of Trigon. This really is territory that would normally be better suited for a guy like John Constantine. As well as if you don't use sun protection (bad girl!), it's tough to catch the right rays. The daylight you're most likely to get on a daily basisin the early morning and late afternoonis too weak to generate enough D.

Again, the internet can be your best friend or worst enemy about this matter. Looking for tools can be time consuming in that you have to find the best ones for you, the ones that are legitimate and those with the good reputations. ABM Resources NL (ASX:ABU) Chairman's Address to Shareholders ABN Newswire Sat, Nov 23, 2013 8:18 PM AEDTThis gave the organization the confidence to push ahead with permitting and planning mining and gravity processing of a 10,000 tonne bulk sample, as allowed under Northern Territory exploration licence conditions. In February, the organization announced a resource estimation upgrade for the Old Pirate Project and resource update focussing on the higher grade portions of the Buccaneer project.

There no inexpensive revoaml which safe. You would have to get a bigger, darker tattoo to do that. Apps opened quickly, multitasking was fast and efficient and swiping through your home screen live tiles is smooth and slick. Inside a direct comparison with an apple iphone 5, the Lumia Ray Ban Sunglasses 920 launched the camera app from standby quicker than Apple's flagship.

The episode features covers of "For He's a Jolly Good Fellow", "This Is when We Do It" by Montell Jordan, "Poison" by Bell Biv DeVoe,[10] "Mercy" by Duffy,[11] "Bust Your Windows" by Jazmine Sullivan,[12] "I Wanna Sex You Up" by Color Me Badd and an instrumental performance of "La Camisa Negra" by Juanes.[13] Studio recordings of "Bust Your Windows" and "Mercy" were released as singles, readily available for digital download. "Bust Your Windows" also features on the album Glee: The Music, Volume 1, having a studio recording of "I Wanna Sex You Up" included like a bonus track on discs purchased in Target.[14].

Soft ticks convey more rounded bodies and do not possess the hard Air Jordan Shoes scutum found in hard ticks. Cheap Nike Roshe Australia These Jordan Shoes ticks usually feed for less than one hour. We tried All of the infusion sets, from all the pump companies and she/we such as the one from the mini med company, it is a quick infusion, you place it where you want it and then squeeze a little with button on both sides, it inserts it for you personally, no pushing needed! We absolutely love it. Kacey does it on her own now, but didn't prior to this.

Polo Shirts

I am passionate about my work. I spend a lot of time thinking about children and how to better enable them to.. (KAB). Don understand that litter has a real and serious economic impact on a community, in addition to the environmental fallout. Appreciate sending me the best man within the whole word. (I was a widow and that he was widowed twice and we found one another with help from our angels in heaven!) I would suggest your site to everyone and anyoneespecially lonely seniors (I am 70 and Bill is 68 so we both were on your site) we only lived 22 miles from one another and grew up in Chicago and also have a lot in commonunreal.

Set yourself up with a few help ahead of time, find an IBCLC (particularly Polo Shirts if your insurance covers several visits, call her and hang a tentative appointment when ever baby is a couple of days old). Or at best La Leche League . Single dating sitesSingles dating realizes that it can be difficult to meet likeminded people; so we can help. This dating site gives you opportunities to connect and meet singles online.

Website around the 4003g and you would be like ok its the grizzly 4003g hands down thats the one im getting . Not that its a better machine however the website is so much better !! Yet i think that the 2 machines are virtually the same . Between pay per click advertising and the search engine marketing, it is more important than ever to keep the online public conscious of the services and goods you provide. Whether you decide to hire out these tasks to a web design or marketing company or get the job done yourself, it Oakley Sunglasses is the most important factor to getting your website awareness out there towards the Polo Ralph Lauren public..

Our friendly, qualified and experienced staff are able to assist Polo Shirts Australia you in finding the next property to call home, whether you are a professional, a young family or indeed a student looking for accommodation close to the universities. If you are a landlord and want to ensure that your rentals are let you fully referenced tenants and looked after by inbranch property management teams only then do we are the lettings specialists to speak to.

Chlorophyll benefits the immune system by enhancing the bone marrow that is the site of origin for that cells of the immune system. Additionally, it plays an active role in detoxifying the body. Toddler toilet phobia can originate from the fear of falling off or falling in. If it's causing problems, try sitting your son or daughter on it backwards so she will hold onto the tank to steady herself, or convey a step in front of the toilet so she has something to rest her feet on..