-
Notifications
You must be signed in to change notification settings - Fork 2
/
index.html
75 lines (74 loc) · 8.2 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
<!doctype html>
<html lang="en" prefix="og: http://ogp.me/ns#">
<head>
<meta charset="utf-8"/>
<title>Havel-Hakimi</title>
<meta name="twitter:card" content="summary"/>
<meta name="twitter:creator" content="@Jaconotar"/>
<meta property="og:title" content="Havel-Hakimi"/>
<meta property="og:url" content="http://jacquerie.github.io/hh/"/>
<meta property="og:description" content="A sequence of integers is called graphical if there exists a graph with it as its degree sequence. A theorem by Erdős and Gallai characterizes which sequences are graphical, but gives no algorithm to explicitly construct such a graph. Can you construct it?"/>
<meta property="og:image" content="http://jacquerie.github.io/hh/img/hh.png"/>
<link rel="shortcut icon" href="favicon.ico"/>
<link rel="apple-touch-icon-precomposed" href="img/favicon-152.png"/>
<script type="text/javascript"
src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/latest.js?config=TeX-MML-AM_CHTML">
</script>
<style>
/*** uncss> filename: http://jacquerie.github.io/hh/css/bootstrap.min.css ***/
/*!
* Bootstrap v3.1.1 (http://getbootstrap.com)
* Copyright 2011-2014 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
*/
/*! normalize.css v3.0.0 | MIT License | git.io/normalize */
html{font-family:sans-serif;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}body{margin:0}footer,header{display:block}a{background:transparent}a:active,a:hover{outline:0}strong{font-weight:bold}h1{font-size:2em;margin:0.67em 0}img{border:0}svg:not(:root){overflow:hidden}hr{-moz-box-sizing:content-box;box-sizing:content-box;height:0}button{color:inherit;font:inherit;margin:0}button{overflow:visible}button{text-transform:none}button{-webkit-appearance:button;cursor:pointer}button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0}@media print{*{text-shadow:none!important;color:#000!important;background:transparent!important;box-shadow:none!important}a,a:visited{text-decoration:underline}a[href]:after{content:" (" attr(href) ")"}img{page-break-inside:avoid}img{max-width:100%!important}p{orphans:3;widows:3}}*{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}*:before,*:after{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}html{font-size:62.5%;-webkit-tap-highlight-color:rgba(0,0,0,0)}body{font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:14px;line-height:1.42857143;color:#333;background-color:#fff}button{font-family:inherit;font-size:inherit;line-height:inherit}a{color:#428bca;text-decoration:none}a:hover,a:focus{color:#2a6496;text-decoration:underline}a:focus{outline:thin dotted;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}img{vertical-align:middle}hr{margin-top:20px;margin-bottom:20px;border:0;border-top:1px solid #eee}h1{font-family:inherit;font-weight:500;line-height:1.1;color:inherit}h1{margin-top:20px;margin-bottom:10px}h1{font-size:36px}p{margin:0 0 10px}ol{margin-top:0;margin-bottom:10px}.container{margin-right:auto;margin-left:auto;padding-left:15px;padding-right:15px}@media (min-width:768px){.container{width:750px}}@media (min-width:992px){.container{width:970px}}@media (min-width:1200px){.container{width:1170px}}.form-control::-moz-placeholder{color:#999;opacity:1}.form-control:-ms-input-placeholder{color:#999}.btn{display:inline-block;margin-bottom:0;font-weight:normal;text-align:center;vertical-align:middle;cursor:pointer;background-image:none;border:1px solid transparent;white-space:nowrap;padding:6px 12px;font-size:14px;line-height:1.42857143;border-radius:4px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.btn:focus,.btn:active:focus{outline:thin dotted;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}.btn:hover,.btn:focus{color:#333;text-decoration:none}.btn:active{outline:0;background-image:none;-webkit-box-shadow:inset 0 3px 5px rgba(0,0,0,0.125);box-shadow:inset 0 3px 5px rgba(0,0,0,0.125)}.btn-danger{color:#fff;background-color:#d9534f;border-color:#d43f3a}.btn-danger:hover,.btn-danger:focus,.btn-danger:active{color:#fff;background-color:#d2322d;border-color:#ac2925}.btn-danger:active{background-image:none}.btn-block{display:block;width:100%;padding-left:0;padding-right:0}@font-face{font-family:'Glyphicons Halflings';src:url(fonts/glyphicons-halflings-regular.eot);src:url(fonts/glyphicons-halflings-regular.eot?#iefix) format('embedded-opentype'),url(fonts/glyphicons-halflings-regular.woff) format('woff'),url(fonts/glyphicons-halflings-regular.ttf) format('truetype'),url(fonts/glyphicons-halflings-regular.svg#glyphicons_halflingsregular) format('svg')}.glyphicon{position:relative;top:1px;display:inline-block;font-family:'Glyphicons Halflings';font-style:normal;font-weight:normal;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.glyphicon-remove:before{content:"\e014"}.breadcrumb{padding:8px 15px;margin-bottom:20px;list-style:none;background-color:#f5f5f5;border-radius:4px}.breadcrumb>li{display:inline-block}.breadcrumb>li+li:before{content:"/\00a0";padding:0 5px;color:#ccc}.breadcrumb>.active{color:#999}body{font-size:16px;line-height:1.75}.container{max-width:600px}.signature{text-align:center}svg{background-color:#FFF;cursor:default;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none}svg:not(.active):not(.ctrl){cursor:crosshair}path.link{fill:none;stroke:#000;stroke-width:4px;cursor:default}svg:not(.active):not(.ctrl) path.link{cursor:pointer}path.link.dragline{pointer-events:none}path.link.hidden{stroke-width:0}circle.node{stroke-width:1.5px;cursor:pointer}text{font:16px sans-serif;pointer-events:none}text.degree{text-anchor:middle;font-weight:bold}
</style>
</head>
<body>
<div class="container">
<header>
<h1>Havel-Hakimi</h1>
<hr>
</header>
<div class="main">
<ol class="breadcrumb">
<li><a href="/">Home</a></li>
<li class="active">Havel-Hakimi</li>
</ol>
<p>A sequence of integers \(d_1,\dots,d_n\) is called <strong>graphical</strong>
if there exists a graph \(G\) with it as its degree sequence. A
<a href="http://en.wikipedia.org/wiki/Erd%C5%91s%E2%80%93Gallai_theorem">theorem by Erdős and Gallai</a> characterizes which sequences are graphical, but gives no
algorithm to explicitly construct such a graph.</p>
<p>Can <em>you</em> construct the graph given its degree sequence? Click and drag
from a node to another to build a link, select a link and press backspace to
delete it.
</p>
<svg></svg>
<div class="controls">
<button type="button" class="btn btn-danger btn-block">
<span class="glyphicon glyphicon-remove"></span> Reset
</button>
</div>
</div>
<footer>
<hr>
<p class="signature">Made by Jacopo Notarstefano
(<a href="https://twitter.com/Jaconotar">@Jaconotar</a>)<br /> Based on
<a href="http://bl.ocks.org/rkirsling/5001347">Directed Graph Editor</a> by
Ross Kirsling (<a href="http://rkirsling.github.io/">rkirsling</a>)</p>
</footer>
<a href="https://github.com/jacquerie/hh"><img style="position: absolute; top: 0; right: 0; border: 0;" src="https://camo.githubusercontent.com/365986a132ccd6a44c23a9169022c0b5c890c387/68747470733a2f2f73332e616d617a6f6e6177732e636f6d2f6769746875622f726962626f6e732f666f726b6d655f72696768745f7265645f6161303030302e706e67" alt="Fork me on GitHub" data-canonical-src="https://s3.amazonaws.com/github/ribbons/forkme_right_red_aa0000.png"></a>
</div>
<script src="js/d3.v3.min.js"></script>
<script src="js/application.js"></script>
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-48140066-1', 'jacquerie.github.io');
ga('send', 'pageview');
</script>
</body>
</html>