Combined Linear Congruential Generator: Difference between revisions

From formulasearchengine
Jump to navigation Jump to search
en>Sun Creator
m →‎Derivation: Typo fixing and checking, typos fixed: ,, → , (2) using AWB (8097)
 
en>Mgarraha
m →‎Example: corrected m_1
Line 1: Line 1:
leg higher sand  [http://adventurelights.com/coach/online.php coach handbags outlet] wedge rearfoot boot footwear, booties,hunter wellies<br><br>NewsNow writing in short supply and it is colleagues may also acquire info if you any of our webpage (to provide an example, in the event article per enquiry, make an account around or subscribe to a site as well as a email list).<br><br>as an  [http://www.stevensassoc.co.uk/michaelkors/outlet.php michael kors outlet uk] example, We might use similarly info to react to your enquiries (just where suitable), to  [http://www.farmercoop.com/brand/ cheap michael kors handbags] manage your amazing enrollment or possibly a request(s) (in which related), To provide the skills customers enquire, to remain files and after that, the places you on your own since explicitly share a common opinion,  [http://www.realtymortgage.net/nike/ tiffany blue nike free runs] To send to you [http://www.google.co.uk/search?hl=en&gl=us&tbm=nws&q=traffic+generation&gs_l=news traffic generation] strategies and information. we will never go over your information for promotion and marketing purposes with third parties without your individual since very revealing permission.<br><br>while  [http://arribaclubs.co.uk/sig/mk.asp arribaclubs.co.uk/sig/mk.asp] submitting skiing gear you come to an agreement to running a person's resources in accordance with our privacy, and thus getting cupcakes relative to our Cookie [http://Fashion.com/ fashion].<br><br>NewsNow producing tight will be acquaintances will probably find information usuallu when you use associated with our net sites (to provide an example, in case hand in a powerful enquiry, purchase around or subscribe to something maybe list).<br><br>as an example, We will use such information to answer to your phone calls (precisely where appropriate), to administer one's own subscription or alternatively membership(s) (specifically true), To provide the representation your business you can ask, to have precise records not to mention, to by itself and also explicitly agree with the fact, To give you advertising and marketing insight. we won't exchange your details for promoting and advertising functions with others if you don't have your divided plus precise permission.<br><br>by applying this you sanction to handling your personal data according to our privacy policy, in addition,yet habitat pastries prior to our Cookie statement.
{{More footnotes|date=July 2012}}
 
In [[computer science]], [[Disjoint-set data structure|Union Find]] is an [[algorithm]] for doing certain operations on sets.  This page is about proof of ''O''(log<sup>*</sup>''n'') [[Amortized analysis|amortized time]] <ref name="name for reference">[[Raimund Seidel]], Micha Sharir. "Top-down analysis of path compression", SIAM J. Computing 34(3):515–525, 2005</ref> of [[Disjoint-set data structure|Union Find]]<ref>{{cite journal |last1=Tarjan |first1=Robert Endre |year=1975 |title=Efficiency of a Good But Not Linear Set Union Algorithm |journal=Journal of the ACM |volume=22 |issue=2 |pages=215&ndash;225 |url=http://portal.acm.org/citation.cfm?id=321884 |doi=10.1145/321879.321884 }}</ref><ref>{{cite journal |last1=Hopcroft |first1=J. E. |last2=Ullman |first2=J. D. |year=1973 |title=Set Merging Algorithms |journal=SIAM Journal on Computing |volume=2 |issue=4 |pages=294&ndash;303 |doi=10.1137/0202024}}</ref><ref>[[Robert E. Tarjan]] and [[Jan van Leeuwen]]. Worst-case analysis of set union algorithms. Journal of the ACM, 31(2):245–281, 1984.</ref>
 
Statement: If ''m'' operations, either [[Disjoint-set data structure#Disjoint-set forests|Union]] or [[Disjoint-set data structure#Disjoint-set forests|Find]], are applied to ''n'' elements, the total run time is ''O''(''m''&nbsp;log<sup>*</sup>''n''), where log<sup>*</sup> is the [[iterated logarithm]].
 
==Proof==
 
{{anchor|increasing rank lemma}}Lemma 1: As the [[Disjoint-set data structure#Disjoint-set forests|find function]] follows the path along to the root, the rank of node it encounters is strictly increasing
 
:Proof: claim that as Find and Union operations are applied to the data set, this fact remains true over time. Initially when each node is the root of its own tree, it's trivially true. The only case when the rank of a node might be changed is when the [[Disjoint-set data structure#Disjoint-set forests|Union by Rank]] operation is applied. In this case, a tree with smaller rank will be attached to a tree with greater rank, rather than vice versa. And during the find operation, all nodes visited along the path will be attached to the root, which has larger rank than its children, so this operation won't change this fact either.
 
{{anchor|min subtree size lemma}}Lemma 2: A node ''u'' which is root of a subtree with rank ''r'' has at least 2<sup>''r''</sup> nodes.
 
:Proof:  Initially when each node is the root of its own tree, it's trivially true. Assume that a node ''u'' with rank ''r'' has at least 2<sup>''r''</sup> nodes. Then when two tree with rank ''r'' [[Disjoint-set data structure#Disjoint-set forests|Unions by Rank]] and form a tree with rank ''r'' + 1, the new node has at least 2<sup>''r''</sup> + 2<sup>''r''</sup> = 2<sup>''r'' + 1</sup> nodes.
 
[[File:ProofOflogstarnRank.jpg|center|alt=Alternative text|Caption text]]
 
Lemma 3: The maximum number of nodes of rank ''r'' is at most ''n''/2<sup>''r''</sup>.
 
:Proof:  From [[#min subtree size lemma|lemma 2]], we know that a node ''u'' which is root of a subtree with rank ''r'' has at least 2<sup>''r''</sup> nodes. We will get the maximum number of nodes of rank ''r'' when each node with rank ''r'' is the root of a tree that has exactly 2<sup>''r''</sup> nodes. In this case, the number of nodes of rank ''r'' is ''n''/2<sup>''r''</sup>
 
For convenience, we define "bucket" here: a bucket is a set that contains vertices with particular ranks.
 
We create some buckets and put vertices into buckets according to their ranks. That is, vertices with rank 0 goes into the zeroth bucket, vertices with rank 1 goes into the first bucket, vertices with rank 2 and 3 goes into the second bucket, and vertices with ranks ''B'' to 2<sup>''B''</sup> &minus; 1 go into the ''B''th bucket.
 
[[File:Proof of O(log*n) Union Find.jpg|center|alt=Alternative text|Caption text]]
We can make two observations about the buckets.
 
# {{anchor|max buckets}}The total number of buckets is at most log<sup>*</sup>''n''
#:Proof: When we go from one bucket to the next, we add one more two to the power, that is, the next bucket to [''B'', 2<sup>''B''</sup> &minus; 1] will be [2<sup>''B''</sup>, 2<sup>2<sup>''B''</sup></sup> &minus; 1]
#{{anchor|max bucket size}}The maximum number of elements in bucket [''B'', 2<sup>''B''</sup> – 1] is at most 2''n''/2<sup>''B''</sup>
#:Proof: The maximum number of elements in bucket [''B'', 2<sup>''B''</sup> – 1] is at most ''n''/2<sup>''B''</sup> + ''n''/2<sup>''B''+1</sup> + ''n''/2<sup>''B''+2</sup> + … + ''n''/2<sup>2^''B'' – 1</sup> ≤ 2''n''/2<sup>''B''</sup>
 
Let ''F'' represent the list of "find" operations performed, and let
 
<math>T_1 = \sum_F\text{(link to the root)}</math>
 
<math>T_2 = \sum_F\text{(number of links traversed where the buckets are different)}</math>
 
<math>T_3 = \sum_F\text{(number of links traversed where the buckets are the same).}</math>
 
Then the total cost of ''m'' finds is ''T'' = ''T''<sub>1</sub> + ''T''<sub>2</sub> + ''T''<sub>3</sub>
 
Since each find operation makes exactly one traversal that leads to a root, we have ''T''<sub>1</sub> = ''O''(''m'').
 
Also, from the bound above on the number of buckets, we have ''T''<sub>2</sub> = ''O''(''m''log<sup>*</sup>''n'').
 
For T<sub>3</sub>, suppose we are traversing from ''u'' to ''v'', where ''u'' and ''v'' have rank in the bucket [''B'', 2<sup>''B''</sup> &minus; 1]. From [[#increasing rank lemma|lemma 1]], we know that the number of times we traversed a link (''u'',''v'') where ''u'' and ''v'' were in the same bucket is at most 2<sup>''B''</sup> &minus; 1 &minus; ''B'', which is at most 2<sup>''B''</sup>.
 
Therefore, <math>T_3=\sum_{[B, 2^B - 1]} \sum_{u} 2^B</math>
 
From Observations [[#max buckets|1]] and [[#max bucket size|2]], we can conclude that <math>T_3\le\sum_{B} 2^B\frac{2n}{2^B}\le 2n\log^*n.</math>
 
Therefore, ''T'' = ''T''<sub>1</sub> + ''T''<sub>2</sub> + ''T''<sub>3</sub> = ''O''(''m'' log<sup>*</sup>''n'').
 
== References ==
<references />
 
[[Category:Search algorithms]]

Revision as of 00:30, 24 December 2013

Template:More footnotes

In computer science, Union Find is an algorithm for doing certain operations on sets. This page is about proof of O(log*n) amortized time [1] of Union Find[2][3][4]

Statement: If m operations, either Union or Find, are applied to n elements, the total run time is O(m log*n), where log* is the iterated logarithm.

Proof

<increasing rank lemma>...</increasing rank lemma>Lemma 1: As the find function follows the path along to the root, the rank of node it encounters is strictly increasing

Proof: claim that as Find and Union operations are applied to the data set, this fact remains true over time. Initially when each node is the root of its own tree, it's trivially true. The only case when the rank of a node might be changed is when the Union by Rank operation is applied. In this case, a tree with smaller rank will be attached to a tree with greater rank, rather than vice versa. And during the find operation, all nodes visited along the path will be attached to the root, which has larger rank than its children, so this operation won't change this fact either.

<min subtree size lemma>...</min subtree size lemma>Lemma 2: A node u which is root of a subtree with rank r has at least 2r nodes.

Proof: Initially when each node is the root of its own tree, it's trivially true. Assume that a node u with rank r has at least 2r nodes. Then when two tree with rank r Unions by Rank and form a tree with rank r + 1, the new node has at least 2r + 2r = 2r + 1 nodes.
Alternative text
Caption text

Lemma 3: The maximum number of nodes of rank r is at most n/2r.

Proof: From lemma 2, we know that a node u which is root of a subtree with rank r has at least 2r nodes. We will get the maximum number of nodes of rank r when each node with rank r is the root of a tree that has exactly 2r nodes. In this case, the number of nodes of rank r is n/2r

For convenience, we define "bucket" here: a bucket is a set that contains vertices with particular ranks.

We create some buckets and put vertices into buckets according to their ranks. That is, vertices with rank 0 goes into the zeroth bucket, vertices with rank 1 goes into the first bucket, vertices with rank 2 and 3 goes into the second bucket, and vertices with ranks B to 2B − 1 go into the Bth bucket.

Alternative text
Caption text

We can make two observations about the buckets.

  1. <max buckets>...</max buckets>The total number of buckets is at most log*n
    Proof: When we go from one bucket to the next, we add one more two to the power, that is, the next bucket to [B, 2B − 1] will be [2B, 22B − 1]
  2. <max bucket size>...</max bucket size>The maximum number of elements in bucket [B, 2B – 1] is at most 2n/2B
    Proof: The maximum number of elements in bucket [B, 2B – 1] is at most n/2B + n/2B+1 + n/2B+2 + … + n/22^B – 1 ≤ 2n/2B

Let F represent the list of "find" operations performed, and let

Then the total cost of m finds is T = T1 + T2 + T3

Since each find operation makes exactly one traversal that leads to a root, we have T1 = O(m).

Also, from the bound above on the number of buckets, we have T2 = O(mlog*n).

For T3, suppose we are traversing from u to v, where u and v have rank in the bucket [B, 2B − 1]. From lemma 1, we know that the number of times we traversed a link (u,v) where u and v were in the same bucket is at most 2B − 1 − B, which is at most 2B.

Therefore,

From Observations 1 and 2, we can conclude that

Therefore, T = T1 + T2 + T3 = O(m log*n).

References

  1. Raimund Seidel, Micha Sharir. "Top-down analysis of path compression", SIAM J. Computing 34(3):515–525, 2005
  2. One of the biggest reasons investing in a Singapore new launch is an effective things is as a result of it is doable to be lent massive quantities of money at very low interest rates that you should utilize to purchase it. Then, if property values continue to go up, then you'll get a really high return on funding (ROI). Simply make sure you purchase one of the higher properties, reminiscent of the ones at Fernvale the Riverbank or any Singapore landed property Get Earnings by means of Renting

    In its statement, the singapore property listing - website link, government claimed that the majority citizens buying their first residence won't be hurt by the new measures. Some concessions can even be prolonged to chose teams of consumers, similar to married couples with a minimum of one Singaporean partner who are purchasing their second property so long as they intend to promote their first residential property. Lower the LTV limit on housing loans granted by monetary establishments regulated by MAS from 70% to 60% for property purchasers who are individuals with a number of outstanding housing loans on the time of the brand new housing purchase. Singapore Property Measures - 30 August 2010 The most popular seek for the number of bedrooms in Singapore is 4, followed by 2 and three. Lush Acres EC @ Sengkang

    Discover out more about real estate funding in the area, together with info on international funding incentives and property possession. Many Singaporeans have been investing in property across the causeway in recent years, attracted by comparatively low prices. However, those who need to exit their investments quickly are likely to face significant challenges when trying to sell their property – and could finally be stuck with a property they can't sell. Career improvement programmes, in-house valuation, auctions and administrative help, venture advertising and marketing, skilled talks and traisning are continuously planned for the sales associates to help them obtain better outcomes for his or her shoppers while at Knight Frank Singapore. No change Present Rules

    Extending the tax exemption would help. The exemption, which may be as a lot as $2 million per family, covers individuals who negotiate a principal reduction on their existing mortgage, sell their house short (i.e., for lower than the excellent loans), or take part in a foreclosure course of. An extension of theexemption would seem like a common-sense means to assist stabilize the housing market, but the political turmoil around the fiscal-cliff negotiations means widespread sense could not win out. Home Minority Chief Nancy Pelosi (D-Calif.) believes that the mortgage relief provision will be on the table during the grand-cut price talks, in response to communications director Nadeam Elshami. Buying or promoting of blue mild bulbs is unlawful.

    A vendor's stamp duty has been launched on industrial property for the primary time, at rates ranging from 5 per cent to 15 per cent. The Authorities might be trying to reassure the market that they aren't in opposition to foreigners and PRs investing in Singapore's property market. They imposed these measures because of extenuating components available in the market." The sale of new dual-key EC models will even be restricted to multi-generational households only. The models have two separate entrances, permitting grandparents, for example, to dwell separately. The vendor's stamp obligation takes effect right this moment and applies to industrial property and plots which might be offered inside three years of the date of buy. JLL named Best Performing Property Brand for second year running

    The data offered is for normal info purposes only and isn't supposed to be personalised investment or monetary advice. Motley Fool Singapore contributor Stanley Lim would not personal shares in any corporations talked about. Singapore private home costs increased by 1.eight% within the fourth quarter of 2012, up from 0.6% within the earlier quarter. Resale prices of government-built HDB residences which are usually bought by Singaporeans, elevated by 2.5%, quarter on quarter, the quickest acquire in five quarters. And industrial property, prices are actually double the levels of three years ago. No withholding tax in the event you sell your property. All your local information regarding vital HDB policies, condominium launches, land growth, commercial property and more

    There are various methods to go about discovering the precise property. Some local newspapers (together with the Straits Instances ) have categorised property sections and many local property brokers have websites. Now there are some specifics to consider when buying a 'new launch' rental. Intended use of the unit Every sale begins with 10 p.c low cost for finish of season sale; changes to 20 % discount storewide; follows by additional reduction of fiftyand ends with last discount of 70 % or extra. Typically there is even a warehouse sale or transferring out sale with huge mark-down of costs for stock clearance. Deborah Regulation from Expat Realtor shares her property market update, plus prime rental residences and houses at the moment available to lease Esparina EC @ Sengkang
  3. One of the biggest reasons investing in a Singapore new launch is an effective things is as a result of it is doable to be lent massive quantities of money at very low interest rates that you should utilize to purchase it. Then, if property values continue to go up, then you'll get a really high return on funding (ROI). Simply make sure you purchase one of the higher properties, reminiscent of the ones at Fernvale the Riverbank or any Singapore landed property Get Earnings by means of Renting

    In its statement, the singapore property listing - website link, government claimed that the majority citizens buying their first residence won't be hurt by the new measures. Some concessions can even be prolonged to chose teams of consumers, similar to married couples with a minimum of one Singaporean partner who are purchasing their second property so long as they intend to promote their first residential property. Lower the LTV limit on housing loans granted by monetary establishments regulated by MAS from 70% to 60% for property purchasers who are individuals with a number of outstanding housing loans on the time of the brand new housing purchase. Singapore Property Measures - 30 August 2010 The most popular seek for the number of bedrooms in Singapore is 4, followed by 2 and three. Lush Acres EC @ Sengkang

    Discover out more about real estate funding in the area, together with info on international funding incentives and property possession. Many Singaporeans have been investing in property across the causeway in recent years, attracted by comparatively low prices. However, those who need to exit their investments quickly are likely to face significant challenges when trying to sell their property – and could finally be stuck with a property they can't sell. Career improvement programmes, in-house valuation, auctions and administrative help, venture advertising and marketing, skilled talks and traisning are continuously planned for the sales associates to help them obtain better outcomes for his or her shoppers while at Knight Frank Singapore. No change Present Rules

    Extending the tax exemption would help. The exemption, which may be as a lot as $2 million per family, covers individuals who negotiate a principal reduction on their existing mortgage, sell their house short (i.e., for lower than the excellent loans), or take part in a foreclosure course of. An extension of theexemption would seem like a common-sense means to assist stabilize the housing market, but the political turmoil around the fiscal-cliff negotiations means widespread sense could not win out. Home Minority Chief Nancy Pelosi (D-Calif.) believes that the mortgage relief provision will be on the table during the grand-cut price talks, in response to communications director Nadeam Elshami. Buying or promoting of blue mild bulbs is unlawful.

    A vendor's stamp duty has been launched on industrial property for the primary time, at rates ranging from 5 per cent to 15 per cent. The Authorities might be trying to reassure the market that they aren't in opposition to foreigners and PRs investing in Singapore's property market. They imposed these measures because of extenuating components available in the market." The sale of new dual-key EC models will even be restricted to multi-generational households only. The models have two separate entrances, permitting grandparents, for example, to dwell separately. The vendor's stamp obligation takes effect right this moment and applies to industrial property and plots which might be offered inside three years of the date of buy. JLL named Best Performing Property Brand for second year running

    The data offered is for normal info purposes only and isn't supposed to be personalised investment or monetary advice. Motley Fool Singapore contributor Stanley Lim would not personal shares in any corporations talked about. Singapore private home costs increased by 1.eight% within the fourth quarter of 2012, up from 0.6% within the earlier quarter. Resale prices of government-built HDB residences which are usually bought by Singaporeans, elevated by 2.5%, quarter on quarter, the quickest acquire in five quarters. And industrial property, prices are actually double the levels of three years ago. No withholding tax in the event you sell your property. All your local information regarding vital HDB policies, condominium launches, land growth, commercial property and more

    There are various methods to go about discovering the precise property. Some local newspapers (together with the Straits Instances ) have categorised property sections and many local property brokers have websites. Now there are some specifics to consider when buying a 'new launch' rental. Intended use of the unit Every sale begins with 10 p.c low cost for finish of season sale; changes to 20 % discount storewide; follows by additional reduction of fiftyand ends with last discount of 70 % or extra. Typically there is even a warehouse sale or transferring out sale with huge mark-down of costs for stock clearance. Deborah Regulation from Expat Realtor shares her property market update, plus prime rental residences and houses at the moment available to lease Esparina EC @ Sengkang
  4. Robert E. Tarjan and Jan van Leeuwen. Worst-case analysis of set union algorithms. Journal of the ACM, 31(2):245–281, 1984.