Skip to content

Instantly share code, notes, and snippets.

@capicue
Last active Aug 29, 2015
Embed
What would you like to do?
Introductions
/**
Head JS The only script in your <HEAD>
Copyright Tero Piirainen (tipiirai)
License MIT / http://bit.ly/mit-license
Version 0.96
http://headjs.com
*/(function(a){function z(){d||(d=!0,s(e,function(a){p(a)}))}function y(c,d){var e=a.createElement("script");e.type="text/"+(c.type||"javascript"),e.src=c.src||c,e.async=!1,e.onreadystatechange=e.onload=function(){var a=e.readyState;!d.done&&(!a||/loaded|complete/.test(a))&&(d.done=!0,d())},(a.body||b).appendChild(e)}function x(a,b){if(a.state==o)return b&&b();if(a.state==n)return k.ready(a.name,b);if(a.state==m)return a.onpreload.push(function(){x(a,b)});a.state=n,y(a.url,function(){a.state=o,b&&b(),s(g[a.name],function(a){p(a)}),u()&&d&&s(g.ALL,function(a){p(a)})})}function w(a,b){a.state===undefined&&(a.state=m,a.onpreload=[],y({src:a.url,type:"cache"},function(){v(a)}))}function v(a){a.state=l,s(a.onpreload,function(a){a.call()})}function u(a){a=a||h;var b;for(var c in a){if(a.hasOwnProperty(c)&&a[c].state!=o)return!1;b=!0}return b}function t(a){return Object.prototype.toString.call(a)=="[object Function]"}function s(a,b){if(!!a){typeof a=="object"&&(a=[].slice.call(a));for(var c=0;c<a.length;c++)b.call(a,a[c],c)}}function r(a){var b;if(typeof a=="object")for(var c in a)a[c]&&(b={name:c,url:a[c]});else b={name:q(a),url:a};var d=h[b.name];if(d&&d.url===b.url)return d;h[b.name]=b;return b}function q(a){var b=a.split("/"),c=b[b.length-1],d=c.indexOf("?");return d!=-1?c.substring(0,d):c}function p(a){a._done||(a(),a._done=1)}var b=a.documentElement,c,d,e=[],f=[],g={},h={},i=a.createElement("script").async===!0||"MozAppearance"in a.documentElement.style||window.opera,j=window.head_conf&&head_conf.head||"head",k=window[j]=window[j]||function(){k.ready.apply(null,arguments)},l=1,m=2,n=3,o=4;i?k.js=function(){var a=arguments,b=a[a.length-1],c={};t(b)||(b=null),s(a,function(d,e){d!=b&&(d=r(d),c[d.name]=d,x(d,b&&e==a.length-2?function(){u(c)&&p(b)}:null))});return k}:k.js=function(){var a=arguments,b=[].slice.call(a,1),d=b[0];if(!c){f.push(function(){k.js.apply(null,a)});return k}d?(s(b,function(a){t(a)||w(r(a))}),x(r(a[0]),t(d)?d:function(){k.js.apply(null,b)})):x(r(a[0]));return k},k.ready=function(b,c){if(b==a){d?p(c):e.push(c);return k}t(b)&&(c=b,b="ALL");if(typeof b!="string"||!t(c))return k;var f=h[b];if(f&&f.state==o||b=="ALL"&&u()&&d){p(c);return k}var i=g[b];i?i.push(c):i=g[b]=[c];return k},k.ready(a,function(){u()&&s(g.ALL,function(a){p(a)}),k.feature&&k.feature("domloaded",!0)});if(window.addEventListener)a.addEventListener("DOMContentLoaded",z,!1),window.addEventListener("load",z,!1);else if(window.attachEvent){a.attachEvent("onreadystatechange",function(){a.readyState==="complete"&&z()});var A=1;try{A=window.frameElement}catch(B){}!A&&b.doScroll&&function(){try{b.doScroll("left"),z()}catch(a){setTimeout(arguments.callee,1);return}}(),window.attachEvent("onload",z)}!a.readyState&&a.addEventListener&&(a.readyState="loading",a.addEventListener("DOMContentLoaded",handler=function(){a.removeEventListener("DOMContentLoaded",handler,!1),a.readyState="complete"},!1)),setTimeout(function(){c=!0,s(f,function(a){a()})},300)})(document)
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Introductions</title>
<meta name="author" content="Stacey Touset" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no, minimal-ui">
<link rel="stylesheet" href="reveal.css">
<link rel="stylesheet" href="white.css" id="theme">
<!--[if lt IE 9]>
<script src="lib/js/html5shiv.js"></script>
<![endif]-->
</head>
<body>
<div class="reveal">
<div class="slides">
<section>
<h1>Introductions</h1>
<img src="meet01.png" width="50%">
</section>
<section style="height:100vh;">
<img src="meet01.png" width="50%">
<p>There are ten people, labeled A through J.</p>
</section>
<section style="height:100vh;">
<img src="meet01.png" width="50%">
<p>They come in pairs. A and B are a couple. C and D are a couple, and so on.
</section>
<section style="height:100vh;">
<img src="meet01.png" width="50%">
<p>They show up to a party and start meeting each other. J is a math nerd who pays close attention.</p>
</section>
<section style="height:100vh;">
<img src="meet01.png" width="50%">
<p>After an hour J proposes a problem.</p>
</section>
<section style="height:100vh;">
<img src="meet01.png" width="50%">
<p>He knows that out of everyone in the room not including himself, there is exactly one person who met no one, exactly one person who met one other person...</p>
</section>
<section style="height:100vh;">
<img src="meet01.png" width="50%">
<p>...exactly one person who met two other people, all the way through exactly one person who met all eight other people.</p>
</section>
<section style="height:100vh;">
<img src="meet01.png" width="50%">
<p>All he wants to know is how many new people his wife met.</p>
</section>
<section>
<h1>Solution</h1>
<img src="meet01.png" width="50%">
</section>
<section style="height:100vh;">
<img src="meet01.png" width="50%">
<p>The chart above represents introductions. If there is an x in row D, column H, that means D and H have met.</p>
</section>
<section style="height:100vh;">
<img src="meet02wrong.png" width="50%">
<p>We know someone met all 8 people. If it was I, J's wife, then there's no one left who hasn't met anyone! It can't be her.</p>
</section>
<section style="height:100vh;">
<img src="meet02.png" width="50%">
<p>Since everyone else is interchangeable at this point, it doesn't change anything to assume it was A.</p>
</section>
<section style="height:100vh;">
<img src="meet03.png" width="50%">
<p>Similarly, there is someone who met no one. Clearly it has to be B since A met everyone else!</p>
</section>
<section style="height:100vh;">
<img src="meet04wrong.png" width="50%">
<p>There is also someone who met exactly 7 people. If it happened to be I, then there would be no one left who could have met only one person. It can't be her.</p>
</section>
<section style="height:100vh;">
<img src="meet04.png" width="50%">
<p>The rest are all indistinguishable, so it makes no difference to the problem who met 7 people. Let's assume it was C.
</section>
<section style="height:100vh;">
<img src="meet05.png" width="50%">
<p>The only person left who could have met only one person is D.</p>
</section>
<section style="height:100vh;">
<img src="meet06wrong.png" width="50%">
<p>You can probably guess what's next. If I was the person who met exactly 6 people, there's no one left who could have met only 2. It still can't be her.</p>
</section>
<section style="height:100vh;">
<img src="meet06.png" width="50%">
<p>Instead, it was either E, F, G or H who met 6 people. It doesn't matter who we pick, so let's say it was E.
</section>
<section style="height:100vh;">
<img src="meet07.png" width="50%">
<p>Then only F could have met 2 people.</p>
</section>
<section style="height:100vh;">
<img src="meet08wrong.png" width="50%">
<p>Someone has to have met 5 people, and you're right, it's not I. If it was her then no one could have met only 3 people.</p>
</section>
<section style="height:100vh;">
<img src="meet08.png" width="50%">
<p>That means either G or H met 5 people. It makes no difference who it was, so let's say it was G.</p>
</section>
<section style="height:100vh;">
<img src="meet09.png" width="50%">
<p>Then H had to meet 3 people.</p>
</section>
<section style="height:100vh;">
<img src="meet10.png" width="50%">
<p>Finally there's only I. She had to meet 4 people.</p>
</section>
<section style="height:100vh;">
<img src="meet11.png" width="50%">
<p>Interestingly, we know that J met 4 people as well. That's pretty good for a math nerd.</p>
</section>
<section>
<h1>FIN</h1>
</section>
</div>
</div>
<script src="head.min.js"></script>
<script src="reveal.js"></script>
<script>
Reveal.initialize({
controls: true,
progress: true,
history: true,
center: true,
transition: 'none'
});
</script>
</body>
</html>
View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment