<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://charlesreid1.com/w/index.php?action=history&amp;feed=atom&amp;title=Project_Euler%2F323</id>
	<title>Project Euler/323 - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://charlesreid1.com/w/index.php?action=history&amp;feed=atom&amp;title=Project_Euler%2F323"/>
	<link rel="alternate" type="text/html" href="https://charlesreid1.com/w/index.php?title=Project_Euler/323&amp;action=history"/>
	<updated>2026-06-20T02:34:26Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.39.12</generator>
	<entry>
		<id>https://charlesreid1.com/w/index.php?title=Project_Euler/323&amp;diff=29893&amp;oldid=prev</id>
		<title>Unknown user: Created page with &quot;https://projecteuler.net/problem=323  ==Notes==  To visualize this problem, think of a coin or stamp collection, where there are slots for coins from each year and you&#039;re coll...&quot;</title>
		<link rel="alternate" type="text/html" href="https://charlesreid1.com/w/index.php?title=Project_Euler/323&amp;diff=29893&amp;oldid=prev"/>
		<updated>2025-04-21T19:59:13Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;https://projecteuler.net/problem=323  ==Notes==  To visualize this problem, think of a coin or stamp collection, where there are slots for coins from each year and you&amp;#039;re coll...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;https://projecteuler.net/problem=323&lt;br /&gt;
&lt;br /&gt;
==Notes==&lt;br /&gt;
&lt;br /&gt;
To visualize this problem, think of a coin or stamp collection, where there are slots for coins from each year and you&amp;#039;re collecting them as you find them. Except what we&amp;#039;re doing here is, starting with a bitvector of 0, called x0, then for multiple rounds, we generate a random number y_i and accumulate any 1s in y_i&amp;#039;s bit positions in x_i. The question asks how many rounds it takes, on average, before all the bitvector slots have 1s.&lt;br /&gt;
&lt;br /&gt;
Key insights:&lt;br /&gt;
* The probability of a given position k in the final bitvector becoming 1 is identical/independent for all positions, and is 50% (if y is a totally random number, the probability of a given position in its binary representation is 1 is 50%)&lt;br /&gt;
* The problem involves independent probabilities of 32 bits, so there will be a 32nd power, somewhere&lt;br /&gt;
* The slots all have 50% probability, so there will probably be a (1/2) factor that gets repeated, somewhere&lt;br /&gt;
&lt;br /&gt;
==Solution==&lt;br /&gt;
&lt;br /&gt;
Link: https://git.charlesreid1.com/cs/euler/src/branch/master/java/Problem323.java&lt;br /&gt;
&lt;br /&gt;
==Flags==&lt;br /&gt;
&lt;br /&gt;
{{ProjectEulerFlag}}&lt;/div&gt;</summary>
		<author><name>Unknown user</name></author>
	</entry>
</feed>