Lucas Kent e39465ad2f Changes to be committed:
new file:   Files/flashplayer_32_sa.exe
	new file:   favicon.ico
	new file:   globe.gif
	new file:   imgs/download.png
	new file:   imgs/zuck.jpg
	new file:   index.html
	new file:   other.ico
	new file:   script.js
	new file:   site.webmanifest
	new file:   sitemap.html
	new file:   styles/backround.css
	new file:   styles/border.css
	new file:   styles/fonts/Titillium_Web/OFL.txt
	new file:   styles/fonts/Titillium_Web/TitilliumWeb-Black.ttf
	new file:   styles/fonts/Titillium_Web/TitilliumWeb-Bold.ttf
	new file:   styles/fonts/Titillium_Web/TitilliumWeb-BoldItalic.ttf
	new file:   styles/fonts/Titillium_Web/TitilliumWeb-ExtraLight.ttf
	new file:   styles/fonts/Titillium_Web/TitilliumWeb-ExtraLightItalic.ttf
	new file:   styles/fonts/Titillium_Web/TitilliumWeb-Italic.ttf
	new file:   styles/fonts/Titillium_Web/TitilliumWeb-Light.ttf
	new file:   styles/fonts/Titillium_Web/TitilliumWeb-LightItalic.ttf
	new file:   styles/fonts/Titillium_Web/TitilliumWeb-Regular.ttf
	new file:   styles/fonts/Titillium_Web/TitilliumWeb-SemiBold.ttf
	new file:   styles/fonts/Titillium_Web/TitilliumWeb-SemiBoldItalic.ttf
	new file:   styles/fonts/webfontkit-20221027-163353/generator_config.txt
	new file:   styles/fonts/webfontkit-20221027-163353/specimen_files/grid_12-825-55-15.css
	new file:   styles/fonts/webfontkit-20221027-163353/specimen_files/specimen_stylesheet.css
	new file:   styles/fonts/webfontkit-20221027-163353/stylesheet.css
	new file:   styles/fonts/webfontkit-20221027-163353/titilliumweb-extralight-demo.html
	new file:   styles/fonts/webfontkit-20221027-163353/titilliumweb-extralight-webfont.woff
	new file:   styles/fonts/webfontkit-20221027-163353/titilliumweb-extralight-webfont.woff2
	new file:   styles/fonts/webfontkit-20221027-165950/generator_config.txt
	new file:   styles/fonts/webfontkit-20221027-165950/specimen_files/grid_12-825-55-15.css
	new file:   styles/fonts/webfontkit-20221027-165950/specimen_files/specimen_stylesheet.css
	new file:   styles/fonts/webfontkit-20221027-165950/stylesheet.css
	new file:   styles/fonts/webfontkit-20221027-165950/titilliumweb-bold-demo.html
	new file:   styles/fonts/webfontkit-20221027-165950/titilliumweb-bold-webfont.woff
	new file:   styles/fonts/webfontkit-20221027-165950/titilliumweb-bold-webfont.woff2
	new file:   styles/style.css
	new file:   tools/2048/.gitignore
	new file:   tools/2048/.jshintrc
	new file:   tools/2048/CONTRIBUTING.md
	new file:   tools/2048/LICENSE.txt
	new file:   tools/2048/README.md
	new file:   tools/2048/Rakefile
	new file:   tools/2048/favicon.ico
	new file:   tools/2048/index.html
	new file:   tools/2048/js/animframe_polyfill.js
	new file:   tools/2048/js/application.js
	new file:   tools/2048/js/bind_polyfill.js
	new file:   tools/2048/js/classlist_polyfill.js
	new file:   tools/2048/js/game_manager.js
	new file:   tools/2048/js/grid.js
	new file:   tools/2048/js/html_actuator.js
	new file:   tools/2048/js/keyboard_input_manager.js
	new file:   tools/2048/js/local_storage_manager.js
	new file:   tools/2048/js/tile.js
    new file:   tools/2048/meta/apple-touch-icon.png
	new file:   tools/webretro/cores/neocd_libretro.js
	new file:   tools/webretro/cores/neocd_libretro.wasm
	new file:   tools/webretro/cores/nestopia_libretro.js
	new file:   tools/webretro/cores/nestopia_libretro.wasm
	new file:   tools/webretro/cores/o2em_libretro.js
	new file:   tools/webretro/cores/o2em_libretro.wasm
	new file:   tools/webretro/cores/opera_libretro.js
	new file:   tools/webretro/cores/opera_libretro.wasm
