{"id":1238,"date":"2022-06-09T09:02:58","date_gmt":"2022-06-09T08:02:58","guid":{"rendered":"https:\/\/wiskunst.nl\/?page_id=1238"},"modified":"2024-03-26T10:56:52","modified_gmt":"2024-03-26T09:56:52","slug":"penney-ante","status":"publish","type":"page","link":"https:\/\/wiskunst.nl\/index.php\/wiskunde-is-leuk\/nieuwe-artikelen\/artikel-00-0f\/penney-ante\/","title":{"rendered":"Penney Ante"},"content":{"rendered":"<p><strong><span class=\"collapseomatic \" id=\"id69de29f75eaf1\"  tabindex=\"0\" title=\"Inhoud\"    >Inhoud<\/span><div id=\"target-id69de29f75eaf1\" class=\"collapseomatic_content \"><\/strong><\/p>\n<ul>\n<li><a href=\"#inleiding\">Inleiding<\/a><\/li>\n<li><a href=\"#spel\">Hoe gaat het spel?<\/a><\/li>\n<li><a href=\"#kansen\">Kansen bepalen<\/a><\/li>\n<li><a href=\"#conway\">Het algoritme van Conway<\/a><\/li>\n<li><a href=\"#wachttijd\">Gemiddelde wachttijd<\/a><\/li>\n<li><a href=\"#nontransitief\">Non-transitief<\/a><\/li>\n<li><a href=\"#programmatuur\">Gebruikte programmatuur<\/a> <\/div><\/li>\n<\/ul>\n<h3><a id=\"inleiding\"><\/a>Inleiding<\/h3>\n<p>De &#8216;Penney Ante game&#8217; is een spel met een munt dat uitstekend in de kroeg gespeeld kan worden. Zeker omdat er altijd een winnende strategie is.<\/p>\n<p>Het spel is voor het eerst genoemd in een artikel in 1969 door Walter Penney en daarna uitgebreid besproken door Martin Gardner in 1974.<\/p>\n<h3><a id=\"spel\"><\/a>Hoe gaat het spel?<\/h3>\n<p>Het spel wordt gespeeld met een munt en twee spelers. Beide spelers spreken vooraf een serie van drie worpen af (bijvoorbeeld KKM voor Kop, Kop, Munt). Daarna wordt de munt net zolang gegooid totdat de serie van \u00e9\u00e9n van de twee spelers is gegooid. De speler van wie de serie het eerst voorkomt is de winnaar.<\/p>\n<p>Stel dat speler1 de serie KKM heeft en speler2 de serie MKK heeft en de munt de sequentie KMKMMKK dan heeft speler2 gewonnen omdat zijn serie het eerst geworpen is (beurt 5 t\/m 7 is namelijk MKK).<\/p>\n<p>Dit lijkt een eerlijk spel omdat de munt iedere keer een kans van 0,5 (50%) heeft om op Kop of Munt te vallen en omdat wij mensen een enorm slechte intu\u00eftie van kansen hebben (de schrijver dezes is daar geen uitzondering op!).<\/p>\n<p>Maar het spel is verre van eerlijk. Speler2 kan altijd een winnende serie maken. Kijk maar naar onderstaande tabel:<\/p>\n<table style=\"border-collapse: collapse; width: 76.8597%; height: 394px;\" border=\"0\" width=\"192\" cellspacing=\"0\" cellpadding=\"0\">\n<tbody>\n<tr style=\"height: 14.4pt;\">\n<td class=\"xl65\" style=\"height: 14.4pt; width: 48pt; text-align: center;\" width=\"64\" height=\"19\">Speler 1<\/td>\n<td class=\"xl65\" style=\"width: 48pt; text-align: center;\" width=\"64\">Speler 2<\/td>\n<td class=\"xl65\" style=\"width: 48pt; text-align: center;\" width=\"64\">&#8220;Odds&#8221;<\/td>\n<\/tr>\n<tr style=\"height: 14.4pt;\">\n<td class=\"xl65\" style=\"height: 14.4pt; text-align: center;\" height=\"19\">KKK<\/td>\n<td class=\"xl65\" style=\"text-align: center;\">MKK<\/td>\n<td class=\"xl65\" style=\"text-align: center;\">7tot 1<\/td>\n<\/tr>\n<tr style=\"height: 14.4pt;\">\n<td class=\"xl65\" style=\"height: 14.4pt; text-align: center;\" height=\"19\">KKM<\/td>\n<td class=\"xl65\" style=\"text-align: center;\">MKK<\/td>\n<td class=\"xl65\" style=\"text-align: center;\">3tot 1<\/td>\n<\/tr>\n<tr style=\"height: 14.4pt;\">\n<td class=\"xl65\" style=\"height: 14.4pt; text-align: center;\" height=\"19\">KMK<\/td>\n<td class=\"xl65\" style=\"text-align: center;\">KKM<\/td>\n<td class=\"xl65\" style=\"text-align: center;\">2tot 1<\/td>\n<\/tr>\n<tr style=\"height: 14.4pt;\">\n<td class=\"xl65\" style=\"height: 14.4pt; text-align: center;\" height=\"19\">KMM<\/td>\n<td class=\"xl65\" style=\"text-align: center;\">KKM<\/td>\n<td class=\"xl65\" style=\"text-align: center;\">2tot 1<\/td>\n<\/tr>\n<tr style=\"height: 14.4pt;\">\n<td class=\"xl65\" style=\"height: 14.4pt; text-align: center;\" height=\"19\">MKK<\/td>\n<td class=\"xl65\" style=\"text-align: center;\">MMK<\/td>\n<td class=\"xl65\" style=\"text-align: center;\">2tot 1<\/td>\n<\/tr>\n<tr style=\"height: 14.4pt;\">\n<td class=\"xl65\" style=\"height: 14.4pt; text-align: center;\" height=\"19\">MKM<\/td>\n<td class=\"xl65\" style=\"text-align: center;\">MMK<\/td>\n<td class=\"xl65\" style=\"text-align: center;\">2tot 1<\/td>\n<\/tr>\n<tr style=\"height: 14.4pt;\">\n<td class=\"xl65\" style=\"height: 14.4pt; text-align: center;\" height=\"19\">MMK<\/td>\n<td class=\"xl65\" style=\"text-align: center;\">KMM<\/td>\n<td class=\"xl65\" style=\"text-align: center;\">3tot 1<\/td>\n<\/tr>\n<tr style=\"height: 14.4pt;\">\n<td class=\"xl65\" style=\"height: 14.4pt; text-align: center;\" height=\"19\">MMM<\/td>\n<td class=\"xl65\" style=\"text-align: center;\">KMM<\/td>\n<td class=\"xl65\" style=\"text-align: center;\">7tot 1<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>Een ander woord voor &#8220;Odds&#8221; is &#8220;kansverhouding&#8221; maar in de praktijk wordt meestal de Engelse term gebruikt.<\/p>\n<p>Dus als speler1 de serie MKK kiest dan moet speler2 de serie MMK nemen. Dan wint speler2 \u00b12 keer zo vaak. En kiest speler1 de serie MMM dan moet speler2 de serie KMM nemen en dan wint speler2 dus zo&#8217;n 7 keer meer dan speler1.<\/p>\n<p>Hoe kan speler2 nu makkelijk anticiperen met zijn keuze ten opzichte van speler1? Welnu: Speler2 maakt zijn serie door de tweede keuze van speler1 te veranderen (dus K wordt M en andersom) en die dan te laten volgen door de eerste twee keuzes van speler1.<br \/>\nDus kiest speler1 de serie MMK dan is de tweede keuze dus een M. Speler2 verandert de M in een K en zet daarachter dan de eerste twee keuzes van speler1 (MM). Speler2 maakt dus de serie KMM.<\/p>\n<p>In Python heb ik een programmaatje geschreven dat dit spel simuleert.<br \/>\nWanneer ik de serie TTH (MMK) invul dan kiest de computer HTT (KMM). Stel dat ik met deze instellingen 100 rondes speel dan is de verwachting vanuit bovenstaande tabel dat de computer zo&#8217;n 75 rondes zal winnen.<\/p>\n<p>Hier is het resultaat:<\/p>\n<p><em><span style=\"font-family: 'courier new', courier, monospace; font-size: 12pt;\">After 100 games you won 28 games with sequence TTH and I won 72 games with sequence HTT.<\/span><\/em><\/p>\n<p>Natuurlijk kan het ook anders uitvallen, het blijft altijd een gok hoe de munt valt. Maar hoe vaker je het speelt, met een bepaalde serie, hoe meer het naar de kansen vanuit bovenstaande tabel zal gaan.<\/p>\n<h3><a id=\"kansen\"><\/a>Kansen bepalen<\/h3>\n<p>Maar hoe zit het nu met de kansen?<\/p>\n<p>Intu\u00eftief ben je geneigd te zeggen dat de kans dat de munt op K of M valt 0,5 (50%) is, en dat is ook zo mits we een eerlijke munt hebben die ook niet op z&#8217;n zijkant terecht kan komen. En op de middelbare school hebben we geleerd dat het berekenen van onafhankelijke kansen een kwestie van vermenigvuldigen van kansen is.<\/p>\n<p>Maar even terug naar de basis. Wat is een kans?<\/p>\n<p>Wiskundig is een kans niets anders dan het quoti\u00ebnt van het aantal gunstige gebeurtenissen en het totaal aantal gebeurtenissen:<\/p>\n<div class=\"wp-katex-eq katex-display\" data-display=\"true\">\\text{Kans}=\\frac{\\text{gunstige gevallen}}{\\text{totaal aantal gevallen}}<\/div>\n<p>De notatie voor kans is: P(&#8220;kans op iets&#8230;&#8221;). De P is van het Engelse woord Probability.<br \/>\nDe kans is altijd een getal tussen de 0 en 1 (beide doen mee).<br \/>\nAls de kans 0 is dan betekent dit dat de gebeurtenis nooit zal optreden.<br \/>\nIs de kans 1 dan betekent dit dat de gebeurtenis altijd zal optreden.<br \/>\nZo is de kans dat je met een vervoermiddel door het paarse verkeerslicht rijdt gelijk aan 0 en de kans dat je ooit dood gaat gelijk aan 1.<\/p>\n<p>Voor het gooien van een munt is het totaal aantal gebeurtenissen twee, namelijk Kop en Munt. En de kans op Kop (en evenzo op Munt) met het opgooien van de munt levert dan een kans van 1\/2 op.<\/p>\n<p>Wanneer we twee keer achter elkaar met een munt gooien dan zijn deze twee gebeurtenissen onafhankelijk van elkaar.<br \/>\nMogelijke uitkomsten zijn: KK, KM, MK, MM, een totaal van 4. Stel dat ik KK wil hebben dan is dat 1 van 4 ofwel 0,25 (25%).<\/p>\n<p>Wanneer we drie keer achter elkaar met een munt gooien dan zijn de mogelijke uitkomsten: KKK, KKM, KMK, KMM, MKK, MKM, MMK en MMM, een totaal van 8. Wil ik nu de serie KMM gooien dan is dat 1 van de 8 ofwel 0,125 (12,5%). Dit resultaat kun je verkrijgen door alle individuele kansen met elkaar te vermenigvuldigen.<br \/>\nDe kans op K = 0,5, de kans op M = 0,5 en de kans op M = 0,5. De kans op KMM is dan 0,5 x 0,5 x 0,5 = 0,125.<\/p>\n<p>De vraag is nu: Waarom zijn de kansen bij Penney Ante niet allemaal 1\/8?<\/p>\n<p>Dit heeft te maken met het feit dat \u00e9\u00e9n van de gekozen series niet meteen na drie beurten hoeft op te treden! Het kan ook zijn dat dit pas optreedt na 10 beurten. En dat heeft invloed op de kans.<\/p>\n<p>Laten we eens kijken naar een aantal voorbeelden en hoe we de daarbij behorende kansen of odds verkrijgen.<\/p>\n<p><strong>Voorbeeld 1<\/strong>: Speler1 kiest KKK, speler2 kiest (dan) MKK.<br \/>\nSpeler1 wint alleen als er 3 keer achtereen een K wordt gegooid. Die kans is P(KKK) = (1\/2)<sup>3 <\/sup>= 1\/8.<br \/>\nDan is de kans op MKK: P(MKK) = 1 &#8211; P(KKK) = 1 &#8211; 1\/8 = 7\/8. De daarbij behorende odd is dan 7 staat tot 1.<\/p>\n<p><strong>Voorbeeld 2<\/strong>: Speler 1 kiest KKM, speler2 kiest MKK.<br \/>\nSpeler1 wint als in de 1e drie beurten KKM valt, of in vier beurten KKKM valt, of in vijf beurten KKKKM valt of in zes&#8230;<br \/>\nHet woordje &#8220;of&#8221; in bovenstaande zin betekent dat we al deze kansen bij elkaar moeten optellen.<br \/>\nDus P(KKM | KKKM | KKKKM | &#8230;) = 1\/8 + 1\/16 + 1\/32 + &#8230;<br \/>\nEn dit is een meetkundige reeks. En hiervoor bestaat een algemene formule:<\/p>\n<div class=\"wp-katex-eq katex-display\" data-display=\"true\">\\sum_{n=0}^{\\infty}ar^{n}=\\frac{a\\text{ - }ar^{n}}{1\\text{ - }r}<\/div>\n<p>Voor ons voorbeeld geldt dat a=1, r=1\/2 en n loopt van 3 naar oneindig.<\/p>\n<p>Wat we dus nodig hebben is:<\/p>\n<div class=\"wp-katex-eq katex-display\" data-display=\"true\">\\sum_{n=3}^{\\infty}\\left (\\frac{1}{2} \\right )^{n}=\\sum_{n=0}^{\\infty} \\left (\\frac{1}{2}\\right )^{n}\\text{ - }\\sum_{n=0}^{2}\\left (\\frac{1}{2}\\right )^{n}<\/div>\n<p>En dat is:<\/p>\n<div class=\"wp-katex-eq katex-display\" data-display=\"true\">\\sum_{n=3}^{\\infty}\\left (\\frac{1}{2} \\right )^{n}=\\frac{1}{1\\text{ - }\\frac{1}{2}}\\text{ - }1\\text{ - }\\frac{1}{2}\\text{ - }\\frac{1}{4}=2\\text{ - }1\\text{ - }\\frac{1}{2}\\text{ - }\\frac{1}{4}=\\frac{1}{4}<\/div>\n<p>Dus P(KKM [hoe dan ook]) = 1\/4 en daarmee is P(MKK [hoe dan ook]) = 1 &#8211; 1\/4 = 3\/4.<\/p>\n<p><strong>Voorbeeld 3<\/strong>: Speler1 kiest KMK, speler2 kiest KKM.<br \/>\nHier is de situatie weer iets anders.<br \/>\nStel nu p = P(KKM voor KMK).<br \/>\nAls de eerste worp een K is en de tweede ook een K dan is de kans op KKM natuurlijk 1\/2. Als de eerste worp echter een M is dan begint het weer helemaal opnieuw en is de kans weer p.<br \/>\nwe krijgen dus de vergelijking:<\/p>\n<div class=\"wp-katex-eq katex-display\" data-display=\"true\">p=\\frac{1}{2}+\\frac{1}{2}\\cdot \\frac{1}{2}p\\Rightarrow p=\\frac{1}{2}+\\frac{1}{4}p\\Rightarrow \\frac{3}{4}p=\\frac{1}{2}\\Rightarrow p=\\frac{1}{2}\\cdot \\frac{4}{3}=\\frac{4}{6}=\\frac{2}{3}<\/div>\n<p>De kans dat speler2 wint is dus 2\/3 en de odds zijn dus 2 staat tot 1.<\/p>\n<p>En zo kunnen we voor alle kansen een berekening &#8220;verzinnen&#8221;.<br \/>\nMaar er is ook een generieke manier om deze kansen uit te rekenen.<\/p>\n<h3><a id=\"conway\"><\/a>Het algoritme van Conway<\/h3>\n<p>John Conway is vooral bekend om zijn simulatie Life, waar in een eenvoudige wereld van cellen simpele regels voor geboorte, overleven en sterven van cellen zijn vastgelegd. Met een initi\u00eble vulling van de wereld ga je kijken wat er per generatie gebeurt. Het blijkt dat, ondanks de simpelheid van het geheel, het niet te voorspellen is hoe deze wereld er na x generaties zal uitzien.<\/p>\n<p>Conway heeft zich echter ook bezig gehouden met de mate van overlapping van verschillende patronen en kende hier een waarde aan toe.<br \/>\nEn die waarde kan worden omgezet in een kans.<\/p>\n<p>En in het Penney Ante spel hebben we te maken met patronen. Deze patronen bestaan immers uit K&#8217;s en M&#8217;s en hebben een lengte van 3.<\/p>\n<p>Laten we eens kijken hoe \u00e9\u00e9n en ander in z&#8217;n werk gaat. We gaan kijken naar de overlapping tussen de patronen &#8216;KKK&#8217; en &#8216;MKK&#8217; (voorbeeld 1).<\/p>\n<p>Zet beide patronen recht boven elkaar:<\/p>\n<p><span style=\"font-family: 'courier new', courier, monospace; font-size: 12pt;\">MKK<\/span><br \/>\n<span style=\"font-family: 'courier new', courier, monospace; font-size: 12pt;\">KKK<\/span><\/p>\n<p>Wanneer beide patronen (lengte 3) overeenkomen zet je een 1 boven het eerste element van het bovenste patroon, anders zet je hier een 0 neer.<br \/>\nIn het voorbeeld komen de patronen niet overeen dus wordt het een 0:<\/p>\n<p><span style=\"font-family: 'courier new', courier, monospace; font-size: 12pt;\">0<\/span><br \/>\n<span style=\"font-family: 'courier new', courier, monospace; font-size: 12pt;\">MKK<\/span><br \/>\n<span style=\"font-family: 'courier new', courier, monospace; font-size: 12pt;\">KKK<\/span><\/p>\n<p>Schuif nu het bovenste patroon 1 plaats naar links, dan houden we het volgende over:<\/p>\n<p><span style=\"font-family: 'courier new', courier, monospace; font-size: 12pt;\">KK<\/span><br \/>\n<span style=\"font-family: 'courier new', courier, monospace; font-size: 12pt;\">KKK<\/span><\/p>\n<p>Nu gaan we kijken naar de overeenkomst tussen het bovenste patroon en de eerste 2 elementen van het onderste patroon, dus eigenlijk kijken we naar:<\/p>\n<p><span style=\"font-family: 'courier new', courier, monospace; font-size: 12pt;\">KK<\/span><br \/>\n<span style=\"font-family: 'courier new', courier, monospace; font-size: 12pt;\">KK(K)<\/span><\/p>\n<p>Komen beide overeen dan zetten we een 1 boven het linker element van het bovenste patroon (dit is dus element 2 van het oorspronkelijke patroon), anders een 0.<br \/>\nIn het voorbeeld komen beide patronen overeen, dus:<\/p>\n<p><span style=\"font-family: 'courier new', courier, monospace; font-size: 12pt;\">1<\/span><br \/>\n<span style=\"font-family: 'courier new', courier, monospace; font-size: 12pt;\">KK<\/span><br \/>\n<span style=\"font-family: 'courier new', courier, monospace; font-size: 12pt;\">KK(K)<\/span><\/p>\n<p>En de vorige stap herhalen we nogmaals. Dus het bovenste patroon weer een plaats naar links en vergelijken met het eerste element van het onderste patroon. Komen ze overeen dan zetten we een 1 erboven en anders een 0.<br \/>\nIn het voorbeeld komen ze overeen, dus:<\/p>\n<p><span style=\"font-size: 12pt; font-family: 'courier new', courier, monospace;\">1<\/span><br \/>\n<span style=\"font-size: 12pt; font-family: 'courier new', courier, monospace;\">K<\/span><br \/>\n<span style=\"font-size: 12pt; font-family: 'courier new', courier, monospace;\">K(KK)<\/span><\/p>\n<p>Het totale resultaat ziet er nu als volgt uit:<\/p>\n<p><span style=\"font-family: 'courier new', courier, monospace; font-size: 12pt;\">011<\/span><br \/>\n<span style=\"font-family: 'courier new', courier, monospace; font-size: 12pt;\">MKK<\/span><br \/>\n<span style=\"font-family: 'courier new', courier, monospace; font-size: 12pt;\">KKK<\/span><\/p>\n<p>De 011 kan worden gezien als een binair getal en de decimale equivalent hiervan is 3.<\/p>\n<p>We zeggen nu dat de waarde van overlapping tussen KKK en MKK 3 is.<\/p>\n<p>Merk meteen op dat het &#8220;omgekeerde&#8221; niet (per se) hetzelfde getal oplevert:<\/p>\n<p>De waarde tussen MKK en KKK is:<\/p>\n<p><span style=\"font-size: 12pt; font-family: 'courier new', courier, monospace;\">000<\/span><br \/>\n<span style=\"font-size: 12pt; font-family: 'courier new', courier, monospace;\">KKK<\/span><br \/>\n<span style=\"font-size: 12pt; font-family: 'courier new', courier, monospace;\">MKK<\/span><\/p>\n<p>Dus de waarde van overlapping tussen MKK en KKK is 0.<\/p>\n<p>Om nu de odds te berekenen tussen KKK en MKK kan de volgende formule gebruikt worden:<\/p>\n<p>Gegeven 2 tripels A en B dan zijn de odds van B tot A:<\/p>\n<p>([AA] &#8211; [AB])\/([BB] &#8211; [BA]),<\/p>\n<p>waarbij [xy] de waarde van overlapping is tussen y en x.<\/p>\n<p>In ons voorbeeld is A=KKK en B=MKK.<\/p>\n<p>We hebben dus [AA], [AB], [BB] en [BA] nodig. Hierboven hebben we al [BA] uitgerekend.<\/p>\n<p>Wanneer je Conway&#8217;s algoritme ook toepast op de andere combinaties dan krijg je:<br \/>\n[AA] = 7, [AB] = 0 en [BB] = 4.<\/p>\n<p>Invullen in bovenstaande formule geeft dan:<\/p>\n<p>Odds(MKK boven KKK) = (7-0)\/(4-3) = 7\/1 = 7.<\/p>\n<p>De bijbehorende kans is dan 7\/8.<\/p>\n<p>De volledige odds-tabel:<\/p>\n<table width=\"592\">\n<tbody>\n<tr>\n<td style=\"text-align: center;\" width=\"64\">Odds<\/td>\n<td style=\"text-align: center;\" width=\"64\">KKK<\/td>\n<td style=\"text-align: center;\" width=\"64\">KKM<\/td>\n<td style=\"text-align: center;\" width=\"72\">KMK<\/td>\n<td style=\"text-align: center;\" width=\"64\">KMM<\/td>\n<td style=\"text-align: center;\" width=\"64\">MKK<\/td>\n<td style=\"text-align: center;\" width=\"64\">MKM<\/td>\n<td style=\"text-align: center;\" width=\"64\">MMK<\/td>\n<td style=\"text-align: center;\" width=\"72\">MMM<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: center;\">KKK<\/td>\n<td style=\"text-align: center;\"><\/td>\n<td style=\"text-align: center;\">1<\/td>\n<td style=\"text-align: center;\">2<\/td>\n<td style=\"text-align: center;\">2<\/td>\n<td style=\"text-align: center;\">7<\/td>\n<td style=\"text-align: center;\">1<\/td>\n<td style=\"text-align: center;\">2<\/td>\n<td style=\"text-align: center;\">1<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: center;\">KKM<\/td>\n<td style=\"text-align: center;\">1<\/td>\n<td style=\"text-align: center;\"><\/td>\n<td style=\"text-align: center;\">0<\/td>\n<td style=\"text-align: center;\">0<\/td>\n<td style=\"text-align: center;\">3<\/td>\n<td style=\"text-align: center;\">1<\/td>\n<td style=\"text-align: center;\">1<\/td>\n<td style=\"text-align: center;\">0<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: center;\">KMK<\/td>\n<td style=\"text-align: center;\">1<\/td>\n<td style=\"text-align: center;\">2<\/td>\n<td style=\"text-align: center;\"><\/td>\n<td style=\"text-align: center;\">1<\/td>\n<td style=\"text-align: center;\">1<\/td>\n<td style=\"text-align: center;\">1<\/td>\n<td style=\"text-align: center;\">2<\/td>\n<td style=\"text-align: center;\">1<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: center;\">KMM<\/td>\n<td style=\"text-align: center;\">1<\/td>\n<td style=\"text-align: center;\">2<\/td>\n<td style=\"text-align: center;\">1<\/td>\n<td style=\"text-align: center;\"><\/td>\n<td style=\"text-align: center;\">1<\/td>\n<td style=\"text-align: center;\">1<\/td>\n<td style=\"text-align: center;\">0<\/td>\n<td style=\"text-align: center;\">0<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: center;\">MKK<\/td>\n<td style=\"text-align: center;\">0<\/td>\n<td style=\"text-align: center;\">0<\/td>\n<td style=\"text-align: center;\">1<\/td>\n<td style=\"text-align: center;\">1<\/td>\n<td style=\"text-align: center;\"><\/td>\n<td style=\"text-align: center;\">1<\/td>\n<td style=\"text-align: center;\">2<\/td>\n<td style=\"text-align: center;\">1<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: center;\">MKM<\/td>\n<td style=\"text-align: center;\">1<\/td>\n<td style=\"text-align: center;\">2<\/td>\n<td style=\"text-align: center;\">1<\/td>\n<td style=\"text-align: center;\">1<\/td>\n<td style=\"text-align: center;\">1<\/td>\n<td style=\"text-align: center;\"><\/td>\n<td style=\"text-align: center;\">2<\/td>\n<td style=\"text-align: center;\">1<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: center;\">MMK<\/td>\n<td style=\"text-align: center;\">0<\/td>\n<td style=\"text-align: center;\">1<\/td>\n<td style=\"text-align: center;\">1<\/td>\n<td style=\"text-align: center;\">3<\/td>\n<td style=\"text-align: center;\">0<\/td>\n<td style=\"text-align: center;\">0<\/td>\n<td style=\"text-align: center;\"><\/td>\n<td style=\"text-align: center;\">1<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: center;\">MMM<\/td>\n<td style=\"text-align: center;\">1<\/td>\n<td style=\"text-align: center;\">2<\/td>\n<td style=\"text-align: center;\">1<\/td>\n<td style=\"text-align: center;\">7<\/td>\n<td style=\"text-align: center;\">2<\/td>\n<td style=\"text-align: center;\">2<\/td>\n<td style=\"text-align: center;\">1<\/td>\n<td style=\"text-align: center;\"><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>Met de bijbehorende kans-tabel:<\/p>\n<table width=\"623\">\n<tbody>\n<tr>\n<td style=\"text-align: center;\" width=\"72\">P(B)<\/td>\n<td style=\"text-align: center;\" width=\"64\">KKK<\/td>\n<td style=\"text-align: center;\" width=\"103\">KKM<\/td>\n<td style=\"text-align: center;\" width=\"64\">KMK<\/td>\n<td style=\"text-align: center;\" width=\"64\">KMM<\/td>\n<td style=\"text-align: center;\" width=\"64\">MKK<\/td>\n<td style=\"text-align: center;\" width=\"64\">MKM<\/td>\n<td style=\"text-align: center;\" width=\"64\">MMK<\/td>\n<td style=\"text-align: center;\" width=\"64\">MMM<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: center;\">KKK<\/td>\n<td style=\"text-align: center;\"><\/td>\n<td style=\"text-align: center;\">0,500<\/td>\n<td style=\"text-align: center;\">0,667<\/td>\n<td style=\"text-align: center;\">0,667<\/td>\n<td style=\"text-align: center;\">0,875<\/td>\n<td style=\"text-align: center;\">0,500<\/td>\n<td style=\"text-align: center;\">0,667<\/td>\n<td style=\"text-align: center;\">0,500<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: center;\">KKM<\/td>\n<td style=\"text-align: center;\">0,500<\/td>\n<td style=\"text-align: center;\"><\/td>\n<td style=\"text-align: center;\">0,000<\/td>\n<td style=\"text-align: center;\">0,000<\/td>\n<td style=\"text-align: center;\">0,750<\/td>\n<td style=\"text-align: center;\">0,500<\/td>\n<td style=\"text-align: center;\">0,500<\/td>\n<td style=\"text-align: center;\">0,000<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: center;\">KMK<\/td>\n<td style=\"text-align: center;\">0,500<\/td>\n<td style=\"text-align: center;\">0,667<\/td>\n<td style=\"text-align: center;\"><\/td>\n<td style=\"text-align: center;\">0,500<\/td>\n<td style=\"text-align: center;\">0,500<\/td>\n<td style=\"text-align: center;\">0,500<\/td>\n<td style=\"text-align: center;\">0,667<\/td>\n<td style=\"text-align: center;\">0,500<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: center;\">KMM<\/td>\n<td style=\"text-align: center;\">0,500<\/td>\n<td style=\"text-align: center;\">0,667<\/td>\n<td style=\"text-align: center;\">0,500<\/td>\n<td style=\"text-align: center;\"><\/td>\n<td style=\"text-align: center;\">0,500<\/td>\n<td style=\"text-align: center;\">0,500<\/td>\n<td style=\"text-align: center;\">0,000<\/td>\n<td style=\"text-align: center;\">0,000<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: center;\">MKK<\/td>\n<td style=\"text-align: center;\">0,000<\/td>\n<td style=\"text-align: center;\">0,000<\/td>\n<td style=\"text-align: center;\">0,500<\/td>\n<td style=\"text-align: center;\">0,500<\/td>\n<td style=\"text-align: center;\"><\/td>\n<td style=\"text-align: center;\">0,500<\/td>\n<td style=\"text-align: center;\">0,667<\/td>\n<td style=\"text-align: center;\">0,500<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: center;\">MKM<\/td>\n<td style=\"text-align: center;\">0,500<\/td>\n<td style=\"text-align: center;\">0,667<\/td>\n<td style=\"text-align: center;\">0,500<\/td>\n<td style=\"text-align: center;\">0,500<\/td>\n<td style=\"text-align: center;\">0,500<\/td>\n<td style=\"text-align: center;\"><\/td>\n<td style=\"text-align: center;\">0,667<\/td>\n<td style=\"text-align: center;\">0,500<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: center;\">MMK<\/td>\n<td style=\"text-align: center;\">0,000<\/td>\n<td style=\"text-align: center;\">0,500<\/td>\n<td style=\"text-align: center;\">0,500<\/td>\n<td style=\"text-align: center;\">0,750<\/td>\n<td style=\"text-align: center;\">0,000<\/td>\n<td style=\"text-align: center;\">0,000<\/td>\n<td style=\"text-align: center;\"><\/td>\n<td style=\"text-align: center;\">0,500<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: center;\">MMM<\/td>\n<td style=\"text-align: center;\">0,500<\/td>\n<td style=\"text-align: center;\">0,667<\/td>\n<td style=\"text-align: center;\">0,500<\/td>\n<td style=\"text-align: center;\">0,875<\/td>\n<td style=\"text-align: center;\">0,667<\/td>\n<td style=\"text-align: center;\">0,667<\/td>\n<td style=\"text-align: center;\">0,500<\/td>\n<td style=\"text-align: center;\"><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h3><a id=\"wachttijd\"><\/a>Gemiddelde wachttijd<\/h3>\n<p>Zonder hier in te gaan op de (best wel ingewikkelde) achterliggende wiskunde, kunnen we ook nog iets zeggen over de lengte van de sequentie alvorens de gekozen triplet zal verschijnen.<\/p>\n<p>Vanuit de waarde van overlapping (van het triplet met zichzelf), zoals we die met het algoritme van Conway kunnen berekenen, blijkt het 2 x zo lang te duren alvorens een bepaald triplet optreedt.<\/p>\n<p>Bekijk eens de volgende tabel:<\/p>\n<table style=\"border-collapse: collapse; width: 68.3252%;\" border=\"0\" width=\"192\" cellspacing=\"0\" cellpadding=\"0\">\n<tbody>\n<tr style=\"height: 14.4pt;\">\n<td style=\"height: 14.4pt; width: 21.6117%; text-align: center;\" width=\"64\" height=\"19\"><\/td>\n<td style=\"width: 20.4531%; text-align: center;\" width=\"64\">C(onway)<\/td>\n<td style=\"width: 103.502%; text-align: center;\" width=\"64\">gem. string lengte=2xC<\/td>\n<\/tr>\n<tr style=\"height: 14.4pt;\">\n<td class=\"xl63\" style=\"height: 14.4pt; width: 21.6117%; text-align: center;\" height=\"19\">KKK<\/td>\n<td class=\"xl63\" style=\"width: 20.4531%; text-align: center;\">7<\/td>\n<td class=\"xl63\" style=\"width: 103.502%; text-align: center;\">14<\/td>\n<\/tr>\n<tr style=\"height: 14.4pt;\">\n<td class=\"xl63\" style=\"height: 14.4pt; width: 21.6117%; text-align: center;\" height=\"19\">KKM<\/td>\n<td class=\"xl63\" style=\"width: 20.4531%; text-align: center;\">4<\/td>\n<td class=\"xl63\" style=\"width: 103.502%; text-align: center;\">8<\/td>\n<\/tr>\n<tr style=\"height: 14.4pt;\">\n<td class=\"xl63\" style=\"height: 14.4pt; width: 21.6117%; text-align: center;\" height=\"19\">KMK<\/td>\n<td class=\"xl63\" style=\"width: 20.4531%; text-align: center;\">5<\/td>\n<td class=\"xl63\" style=\"width: 103.502%; text-align: center;\">10<\/td>\n<\/tr>\n<tr style=\"height: 14.4pt;\">\n<td class=\"xl63\" style=\"height: 14.4pt; width: 21.6117%; text-align: center;\" height=\"19\">KMM<\/td>\n<td class=\"xl63\" style=\"width: 20.4531%; text-align: center;\">4<\/td>\n<td class=\"xl63\" style=\"width: 103.502%; text-align: center;\">8<\/td>\n<\/tr>\n<tr style=\"height: 14.4pt;\">\n<td class=\"xl63\" style=\"height: 14.4pt; width: 21.6117%; text-align: center;\" height=\"19\">MKK<\/td>\n<td class=\"xl63\" style=\"width: 20.4531%; text-align: center;\">4<\/td>\n<td class=\"xl63\" style=\"width: 103.502%; text-align: center;\">8<\/td>\n<\/tr>\n<tr style=\"height: 14.4pt;\">\n<td class=\"xl63\" style=\"height: 14.4pt; width: 21.6117%; text-align: center;\" height=\"19\">MKM<\/td>\n<td class=\"xl63\" style=\"width: 20.4531%; text-align: center;\">5<\/td>\n<td class=\"xl63\" style=\"width: 103.502%; text-align: center;\">10<\/td>\n<\/tr>\n<tr style=\"height: 14.4pt;\">\n<td class=\"xl63\" style=\"height: 14.4pt; width: 21.6117%; text-align: center;\" height=\"19\">MMK<\/td>\n<td class=\"xl63\" style=\"width: 20.4531%; text-align: center;\">4<\/td>\n<td class=\"xl63\" style=\"width: 103.502%; text-align: center;\">8<\/td>\n<\/tr>\n<tr style=\"height: 14.4pt;\">\n<td class=\"xl63\" style=\"height: 14.4pt; width: 21.6117%; text-align: center;\" height=\"19\">MMM<\/td>\n<td class=\"xl63\" style=\"width: 20.4531%; text-align: center;\">7<\/td>\n<td class=\"xl63\" style=\"width: 103.502%; text-align: center;\">14<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>Voordat bijvoorbeeld de triplet KKK zal optreden heb je een sequentie nodig van gemiddeld 14 x gooien met de munt.<\/p>\n<h3><a id=\"nontransitief\"><\/a>Non-transitief<\/h3>\n<p>In de wiskunde heet het Penney Ante spel een non-transitief spel.<\/p>\n<p>Een voorbeeld van een transitieve relatie is het welbekende:<\/p>\n<p>Als a &gt; b en b &gt; c dan a &gt; c of wat algemener:<\/p>\n<p>Als a b impliceert en b c impliceert dan impliceert a c.<\/p>\n<p>Als we deze voorbeelden non-transitief zouden maken dan krijgen we:<\/p>\n<p>Als a &gt; b en b &gt; c dan c &gt; a of:<\/p>\n<p>Als a b impliceert en b c impliceert dan impliceert c a.<\/p>\n<p>Wat natuurlijk allemaal wat vreemd overkomt.<\/p>\n<p>Toch spelen kinderen vaak het non-transitieve spel &#8220;steen-papier-schaar&#8221; waarbij geldt:<\/p>\n<p>schaar wint van papier, papier wint van steen en steen wint van schaar:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1254\" src=\"https:\/\/wiskunst.nl\/wp-content\/uploads\/2022\/06\/steen-papier-schaar.png\" alt=\"\" width=\"259\" height=\"236\" \/><\/p>\n<p>En dit is ook het geval met het Penney Ante spel. En dat maakt het allemaal zo boeiend.<\/p>\n<h3><a id=\"programmatuur\"><\/a>Gebruikte programmatuur<\/h3>\n<p><em><span class=\"collapseomatic \" id=\"id69de29f75eb80\"  tabindex=\"0\" title=\"Hieronder het Python programma dat het spel simuleert:\"    >Hieronder het Python programma dat het spel simuleert:<\/span><div id=\"target-id69de29f75eb80\" class=\"collapseomatic_content \"><\/em><\/p>\n<div>\n<div><span style=\"font-size: 10pt; font-family: 'courier new', courier, monospace;\">#Penney-Ante game<\/span><\/div>\n<div><span style=\"font-size: 10pt; font-family: 'courier new', courier, monospace;\">import time<\/span><\/div>\n<div><span style=\"font-size: 10pt; font-family: 'courier new', courier, monospace;\">import random<\/span><\/div>\n<div><span style=\"font-size: 10pt; font-family: 'courier new', courier, monospace;\">def help():<\/span><\/div>\n<div><span style=\"font-size: 10pt; font-family: 'courier new', courier, monospace;\">\u00a0 \u00a0 print(&#8216;-&#8216;*105)<\/span><\/div>\n<div><span style=\"font-size: 10pt; font-family: 'courier new', courier, monospace;\">\u00a0 \u00a0 print(&#8216;Explanation on the Penney-Ante game&#8217;)<\/span><\/div>\n<div><span style=\"font-size: 10pt; font-family: 'courier new', courier, monospace;\">\u00a0 \u00a0 print()<\/span><\/div>\n<div><span style=\"font-size: 10pt; font-family: 'courier new', courier, monospace;\">\u00a0 \u00a0 print(&#8216;In this game we will throw a non biased coin.&#8217;)<\/span><\/div>\n<div><span style=\"font-size: 10pt; font-family: 'courier new', courier, monospace;\">\u00a0 \u00a0 print(&#8216;So the coin is falling on heads(H) or tails(T) with a 50-50% chance.&#8217;)<\/span><\/div>\n<div><span style=\"font-size: 10pt; font-family: 'courier new', courier, monospace;\">\u00a0 \u00a0 print()<\/span><\/div>\n<div><span style=\"font-size: 10pt; font-family: 'courier new', courier, monospace;\">\u00a0 \u00a0 print(&#8216;You choose a sequence of length 3 with heads(H) or tails(T), and so do I.&#8217;)<\/span><\/div>\n<div><span style=\"font-size: 10pt; font-family: 'courier new', courier, monospace;\">\u00a0 \u00a0 print(&#8216;We will throw the coin until one of our sequences is thrown.&#8217;)<\/span><\/div>\n<div><span style=\"font-size: 10pt; font-family: 'courier new', courier, monospace;\">\u00a0 \u00a0 print(&#8216;If your sequence is thrown you win, if my sequence is thrown I win, otherwise we throw the coin again.&#8217;)<\/span><\/div>\n<div><span style=\"font-size: 10pt; font-family: 'courier new', courier, monospace;\">\u00a0 \u00a0 print()<\/span><\/div>\n<div><span style=\"font-size: 10pt; font-family: 'courier new', courier, monospace;\">\u00a0 \u00a0 print(&#8216;Example:&#8217;)<\/span><\/div>\n<div><span style=\"font-size: 10pt; font-family: 'courier new', courier, monospace;\">\u00a0 \u00a0 print(&#8216;You coose the sequence THT.&#8217;)<\/span><\/div>\n<div><span style=\"font-size: 10pt; font-family: 'courier new', courier, monospace;\">\u00a0 \u00a0 print(&#8216;I choose the sequence TTH.&#8217;)<\/span><\/div>\n<div><span style=\"font-size: 10pt; font-family: 'courier new', courier, monospace;\">\u00a0 \u00a0 print(&#8216;After throwing the coin 5 times the seqence is HHTHT, so you win!&#8217;)<\/span><\/div>\n<div><span style=\"font-size: 10pt; font-family: 'courier new', courier, monospace;\">\u00a0 \u00a0 print()<\/span><\/div>\n<div><span style=\"font-size: 10pt; font-family: 'courier new', courier, monospace;\">\u00a0 \u00a0 print(&#8216;Now the BIG question is: Is this a fair game???&#8217;)<\/span><\/div>\n<div><span style=\"font-size: 10pt; font-family: 'courier new', courier, monospace;\">\u00a0 \u00a0 print(&#8216;-&#8216;*105)<\/span><\/div>\n<div><span style=\"font-size: 10pt; font-family: 'courier new', courier, monospace;\">\u00a0 \u00a0 print()<\/span><\/div>\n<div><span style=\"font-size: 10pt; font-family: 'courier new', courier, monospace;\">\u00a0 \u00a0 quit()<\/span><\/div>\n<div><span style=\"font-size: 10pt; font-family: 'courier new', courier, monospace;\">def choose_sequence(opponent_sequence):<\/span><\/div>\n<div><span style=\"font-size: 10pt; font-family: 'courier new', courier, monospace;\">\u00a0 \u00a0 mys=&#8221;&#8221;<\/span><\/div>\n<div><span style=\"font-size: 10pt; font-family: 'courier new', courier, monospace;\">\u00a0 \u00a0 c=opponent_sequence[1]<\/span><\/div>\n<div><span style=\"font-size: 10pt; font-family: 'courier new', courier, monospace;\">\u00a0 \u00a0 if c==&#8217;T&#8217;:<\/span><\/div>\n<div><span style=\"font-size: 10pt; font-family: 'courier new', courier, monospace;\">\u00a0 \u00a0 \u00a0 \u00a0 mys = &#8220;H&#8221;<\/span><\/div>\n<div><span style=\"font-size: 10pt; font-family: 'courier new', courier, monospace;\">\u00a0 \u00a0 else:<\/span><\/div>\n<div><span style=\"font-size: 10pt; font-family: 'courier new', courier, monospace;\">\u00a0 \u00a0 \u00a0 \u00a0 mys = &#8220;T&#8221;<\/span><\/div>\n<div><span style=\"font-size: 10pt; font-family: 'courier new', courier, monospace;\">\u00a0 \u00a0 mys = mys + opponent_sequence[:2]<\/span><\/div>\n<div><span style=\"font-size: 10pt; font-family: 'courier new', courier, monospace;\">\u00a0 \u00a0 return mys<\/span><\/div>\n<div><span style=\"font-size: 10pt; font-family: 'courier new', courier, monospace;\">num_of_games = 1<\/span><\/div>\n<div><span style=\"font-size: 10pt; font-family: 'courier new', courier, monospace;\">opponent_sequence = &#8221; #&#8217;THH&#8217;<\/span><\/div>\n<div><span style=\"font-size: 10pt; font-family: 'courier new', courier, monospace;\">computer_sequence = &#8221; #choose_sequence(opponent_sequence)<\/span><\/div>\n<div><span style=\"font-size: 10pt; font-family: 'courier new', courier, monospace;\">slow = True<\/span><\/div>\n<div><span style=\"font-size: 10pt; font-family: 'courier new', courier, monospace;\">opponent_wins = 0<\/span><\/div>\n<div><span style=\"font-size: 10pt; font-family: 'courier new', courier, monospace;\">computer_wins = 0<\/span><\/div>\n<div><\/div>\n<div><span style=\"font-size: 10pt; font-family: 'courier new', courier, monospace;\">def check_win(s):<\/span><\/div>\n<div><span style=\"font-size: 10pt; font-family: 'courier new', courier, monospace;\">\u00a0 \u00a0 global opponent_sequence, computer_sequence<\/span><\/div>\n<div><span style=\"font-size: 10pt; font-family: 'courier new', courier, monospace;\">\u00a0 \u00a0 lens = len(s)<\/span><\/div>\n<div><span style=\"font-size: 10pt; font-family: 'courier new', courier, monospace;\">\u00a0 \u00a0 if lens &lt; 3:<\/span><\/div>\n<div><span style=\"font-size: 10pt; font-family: 'courier new', courier, monospace;\">\u00a0 \u00a0 \u00a0 \u00a0 return False, &#8221;<\/span><\/div>\n<div><span style=\"font-size: 10pt; font-family: 'courier new', courier, monospace;\">\u00a0 \u00a0 else:<\/span><\/div>\n<div><span style=\"font-size: 10pt; font-family: 'courier new', courier, monospace;\">\u00a0 \u00a0 \u00a0 \u00a0 h = s[lens-3:lens]<\/span><\/div>\n<div><span style=\"font-size: 10pt; font-family: 'courier new', courier, monospace;\">\u00a0 \u00a0 \u00a0 \u00a0 if opponent_sequence == h:<\/span><\/div>\n<div><span style=\"font-size: 10pt; font-family: 'courier new', courier, monospace;\">\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 #print(&#8216;[&#8216;+h+&#8217;]&#8217;)<\/span><\/div>\n<div><span style=\"font-size: 10pt; font-family: 'courier new', courier, monospace;\">\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 #print(&#8216;&lt;&#8216;+opponent_sequence+&#8217;&gt;&#8217;)<\/span><\/div>\n<div><span style=\"font-size: 10pt; font-family: 'courier new', courier, monospace;\">\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 return True, &#8216;opponent&#8217;<\/span><\/div>\n<div><span style=\"font-size: 10pt; font-family: 'courier new', courier, monospace;\">\u00a0 \u00a0 \u00a0 \u00a0 elif computer_sequence == h:<\/span><\/div>\n<div><span style=\"font-size: 10pt; font-family: 'courier new', courier, monospace;\">\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 #print(&#8216;[&#8216;+h+&#8217;]&#8217;)<\/span><\/div>\n<div><span style=\"font-size: 10pt; font-family: 'courier new', courier, monospace;\">\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 #print(&#8216;&lt;&#8216;+computer_sequence+&#8217;&gt;&#8217;)<\/span><\/div>\n<div><span style=\"font-size: 10pt; font-family: 'courier new', courier, monospace;\">\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 return True, &#8216;computer&#8217;<\/span><\/div>\n<div><span style=\"font-size: 10pt; font-family: 'courier new', courier, monospace;\">\u00a0 \u00a0 \u00a0 \u00a0 else:<\/span><\/div>\n<div><span style=\"font-size: 10pt; font-family: 'courier new', courier, monospace;\">\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 return False, &#8221;<\/span><\/div>\n<div><span style=\"font-size: 10pt; font-family: 'courier new', courier, monospace;\">def throw_coin():<\/span><\/div>\n<div><span style=\"font-size: 10pt; font-family: 'courier new', courier, monospace;\">\u00a0 \u00a0 global computer_wins, opponent_wins<\/span><\/div>\n<div><span style=\"font-size: 10pt; font-family: 'courier new', courier, monospace;\">\u00a0 \u00a0 a = 0<\/span><\/div>\n<div><span style=\"font-size: 10pt; font-family: 'courier new', courier, monospace;\">\u00a0 \u00a0 s = &#8220;&#8221;<\/span><\/div>\n<div><span style=\"font-size: 10pt; font-family: 'courier new', courier, monospace;\">\u00a0 \u00a0 win = False<\/span><\/div>\n<div><span style=\"font-size: 10pt; font-family: 'courier new', courier, monospace;\">\u00a0 \u00a0 while not win:<\/span><\/div>\n<div><span style=\"font-size: 10pt; font-family: 'courier new', courier, monospace;\">\u00a0 \u00a0 \u00a0 \u00a0 a += 1<\/span><\/div>\n<div><span style=\"font-size: 10pt; font-family: 'courier new', courier, monospace;\">\u00a0 \u00a0 \u00a0 \u00a0 coin = random.randint(0,1)<\/span><\/div>\n<div><span style=\"font-size: 10pt; font-family: 'courier new', courier, monospace;\">\u00a0 \u00a0 \u00a0 \u00a0 if coin == 0:<\/span><\/div>\n<div><span style=\"font-size: 10pt; font-family: 'courier new', courier, monospace;\">\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 s = s + &#8216;H&#8217;<\/span><\/div>\n<div><span style=\"font-size: 10pt; font-family: 'courier new', courier, monospace;\">\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 if num_of_games &lt;= 100: \u00a0 \u00a0<\/span><\/div>\n<div><span style=\"font-size: 10pt; font-family: 'courier new', courier, monospace;\">\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 print(&#8216;H&#8217;, end=&#8221;, flush=True)<\/span><\/div>\n<div><span style=\"font-size: 10pt; font-family: 'courier new', courier, monospace;\">\u00a0 \u00a0 \u00a0 \u00a0 else:<\/span><\/div>\n<div><span style=\"font-size: 10pt; font-family: 'courier new', courier, monospace;\">\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 s = s + &#8216;T&#8217;<\/span><\/div>\n<div><span style=\"font-size: 10pt; font-family: 'courier new', courier, monospace;\">\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 if num_of_games &lt;= 100:<\/span><\/div>\n<div><span style=\"font-size: 10pt; font-family: 'courier new', courier, monospace;\">\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 print(&#8216;T&#8217;, end=&#8221;, flush=True)<\/span><\/div>\n<div><span style=\"font-size: 10pt; font-family: 'courier new', courier, monospace;\">\u00a0 \u00a0 \u00a0 \u00a0 win, winner = check_win(s)<\/span><\/div>\n<div><span style=\"font-size: 10pt; font-family: 'courier new', courier, monospace;\">\u00a0 \u00a0 \u00a0 \u00a0 if winner == &#8216;computer&#8217;:<\/span><\/div>\n<div><span style=\"font-size: 10pt; font-family: 'courier new', courier, monospace;\">\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 computer_wins += 1<\/span><span style=\"font-size: 10pt; font-family: 'courier new', courier, monospace;\">\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0\u00a0<\/span><\/div>\n<div><span style=\"font-size: 10pt; font-family: 'courier new', courier, monospace;\">\u00a0 \u00a0 \u00a0 \u00a0 elif winner == &#8216;opponent&#8217;:<\/span><\/div>\n<div><span style=\"font-size: 10pt; font-family: 'courier new', courier, monospace;\">\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 opponent_wins += 1<\/span><span style=\"font-size: 10pt; font-family: 'courier new', courier, monospace;\">\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0\u00a0<\/span><\/div>\n<div><span style=\"font-size: 10pt; font-family: 'courier new', courier, monospace;\">\u00a0 \u00a0 \u00a0 \u00a0 if slow and num_of_games &lt;= 100:<\/span><\/div>\n<div><span style=\"font-size: 10pt; font-family: 'courier new', courier, monospace;\">\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 time.sleep(0.25)<\/span><\/div>\n<div><span style=\"font-size: 10pt; font-family: 'courier new', courier, monospace;\">\u00a0 \u00a0 if num_of_games &lt;= 100:<\/span><\/div>\n<div><span style=\"font-size: 10pt; font-family: 'courier new', courier, monospace;\">\u00a0 \u00a0 \u00a0 \u00a0 print()<\/span><\/div>\n<div><span style=\"font-size: 10pt; font-family: 'courier new', courier, monospace;\">\u00a0 \u00a0 if num_of_games &lt;= 100:<\/span><\/div>\n<div><span style=\"font-size: 10pt; font-family: 'courier new', courier, monospace;\">\u00a0 \u00a0 \u00a0 \u00a0 if winner == &#8216;computer&#8217;:<\/span><\/div>\n<div><span style=\"font-size: 10pt; font-family: 'courier new', courier, monospace;\">\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 w = &#8216;I am&#8217;<\/span><\/div>\n<div><span style=\"font-size: 10pt; font-family: 'courier new', courier, monospace;\">\u00a0 \u00a0 \u00a0 \u00a0 else:<\/span><\/div>\n<div><span style=\"font-size: 10pt; font-family: 'courier new', courier, monospace;\">\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 w = &#8216;You are&#8217;<\/span><\/div>\n<div><span style=\"font-size: 10pt; font-family: 'courier new', courier, monospace;\">\u00a0 \u00a0 \u00a0 \u00a0 print(w + &#8216; the winner after &#8216; + str(a) + &#8216; throws&#8217;)<\/span><\/div>\n<div><span style=\"font-size: 10pt; font-family: 'courier new', courier, monospace;\">def play():<\/span><\/div>\n<div><span style=\"font-size: 10pt; font-family: 'courier new', courier, monospace;\">\u00a0 \u00a0 for i in range(num_of_games):<\/span><\/div>\n<div><span style=\"font-size: 10pt; font-family: 'courier new', courier, monospace;\">\u00a0 \u00a0 \u00a0 \u00a0 if num_of_games &lt;= 100:<\/span><\/div>\n<div><span style=\"font-size: 10pt; font-family: 'courier new', courier, monospace;\">\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 print(&#8216;Game &#8216; + str(i+1) + &#8216;:&#8217;)<\/span><\/div>\n<div><span style=\"font-size: 10pt; font-family: 'courier new', courier, monospace;\">\u00a0 \u00a0 \u00a0 \u00a0 throw_coin()<\/span><\/div>\n<div><span style=\"font-size: 10pt; font-family: 'courier new', courier, monospace;\">\u00a0 \u00a0 m = &#8216;\\nAfter &#8216; + str(num_of_games) + &#8216; games you won &#8216; + str(opponent_wins)<\/span><\/div>\n<div><span style=\"font-size: 10pt; font-family: 'courier new', courier, monospace;\">\u00a0 \u00a0 m = m + (&#8216; game&#8217; if opponent_wins == 1 else &#8216; games&#8217;) + &#8216; with sequence &#8216; + opponent_sequence + &#8216; and I won &#8216; + str(computer_wins)<\/span><\/div>\n<div><span style=\"font-size: 10pt; font-family: 'courier new', courier, monospace;\">\u00a0 \u00a0 m = m + (&#8216; game&#8217; if computer_wins == 1 else &#8216; games&#8217;) + &#8216; with sequence &#8216; + computer_sequence + &#8216;.&#8217;<\/span><\/div>\n<div><span style=\"font-size: 10pt; font-family: 'courier new', courier, monospace;\">\u00a0 \u00a0 print(m)<\/span><span style=\"font-size: 10pt; font-family: 'courier new', courier, monospace;\">\u00a0 \u00a0 <\/span><\/div>\n<div><span style=\"font-size: 10pt; font-family: 'courier new', courier, monospace;\">\u00a0 \u00a0 \u00a0 \u00a0<\/span><\/div>\n<div><span style=\"font-size: 10pt; font-family: 'courier new', courier, monospace;\">def start():<\/span><\/div>\n<div><span style=\"font-size: 10pt; font-family: 'courier new', courier, monospace;\">\u00a0 \u00a0 global num_of_games, slow, opponent_sequence, computer_sequence<\/span><\/div>\n<div><span style=\"font-size: 10pt; font-family: 'courier new', courier, monospace;\">\u00a0 \u00a0 print(&#8216;Penney-Ante game&#8217;)<\/span><\/div>\n<div><span style=\"font-size: 10pt; font-family: 'courier new', courier, monospace;\">\u00a0 \u00a0 print()<\/span><\/div>\n<div><span style=\"font-size: 10pt; font-family: 'courier new', courier, monospace;\">\u00a0 \u00a0 p = input(&#8216;Need explanation (Y or N)[N]? &#8216;)<\/span><\/div>\n<div><span style=\"font-size: 10pt; font-family: 'courier new', courier, monospace;\">\u00a0 \u00a0 if len(p) == 0:<\/span><\/div>\n<div><span style=\"font-size: 10pt; font-family: 'courier new', courier, monospace;\">\u00a0 \u00a0 \u00a0 \u00a0 #print(&#8216;\\bN&#8217;)<\/span><\/div>\n<div><span style=\"font-size: 10pt; font-family: 'courier new', courier, monospace;\">\u00a0 \u00a0 \u00a0 \u00a0 p=&#8217;N&#8217;<\/span><\/div>\n<div><span style=\"font-size: 10pt; font-family: 'courier new', courier, monospace;\">\u00a0 \u00a0 if p[0].upper() == &#8216;Y&#8217;:<\/span><\/div>\n<div><span style=\"font-size: 10pt; font-family: 'courier new', courier, monospace;\">\u00a0 \u00a0 \u00a0 \u00a0 help()<\/span><\/div>\n<div><span style=\"font-size: 10pt; font-family: 'courier new', courier, monospace;\">\u00a0 \u00a0 p = input(&#8220;Give your 3-length sequence (only T&#8217;s or H&#8217;s): &#8220;)<\/span><\/div>\n<div><span style=\"font-size: 10pt; font-family: 'courier new', courier, monospace;\">\u00a0 \u00a0 p = p.upper()<\/span><\/div>\n<div><span style=\"font-size: 10pt; font-family: 'courier new', courier, monospace;\">\u00a0 \u00a0 r=(len(p)==3)<\/span><\/div>\n<div><span style=\"font-size: 10pt; font-family: 'courier new', courier, monospace;\">\u00a0 \u00a0 if r:<\/span><\/div>\n<div><span style=\"font-size: 10pt; font-family: 'courier new', courier, monospace;\">\u00a0 \u00a0 \u00a0 \u00a0 for i in range(2):<\/span><\/div>\n<div><span style=\"font-size: 10pt; font-family: 'courier new', courier, monospace;\">\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 if (p[i]!=&#8217;T&#8217; and p[i]!=&#8217;H&#8217;):<\/span><\/div>\n<div><span style=\"font-size: 10pt; font-family: 'courier new', courier, monospace;\">\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 r=False<\/span><\/div>\n<div><span style=\"font-size: 10pt; font-family: 'courier new', courier, monospace;\">\u00a0 \u00a0 if not r:<\/span><\/div>\n<div><span style=\"font-size: 10pt; font-family: 'courier new', courier, monospace;\">\u00a0 \u00a0 \u00a0 \u00a0 print(&#8216;No valid input. You play with TTT.&#8217;)<\/span><\/div>\n<div><span style=\"font-size: 10pt; font-family: 'courier new', courier, monospace;\">\u00a0 \u00a0 \u00a0 \u00a0 p=&#8217;TTT&#8217;<\/span><\/div>\n<div><span style=\"font-size: 10pt; font-family: 'courier new', courier, monospace;\">\u00a0 \u00a0 opponent_sequence = p<\/span><\/div>\n<div><span style=\"font-size: 10pt; font-family: 'courier new', courier, monospace;\">\u00a0 \u00a0 computer_sequence = choose_sequence(opponent_sequence)<\/span><\/div>\n<div><span style=\"font-size: 10pt; font-family: 'courier new', courier, monospace;\">\u00a0 \u00a0 p = input(&#8216;How many games (&gt;0)[10]: &#8216;)<\/span><\/div>\n<div><span style=\"font-size: 10pt; font-family: 'courier new', courier, monospace;\">\u00a0 \u00a0 if len(p)==0:<\/span><\/div>\n<div><span style=\"font-size: 10pt; font-family: 'courier new', courier, monospace;\">\u00a0 \u00a0 \u00a0 \u00a0 p=&#8217;10&#8217;<\/span><\/div>\n<div><span style=\"font-size: 10pt; font-family: 'courier new', courier, monospace;\">\u00a0 \u00a0 try:<\/span><\/div>\n<div><span style=\"font-size: 10pt; font-family: 'courier new', courier, monospace;\">\u00a0 \u00a0 \u00a0 \u00a0 p = int(p)<\/span><\/div>\n<div><span style=\"font-size: 10pt; font-family: 'courier new', courier, monospace;\">\u00a0 \u00a0 except:<\/span><\/div>\n<div><span style=\"font-size: 10pt; font-family: 'courier new', courier, monospace;\">\u00a0 \u00a0 \u00a0 \u00a0 p = 10<\/span><\/div>\n<div><span style=\"font-size: 10pt; font-family: 'courier new', courier, monospace;\">\u00a0 \u00a0 num_of_games = p<\/span><\/div>\n<div><span style=\"font-size: 10pt; font-family: 'courier new', courier, monospace;\">\u00a0 \u00a0 p = input(&#8216;Play Slow or Fast (S or F)[F]: &#8216;)<\/span><\/div>\n<div><span style=\"font-size: 10pt; font-family: 'courier new', courier, monospace;\">\u00a0 \u00a0 if len(p) == 0:<\/span><\/div>\n<div><span style=\"font-size: 10pt; font-family: 'courier new', courier, monospace;\">\u00a0 \u00a0 \u00a0 \u00a0 p=&#8217;F&#8217;<\/span><\/div>\n<div><span style=\"font-size: 10pt; font-family: 'courier new', courier, monospace;\">\u00a0 \u00a0 p = p[0].upper()<\/span><\/div>\n<div><span style=\"font-size: 10pt; font-family: 'courier new', courier, monospace;\">\u00a0 \u00a0 slow = (p == &#8216;S&#8217;)<\/span><\/div>\n<div><span style=\"font-size: 10pt; font-family: 'courier new', courier, monospace;\">\u00a0 \u00a0 print(&#8216;Your sequence is: &#8216; + opponent_sequence)<\/span><\/div>\n<div><span style=\"font-size: 10pt; font-family: 'courier new', courier, monospace;\">\u00a0 \u00a0 print(&#8216;My sequence is: &#8216; + computer_sequence)<\/span><\/div>\n<div><span style=\"font-size: 10pt; font-family: 'courier new', courier, monospace;\">\u00a0 \u00a0 print(&#8220;Let&#8217;s play&#8230;&#8221;)<\/span><\/div>\n<div><span style=\"font-size: 10pt; font-family: 'courier new', courier, monospace;\">\u00a0 \u00a0 play()<\/span><\/div>\n<div><span style=\"font-size: 10pt; font-family: 'courier new', courier, monospace;\">\u00a0 \u00a0<\/span><\/div>\n<div><span style=\"font-size: 10pt; font-family: 'courier new', courier, monospace;\">start()<\/span><\/div>\n<\/div>\n<\/div>\n<p><em><span class=\"collapseomatic \" id=\"id69de29f75ebc1\"  tabindex=\"0\" title=\"Hieronder de Excel UDF&#039;s (User Defiened Function) die ik heb gebruikt voor de tabellen:\"    >Hieronder de Excel UDF's (User Defiened Function) die ik heb gebruikt voor de tabellen:<\/span><div id=\"target-id69de29f75ebc1\" class=\"collapseomatic_content \"><\/em><\/p>\n<p><span style=\"font-size: 10pt; font-family: 'courier new', courier, monospace;\">Function ConwayS(s1 As String, s2 As String) As Integer<\/span><br \/>\n<span style=\"font-size: 10pt; font-family: 'courier new', courier, monospace;\">\u00a0 \u00a0 Dim s As String<\/span><br \/>\n<span style=\"font-size: 10pt; font-family: 'courier new', courier, monospace;\">\u00a0 \u00a0 Dim h1 As String<\/span><br \/>\n<span style=\"font-size: 10pt; font-family: 'courier new', courier, monospace;\">\u00a0 \u00a0 Dim h2 As String<\/span><br \/>\n<span style=\"font-size: 10pt; font-family: 'courier new', courier, monospace;\">\u00a0 \u00a0 Dim x1 As String<\/span><br \/>\n<span style=\"font-size: 10pt; font-family: 'courier new', courier, monospace;\">\u00a0 \u00a0 Dim x2 As String<\/span><br \/>\n<span style=\"font-size: 10pt; font-family: 'courier new', courier, monospace;\">\u00a0 \u00a0 Dim a As Integer<\/span><br \/>\n<span style=\"font-size: 10pt; font-family: 'courier new', courier, monospace;\">\u00a0 \u00a0 Dim p As Integer<\/span><\/p>\n<p><span style=\"font-size: 10pt; font-family: 'courier new', courier, monospace;\">\u00a0 \u00a0 s = &#8220;&#8221;<\/span><br \/>\n<span style=\"font-size: 10pt; font-family: 'courier new', courier, monospace;\">\u00a0 \u00a0 h1 = s1<\/span><br \/>\n<span style=\"font-size: 10pt; font-family: 'courier new', courier, monospace;\">\u00a0 \u00a0 h2 = s2<\/span><\/p>\n<p><span style=\"font-size: 10pt; font-family: 'courier new', courier, monospace;\">\u00a0 \u00a0 For a = 1 To 3<\/span><br \/>\n<span style=\"font-size: 10pt; font-family: 'courier new', courier, monospace;\">\u00a0 \u00a0 \u00a0 \u00a0 x2 = Mid(h1, 1, 4 &#8211; a)<\/span><br \/>\n<span style=\"font-size: 10pt; font-family: 'courier new', courier, monospace;\">\u00a0 \u00a0 \u00a0 \u00a0 x1 = Mid(h2, a, 4 &#8211; a)<\/span><br \/>\n<span style=\"font-size: 10pt; font-family: 'courier new', courier, monospace;\">\u00a0 \u00a0 \u00a0 \u00a0 If x1 = x2 Then<\/span><br \/>\n<span style=\"font-size: 10pt; font-family: 'courier new', courier, monospace;\">\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 s = s &amp; &#8220;1&#8221;<\/span><br \/>\n<span style=\"font-size: 10pt; font-family: 'courier new', courier, monospace;\">\u00a0 \u00a0 \u00a0 \u00a0 Else<\/span><br \/>\n<span style=\"font-size: 10pt; font-family: 'courier new', courier, monospace;\">\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 s = s &amp; &#8220;0&#8221;<\/span><br \/>\n<span style=\"font-size: 10pt; font-family: 'courier new', courier, monospace;\">\u00a0 \u00a0 \u00a0 \u00a0 End If<\/span><br \/>\n<span style=\"font-size: 10pt; font-family: 'courier new', courier, monospace;\">\u00a0 \u00a0 Next a<\/span><\/p>\n<p><span style=\"font-size: 10pt; font-family: 'courier new', courier, monospace;\">\u00a0 \u00a0 p = 0<\/span><br \/>\n<span style=\"font-size: 10pt; font-family: 'courier new', courier, monospace;\">\u00a0 \u00a0 For a = 0 To 2<\/span><br \/>\n<span style=\"font-size: 10pt; font-family: 'courier new', courier, monospace;\">\u00a0 \u00a0 \u00a0 \u00a0 p = p + (Asc(Mid(s, a + 1, 1)) &#8211; 48) * 2 ^ (2 &#8211; a)<\/span><br \/>\n<span style=\"font-size: 10pt; font-family: 'courier new', courier, monospace;\">\u00a0 \u00a0 Next a<\/span><br \/>\n<span style=\"font-size: 10pt; font-family: 'courier new', courier, monospace;\">\u00a0 \u00a0 ConwayS = p<\/span><br \/>\n<span style=\"font-size: 10pt; font-family: 'courier new', courier, monospace;\">End Function<\/span><\/p>\n<p><span style=\"font-size: 10pt; font-family: 'courier new', courier, monospace;\">Function Odds(s1 As String, s2 As String)<\/span><br \/>\n<span style=\"font-size: 10pt; font-family: 'courier new', courier, monospace;\">\u00a0 \u00a0 Dim AA As Integer<\/span><br \/>\n<span style=\"font-size: 10pt; font-family: 'courier new', courier, monospace;\">\u00a0 \u00a0 Dim AB As Integer<\/span><br \/>\n<span style=\"font-size: 10pt; font-family: 'courier new', courier, monospace;\">\u00a0 \u00a0 Dim BA As Integer<\/span><br \/>\n<span style=\"font-size: 10pt; font-family: 'courier new', courier, monospace;\">\u00a0 \u00a0 Dim BB As Integer<\/span><br \/>\n<span style=\"font-size: 10pt; font-family: 'courier new', courier, monospace;\">\u00a0 \u00a0 Dim o As Integer<\/span><\/p>\n<p><span style=\"font-size: 10pt; font-family: 'courier new', courier, monospace;\">\u00a0 \u00a0 If s1 &lt;&gt; s2 Then<\/span><br \/>\n<span style=\"font-size: 10pt; font-family: 'courier new', courier, monospace;\">\u00a0 \u00a0 \u00a0 \u00a0 AA = ConwayS(s1, s1)<\/span><br \/>\n<span style=\"font-size: 10pt; font-family: 'courier new', courier, monospace;\">\u00a0 \u00a0 \u00a0 \u00a0 AB = ConwayS(s2, s1)<\/span><br \/>\n<span style=\"font-size: 10pt; font-family: 'courier new', courier, monospace;\">\u00a0 \u00a0 \u00a0 \u00a0 BA = ConwayS(s1, s2)<\/span><br \/>\n<span style=\"font-size: 10pt; font-family: 'courier new', courier, monospace;\">\u00a0 \u00a0 \u00a0 \u00a0 BB = ConwayS(s2, s2)<\/span><br \/>\n<span style=\"font-size: 10pt; font-family: 'courier new', courier, monospace;\">\u00a0 \u00a0 \u00a0 \u00a0 o = (AA &#8211; AB) \/ (BB &#8211; BA)<\/span><br \/>\n<span style=\"font-size: 10pt; font-family: 'courier new', courier, monospace;\">\u00a0 \u00a0 \u00a0 \u00a0 Odds = o<\/span><br \/>\n<span style=\"font-size: 10pt; font-family: 'courier new', courier, monospace;\">\u00a0 \u00a0 Else<\/span><br \/>\n<span style=\"font-size: 10pt; font-family: 'courier new', courier, monospace;\">\u00a0 \u00a0 \u00a0 \u00a0 Odds = &#8220;&#8221;<\/span><br \/>\n<span style=\"font-size: 10pt; font-family: 'courier new', courier, monospace;\">\u00a0 \u00a0 End If<\/span><br \/>\n<span style=\"font-size: 10pt; font-family: 'courier new', courier, monospace;\">End Function<\/span><\/p>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Inleiding De &#8216;Penney Ante game&#8217; is een spel met een munt dat uitstekend in de kroeg gespeeld kan worden. Zeker omdat er altijd een winnende strategie is. Het spel is voor het eerst genoemd in een artikel in 1969 door Walter Penney en daarna uitgebreid besproken door Martin Gardner in 1974. Hoe gaat het spel? [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":2061,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"templates\/template-full-width.php","meta":{"_lmt_disableupdate":"no","_lmt_disable":"","footnotes":""},"class_list":["post-1238","page","type-page","status-publish","hentry"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.3 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Penney Ante - Wiskunst<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/wiskunst.nl\/index.php\/wiskunde-is-leuk\/nieuwe-artikelen\/artikel-00-0f\/penney-ante\/\" \/>\n<meta property=\"og:locale\" content=\"nl_NL\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Penney Ante - Wiskunst\" \/>\n<meta property=\"og:description\" content=\"Inleiding De &#8216;Penney Ante game&#8217; is een spel met een munt dat uitstekend in de kroeg gespeeld kan worden. Zeker omdat er altijd een winnende strategie is. Het spel is voor het eerst genoemd in een artikel in 1969 door Walter Penney en daarna uitgebreid besproken door Martin Gardner in 1974. Hoe gaat het spel? [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/wiskunst.nl\/index.php\/wiskunde-is-leuk\/nieuwe-artikelen\/artikel-00-0f\/penney-ante\/\" \/>\n<meta property=\"og:site_name\" content=\"Wiskunst\" \/>\n<meta property=\"article:modified_time\" content=\"2024-03-26T09:56:52+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/wiskunst.nl\/wp-content\/uploads\/2022\/06\/steen-papier-schaar.png\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Geschatte leestijd\" \/>\n\t<meta name=\"twitter:data1\" content=\"15 minuten\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/wiskunst.nl\\\/index.php\\\/wiskunde-is-leuk\\\/nieuwe-artikelen\\\/artikel-00-0f\\\/penney-ante\\\/\",\"url\":\"https:\\\/\\\/wiskunst.nl\\\/index.php\\\/wiskunde-is-leuk\\\/nieuwe-artikelen\\\/artikel-00-0f\\\/penney-ante\\\/\",\"name\":\"Penney Ante - Wiskunst\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/wiskunst.nl\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/wiskunst.nl\\\/index.php\\\/wiskunde-is-leuk\\\/nieuwe-artikelen\\\/artikel-00-0f\\\/penney-ante\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/wiskunst.nl\\\/index.php\\\/wiskunde-is-leuk\\\/nieuwe-artikelen\\\/artikel-00-0f\\\/penney-ante\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/wiskunst.nl\\\/wp-content\\\/uploads\\\/2022\\\/06\\\/steen-papier-schaar.png\",\"datePublished\":\"2022-06-09T08:02:58+00:00\",\"dateModified\":\"2024-03-26T09:56:52+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/wiskunst.nl\\\/index.php\\\/wiskunde-is-leuk\\\/nieuwe-artikelen\\\/artikel-00-0f\\\/penney-ante\\\/#breadcrumb\"},\"inLanguage\":\"nl-NL\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/wiskunst.nl\\\/index.php\\\/wiskunde-is-leuk\\\/nieuwe-artikelen\\\/artikel-00-0f\\\/penney-ante\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"nl-NL\",\"@id\":\"https:\\\/\\\/wiskunst.nl\\\/index.php\\\/wiskunde-is-leuk\\\/nieuwe-artikelen\\\/artikel-00-0f\\\/penney-ante\\\/#primaryimage\",\"url\":\"https:\\\/\\\/wiskunst.nl\\\/wp-content\\\/uploads\\\/2022\\\/06\\\/steen-papier-schaar.png\",\"contentUrl\":\"https:\\\/\\\/wiskunst.nl\\\/wp-content\\\/uploads\\\/2022\\\/06\\\/steen-papier-schaar.png\",\"width\":259,\"height\":236},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/wiskunst.nl\\\/index.php\\\/wiskunde-is-leuk\\\/nieuwe-artikelen\\\/artikel-00-0f\\\/penney-ante\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/wiskunst.nl\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Wiskunde is leuk\",\"item\":\"https:\\\/\\\/wiskunst.nl\\\/index.php\\\/wiskunde-is-leuk\\\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Nieuwe artikelen\",\"item\":\"https:\\\/\\\/wiskunst.nl\\\/index.php\\\/wiskunde-is-leuk\\\/nieuwe-artikelen\\\/\"},{\"@type\":\"ListItem\",\"position\":4,\"name\":\"Artikel 00-0F\",\"item\":\"https:\\\/\\\/wiskunst.nl\\\/index.php\\\/wiskunde-is-leuk\\\/nieuwe-artikelen\\\/artikel-00-0f\\\/\"},{\"@type\":\"ListItem\",\"position\":5,\"name\":\"Penney Ante\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/wiskunst.nl\\\/#website\",\"url\":\"https:\\\/\\\/wiskunst.nl\\\/\",\"name\":\"Wiskunst\",\"description\":\"2\u221e\u2227&gt;\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/wiskunst.nl\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"nl-NL\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Penney Ante - Wiskunst","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/wiskunst.nl\/index.php\/wiskunde-is-leuk\/nieuwe-artikelen\/artikel-00-0f\/penney-ante\/","og_locale":"nl_NL","og_type":"article","og_title":"Penney Ante - Wiskunst","og_description":"Inleiding De &#8216;Penney Ante game&#8217; is een spel met een munt dat uitstekend in de kroeg gespeeld kan worden. Zeker omdat er altijd een winnende strategie is. Het spel is voor het eerst genoemd in een artikel in 1969 door Walter Penney en daarna uitgebreid besproken door Martin Gardner in 1974. Hoe gaat het spel? [&hellip;]","og_url":"https:\/\/wiskunst.nl\/index.php\/wiskunde-is-leuk\/nieuwe-artikelen\/artikel-00-0f\/penney-ante\/","og_site_name":"Wiskunst","article_modified_time":"2024-03-26T09:56:52+00:00","og_image":[{"url":"https:\/\/wiskunst.nl\/wp-content\/uploads\/2022\/06\/steen-papier-schaar.png","type":"","width":"","height":""}],"twitter_card":"summary_large_image","twitter_misc":{"Geschatte leestijd":"15 minuten"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/wiskunst.nl\/index.php\/wiskunde-is-leuk\/nieuwe-artikelen\/artikel-00-0f\/penney-ante\/","url":"https:\/\/wiskunst.nl\/index.php\/wiskunde-is-leuk\/nieuwe-artikelen\/artikel-00-0f\/penney-ante\/","name":"Penney Ante - Wiskunst","isPartOf":{"@id":"https:\/\/wiskunst.nl\/#website"},"primaryImageOfPage":{"@id":"https:\/\/wiskunst.nl\/index.php\/wiskunde-is-leuk\/nieuwe-artikelen\/artikel-00-0f\/penney-ante\/#primaryimage"},"image":{"@id":"https:\/\/wiskunst.nl\/index.php\/wiskunde-is-leuk\/nieuwe-artikelen\/artikel-00-0f\/penney-ante\/#primaryimage"},"thumbnailUrl":"https:\/\/wiskunst.nl\/wp-content\/uploads\/2022\/06\/steen-papier-schaar.png","datePublished":"2022-06-09T08:02:58+00:00","dateModified":"2024-03-26T09:56:52+00:00","breadcrumb":{"@id":"https:\/\/wiskunst.nl\/index.php\/wiskunde-is-leuk\/nieuwe-artikelen\/artikel-00-0f\/penney-ante\/#breadcrumb"},"inLanguage":"nl-NL","potentialAction":[{"@type":"ReadAction","target":["https:\/\/wiskunst.nl\/index.php\/wiskunde-is-leuk\/nieuwe-artikelen\/artikel-00-0f\/penney-ante\/"]}]},{"@type":"ImageObject","inLanguage":"nl-NL","@id":"https:\/\/wiskunst.nl\/index.php\/wiskunde-is-leuk\/nieuwe-artikelen\/artikel-00-0f\/penney-ante\/#primaryimage","url":"https:\/\/wiskunst.nl\/wp-content\/uploads\/2022\/06\/steen-papier-schaar.png","contentUrl":"https:\/\/wiskunst.nl\/wp-content\/uploads\/2022\/06\/steen-papier-schaar.png","width":259,"height":236},{"@type":"BreadcrumbList","@id":"https:\/\/wiskunst.nl\/index.php\/wiskunde-is-leuk\/nieuwe-artikelen\/artikel-00-0f\/penney-ante\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/wiskunst.nl\/"},{"@type":"ListItem","position":2,"name":"Wiskunde is leuk","item":"https:\/\/wiskunst.nl\/index.php\/wiskunde-is-leuk\/"},{"@type":"ListItem","position":3,"name":"Nieuwe artikelen","item":"https:\/\/wiskunst.nl\/index.php\/wiskunde-is-leuk\/nieuwe-artikelen\/"},{"@type":"ListItem","position":4,"name":"Artikel 00-0F","item":"https:\/\/wiskunst.nl\/index.php\/wiskunde-is-leuk\/nieuwe-artikelen\/artikel-00-0f\/"},{"@type":"ListItem","position":5,"name":"Penney Ante"}]},{"@type":"WebSite","@id":"https:\/\/wiskunst.nl\/#website","url":"https:\/\/wiskunst.nl\/","name":"Wiskunst","description":"2\u221e\u2227&gt;","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/wiskunst.nl\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"nl-NL"}]}},"_links":{"self":[{"href":"https:\/\/wiskunst.nl\/index.php\/wp-json\/wp\/v2\/pages\/1238","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wiskunst.nl\/index.php\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/wiskunst.nl\/index.php\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/wiskunst.nl\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/wiskunst.nl\/index.php\/wp-json\/wp\/v2\/comments?post=1238"}],"version-history":[{"count":30,"href":"https:\/\/wiskunst.nl\/index.php\/wp-json\/wp\/v2\/pages\/1238\/revisions"}],"predecessor-version":[{"id":2051,"href":"https:\/\/wiskunst.nl\/index.php\/wp-json\/wp\/v2\/pages\/1238\/revisions\/2051"}],"up":[{"embeddable":true,"href":"https:\/\/wiskunst.nl\/index.php\/wp-json\/wp\/v2\/pages\/2061"}],"wp:attachment":[{"href":"https:\/\/wiskunst.nl\/index.php\/wp-json\/wp\/v2\/media?parent=1238"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}