{"id":1933,"date":"2014-12-13T11:02:26","date_gmt":"2014-12-13T10:02:26","guid":{"rendered":"http:\/\/www.theusrus.de\/blog\/?p=1933"},"modified":"2014-12-15T08:20:03","modified_gmt":"2014-12-15T07:20:03","slug":"uefa-champions-league-drawing","status":"publish","type":"post","link":"https:\/\/www.theusrus.de\/blog\/uefa-champions-league-drawing\/","title":{"rendered":"UEFA Champions League Round of 16 draw"},"content":{"rendered":"<p>Each year after the group stage, there is\u00a0the much awaited drawing of the eighth-final, which essentially defines a team&#8217;s fate. So far the thing is not too complicated, as there are 16 teams out of which we need to generate 8 games &#8211; no problem if it would be possible to draw the teams without restrictions. But there are quite a few:<\/p>\n<ol>\n<li>Group winners only play group runner up<\/li>\n<li>You can&#8217;t play a team which was in the same group<\/li>\n<li>Teams from the same league can&#8217;t play each others<\/li>\n<\/ol>\n<p>Thus there is some <a href=\"http:\/\/pastebin.com\/AN0zNavg\" target=\"_blank\">combinatorics <\/a>to solve. Sebastian created a shiny app and the necessary <a title=\"R-Code\" href=\"http:\/\/pastebin.com\/3pcMn4Lk\" target=\"_blank\">R-Code<\/a> to generate the probabilities of who plays whom:<\/p>\n<p><a href=\"http:\/\/54.148.173.94:3838\/cl_shiny\/\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter\" src=\"http:\/\/www.theusRus.de\/Blog-files\/CLStart.png\" alt=\"\" width=\"575\" height=\"491\" \/><\/a><\/p>\n<p>Here we immediately see the restrictions as 0% probability, as there are 8 zeros on the diagonal (restriction 2) and 7 zeros off-diagonal (restriction 3). As each row and column must add up to one (a fact that the friends at <a href=\"http:\/\/www.spiegel.de\/sport\/fussball\/achtelfinale-der-champions-league-alles-wichtige-im-ueberblick-a-1007849.html\" target=\"_blank\">SPON<\/a> got wrong as they initially posted a false solution), combinations at intersections of rows and columns with many zeros get higher probabilities. So the most likely draws (greedy) are:<\/p>\n<ul>\n<li>FC Chelsea vs. Bayer 04 Leverkusen<\/li>\n<li>FC Bayern Munich vs.\u00a0FC Arsenal<\/li>\n<li>Borussia Dortmund vs.\u00a0Manchester City<\/li>\n<li>AS Monaco vs. FC Schalke 04<\/li>\n<\/ul>\n<p>If these matches would be drawn, we would end up with equal probabilities and still three different opponents for all the remaining teams:<\/p>\n<p><a href=\"http:\/\/54.148.173.94:3838\/cl_shiny\/\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter\" src=\"http:\/\/www.theusRus.de\/Blog-files\/CLEqual.png\" alt=\"\" width=\"575\" height=\"490\" \/><\/a><\/p>\n<p>Things look quite different, when we go for the least probable matches for each draw, these are e.g.:<\/p>\n<ul>\n<li>Real Madrid vs. FC Shakthar Donetsk (1 out of 9 with 11%)<\/li>\n<li>FC Porto vs. FC Basel (9.3%)<\/li>\n<li>FC Barcelona vs. Juventus Turin (13%)<\/li>\n<li>AS Monaco vs. Manchester City (1 out of 7 with 16.7%)<\/li>\n<\/ul>\n<p>Now, only after 4 draws, the remaining matches are all fixed by one of the restrictions:<\/p>\n<p><a href=\"http:\/\/54.148.173.94:3838\/cl_shiny\/\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter\" src=\"http:\/\/www.theusRus.de\/Blog-files\/CLLeast.png\" alt=\"\" width=\"575\" height=\"490\" \/><\/a><\/p>\n<p>Now we see what makes the drawing so interesting. Given what matches were already drawn, the remaining matches are more or less fixed.<\/p>\n<p>Thanks to <a href=\"http:\/\/schw4rzr0tg0ld.wordpress.com\" target=\"_blank\">Sebastian<\/a> for the nice tool, and have fun to play around &#8211; maybe you find three matches which already fix all remaining?! Let&#8217;s see what happens on Monday, when the actual drawimg takes place.<\/p>\n<p>Anyway a fantastic example of how useful <a href=\"http:\/\/shiny.rstudio.com\" target=\"_blank\">shiny<\/a> can be.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Each year after the group stage, there is\u00a0the much awaited drawing of the eighth-final, which essentially defines a team&#8217;s fate. So far the thing is not too complicated, as there are 16 teams out of which we need to generate 8 games &#8211; no problem if it would be possible to draw the teams without [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1,14,13],"tags":[],"class_list":["post-1933","post","type-post","status-publish","format-standard","hentry","category-general","category-r","category-soccer"],"_links":{"self":[{"href":"https:\/\/www.theusrus.de\/blog\/wp-json\/wp\/v2\/posts\/1933","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.theusrus.de\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.theusrus.de\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.theusrus.de\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.theusrus.de\/blog\/wp-json\/wp\/v2\/comments?post=1933"}],"version-history":[{"count":14,"href":"https:\/\/www.theusrus.de\/blog\/wp-json\/wp\/v2\/posts\/1933\/revisions"}],"predecessor-version":[{"id":1947,"href":"https:\/\/www.theusrus.de\/blog\/wp-json\/wp\/v2\/posts\/1933\/revisions\/1947"}],"wp:attachment":[{"href":"https:\/\/www.theusrus.de\/blog\/wp-json\/wp\/v2\/media?parent=1933"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.theusrus.de\/blog\/wp-json\/wp\/v2\/categories?post=1933"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.theusrus.de\/blog\/wp-json\/wp\/v2\/tags?post=1933"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}