<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Archives of the Computing - The Event Horizons</title>
	<atom:link href="https://theeventhorizons.com/category/computation/feed/" rel="self" type="application/rss+xml" />
	<link>https://theeventhorizons.com/category/computation/</link>
	<description>Immerse yourself in our universe</description>
	<lastBuildDate>Wed, 10 Jan 2024 10:55:15 +0000</lastBuildDate>
	<language>en-GB</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9.4</generator>
	<item>
		<title>Stormtroopers Are Bad at Shooting? Yes.</title>
		<link>https://theeventhorizons.com/stormtroopers/</link>
					<comments>https://theeventhorizons.com/stormtroopers/#respond</comments>
		
		<dc:creator><![CDATA[admin]]></dc:creator>
		<pubDate>Sun, 23 Jul 2023 17:33:03 +0000</pubDate>
				<category><![CDATA[Computing]]></category>
		<guid isPermaLink="false">https://theeventhorizons.com/?p=654</guid>

					<description><![CDATA[<p>A long time ago, in a galaxy far, far away, a young commander took a battalion of particularly clumsy stormtroopers to a shooting range. They seemed destined to constantly miss their targets, making them the laughing stock of the Empire. However, the commander had a bold idea to exploit their apparent incompetence. From now on, they would estimate areas!</p>
<p>The article <a href="https://theeventhorizons.com/stormtroopers/">Stormtroopers Are Bad at Shooting? Yes.</a> first appeared on <a href="https://theeventhorizons.com">The Event Horizons</a>.</p>
]]></description>
										<content:encoded><![CDATA[		<div data-elementor-type="wp-post" data-elementor-id="654" class="elementor elementor-654">
						<section class="elementor-section elementor-top-section elementor-element elementor-element-7f0b92bf elementor-section-boxed elementor-section-height-default elementor-section-height-default" data-id="7f0b92bf" data-element_type="section" data-e-type="section">
						<div class="elementor-container elementor-column-gap-default">
					<div class="elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-47c28176" data-id="47c28176" data-element_type="column" data-e-type="column">
			<div class="elementor-widget-wrap elementor-element-populated">
						<div class="elementor-element elementor-element-8dd7f91 elementor-align-center elementor-widget elementor-widget-button" data-id="8dd7f91" data-element_type="widget" data-e-type="widget" data-widget_type="button.default">
				<div class="elementor-widget-container">
									<div class="elementor-button-wrapper">
					<a class="elementor-button elementor-button-link elementor-size-xs" href="">
						<span class="elementor-button-content-wrapper">
									<span class="elementor-button-text">	Computing</span>
					</span>
					</a>
				</div>
								</div>
				</div>
				<div class="elementor-element elementor-element-fe704c0 elementor-widget elementor-widget-heading" data-id="fe704c0" data-element_type="widget" data-e-type="widget" data-widget_type="heading.default">
				<div class="elementor-widget-container">
					<h2 class="elementor-heading-title elementor-size-xxl">Stormtroopers Are Bad at Shooting? <br>Yes.</h2>				</div>
				</div>
					</div>
		</div>
					</div>
		</section>
				<section class="elementor-section elementor-top-section elementor-element elementor-element-1b0816d elementor-section-boxed elementor-section-height-default elementor-section-height-default" data-id="1b0816d" data-element_type="section" data-e-type="section">
						<div class="elementor-container elementor-column-gap-default">
					<div class="elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-b15b917" data-id="b15b917" data-element_type="column" data-e-type="column">
			<div class="elementor-widget-wrap elementor-element-populated">
						<div class="elementor-element elementor-element-1955e17 elementor-widget elementor-widget-heading" data-id="1955e17" data-element_type="widget" data-e-type="widget" data-widget_type="heading.default">
				<div class="elementor-widget-container">
					<h2 class="elementor-heading-title elementor-size-small">By Jordan Moles on July 23, 2023</h2>				</div>
				</div>
					</div>
		</div>
					</div>
		</section>
				<section class="elementor-section elementor-top-section elementor-element elementor-element-5313701 elementor-section-boxed elementor-section-height-default elementor-section-height-default" data-id="5313701" data-element_type="section" data-e-type="section">
						<div class="elementor-container elementor-column-gap-default">
					<div class="elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-4f23751" data-id="4f23751" data-element_type="column" data-e-type="column">
			<div class="elementor-widget-wrap elementor-element-populated">
						<div class="elementor-element elementor-element-6c373b0 elementor-widget elementor-widget-image" data-id="6c373b0" data-element_type="widget" data-e-type="widget" data-widget_type="image.default">
				<div class="elementor-widget-container">
															<img fetchpriority="high" decoding="async" width="1024" height="768" src="https://theeventhorizons.com/wp-content/uploads/2023/07/Miniature-storm-1-1024x768.jpeg" class="attachment-large size-large wp-image-669" alt="" srcset="https://theeventhorizons.com/wp-content/uploads/2023/07/Miniature-storm-1-1024x768.jpeg 1024w, https://theeventhorizons.com/wp-content/uploads/2023/07/Miniature-storm-1-300x225.jpeg 300w, https://theeventhorizons.com/wp-content/uploads/2023/07/Miniature-storm-1-768x576.jpeg 768w, https://theeventhorizons.com/wp-content/uploads/2023/07/Miniature-storm-1.jpeg 1440w" sizes="(max-width: 1024px) 100vw, 1024px" />															</div>
				</div>
					</div>
		</div>
					</div>
		</section>
				<section class="elementor-section elementor-top-section elementor-element elementor-element-923f755 elementor-section-boxed elementor-section-height-default elementor-section-height-default" data-id="923f755" data-element_type="section" data-e-type="section">
						<div class="elementor-container elementor-column-gap-default">
					<div class="elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-7898c36" data-id="7898c36" data-element_type="column" data-e-type="column">
			<div class="elementor-widget-wrap elementor-element-populated">
						<div class="elementor-element elementor-element-370feff elementor-widget elementor-widget-video" data-id="370feff" data-element_type="widget" data-e-type="widget" data-settings="{&quot;video_type&quot;:&quot;hosted&quot;,&quot;autoplay&quot;:&quot;yes&quot;,&quot;controls&quot;:&quot;yes&quot;}" data-widget_type="video.default">
				<div class="elementor-widget-container">
							<div class="e-hosted-video elementor-wrapper elementor-open-inline">
					<video class="elementor-video" src="https://theeventhorizons.com/wp-content/uploads/2023/07/StormvidEN.mp4" autoplay="" controls="" controlsList="nodownload"></video>
				</div>
						</div>
				</div>
					</div>
		</div>
					</div>
		</section>
				<section class="elementor-section elementor-top-section elementor-element elementor-element-6567bb72 elementor-section-boxed elementor-section-height-default elementor-section-height-default" data-id="6567bb72" data-element_type="section" data-e-type="section">
						<div class="elementor-container elementor-column-gap-default">
					<div class="elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-2a3e55d2" data-id="2a3e55d2" data-element_type="column" data-e-type="column">
			<div class="elementor-widget-wrap elementor-element-populated">
						<div class="elementor-element elementor-element-4ea83cb9 elementor-widget__width-initial elementor-widget elementor-widget-text-editor" data-id="4ea83cb9" data-element_type="widget" data-e-type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
									<h2 data-elementor-setting-key="title" data-pen-placeholder="Écrivez ici..."> </h2><h2 class="elementor-heading-title elementor-size-large elementor-inline-editing pen" style="font-variant-ligatures: normal; font-variant-caps: normal; font-family: 'Roboto Serif', sans-serif; font-size: 29px; font-style: normal; color: #414141;" data-elementor-setting-key="title" data-pen-placeholder="Écrivez ici...">The Monte Carlo Method</h2><p>The Monte Carlo method is an efficient mathematical strategy that is applied to approximate results that are otherwise intractable to calculate with precision. It relies on the use of pseudo-random numbers to simulate random events and derive probabilistic outcomes. A simple illustration to grasp this method would be to envision an army of stormtroopers randomly firing upon a target. By virtue of the Monte Carlo method, we can estimate the stormtroopers&#8217; precision rate by simulating their random shooting and counting the number of shots that strike the target. But especially they can estimate areas.</p><p>Tis method is grounded on the law of large numbers, which asserts that if a large number of independent random experiments are conducted, the frequency of the outcomes will converge towards the theoretical probability. For example, if you toss a balanced coin a very large number of times, it will appear tail or head half the time. To employ this method, one must first define a simulation space of random events, generate pseudo-random numbers to mimic these events, and tally the number of occurrences that transpire within a specific region of interest. This information is then used to estimate the probability of a particular event.</p><p>For instance, to estimate the precision rate of the stormtroopers, we could define a simulation space that represents the target, let them shoot, and count the number of shots that strike the target. By using the ratio of the number of shots that strike the target to the total number of shots, we can estimate the precision rate of the stormtroopers. To do so,</p><p>1. Put one stormtrooper in the closed and huge shooting range.<br />2. Let&#8217;s draw a circle of radius 25 meters in the center of the squared back wall of 50 meters.<br />3. Now, it&#8217;s time to order to the stormtrooper to fire.</p><p>&#8220;Stormtrooper, attention, target in the back wall in sight, fire one thousand shot.&#8221;</p>								</div>
				</div>
					</div>
		</div>
					</div>
		</section>
				<section class="elementor-section elementor-top-section elementor-element elementor-element-9096e17 elementor-section-boxed elementor-section-height-default elementor-section-height-default" data-id="9096e17" data-element_type="section" data-e-type="section">
						<div class="elementor-container elementor-column-gap-default">
					<div class="elementor-column elementor-col-50 elementor-top-column elementor-element elementor-element-32b5271c" data-id="32b5271c" data-element_type="column" data-e-type="column">
			<div class="elementor-widget-wrap elementor-element-populated">
						<div class="elementor-element elementor-element-4220e4ef elementor-widget elementor-widget-image" data-id="4220e4ef" data-element_type="widget" data-e-type="widget" data-widget_type="image.default">
				<div class="elementor-widget-container">
															<img decoding="async" width="1024" height="745" src="https://theeventhorizons.com/wp-content/uploads/2023/07/onestorm-1024x745.png" class="attachment-large size-large wp-image-266" alt="" srcset="https://theeventhorizons.com/wp-content/uploads/2023/07/onestorm-1024x745.png 1024w, https://theeventhorizons.com/wp-content/uploads/2023/07/onestorm-300x218.png 300w, https://theeventhorizons.com/wp-content/uploads/2023/07/onestorm-768x558.png 768w, https://theeventhorizons.com/wp-content/uploads/2023/07/onestorm-1536x1117.png 1536w, https://theeventhorizons.com/wp-content/uploads/2023/07/onestorm.png 1942w" sizes="(max-width: 1024px) 100vw, 1024px" />															</div>
				</div>
					</div>
		</div>
				<div class="elementor-column elementor-col-50 elementor-top-column elementor-element elementor-element-3224bf80" data-id="3224bf80" data-element_type="column" data-e-type="column">
			<div class="elementor-widget-wrap elementor-element-populated">
						<div class="elementor-element elementor-element-60cb4960 elementor-widget elementor-widget-image" data-id="60cb4960" data-element_type="widget" data-e-type="widget" data-widget_type="image.default">
				<div class="elementor-widget-container">
															<img decoding="async" width="776" height="770" src="https://theeventhorizons.com/wp-content/uploads/2023/07/1thousand.png" class="attachment-large size-large wp-image-267" alt="" srcset="https://theeventhorizons.com/wp-content/uploads/2023/07/1thousand.png 776w, https://theeventhorizons.com/wp-content/uploads/2023/07/1thousand-300x298.png 300w, https://theeventhorizons.com/wp-content/uploads/2023/07/1thousand-150x150.png 150w, https://theeventhorizons.com/wp-content/uploads/2023/07/1thousand-768x762.png 768w" sizes="(max-width: 776px) 100vw, 776px" />															</div>
				</div>
					</div>
		</div>
					</div>
		</section>
				<section class="elementor-section elementor-top-section elementor-element elementor-element-6ab7309 elementor-section-boxed elementor-section-height-default elementor-section-height-default" data-id="6ab7309" data-element_type="section" data-e-type="section">
						<div class="elementor-container elementor-column-gap-default">
					<div class="elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-fa9f996" data-id="fa9f996" data-element_type="column" data-e-type="column">
			<div class="elementor-widget-wrap elementor-element-populated">
						<div class="elementor-element elementor-element-2e5df5de elementor-widget elementor-widget-heading" data-id="2e5df5de" data-element_type="widget" data-e-type="widget" data-widget_type="heading.default">
				<div class="elementor-widget-container">
					<h2 class="elementor-heading-title elementor-size-small">Figure 1: A stormtrooper trying to shot the target and the result obtained with one thousand shots.</h2>				</div>
				</div>
					</div>
		</div>
					</div>
		</section>
				<section class="elementor-section elementor-top-section elementor-element elementor-element-5e8e9c7c elementor-section-boxed elementor-section-height-default elementor-section-height-default" data-id="5e8e9c7c" data-element_type="section" data-e-type="section">
						<div class="elementor-container elementor-column-gap-default">
					<div class="elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-3dc9c4a" data-id="3dc9c4a" data-element_type="column" data-e-type="column">
			<div class="elementor-widget-wrap elementor-element-populated">
						<div class="elementor-element elementor-element-5a8b2614 elementor-widget elementor-widget-text-editor" data-id="5a8b2614" data-element_type="widget" data-e-type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
									<p>According to the target, we have the proof that he is not really good at shooting. In fact, he shoots uniformly in the back wall, i.e., in mathematical terms, it means that the probability of striking a defined zone in the back wall is the same as striking another one with the same area. This probability is called continuous uniform distribution. These non-skills will be used to estimate the value of mathematical constants (such as π) and a lot more things.</p>								</div>
				</div>
					</div>
		</div>
					</div>
		</section>
				<section class="elementor-section elementor-top-section elementor-element elementor-element-1a58a202 elementor-section-boxed elementor-section-height-default elementor-section-height-default" data-id="1a58a202" data-element_type="section" data-e-type="section">
						<div class="elementor-container elementor-column-gap-default">
					<div class="elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-3980a90e" data-id="3980a90e" data-element_type="column" data-e-type="column">
			<div class="elementor-widget-wrap elementor-element-populated">
						<div class="elementor-element elementor-element-6475c6e3 elementor-widget elementor-widget-text-editor" data-id="6475c6e3" data-element_type="widget" data-e-type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
									<h2 data-elementor-setting-key="title" data-pen-placeholder="Écrivez ici...">&nbsp;</h2>
<h2 class="elementor-heading-title elementor-size-large elementor-inline-editing pen" style="font-variant-ligatures: normal; font-variant-caps: normal; font-family: 'Roboto Serif', sans-serif; font-size: 29px; font-style: normal; color: #414141;" data-elementor-setting-key="title" data-pen-placeholder="Écrivez ici...">Estimation of π and the Millennium Falcon&#8217;s Area</h2>
<p>Before continuing, let&#8217;s recall that the area of a square of side R is \(S_{square}=R²\) and the area of a circle of radius R is \(S_{circle}=π R²\). We will start with the simplest estimation: that of π. This works by using the same steps as outlined previously</p>
<p>1. Put the army of one million and identical stormtroopers in the closed and huge shooting range.<br>2. Draw a circle of radius 25 meters within the squared back wall of 50 meters.<br>3. Recall the order.</p>
<p>&#8220;Stormtroopers, attention, target in the back wall in sight, fire one shot.&#8221;</p>
<p>1. Count the number of impacts (or points) that fall inside the circle.<br>2. Use the proportion of impacts inside the circle to the total number of impacts generated to estimate π. Specifically, you can use the following formula:</p>								</div>
				</div>
					</div>
		</div>
					</div>
		</section>
				<section class="elementor-section elementor-top-section elementor-element elementor-element-3440d9aa elementor-section-boxed elementor-section-height-default elementor-section-height-default" data-id="3440d9aa" data-element_type="section" data-e-type="section">
						<div class="elementor-container elementor-column-gap-default">
					<div class="elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-69f8954b" data-id="69f8954b" data-element_type="column" data-e-type="column">
			<div class="elementor-widget-wrap elementor-element-populated">
						<div class="elementor-element elementor-element-721e634b elementor-widget elementor-widget-text-editor" data-id="721e634b" data-element_type="widget" data-e-type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
									<p>\begin{equation*}<br />\pi=\frac{S_{circle}}{S_{square}}=\frac{\text{Number of impacts in the circle}}{\text{Total number of impacts}}.<br />\end{equation*}</p><p>Repeat steps several times or increase your army to get a more precise estimate of π.</p>								</div>
				</div>
					</div>
		</div>
					</div>
		</section>
				<section class="elementor-section elementor-top-section elementor-element elementor-element-326f27dd elementor-section-boxed elementor-section-height-default elementor-section-height-default" data-id="326f27dd" data-element_type="section" data-e-type="section">
						<div class="elementor-container elementor-column-gap-default">
					<div class="elementor-column elementor-col-50 elementor-top-column elementor-element elementor-element-5a0bc21c" data-id="5a0bc21c" data-element_type="column" data-e-type="column">
			<div class="elementor-widget-wrap elementor-element-populated">
						<div class="elementor-element elementor-element-76e0746f elementor-widget elementor-widget-image" data-id="76e0746f" data-element_type="widget" data-e-type="widget" data-widget_type="image.default">
				<div class="elementor-widget-container">
															<img loading="lazy" decoding="async" width="845" height="1024" src="https://theeventhorizons.com/wp-content/uploads/2023/07/millionstorm-845x1024.png" class="attachment-large size-large wp-image-295" alt="" srcset="https://theeventhorizons.com/wp-content/uploads/2023/07/millionstorm-845x1024.png 845w, https://theeventhorizons.com/wp-content/uploads/2023/07/millionstorm-248x300.png 248w, https://theeventhorizons.com/wp-content/uploads/2023/07/millionstorm-768x931.png 768w, https://theeventhorizons.com/wp-content/uploads/2023/07/millionstorm.png 1009w" sizes="(max-width: 845px) 100vw, 845px" />															</div>
				</div>
					</div>
		</div>
				<div class="elementor-column elementor-col-50 elementor-top-column elementor-element elementor-element-be3e15a" data-id="be3e15a" data-element_type="column" data-e-type="column">
			<div class="elementor-widget-wrap elementor-element-populated">
						<div class="elementor-element elementor-element-3a45e69 elementor-widget elementor-widget-image" data-id="3a45e69" data-element_type="widget" data-e-type="widget" data-widget_type="image.default">
				<div class="elementor-widget-container">
															<img loading="lazy" decoding="async" width="780" height="770" src="https://theeventhorizons.com/wp-content/uploads/2023/07/10thousand.png" class="attachment-large size-large wp-image-296" alt="" srcset="https://theeventhorizons.com/wp-content/uploads/2023/07/10thousand.png 780w, https://theeventhorizons.com/wp-content/uploads/2023/07/10thousand-300x296.png 300w, https://theeventhorizons.com/wp-content/uploads/2023/07/10thousand-768x758.png 768w" sizes="(max-width: 780px) 100vw, 780px" />															</div>
				</div>
					</div>
		</div>
					</div>
		</section>
				<section class="elementor-section elementor-top-section elementor-element elementor-element-1e7faa42 elementor-section-boxed elementor-section-height-default elementor-section-height-default" data-id="1e7faa42" data-element_type="section" data-e-type="section">
						<div class="elementor-container elementor-column-gap-default">
					<div class="elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-181b07e3" data-id="181b07e3" data-element_type="column" data-e-type="column">
			<div class="elementor-widget-wrap elementor-element-populated">
						<div class="elementor-element elementor-element-4fc26988 elementor-widget elementor-widget-heading" data-id="4fc26988" data-element_type="widget" data-e-type="widget" data-widget_type="heading.default">
				<div class="elementor-widget-container">
					<h2 class="elementor-heading-title elementor-size-small">Figure 2: The army has arrived and launch first 10 thousands shots.</h2>				</div>
				</div>
					</div>
		</div>
					</div>
		</section>
				<section class="elementor-section elementor-top-section elementor-element elementor-element-2e6e219 elementor-section-boxed elementor-section-height-default elementor-section-height-default" data-id="2e6e219" data-element_type="section" data-e-type="section">
						<div class="elementor-container elementor-column-gap-default">
					<div class="elementor-column elementor-col-50 elementor-top-column elementor-element elementor-element-13fe9ee0" data-id="13fe9ee0" data-element_type="column" data-e-type="column">
			<div class="elementor-widget-wrap elementor-element-populated">
						<div class="elementor-element elementor-element-3cdf559a elementor-widget elementor-widget-image" data-id="3cdf559a" data-element_type="widget" data-e-type="widget" data-widget_type="image.default">
				<div class="elementor-widget-container">
															<img loading="lazy" decoding="async" width="776" height="772" src="https://theeventhorizons.com/wp-content/uploads/2023/07/100thousand.png" class="attachment-large size-large wp-image-297" alt="" srcset="https://theeventhorizons.com/wp-content/uploads/2023/07/100thousand.png 776w, https://theeventhorizons.com/wp-content/uploads/2023/07/100thousand-300x298.png 300w, https://theeventhorizons.com/wp-content/uploads/2023/07/100thousand-150x150.png 150w, https://theeventhorizons.com/wp-content/uploads/2023/07/100thousand-768x764.png 768w" sizes="(max-width: 776px) 100vw, 776px" />															</div>
				</div>
					</div>
		</div>
				<div class="elementor-column elementor-col-50 elementor-top-column elementor-element elementor-element-59704ecf" data-id="59704ecf" data-element_type="column" data-e-type="column">
			<div class="elementor-widget-wrap elementor-element-populated">
						<div class="elementor-element elementor-element-5a60362b elementor-widget elementor-widget-image" data-id="5a60362b" data-element_type="widget" data-e-type="widget" data-widget_type="image.default">
				<div class="elementor-widget-container">
															<img loading="lazy" decoding="async" width="776" height="772" src="https://theeventhorizons.com/wp-content/uploads/2023/07/1million.png" class="attachment-large size-large wp-image-298" alt="" srcset="https://theeventhorizons.com/wp-content/uploads/2023/07/1million.png 776w, https://theeventhorizons.com/wp-content/uploads/2023/07/1million-300x298.png 300w, https://theeventhorizons.com/wp-content/uploads/2023/07/1million-150x150.png 150w, https://theeventhorizons.com/wp-content/uploads/2023/07/1million-768x764.png 768w" sizes="(max-width: 776px) 100vw, 776px" />															</div>
				</div>
					</div>
		</div>
					</div>
		</section>
				<section class="elementor-section elementor-top-section elementor-element elementor-element-4078274a elementor-section-boxed elementor-section-height-default elementor-section-height-default" data-id="4078274a" data-element_type="section" data-e-type="section">
						<div class="elementor-container elementor-column-gap-default">
					<div class="elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-66025faa" data-id="66025faa" data-element_type="column" data-e-type="column">
			<div class="elementor-widget-wrap elementor-element-populated">
						<div class="elementor-element elementor-element-2234785a elementor-widget elementor-widget-heading" data-id="2234785a" data-element_type="widget" data-e-type="widget" data-widget_type="heading.default">
				<div class="elementor-widget-container">
					<h2 class="elementor-heading-title elementor-size-small">Figure 3: From left to right, 100 thousands and 1 million shots.
</h2>				</div>
				</div>
					</div>
		</div>
					</div>
		</section>
				<section class="elementor-section elementor-top-section elementor-element elementor-element-41cfce0a elementor-section-boxed elementor-section-height-default elementor-section-height-default" data-id="41cfce0a" data-element_type="section" data-e-type="section">
						<div class="elementor-container elementor-column-gap-default">
					<div class="elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-6f3e0714" data-id="6f3e0714" data-element_type="column" data-e-type="column">
			<div class="elementor-widget-wrap elementor-element-populated">
						<div class="elementor-element elementor-element-26628308 elementor-widget elementor-widget-text-editor" data-id="26628308" data-element_type="widget" data-e-type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
									<p>Similarly, one can use this method to estimate the area of the Millennium Falcon, a famous spaceship from the Star Wars series that measures 35 meters in length and 25 meters in width.</p>								</div>
				</div>
					</div>
		</div>
					</div>
		</section>
				<section class="elementor-section elementor-top-section elementor-element elementor-element-260e035b elementor-section-boxed elementor-section-height-default elementor-section-height-default" data-id="260e035b" data-element_type="section" data-e-type="section">
						<div class="elementor-container elementor-column-gap-default">
					<div class="elementor-column elementor-col-50 elementor-top-column elementor-element elementor-element-1eee9d9b" data-id="1eee9d9b" data-element_type="column" data-e-type="column">
			<div class="elementor-widget-wrap elementor-element-populated">
						<div class="elementor-element elementor-element-4dc1801e elementor-widget elementor-widget-image" data-id="4dc1801e" data-element_type="widget" data-e-type="widget" data-widget_type="image.default">
				<div class="elementor-widget-container">
															<img loading="lazy" decoding="async" width="1024" height="570" src="https://theeventhorizons.com/wp-content/uploads/2023/07/falcon4-1024x570.png" class="attachment-large size-large wp-image-300" alt="" srcset="https://theeventhorizons.com/wp-content/uploads/2023/07/falcon4-1024x570.png 1024w, https://theeventhorizons.com/wp-content/uploads/2023/07/falcon4-300x167.png 300w, https://theeventhorizons.com/wp-content/uploads/2023/07/falcon4-768x427.png 768w, https://theeventhorizons.com/wp-content/uploads/2023/07/falcon4.png 1298w" sizes="(max-width: 1024px) 100vw, 1024px" />															</div>
				</div>
					</div>
		</div>
				<div class="elementor-column elementor-col-50 elementor-top-column elementor-element elementor-element-5fe535f9" data-id="5fe535f9" data-element_type="column" data-e-type="column">
			<div class="elementor-widget-wrap elementor-element-populated">
						<div class="elementor-element elementor-element-131714db elementor-widget elementor-widget-image" data-id="131714db" data-element_type="widget" data-e-type="widget" data-widget_type="image.default">
				<div class="elementor-widget-container">
															<img loading="lazy" decoding="async" width="890" height="878" src="https://theeventhorizons.com/wp-content/uploads/2023/07/falcon3.png" class="attachment-large size-large wp-image-299" alt="" srcset="https://theeventhorizons.com/wp-content/uploads/2023/07/falcon3.png 890w, https://theeventhorizons.com/wp-content/uploads/2023/07/falcon3-300x296.png 300w, https://theeventhorizons.com/wp-content/uploads/2023/07/falcon3-768x758.png 768w" sizes="(max-width: 890px) 100vw, 890px" />															</div>
				</div>
					</div>
		</div>
					</div>
		</section>
				<section class="elementor-section elementor-top-section elementor-element elementor-element-2291697a elementor-section-boxed elementor-section-height-default elementor-section-height-default" data-id="2291697a" data-element_type="section" data-e-type="section">
						<div class="elementor-container elementor-column-gap-default">
					<div class="elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-a109d0f" data-id="a109d0f" data-element_type="column" data-e-type="column">
			<div class="elementor-widget-wrap elementor-element-populated">
						<div class="elementor-element elementor-element-2f93c080 elementor-widget elementor-widget-heading" data-id="2f93c080" data-element_type="widget" data-e-type="widget" data-widget_type="heading.default">
				<div class="elementor-widget-container">
					<h2 class="elementor-heading-title elementor-size-small">Figure 4: Here is the real spaceship photo and plan.</h2>				</div>
				</div>
					</div>
		</div>
					</div>
		</section>
				<section class="elementor-section elementor-top-section elementor-element elementor-element-7169396e elementor-section-boxed elementor-section-height-default elementor-section-height-default" data-id="7169396e" data-element_type="section" data-e-type="section">
						<div class="elementor-container elementor-column-gap-default">
					<div class="elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-13d6ab7e" data-id="13d6ab7e" data-element_type="column" data-e-type="column">
			<div class="elementor-widget-wrap elementor-element-populated">
						<div class="elementor-element elementor-element-779aaf8e elementor-widget elementor-widget-text-editor" data-id="779aaf8e" data-element_type="widget" data-e-type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
									<p>The methodology will almost be the same. We use a computer simulation where stormtroopers randomly shoot at the surface of the spaceship. Each point where a &#8220;stormtrooper&#8221; hits the surface is recorded and the total area is then calculated by counting the total number of points and comparing it to the total size of the spaceship&#8217;s surface. This method is very effective because it takes into account the irregular shapes of the spaceship&#8217;s surface, which could make it difficult for a more traditional area estimation. But, unfortunately, this will lead to the total destruction of the spaceship!</p><p>1. Put the army of stormtroopers in a closed and huge shooting range.<br />2. Draw a 35m x 25m rectangle to represent the surface of the back wall and stick the millennium falcon on it.<br />3. Order the stormtroopers to fire.<br />4. Count the number of shots that strike the surface of the Millennium Falcon.<br />5. Use the proportion of shots that strike the surface of the Millennium Falcon to the total number of shots to estimate the area of the Millennium Falcon. Specifically, you can use the following formula:<br />\begin{equation*}<br />\text{Area of Millennium Falcon}=35\times 25\frac{\text{Number of shots that strike the Millennium Falcon}}{\text{Total number of shots}}.<br />\end{equation*}<br />6. Repeat steps several times or increase the number of stormtroopers to get a more precise estimate of the area of the Millennium Falcon.<br /><br /></p>								</div>
				</div>
					</div>
		</div>
					</div>
		</section>
				<section class="elementor-section elementor-top-section elementor-element elementor-element-6379c1e1 elementor-section-boxed elementor-section-height-default elementor-section-height-default" data-id="6379c1e1" data-element_type="section" data-e-type="section">
						<div class="elementor-container elementor-column-gap-default">
					<div class="elementor-column elementor-col-33 elementor-top-column elementor-element elementor-element-fe97f33" data-id="fe97f33" data-element_type="column" data-e-type="column">
			<div class="elementor-widget-wrap elementor-element-populated">
						<div class="elementor-element elementor-element-5ebab9ef elementor-widget elementor-widget-image" data-id="5ebab9ef" data-element_type="widget" data-e-type="widget" data-widget_type="image.default">
				<div class="elementor-widget-container">
															<img loading="lazy" decoding="async" width="628" height="844" src="https://theeventhorizons.com/wp-content/uploads/2023/07/10thousandF.png" class="attachment-large size-large wp-image-301" alt="" srcset="https://theeventhorizons.com/wp-content/uploads/2023/07/10thousandF.png 628w, https://theeventhorizons.com/wp-content/uploads/2023/07/10thousandF-223x300.png 223w" sizes="(max-width: 628px) 100vw, 628px" />															</div>
				</div>
					</div>
		</div>
				<div class="elementor-column elementor-col-33 elementor-top-column elementor-element elementor-element-29884a17" data-id="29884a17" data-element_type="column" data-e-type="column">
			<div class="elementor-widget-wrap elementor-element-populated">
						<div class="elementor-element elementor-element-25269628 elementor-widget elementor-widget-image" data-id="25269628" data-element_type="widget" data-e-type="widget" data-widget_type="image.default">
				<div class="elementor-widget-container">
															<img loading="lazy" decoding="async" width="628" height="843" src="https://theeventhorizons.com/wp-content/uploads/2023/07/100thousandF.png" class="attachment-large size-large wp-image-302" alt="" srcset="https://theeventhorizons.com/wp-content/uploads/2023/07/100thousandF.png 628w, https://theeventhorizons.com/wp-content/uploads/2023/07/100thousandF-223x300.png 223w" sizes="(max-width: 628px) 100vw, 628px" />															</div>
				</div>
					</div>
		</div>
				<div class="elementor-column elementor-col-33 elementor-top-column elementor-element elementor-element-432eb565" data-id="432eb565" data-element_type="column" data-e-type="column">
			<div class="elementor-widget-wrap elementor-element-populated">
						<div class="elementor-element elementor-element-311ddf65 elementor-widget elementor-widget-image" data-id="311ddf65" data-element_type="widget" data-e-type="widget" data-widget_type="image.default">
				<div class="elementor-widget-container">
															<img loading="lazy" decoding="async" width="624" height="839" src="https://theeventhorizons.com/wp-content/uploads/2023/07/1millionF.png" class="attachment-large size-large wp-image-303" alt="" srcset="https://theeventhorizons.com/wp-content/uploads/2023/07/1millionF.png 624w, https://theeventhorizons.com/wp-content/uploads/2023/07/1millionF-223x300.png 223w" sizes="(max-width: 624px) 100vw, 624px" />															</div>
				</div>
					</div>
		</div>
					</div>
		</section>
				<section class="elementor-section elementor-top-section elementor-element elementor-element-5be2b59c elementor-section-boxed elementor-section-height-default elementor-section-height-default" data-id="5be2b59c" data-element_type="section" data-e-type="section">
						<div class="elementor-container elementor-column-gap-default">
					<div class="elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-4c46138a" data-id="4c46138a" data-element_type="column" data-e-type="column">
			<div class="elementor-widget-wrap elementor-element-populated">
						<div class="elementor-element elementor-element-1fc96b02 elementor-widget elementor-widget-heading" data-id="1fc96b02" data-element_type="widget" data-e-type="widget" data-widget_type="heading.default">
				<div class="elementor-widget-container">
					<h2 class="elementor-heading-title elementor-size-small">Figure 5: From left to right, with 10 thousands, 100 thousands and 1 million shots.</h2>				</div>
				</div>
					</div>
		</div>
					</div>
		</section>
				<section class="elementor-section elementor-top-section elementor-element elementor-element-6fd9af84 elementor-section-boxed elementor-section-height-default elementor-section-height-default" data-id="6fd9af84" data-element_type="section" data-e-type="section">
						<div class="elementor-container elementor-column-gap-default">
					<div class="elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-523c3a0f" data-id="523c3a0f" data-element_type="column" data-e-type="column">
			<div class="elementor-widget-wrap elementor-element-populated">
						<div class="elementor-element elementor-element-9ff051d elementor-widget elementor-widget-text-editor" data-id="9ff051d" data-element_type="widget" data-e-type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
									<p>The accuracy of the Monte Carlo method for estimating areas depends on the number of randomly generated shots. The more impacts you generate, the more accurate your estimate will be. However, it is important to note that even if you generate a large number of impacts, you will never be able to calculate the exact value of the area you consider. For example, with 1 million stormtroopers, you can get an estimate of π with an accuracy of about 2 decimal places. For the millenium falcon area, we get approximately 400.855m<span style="font-size: 14px; color: var( --e-global-color-text );">².</span></p>								</div>
				</div>
					</div>
		</div>
					</div>
		</section>
				<section class="elementor-section elementor-top-section elementor-element elementor-element-7ebb5562 elementor-section-boxed elementor-section-height-default elementor-section-height-default" data-id="7ebb5562" data-element_type="section" data-e-type="section">
						<div class="elementor-container elementor-column-gap-default">
					<div class="elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-33c6bb0e" data-id="33c6bb0e" data-element_type="column" data-e-type="column">
			<div class="elementor-widget-wrap elementor-element-populated">
						<div class="elementor-element elementor-element-61758fe0 elementor-widget elementor-widget-text-editor" data-id="61758fe0" data-element_type="widget" data-e-type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
									<h2 data-elementor-setting-key="title" data-pen-placeholder="Écrivez ici..."> </h2><h2 class="elementor-heading-title elementor-size-large elementor-inline-editing pen" style="font-variant-ligatures: normal; font-variant-caps: normal; font-family: 'Roboto Serif', sans-serif; font-size: 29px; font-style: normal; color: #414141;" data-elementor-setting-key="title" data-pen-placeholder="Écrivez ici...">The importance of lack of precision</h2><p>The Monte Carlo method relies heavily on the generation of random numbers to simulate random events. This is where the lack of precision of the stormtroopers comes in. In the previous example, the stormtroopers&#8217; lack of precision in shooting represents the randomness required for the Monte Carlo method to work effectively (here, they shoot perfectly bad). Without this randomness, the method would not be able to accurately approximate results.</p><p>Let me explain this concept by introducing Han Solo, a highly skilled marksman, into the simulation. The distribution of shots fired would no longer be uniformly random, but rather, it would be weighted towards the areas where Han Solo aims. More precisely, if we estimate its precision rate as we did with the stormtroopers, we observe that he shoots almost perfectly well.</p>								</div>
				</div>
					</div>
		</div>
					</div>
		</section>
				<section class="elementor-section elementor-top-section elementor-element elementor-element-771ab516 elementor-section-boxed elementor-section-height-default elementor-section-height-default" data-id="771ab516" data-element_type="section" data-e-type="section">
						<div class="elementor-container elementor-column-gap-default">
					<div class="elementor-column elementor-col-50 elementor-top-column elementor-element elementor-element-30ebf619" data-id="30ebf619" data-element_type="column" data-e-type="column">
			<div class="elementor-widget-wrap elementor-element-populated">
						<div class="elementor-element elementor-element-6c6c2e4c elementor-widget elementor-widget-image" data-id="6c6c2e4c" data-element_type="widget" data-e-type="widget" data-widget_type="image.default">
				<div class="elementor-widget-container">
															<img loading="lazy" decoding="async" width="704" height="596" src="https://theeventhorizons.com/wp-content/uploads/2023/07/han.png" class="attachment-large size-large wp-image-304" alt="" srcset="https://theeventhorizons.com/wp-content/uploads/2023/07/han.png 704w, https://theeventhorizons.com/wp-content/uploads/2023/07/han-300x254.png 300w" sizes="(max-width: 704px) 100vw, 704px" />															</div>
				</div>
					</div>
		</div>
				<div class="elementor-column elementor-col-50 elementor-top-column elementor-element elementor-element-455c8713" data-id="455c8713" data-element_type="column" data-e-type="column">
			<div class="elementor-widget-wrap elementor-element-populated">
						<div class="elementor-element elementor-element-1fd32517 elementor-widget elementor-widget-image" data-id="1fd32517" data-element_type="widget" data-e-type="widget" data-widget_type="image.default">
				<div class="elementor-widget-container">
															<img loading="lazy" decoding="async" width="772" height="774" src="https://theeventhorizons.com/wp-content/uploads/2023/07/hanshot.png" class="attachment-large size-large wp-image-305" alt="" srcset="https://theeventhorizons.com/wp-content/uploads/2023/07/hanshot.png 772w, https://theeventhorizons.com/wp-content/uploads/2023/07/hanshot-300x300.png 300w, https://theeventhorizons.com/wp-content/uploads/2023/07/hanshot-150x150.png 150w, https://theeventhorizons.com/wp-content/uploads/2023/07/hanshot-768x770.png 768w" sizes="(max-width: 772px) 100vw, 772px" />															</div>
				</div>
					</div>
		</div>
					</div>
		</section>
				<section class="elementor-section elementor-top-section elementor-element elementor-element-52fea7e7 elementor-section-boxed elementor-section-height-default elementor-section-height-default" data-id="52fea7e7" data-element_type="section" data-e-type="section">
						<div class="elementor-container elementor-column-gap-default">
					<div class="elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-828e4ad" data-id="828e4ad" data-element_type="column" data-e-type="column">
			<div class="elementor-widget-wrap elementor-element-populated">
						<div class="elementor-element elementor-element-78e7d569 elementor-widget elementor-widget-heading" data-id="78e7d569" data-element_type="widget" data-e-type="widget" data-widget_type="heading.default">
				<div class="elementor-widget-container">
					<h2 class="elementor-heading-title elementor-size-small">Figure 6: Han solo firing one million shots.</h2>				</div>
				</div>
					</div>
		</div>
					</div>
		</section>
				<section class="elementor-section elementor-top-section elementor-element elementor-element-430b8307 elementor-section-boxed elementor-section-height-default elementor-section-height-default" data-id="430b8307" data-element_type="section" data-e-type="section">
						<div class="elementor-container elementor-column-gap-default">
					<div class="elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-55b6b538" data-id="55b6b538" data-element_type="column" data-e-type="column">
			<div class="elementor-widget-wrap elementor-element-populated">
						<div class="elementor-element elementor-element-30585e3d elementor-widget elementor-widget-text-editor" data-id="30585e3d" data-element_type="widget" data-e-type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
									<p>Maybe because Chewbacca is bothering him or because he has dust in his eye, and this is why its precision rate is not 100 percent (he says). Now, how good is he at estimating π? By using the same formula <br />\begin{equation*}<br />\pi=\frac{\text{Number of impact in the circle}}{\text{Total number of impact}},<br />\end{equation*}<br />it seems that π is more or less equal to 4 with 1 million of shots.</p><p>This highlights an important consideration when using the Monte Carlo method &#8211; the accuracy of the results depends heavily on the random nature of the simulation. Introducing biases or non-uniform distributions can greatly impact the effectiveness of the method. Roughly speaking, it means that to be accurate, the random numbers generated must be truly random and not follow a predictable pattern or being precise.</p>								</div>
				</div>
					</div>
		</div>
					</div>
		</section>
				<section class="elementor-section elementor-top-section elementor-element elementor-element-72e381c9 elementor-section-boxed elementor-section-height-default elementor-section-height-default" data-id="72e381c9" data-element_type="section" data-e-type="section">
						<div class="elementor-container elementor-column-gap-default">
					<div class="elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-7bfb428e" data-id="7bfb428e" data-element_type="column" data-e-type="column">
			<div class="elementor-widget-wrap elementor-element-populated">
						<div class="elementor-element elementor-element-47e1b033 elementor-widget elementor-widget-text-editor" data-id="47e1b033" data-element_type="widget" data-e-type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
									<h2 data-elementor-setting-key="title" data-pen-placeholder="Écrivez ici..."> </h2><h2 class="elementor-heading-title elementor-size-large elementor-inline-editing pen" style="font-variant-ligatures: normal; font-variant-caps: normal; font-family: 'Roboto Serif', sans-serif; font-size: 29px; font-style: normal; color: #414141;" data-elementor-setting-key="title" data-pen-placeholder="Écrivez ici...">Generation of random numbers</h2><p>Generating random numbers is a fundamental task in many fields, ranging from computer science to cryptography and simulations. While we often think of randomness as something that occurs naturally, such as the roll of a die or the flip of a coin, many random numbers used in computing are actually generated through sophisticated algorithms or physical phenomena.</p><p>One widely used method is the pseudo-random number generator, which produces a sequence of numbers that appears random, but is actually calculated deterministically from an initial &#8220;seed&#8221; value. Although not truly random, pseudo-random generators are highly efficient and unpredictable enough to meet most practical needs. However, they are subject to periodicities and correlations in the sequences produced, which can pose security risks in certain applications. By using the Star Wars analogy, it consists in taking a perfect imperial sniper which follows a shooting pattern; you only have to order the first target to hit and each shoot will be a defined function of the previous one.</p>								</div>
				</div>
					</div>
		</div>
					</div>
		</section>
				<section class="elementor-section elementor-top-section elementor-element elementor-element-43645b58 elementor-section-boxed elementor-section-height-default elementor-section-height-default" data-id="43645b58" data-element_type="section" data-e-type="section">
						<div class="elementor-container elementor-column-gap-default">
					<div class="elementor-column elementor-col-50 elementor-top-column elementor-element elementor-element-2c859974" data-id="2c859974" data-element_type="column" data-e-type="column">
			<div class="elementor-widget-wrap elementor-element-populated">
						<div class="elementor-element elementor-element-2ee93cce elementor-widget elementor-widget-image" data-id="2ee93cce" data-element_type="widget" data-e-type="widget" data-widget_type="image.default">
				<div class="elementor-widget-container">
															<img loading="lazy" decoding="async" width="1024" height="743" src="https://theeventhorizons.com/wp-content/uploads/2023/07/sniper-1024x743.png" class="attachment-large size-large wp-image-306" alt="" srcset="https://theeventhorizons.com/wp-content/uploads/2023/07/sniper-1024x743.png 1024w, https://theeventhorizons.com/wp-content/uploads/2023/07/sniper-300x218.png 300w, https://theeventhorizons.com/wp-content/uploads/2023/07/sniper-768x557.png 768w, https://theeventhorizons.com/wp-content/uploads/2023/07/sniper-1536x1114.png 1536w, https://theeventhorizons.com/wp-content/uploads/2023/07/sniper-2048x1486.png 2048w" sizes="(max-width: 1024px) 100vw, 1024px" />															</div>
				</div>
					</div>
		</div>
				<div class="elementor-column elementor-col-50 elementor-top-column elementor-element elementor-element-376725da" data-id="376725da" data-element_type="column" data-e-type="column">
			<div class="elementor-widget-wrap elementor-element-populated">
						<div class="elementor-element elementor-element-491518e9 elementor-widget elementor-widget-image" data-id="491518e9" data-element_type="widget" data-e-type="widget" data-widget_type="image.default">
				<div class="elementor-widget-container">
															<img loading="lazy" decoding="async" width="736" height="734" src="https://theeventhorizons.com/wp-content/uploads/2023/07/plan.png" class="attachment-large size-large wp-image-307" alt="" srcset="https://theeventhorizons.com/wp-content/uploads/2023/07/plan.png 736w, https://theeventhorizons.com/wp-content/uploads/2023/07/plan-300x300.png 300w, https://theeventhorizons.com/wp-content/uploads/2023/07/plan-150x150.png 150w" sizes="(max-width: 736px) 100vw, 736px" />															</div>
				</div>
					</div>
		</div>
					</div>
		</section>
				<section class="elementor-section elementor-top-section elementor-element elementor-element-36d18908 elementor-section-boxed elementor-section-height-default elementor-section-height-default" data-id="36d18908" data-element_type="section" data-e-type="section">
						<div class="elementor-container elementor-column-gap-default">
					<div class="elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-70763668" data-id="70763668" data-element_type="column" data-e-type="column">
			<div class="elementor-widget-wrap elementor-element-populated">
						<div class="elementor-element elementor-element-246c8988 elementor-widget elementor-widget-heading" data-id="246c8988" data-element_type="widget" data-e-type="widget" data-widget_type="heading.default">
				<div class="elementor-widget-container">
					<h2 class="elementor-heading-title elementor-size-small">Figure 7: An imperial sniper with a part of his shooting pattern.</h2>				</div>
				</div>
					</div>
		</div>
					</div>
		</section>
				<section class="elementor-section elementor-top-section elementor-element elementor-element-778885b elementor-section-boxed elementor-section-height-default elementor-section-height-default" data-id="778885b" data-element_type="section" data-e-type="section">
						<div class="elementor-container elementor-column-gap-default">
					<div class="elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-15ffd351" data-id="15ffd351" data-element_type="column" data-e-type="column">
			<div class="elementor-widget-wrap elementor-element-populated">
						<div class="elementor-element elementor-element-58fbbd07 elementor-widget elementor-widget-text-editor" data-id="58fbbd07" data-element_type="widget" data-e-type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
									<p>Now, imagine that you are a rebel spy and you want to send a secret message to your base. For this, you need a random number that will serve as an encryption key. You could use a pseudorandom number generator to create one, but there is always a risk that the Empire has been able to predict the sequence of numbers you are going to use. To make sure that your encryption key is truly random, you could use a quantum number generator.</p><p>In this example, the pseudorandom number generator would be like an Empire soldier who follows a predefined and easily predictable attack plan as the imperial sniper. On the other hand, the quantum number generator would be like a scientist rebel who exploits the unique properties of light sabers to find unpredictable solutions to each situation. As quantum numbers are generated from unpredictable quantum phenomena such as polarization, phase, or frequency of photons, the Empire cannot predict the sequence of numbers you will use, making your secret message much safer. These generators produce numbers that are truly random and impossible to replicate. While still relatively new and expensive, quantum random number generators hold great promise for applications requiring the highest levels of security and unpredictability.</p>								</div>
				</div>
					</div>
		</div>
					</div>
		</section>
				<section class="elementor-section elementor-top-section elementor-element elementor-element-62ea9fd4 elementor-section-boxed elementor-section-height-default elementor-section-height-default" data-id="62ea9fd4" data-element_type="section" data-e-type="section">
						<div class="elementor-container elementor-column-gap-default">
					<div class="elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-4d189414" data-id="4d189414" data-element_type="column" data-e-type="column">
			<div class="elementor-widget-wrap elementor-element-populated">
						<div class="elementor-element elementor-element-3f70524a elementor-widget elementor-widget-text-editor" data-id="3f70524a" data-element_type="widget" data-e-type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
									<h2 data-elementor-setting-key="title" data-pen-placeholder="Écrivez ici..."> </h2><h2 class="elementor-heading-title elementor-size-large elementor-inline-editing pen" style="font-variant-ligatures: normal; font-variant-caps: normal; font-family: 'Roboto Serif', sans-serif; font-size: 29px; font-style: normal; color: #414141;" data-elementor-setting-key="title" data-pen-placeholder="Écrivez ici...">The Versatility and Power of the Monte Carlo Method</h2><p>To sum up, the Monte Carlo method is a versatile and powerful mathematical technique that allows for the approximation of complex results that are otherwise difficult to calculate precisely. The use of random or pseudo-random numbers to simulate random events and determine probabilistic outcomes makes it an effective tool for various applications, as demonstrated by the simulations of stormtroopers&#8217; shootings. The method&#8217;s applications extend beyond estimating mathematical constants and areas of irregular shapes, to include predicting the outcome of elections, simulating population growth, and estimating the probability of rolling a certain number on a dice game.</p><p> The Monte Carlo method is a valuable tool for numerous fields, such as physics, engineering, and finance, making it an essential component of the mathematician and statistician&#8217;s toolkit.</p>								</div>
				</div>
					</div>
		</div>
					</div>
		</section>
				<section class="elementor-section elementor-top-section elementor-element elementor-element-36bf0986 elementor-section-boxed elementor-section-height-default elementor-section-height-default" data-id="36bf0986" data-element_type="section" data-e-type="section">
						<div class="elementor-container elementor-column-gap-default">
					<div class="elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-6e3a3ed8" data-id="6e3a3ed8" data-element_type="column" data-e-type="column">
			<div class="elementor-widget-wrap elementor-element-populated">
						<div class="elementor-element elementor-element-4b171ca elementor-widget elementor-widget-image" data-id="4b171ca" data-element_type="widget" data-e-type="widget" data-widget_type="image.default">
				<div class="elementor-widget-container">
															<img loading="lazy" decoding="async" width="1024" height="547" src="https://theeventhorizons.com/wp-content/uploads/2023/07/yoda2-1024x547.png" class="attachment-large size-large wp-image-308" alt="" srcset="https://theeventhorizons.com/wp-content/uploads/2023/07/yoda2-1024x547.png 1024w, https://theeventhorizons.com/wp-content/uploads/2023/07/yoda2-300x160.png 300w, https://theeventhorizons.com/wp-content/uploads/2023/07/yoda2-768x411.png 768w, https://theeventhorizons.com/wp-content/uploads/2023/07/yoda2.png 1169w" sizes="(max-width: 1024px) 100vw, 1024px" />															</div>
				</div>
					</div>
		</div>
					</div>
		</section>
				<section class="elementor-section elementor-top-section elementor-element elementor-element-3da7bcb2 elementor-section-boxed elementor-section-height-default elementor-section-height-default" data-id="3da7bcb2" data-element_type="section" data-e-type="section">
						<div class="elementor-container elementor-column-gap-default">
					<div class="elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-33085cd" data-id="33085cd" data-element_type="column" data-e-type="column">
			<div class="elementor-widget-wrap elementor-element-populated">
						<div class="elementor-element elementor-element-67842ff6 elementor-widget elementor-widget-spacer" data-id="67842ff6" data-element_type="widget" data-e-type="widget" data-widget_type="spacer.default">
				<div class="elementor-widget-container">
							<div class="elementor-spacer">
			<div class="elementor-spacer-inner"></div>
		</div>
						</div>
				</div>
					</div>
		</div>
					</div>
		</section>
				<section class="elementor-section elementor-top-section elementor-element elementor-element-1ff8cd9c elementor-section-boxed elementor-section-height-default elementor-section-height-default" data-id="1ff8cd9c" data-element_type="section" data-e-type="section">
						<div class="elementor-container elementor-column-gap-default">
					<div class="elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-6113ee0e" data-id="6113ee0e" data-element_type="column" data-e-type="column">
			<div class="elementor-widget-wrap elementor-element-populated">
						<div class="elementor-element elementor-element-2ec3a36b elementor-widget elementor-widget-heading" data-id="2ec3a36b" data-element_type="widget" data-e-type="widget" data-widget_type="heading.default">
				<div class="elementor-widget-container">
					<h2 class="elementor-heading-title elementor-size-large">Bibliography</h2>				</div>
				</div>
					</div>
		</div>
					</div>
		</section>
				<section class="elementor-section elementor-top-section elementor-element elementor-element-3d0aa54 elementor-section-boxed elementor-section-height-default elementor-section-height-default" data-id="3d0aa54" data-element_type="section" data-e-type="section">
						<div class="elementor-container elementor-column-gap-default">
					<div class="elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-50101f36" data-id="50101f36" data-element_type="column" data-e-type="column">
			<div class="elementor-widget-wrap elementor-element-populated">
						<div class="elementor-element elementor-element-74974dae elementor-widget elementor-widget-text-editor" data-id="74974dae" data-element_type="widget" data-e-type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
									<p>M. Kalos, P. Whitlock, Monte Carlo Methods, 2008.</p><p>D. P. Kroese, T. Taimre, Z.I. Botev, Handbook of Monte Carlo Methods, 2011.</p><p>D. P. Kroese, T. Brereton, T. Taimre, Z.I. Botev, Why the Monte Carlo method is so important today, 2014.</p><p>S. Weinzierl, Introduction to Monte Carlo methods, 2000.</p>								</div>
				</div>
					</div>
		</div>
					</div>
		</section>
				<section class="elementor-section elementor-top-section elementor-element elementor-element-a1992de elementor-section-boxed elementor-section-height-default elementor-section-height-default" data-id="a1992de" data-element_type="section" data-e-type="section">
						<div class="elementor-container elementor-column-gap-default">
					<div class="elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-fa0df85" data-id="fa0df85" data-element_type="column" data-e-type="column">
			<div class="elementor-widget-wrap">
							</div>
		</div>
					</div>
		</section>
				<section class="elementor-section elementor-top-section elementor-element elementor-element-36cc0f5 elementor-section-boxed elementor-section-height-default elementor-section-height-default" data-id="36cc0f5" data-element_type="section" data-e-type="section">
						<div class="elementor-container elementor-column-gap-default">
					<div class="elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-ec9ee8f" data-id="ec9ee8f" data-element_type="column" data-e-type="column">
			<div class="elementor-widget-wrap elementor-element-populated">
						<div class="elementor-element elementor-element-7aac517 elementor-widget elementor-widget-spacer" data-id="7aac517" data-element_type="widget" data-e-type="widget" data-widget_type="spacer.default">
				<div class="elementor-widget-container">
							<div class="elementor-spacer">
			<div class="elementor-spacer-inner"></div>
		</div>
						</div>
				</div>
					</div>
		</div>
					</div>
		</section>
				<section class="elementor-section elementor-top-section elementor-element elementor-element-e69b643 elementor-section-boxed elementor-section-height-default elementor-section-height-default" data-id="e69b643" data-element_type="section" data-e-type="section">
						<div class="elementor-container elementor-column-gap-default">
					<div class="elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-dabe4bb" data-id="dabe4bb" data-element_type="column" data-e-type="column">
			<div class="elementor-widget-wrap elementor-element-populated">
						<div class="elementor-element elementor-element-5bb575c elementor-view-default elementor-position-block-start elementor-mobile-position-block-start elementor-widget elementor-widget-icon-box" data-id="5bb575c" data-element_type="widget" data-e-type="widget" data-widget_type="icon-box.default">
				<div class="elementor-widget-container">
							<div class="elementor-icon-box-wrapper">

						<div class="elementor-icon-box-icon">
				<span  class="elementor-icon">
				<i aria-hidden="true" class="fab fa-python"></i>				</span>
			</div>
			
			
		</div>
						</div>
				</div>
					</div>
		</div>
					</div>
		</section>
				<section class="elementor-section elementor-top-section elementor-element elementor-element-6161196 elementor-section-boxed elementor-section-height-default elementor-section-height-default" data-id="6161196" data-element_type="section" data-e-type="section">
						<div class="elementor-container elementor-column-gap-default">
					<div class="elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-5cfd073" data-id="5cfd073" data-element_type="column" data-e-type="column">
			<div class="elementor-widget-wrap elementor-element-populated">
						<div class="elementor-element elementor-element-f6ac239 elementor-widget elementor-widget-toggle" data-id="f6ac239" data-element_type="widget" data-e-type="widget" data-widget_type="toggle.default">
				<div class="elementor-widget-container">
							<div class="elementor-toggle">
							<div class="elementor-toggle-item">
					<div id="elementor-tab-title-2581" class="elementor-tab-title" data-tab="1" role="button" aria-controls="elementor-tab-content-2581" aria-expanded="false">
												<span class="elementor-toggle-icon elementor-toggle-icon-left" aria-hidden="true">
															<span class="elementor-toggle-icon-closed"><i class="fas fa-caret-right"></i></span>
								<span class="elementor-toggle-icon-opened"><i class="elementor-toggle-icon-opened fas fa-caret-up"></i></span>
													</span>
												<a class="elementor-toggle-title" tabindex="0">Estimation of pi by Stormtroopers</a>
					</div>

					<div id="elementor-tab-content-2581" class="elementor-tab-content elementor-clearfix" data-tab="1" role="region" aria-labelledby="elementor-tab-title-2581">
<pre class="wp-block-code has-black-background-color has-background"><code class="language-python line-numbers" lang="python">
import random
import matplotlib.pyplot as plt

def estimate_pi(n):
    num_points_circle = 0
    num_points_total = 0
    circle_x, circle_y = [], []
    square_x, square_y = [], []

    # Loop for generating random points and estimating π
    for _ in range(n):
        x = random.uniform(-1, 1)
        y = random.uniform(-1, 1)
        distance = x**2 + y**2
        if distance <= 1:
            num_points_circle += 1
            circle_x.append(x)
            circle_y.append(y)
        else:
            square_x.append(x)
            square_y.append(y)
        num_points_total += 1

    # Plotting the points on a graph
    plt.figure(figsize=(5, 5))
    plt.scatter(circle_x, circle_y, color='blue', s=0.1)
    plt.scatter(square_x, square_y, color='red', s=0.1)
    plt.xlim(-1.1, 1.1)
    plt.ylim(-1.1, 1.1)
    plt.title("Estimation of π using the Monte Carlo method\nN = {}".format(n))
    plt.show()

    # Calculating and returning the estimated value of π
    return 4 * num_points_circle / num_points_total

print(estimate_pi(10000))


</code></pre>
</div>
				</div>
							<div class="elementor-toggle-item">
					<div id="elementor-tab-title-2582" class="elementor-tab-title" data-tab="2" role="button" aria-controls="elementor-tab-content-2582" aria-expanded="false">
												<span class="elementor-toggle-icon elementor-toggle-icon-left" aria-hidden="true">
															<span class="elementor-toggle-icon-closed"><i class="fas fa-caret-right"></i></span>
								<span class="elementor-toggle-icon-opened"><i class="elementor-toggle-icon-opened fas fa-caret-up"></i></span>
													</span>
												<a class="elementor-toggle-title" tabindex="0">Estimation of the Millenium Falcon</a>
					</div>

					<div id="elementor-tab-content-2582" class="elementor-tab-content elementor-clearfix" data-tab="2" role="region" aria-labelledby="elementor-tab-title-2582">
<pre class="wp-block-code has-black-background-color has-background"><code class="language-python line-numbers" lang="python">

import cv2
import numpy as np
import random

# Load the image and convert it to grayscale
img = cv2.imread("/Users/.../falcon2.png", cv2.IMREAD_GRAYSCALE)

# Apply thresholding to get a binary image
ret, thresh = cv2.threshold(img, 127, 255, cv2.THRESH_BINARY)

# Invert the colors so that black becomes white and vice versa
thresh = cv2.bitwise_not(thresh)

# Find contours in the image
contours, hierarchy = cv2.findContours(thresh, cv2.RETR_EXTERNAL, cv2.CHAIN_APPROX_SIMPLE)

# Create a black image to draw the contours
contour_img = np.zeros((img.shape[0], img.shape[1], 3), np.uint8)

# Draw the contours in white on the black image
cv2.drawContours(contour_img, contours, -1, (255, 255, 255), 2)

# Get the size of the image in pixels
height, width = img.shape[:2]

# Retrieve the size of the image in pixels
size = img.shape[:2]

# Define the real dimensions of the Millennium Falcon
real_length = 35  # in meters
real_width = 25   # in meters

# Define the resolution of the image in pixels/meter
resolution = 144

# Calculate the total number of pixels of the ship's surface
total_surface_pixels = int(real_length * real_width * resolution**2)

# Number of random points to generate for the estimation
n = 1000000

# Number of points inside the black figure
num_points_inside = 0

# Generate random points in the image and count the number of points inside the black figure
for i in range(n):
    # Generate a random point in the image
    x = random.randint(0, width-1)
    y = random.randint(0, height-1)

    # Check if the point is inside the black figure
    if cv2.pointPolygonTest(contours[0], (x, y), False) == 1:
        num_points_inside += 1
        # Draw the point in blue
        cv2.circle(contour_img, (x, y), 1, (255, 0, 0), -1)
    else:
        # Draw the point in red
        cv2.circle(contour_img, (x, y), 1, (0, 0, 255), -1)

# Estimation of the area of the black figure using the Monte Carlo method
estimated_area = (num_points_inside / n) * (width * height)

# Display the image with points in blue and red
cv2.imshow('Image with points', contour_img)

# Wait for the user to press a key to close the window
cv2.waitKey(0)
cv2.destroyAllWindows()

# Display the estimated area of the black figure
print("Estimated area of the black figure:", estimated_area)


</code></pre>
</div>
				</div>
							<div class="elementor-toggle-item">
					<div id="elementor-tab-title-2583" class="elementor-tab-title" data-tab="3" role="button" aria-controls="elementor-tab-content-2583" aria-expanded="false">
												<span class="elementor-toggle-icon elementor-toggle-icon-left" aria-hidden="true">
															<span class="elementor-toggle-icon-closed"><i class="fas fa-caret-right"></i></span>
								<span class="elementor-toggle-icon-opened"><i class="elementor-toggle-icon-opened fas fa-caret-up"></i></span>
													</span>
												<a class="elementor-toggle-title" tabindex="0">Estimation of pi by Han Solo</a>
					</div>

					<div id="elementor-tab-content-2583" class="elementor-tab-content elementor-clearfix" data-tab="3" role="region" aria-labelledby="elementor-tab-title-2583">
<pre class="wp-block-code has-black-background-color has-background"><code class="language-python line-numbers" lang="python">


import random
import math
import matplotlib.pyplot as plt

num_shots = 1000000
circle_hits = 0
square_hits = 0
circle_x = []
circle_y = []
square_x = []
square_y = []

for i in range(num_shots):
    x = random.gauss(0, 0.05) # shots centered at the circle's center
    y = random.gauss(0, 0.05)
    distance = math.sqrt(x**2 + y**2)
    if distance <= 1:
        circle_hits += 1
        circle_x.append(x)
        circle_y.append(y)
    else:
        square_x.append(x)
        square_y.append(y)
    square_hits += 1
    if random.random() < 0.1: # 10% chance of shooting in the circle
        if distance <= 1:
            circle_hits -= 1
            circle_x.pop()
            circle_y.pop()
        else:
            circle_hits += 1
            circle_x.append(x)
            circle_y.append(y)
        square_hits -= 1

pi_estimation = 4 * circle_hits / square_hits
print("Estimation of pi:", pi_estimation)

fig, ax = plt.subplots(figsize=(6, 6))
ax.set_xlim([-1.2, 1.2])
ax.set_ylim([-1.2, 1.2])
ax.set_aspect('equal')
ax.scatter(square_x, square_y, color='red', s=1, label='Outside the circle')
ax.scatter(circle_x, circle_y, color='blue', s=1, label='Inside the circle')
circle = plt.Circle((0, 0), 1, color='black', fill=False)
ax.add_artist(circle)
ax.legend()
plt.show()



</code></pre>
</div>
				</div>
								</div>
						</div>
				</div>
					</div>
		</div>
					</div>
		</section>
				<section class="elementor-section elementor-top-section elementor-element elementor-element-c586581 elementor-section-boxed elementor-section-height-default elementor-section-height-default" data-id="c586581" data-element_type="section" data-e-type="section">
						<div class="elementor-container elementor-column-gap-default">
					<div class="elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-6df766d" data-id="6df766d" data-element_type="column" data-e-type="column">
			<div class="elementor-widget-wrap elementor-element-populated">
						<div class="elementor-element elementor-element-8e524f3 elementor-widget elementor-widget-heading" data-id="8e524f3" data-element_type="widget" data-e-type="widget" data-widget_type="heading.default">
				<div class="elementor-widget-container">
					<h2 class="elementor-heading-title elementor-size-small">To find the Millenium Falcon area, we used the following image.</h2>				</div>
				</div>
					</div>
		</div>
					</div>
		</section>
				<section class="elementor-section elementor-top-section elementor-element elementor-element-397bbf3 elementor-section-boxed elementor-section-height-default elementor-section-height-default" data-id="397bbf3" data-element_type="section" data-e-type="section">
						<div class="elementor-container elementor-column-gap-default">
					<div class="elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-c501b45" data-id="c501b45" data-element_type="column" data-e-type="column">
			<div class="elementor-widget-wrap elementor-element-populated">
						<div class="elementor-element elementor-element-f0f961a elementor-widget elementor-widget-image" data-id="f0f961a" data-element_type="widget" data-e-type="widget" data-widget_type="image.default">
				<div class="elementor-widget-container">
															<img loading="lazy" decoding="async" width="300" height="296" src="https://theeventhorizons.com/wp-content/uploads/2023/07/falcon2-300x296.png" class="attachment-medium size-medium wp-image-1994" alt="" srcset="https://theeventhorizons.com/wp-content/uploads/2023/07/falcon2-300x296.png 300w, https://theeventhorizons.com/wp-content/uploads/2023/07/falcon2-768x758.png 768w, https://theeventhorizons.com/wp-content/uploads/2023/07/falcon2.png 890w" sizes="(max-width: 300px) 100vw, 300px" />															</div>
				</div>
					</div>
		</div>
					</div>
		</section>
				</div>
		<p>The article <a href="https://theeventhorizons.com/stormtroopers/">Stormtroopers Are Bad at Shooting? Yes.</a> first appeared on <a href="https://theeventhorizons.com">The Event Horizons</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://theeventhorizons.com/stormtroopers/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		<enclosure url="https://theeventhorizons.com/wp-content/uploads/2023/07/StormvidEN.mp4" length="42453871" type="video/mp4" />

			</item>
	</channel>
</rss>
