Move Project Euler under puzzles.
This commit is contained in:
106
puzzles/project_euler/pe/p107.html
Normal file
106
puzzles/project_euler/pe/p107.html
Normal file
@@ -0,0 +1,106 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="author" content="Colin Hughes" />
|
||||
<meta name="description" content="A website dedicated to the fascinating world of mathematics and programming" />
|
||||
<meta name="keywords" content="programming,mathematics,problems,puzzles" />
|
||||
|
||||
<title>Problem 107 - Project Euler</title>
|
||||
<link rel="shortcut icon" href="http://projecteuler.net/favicon.ico" />
|
||||
<link rel="stylesheet" type="text/css" href="style_main.css" />
|
||||
<link rel="stylesheet" type="text/css" href="style_light.css" />
|
||||
<script type="text/x-mathjax-config">
|
||||
MathJax.Hub.Config({
|
||||
jax: ["input/TeX", "output/HTML-CSS"],
|
||||
tex2jax: {
|
||||
inlineMath: [ ["$","$"], ["\\(","\\)"] ],
|
||||
displayMath: [ ["$$","$$"], ["\\[","\\]"] ],
|
||||
processEscapes: true
|
||||
},
|
||||
"HTML-CSS": { availableFonts: ["TeX"] }
|
||||
});
|
||||
</script>
|
||||
|
||||
<script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS_HTML">
|
||||
</script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id="container">
|
||||
|
||||
<div id="nav" class="noprint">
|
||||
<ul>
|
||||
<li><a href="about" title="About" accesskey="h">About</a></li>
|
||||
<li><a href="register" title="Register" accesskey="1">Register</a></li>
|
||||
<li id="current"><a href="problems" title="Problems" accesskey="2">Problems</a></li>
|
||||
<li><a href="login" title="Login" accesskey="3">Login</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div id="info_panel"><a href="rss2_euler.xml"><img src="images/icon_rss.png" alt="RSS Feed" title="RSS Feed" /></a><a href="secure=1fd92"><img src="images/icon_lock.png" alt="Use secure connection" title="Use secure connection" /></a></div>
|
||||
|
||||
<div id="logo" class="noprint">
|
||||
<img src="images/pe_banner_light.png" alt="Project Euler .net" />
|
||||
</div>
|
||||
|
||||
<div id="content">
|
||||
<div style="text-align:center;" class="print"><img src="images/pe_banner.png" alt="projecteuler.net" style="border:none;" /></div>
|
||||
<h2>Minimal network</h2><div class="info" style="cursor:help;width:200px;margin-bottom:10px;"><h3>Problem 107</h3><span style="width:300px;color:#666;">Published on Friday, 21st October 2005, 06:00 pm; Solved by 5193</span></div>
|
||||
<div class="problem_content" role="problem">
|
||||
|
||||
<p>The following undirected network consists of seven vertices and twelve edges with a total weight of 243.</p>
|
||||
<div style='text-align:center;'>
|
||||
<img src='project/images/p_107_1.gif' width='381' height='278' alt='' /><br />
|
||||
</div>
|
||||
<p>The same network can be represented by the matrix below.</p>
|
||||
<table cellpadding='5' cellspacing='0' border='1' align='center'>
|
||||
<tr>
|
||||
<td> </td><td><b>A</b></td><td><b>B</b></td><td><b>C</b></td><td><b>D</b></td><td><b>E</b></td><td><b>F</b></td><td><b>G</b></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><b>A</b></td><td>-</td><td>16</td><td>12</td><td>21</td><td>-</td><td>-</td><td>-</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><b>B</b></td><td>16</td><td>-</td><td>-</td><td>17</td><td>20</td><td>-</td><td>-</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><b>C</b></td><td>12</td><td>-</td><td>-</td><td>28</td><td>-</td><td>31</td><td>-</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><b>D</b></td><td>21</td><td>17</td><td>28</td><td>-</td><td>18</td><td>19</td><td>23</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><b>E</b></td><td>-</td><td>20</td><td>-</td><td>18</td><td>-</td><td>-</td><td>11</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><b>F</b></td><td>-</td><td>-</td><td>31</td><td>19</td><td>-</td><td>-</td><td>27</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><b>G</b></td><td>-</td><td>-</td><td>-</td><td>23</td><td>11</td><td>27</td><td>-</td>
|
||||
</tr>
|
||||
</table>
|
||||
<p>However, it is possible to optimise the network by removing some edges and still ensure that all points on the network remain connected. The network which achieves the maximum saving is shown below. It has a weight of 93, representing a saving of 243 <img src='images/symbol_minus.gif' width='9' height='3' alt='−' border='0' style='vertical-align:middle;' /> 93 = 150 from the original network.</p>
|
||||
<div style='text-align:center;'>
|
||||
<img src='project/images/p_107_2.gif' width='385' height='288' alt='' /><br />
|
||||
</div>
|
||||
<p>Using <a href='project/network.txt'>network.txt</a> (right click and 'Save Link/Target As...'), a 6K text file containing a network with forty vertices, and given in matrix form, find the maximum saving which can be achieved by removing redundant edges whilst ensuring that the network remains connected.</p>
|
||||
|
||||
</div><br />
|
||||
<br /></div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div id="footer" class="noprint">
|
||||
<a href="copyright">Project Euler Copyright Information</a>
|
||||
<!--/Creative Commons License--><!-- <rdf:RDF xmlns="http://web.resource.org/cc/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#">
|
||||
<Work rdf:about="">
|
||||
<license rdf:resource="http://creativecommons.org/licenses/by-nc-sa/2.0/uk/" />
|
||||
<dc:type rdf:resource="http://purl.org/dc/dcmitype/Text" />
|
||||
</Work>
|
||||
<License rdf:about="http://creativecommons.org/licenses/by-nc-sa/2.0/uk/"><permits rdf:resource="http://web.resource.org/cc/Reproduction"/><permits rdf:resource="http://web.resource.org/cc/Distribution"/><requires rdf:resource="http://web.resource.org/cc/Notice"/><requires rdf:resource="http://web.resource.org/cc/Attribution"/><prohibits rdf:resource="http://web.resource.org/cc/CommercialUse"/><permits rdf:resource="http://web.resource.org/cc/DerivativeWorks"/><requires rdf:resource="http://web.resource.org/cc/ShareAlike"/></License></rdf:RDF> -->
|
||||
</div>
|
||||
</div>
|
||||
<div style="height:1px;"> </div></body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user