2022-11-02 08:40:01 -04:00

340 lines
14 KiB
HTML

<!doctype html>
<html lang="en"><!-- #BeginTemplate "/Templates/Advanced.dwt" --><!-- DW6 -->
<!-- Mirrored from www.mathsisfun.com/sets/power-set.html by HTTrack Website Copier/3.x [XR&CO'2014], Sat, 29 Oct 2022 00:32:07 GMT -->
<head>
<!-- #BeginEditable "doctitle" -->
<title>Power Set</title>
<script language="JavaScript" type="text/javascript">reSpell=[["flavor","flavour"],["flavors","flavours"]];</script>
<!-- #EndEditable -->
<meta name="keywords" content="math, maths, mathematics, school, homework, education" />
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width; initial-scale=1.0; user-scalable=true;" />
<meta name="HandheldFriendly" content="true"/>
<meta http-equiv="pics-label" content='(PICS-1.1 "http://www.classify.org/safesurf/" L gen true for "http://www.mathsisfun.com" r (SS~~000 1))' />
<link rel="stylesheet" type="text/css" href="../style3.css" />
<script src="../main3.js" type="text/javascript"></script>
</head>
<body id="bodybg" class="adv">
<div class="bg">
<div id="stt"></div>
<div id="hdr"></div>
<div id="logo"><a href="../index.html"><img src="../images/style/logo.svg" alt="Math is Fun" /></a></div>
<div id="advText">Advanced</div>
<div id="gtran"><script type="text/javascript">document.write(getTrans());</script></div>
<div id="gplus"><script type="text/javascript">document.write(getGPlus());</script></div>
<div id="adTopOuter" class="centerfull noprint">
<div id="adTop">
<script type="text/javascript">document.write(getAdTop());</script>
</div>
</div>
<div id="adHide">
<div id="showAds1"><a href="javascript:showAds()">Show Ads</a></div>
<div id="hideAds1"><a href="javascript:hideAds()">Hide Ads</a><br>
<a href="../about-ads.html">About Ads</a></div>
</div>
<div id="menuWide" class="menu">
<script type="text/javascript">document.write(getMenu(0));</script>
</div>
<div id="linkto">
<div id="linktort"><script type="text/javascript">document.write(getLinks());</script></div>
</div>
<div id="search" role="search"><script type="text/javascript">document.write(getSearch());</script></div>
<div id="menuSlim" class="menu">
<script type="text/javascript">document.write(getMenu(1));</script>
</div>
<div id="menuTiny" class="menu">
<script type="text/javascript">document.write(getMenu(2));</script>
</div>
<div id="extra"></div>
</div>
<div id="content" role="main"><!-- #BeginEditable "Body" -->
<h1 align="center">Power Set</h1>
<div align="center"><span class="large">A Power Set is a set of <i>all the subsets of a set</i>.</span></div>
<p align="center"><i><b>OK? Got that? Maybe an example will help...</b></i></p>
<h2>All The Subsets</h2>
<p style="float:right; margin: 0 0 5px 10px;"><img src="images/power-set.svg" alt="power set of {a,b,c}" /></p>
<p>For&nbsp;the&nbsp;<a href="sets-introduction.html">set</a> {a,b,c}:</p>
<ul>
<li>The empty set {} is a subset of {a,b,c}</li>
<li>And these are subsets: {a}, {b} and {c} </li>
<li>And these are also subsets: {a,b}, {a,c} and {b,c}</li>
<li>And {a,b,c} is a subset of {a,b,c} </li>
</ul>
<p>And altogether we get the <b>Power Set</b> of {a,b,c}:</p>
<p align="center"><font size="+1">P(S) =</font> <font size="+1">{</font> {}, {a}, {b}, {c}, {a, b}, {a, c}, {b, c}, {a, b, c} <font size="+1">}</font></p>
<p>Think of it as all the different ways we can select the items (the order of the items doesn't matter), including selecting none, or all.</p>
<div class="example"><p style="float:right; margin: 0 0 5px 10px;"><img src="../combinatorics/images/ice-cream.jpg" width="100" height="133" alt="ice cream" /></p>
<h3>Example: The shop has banana, chocolate and lemon ice cream. </h3>
<p>&nbsp;</p>
<p>What&nbsp;do you order?</p>
<ul>
<li>Nothing at all: {}</li>
<li>Or maybe just banana: {banana}. Or just {chocolate} or just {lemon}</li>
<li>Or two together: {banana,chocolate} or {banana,lemon} or {chocolate,lemon}</li>
<li>Or all three! {banana, chocolate,lemon}</li>
</ul>
<p><i>Question: if the shop also has strawberry flavor what are your options? Solution later</i>.</p>
</div>
<h2>How Many Subsets</h2>
<p>Easy! If the original set has <span class="large">n</span> members, then the Power Set will have <span class="large">2<sup>n</sup></span> members</p>
<div class="example">
<h3>Example: {a,b,c} has three members (<b>a</b>,<b>b</b> and <b>c</b>).</h3>
<p>So, the Power Set should have 2<sup>3</sup> = 8, which it does, as we worked out before.</p>
</div>
<h3>Notation</h3>
<p>The number of members of a set is often written as |S|, so when S has n members we can write:</p>
<div class="large" align="center">|P(S)| = 2<sup>n</sup></div>
<br />
<div class="example">
<h3>Example: for the set S={1,2,3,4,5} how many members will the power set have?</h3>
<p>Well, S has 5 members, so:</p>
<p align="center" class="large">|P(S)| = 2<sup>n</sup> = 2<sup>5</sup> = 32</p>
</div>
<p>You will see in a minute why the number of members is a power of 2</p>
<h2>It's Binary!</h2>
<p>And here is the most amazing thing. To create the Power Set, write down the sequence of <a href="../binary-number-system.html">binary numbers</a> (using <b>n</b> digits), and then let &quot;1&quot; mean &quot;put the matching member into this subset&quot;.</p>
<p>So &quot;101&quot; is replaced by 1 <b>a</b>, 0 <b>b</b> and 1 <b>c</b> to get us {a,c}</p>
<p>Like this:</p>
<div class="simple">
<table width="300" border="0" align="center">
<tr align="center">
<th width="10%">&nbsp;</th>
<th width="40%">abc</th>
<th width="40%">Subset</th>
</tr>
<tr align="center">
<td width="10%">0</td>
<td width="40%">000</td>
<td width="40%">{ }</td>
</tr>
<tr align="center">
<td width="10%">1</td>
<td width="40%">001</td>
<td width="40%">{c}</td>
</tr>
<tr align="center">
<td width="10%">2</td>
<td width="40%">010</td>
<td width="40%">{b}</td>
</tr>
<tr align="center">
<td width="10%">3</td>
<td width="40%">011</td>
<td width="40%">{b,c}</td>
</tr>
<tr align="center">
<td width="10%">4</td>
<td width="40%">100</td>
<td width="40%">{a}</td>
</tr>
<tr align="center">
<td width="10%">5</td>
<td width="40%">101</td>
<td width="40%">{a,c}</td>
</tr>
<tr align="center">
<td width="10%">6</td>
<td width="40%">110</td>
<td width="40%">{a,b}</td>
</tr>
<tr align="center">
<td width="10%">7</td>
<td width="40%">111</td>
<td width="40%">{a,b,c}</td>
</tr>
</table>
</div>
<p>Well, they are not in a pretty order, but they are all there.</p>
<h2>Another Example</h2>
<p style="float:right; margin: 0 0 5px 10px;"><img src="../combinatorics/images/ice-cream.jpg" width="100" height="133" alt="ice cream" /></p>
<p>Let's eat! We have four flavors of ice cream: <b>banana, chocolate, lemon, and strawberry</b>. How many different ways can we have them?</p>
<p>Let's use letters for the flavors: {b, c, l, s}. Example selections include: </p>
<ul>
<li>{} (nothing, you are on a diet)</li>
<li>{b, c, l, s} (every flavor)</li>
<li>{b, c} (banana and chocolate are good together)</li>
<li>etc</li>
</ul>
Let's make the table using &quot;binary&quot;:
<div class="simple">
<table width="300" border="0" align="center">
<tr align="center">
<th width="10%">&nbsp;</th>
<th width="40%">bcls</th>
<th width="40%">Subset</th>
</tr>
<tr align="center">
<td width="10%">0</td>
<td width="40%">0000</td>
<td width="40%">{}</td>
</tr>
<tr align="center">
<td width="10%">1</td>
<td width="40%">0001</td>
<td width="40%">{s}</td>
</tr>
<tr align="center">
<td width="10%">2</td>
<td width="40%">0010</td>
<td width="40%">{l}</td>
</tr>
<tr align="center">
<td width="10%">3</td>
<td width="40%">0011</td>
<td width="40%">{l,s}</td>
</tr>
<tr align="center">
<td width="10%">...</td>
<td width="40%"><i>... etc ..</i></td>
<td width="40%"><i>... etc ...</i></td>
</tr>
<tr align="center">
<td width="10%">12</td>
<td width="40%">1100</td>
<td width="40%">{b,c}</td>
</tr>
<tr align="center">
<td width="10%">13</td>
<td width="40%">1101</td>
<td width="40%">{b,c,s}</td>
</tr>
<tr align="center">
<td width="10%">14</td>
<td width="40%">1110</td>
<td width="40%">{b,c,l}</td>
</tr>
<tr align="center">
<td width="10%">15</td>
<td width="40%">1111</td>
<td width="40%">{b,c,l,s}</td>
</tr>
</table>
<p>And the result is (more neatly arranged):</p>
<p align="center"><font size="+1">P =</font> <font size="+1">{</font> {}, {b}, {c}, {l}, {s}, {b,c}, {b,l}, {b,s}, {c,l}, {c,s}, {l,s}, {b,c,l}, {b,c,s}, <br />
{b,l,s}, {c,l,s}, {b,c,l,s} <font size="+1">}</font></p>
</div>
<br />
<div class="beach">
<table border="0" align="center">
<tr>
<td><img src="../images/style/yin-yang.gif" width="100" height="100" alt="yin yang" /></td>
<td><h3>Symmetry</h3>
<p>In the table above, did you notice that the first subset is empty and the last has every member? </p>
<p>But did you also notice that the second subset has &quot;s&quot;, and the second last subset has everything <i>except</i> &quot;s&quot;?</p></td>
</tr>
<tr>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr>
<td><img src="../numbers/images/binary-symmetry.svg" alt="binary symmetry" /></td>
<td><p>In fact when we mirror that table about the middle we see there is a kind of symmetry. </p>
<p>This is because the binary numbers (that we used to help us get all those combinations) have a beautiful and elegant pattern.</p></td>
</tr>
</table>
</div>
<h2>A Prime Example</h2>
<p>The Power Set can be useful in unexpected areas. </p>
<p>I wanted to find all factors (not just the <a href="../prime-factorization.html">prime factors</a>, but <i>all</i> factors) of a number. </p>
<p>I could test all possible numbers: I could check 2, 3, 4, 5, 6, 7, etc... </p>
<p>That took a <b>long time</b> for large numbers.</p>
<p>But could I try to combine the prime factors?</p>
<p>Let me see, the prime factors of 510 are 2&times;3&times;5&times;17 (using <a href="../numbers/prime-factorization-tool.html">prime factor tool</a>).</p>
<p>So, <b>all the factors</b> of 510 are: </p>
<ul>
<li>2, 3, 5 and 17,</li>
<li>2&times;3, 2&times;5 and 2&times;17 as well, and </li>
<li>2&times;3&times;5 and 2&times;3&times;17 and ... </li>
<li>.. aha! Just like ice cream I needed a Power Set!</li>
</ul>
<p>And this is what I got:</p>
<div class="simple">
<table border="0" align="center">
<tr align="center">
<th>&nbsp;</th>
<th>2,3,5,17</th>
<th>Subset</th>
<th>Factors of 510</th>
</tr>
<tr align="center">
<td>0</td>
<td>0000</td>
<td>{ }</td>
<td>1</td>
</tr>
<tr align="center">
<td>1</td>
<td>0001</td>
<td>{17}</td>
<td>17</td>
</tr>
<tr align="center">
<td>2</td>
<td>0010</td>
<td>{5}</td>
<td>5</td>
</tr>
<tr align="center">
<td>3</td>
<td>0011</td>
<td>{5,17}</td>
<td>5 &times; 17 = 85</td>
</tr>
<tr align="center">
<td>4</td>
<td>0100</td>
<td>{3}</td>
<td>3</td>
</tr>
<tr align="center">
<td>5</td>
<td>0101</td>
<td>{3,17}</td>
<td>3 &times; 17 = 51</td>
</tr>
<tr align="center">
<td>&nbsp;</td>
<td><i>... etc ...</i></td>
<td><i>... etc ...</i></td>
<td><i>... etc ...</i></td>
</tr>
<tr align="center">
<td>15</td>
<td>1111</td>
<td>{2,3,5,17}</td>
<td>2 &times; 3 &times; 5 &times; 17 = 510</td>
</tr>
</table>
</div>
<p><br />
And the result? The factors of 510 are 1, 2, 3, 5, 6, 10, 15, 17, 30, 34, 51, 85, 102, 170, 255 and 510 (and &minus;1, &minus;2, &minus;3, etc as well). See the <i> <a href="../numbers/factors-all-tool.html">All Factors Tool</a></i>. </p>
<h2>Automated</h2>
<p>I couldn't resist making Power Sets available to you in an automated way.</p>
<p>So, when you need a power set, try <a href="power-set-maker.html">Power Set Maker</a>.</p>
<p>&nbsp;</p>
<div class="questions">
<script type="text/javascript">getQ(2028, 2029, 2030, 8274, 8275, 8276, 8277, 8278, 2031, 8279);</script>&nbsp; </div>
<div class="related"> <a href="sets-introduction.html">Introduction to Sets</a> <a href="../binary-digits.html">Binary Digits</a>
<a href="set-calculator.html">Set Calculator</a>
<a href="../geometry/symmetry.html">Symmetry</a> <a href="power-set-maker.html">Power Set Maker</a> <a href="index.html">Sets Index</a> </div>
<!-- #EndEditable --></div>
<div id="adend" class="centerfull noprint">
<script type="text/javascript">document.write(getAdEnd());</script>
</div>
<div id="footer" class="centerfull noprint">
<script type="text/javascript">document.write(getFooter());</script>
</div>
<div id="copyrt">
Copyright &copy; 2017 MathsIsFun.com
</div>
<script type="text/javascript">document.write(getBodyEnd());</script>
</body>
<!-- #EndTemplate -->
<!-- Mirrored from www.mathsisfun.com/sets/power-set.html by HTTrack Website Copier/3.x [XR&CO'2014], Sat, 29 Oct 2022 00:32:08 GMT -->
</html>