{"id":1323,"date":"2016-02-01T12:00:51","date_gmt":"2016-02-01T17:00:51","guid":{"rendered":"https:\/\/blogs.mathworks.com\/cleve\/?p=1323"},"modified":"2016-01-31T20:26:53","modified_gmt":"2016-02-01T01:26:53","slug":"perfect-shuffles-of-playing-cards","status":"publish","type":"post","link":"https:\/\/blogs.mathworks.com\/cleve\/2016\/02\/01\/perfect-shuffles-of-playing-cards\/","title":{"rendered":"Perfect Shuffles of Playing Cards"},"content":{"rendered":"\r\n<div class=\"content\"><!--introduction--><p>When a deck of playing cards is shuffled perfectly, the result is not random.  A perfect shuffle places the cards in a mathematically precise order.  As a result, when the most common version of a perfect shuffle is repeated eight times, the deck returns to its original state.<\/p><!--\/introduction--><h3>Contents<\/h3><div><ul><li><a href=\"#9560e022-65ec-4252-b78d-4bcecc9671cd\">A Deck of Playing Cards<\/a><\/li><li><a href=\"#366f659a-3638-46be-8ca3-254abf555273\">Faro Shuffles<\/a><\/li><li><a href=\"#107aaad3-7c0e-4ff7-b997-5299d35df79b\">Out-Faro<\/a><\/li><li><a href=\"#7915e655-82a9-476e-b2a3-ee3a48fe402e\">It takes only 8 Out-Faro shuffles.<\/a><\/li><li><a href=\"#d753e65b-9c9c-48a0-83fe-745464d42b5a\">In-Faro<\/a><\/li><li><a href=\"#65bf5a08-2414-4562-b17d-20e39cfacfbb\">Permutation Matrices<\/a><\/li><li><a href=\"#04fc6bff-488a-47a4-b45a-1d9b46ce550c\">Eigenvalues.<\/a><\/li><li><a href=\"#8039b563-72e7-41c8-91a6-91b0ac32463c\">Multiplicities<\/a><\/li><li><a href=\"#c22c6db7-a398-4d49-b49f-62e4d52b9a03\">Deck_view.<\/a><\/li><li><a href=\"#7cef78d6-ae15-4fb1-a04b-21e959d1d499\">An informative video.<\/a><\/li><\/ul><\/div><h4>A Deck of Playing Cards<a name=\"9560e022-65ec-4252-b78d-4bcecc9671cd\"><\/a><\/h4><p>Fresh out of its package, a deck of playing cards always has the Ace of Spades first, followed by the rest of the spades.  The hearts, in order, are next, followed by the clubs (shown here in green), and finally the diamonds (blue).  The King of Diamonds is last.  Here is a view of a fresh deck.<\/p><pre class=\"codeinput\">   v = 1:52;\r\n   deck_view(v)\r\n   title(0)\r\n<\/pre><img decoding=\"async\" vspace=\"5\" hspace=\"5\" src=\"https:\/\/blogs.mathworks.com\/images\/cleve\/shuffle_blog_01.png\" alt=\"\"> <h4>Faro Shuffles<a name=\"366f659a-3638-46be-8ca3-254abf555273\"><\/a><\/h4><p>A perfect shuffle is also known  as a <i>faro shuffle<\/i>, because it is used frequently in the classic card game, Faro.  The deck is cut into two packs, each containing exactly half of the cards.  Then the two packs are merged by precisely interleaving the cards.<\/p><p>There are two variants.  In an <i>out-faro<\/i> shuffle, the merger is started with the top card from the first half and eventually completed with the last card from the second half.  So with an out-faro shuffle of a fresh deck, the Ace of Spades remains on top and the King of Diamonds remains on the bottom.  An <i>in-faro<\/i> shuffle is started with the second half.  So the Ace of Spades and the King of Diamonds are inserted in the second and next to last positions respectively.<\/p><h4>Out-Faro<a name=\"107aaad3-7c0e-4ff7-b997-5299d35df79b\"><\/a><\/h4><p>A shuffle is a permutation of the elements of a vector representing the deck.  Here is the index vector that produces an out-faro shuffle. A rectangular matrix is created with <tt>1:26<\/tt> in the first row and <tt>27:52<\/tt> in the second.  So its first column is <tt>[1;27]<\/tt>, its second column is <tt>[2;28]<\/tt>, and so on.  The <tt>reshape<\/tt> operation, which is carried out by columns, then generates the desired index vector.<\/p><pre class=\"codeinput\">   pout = reshape([1:26; 27:52],[1,52])\r\n<\/pre><pre class=\"codeoutput\">pout =\r\n  Columns 1 through 13\r\n     1    27     2    28     3    29     4    30     5    31     6    32     7\r\n  Columns 14 through 26\r\n    33     8    34     9    35    10    36    11    37    12    38    13    39\r\n  Columns 27 through 39\r\n    14    40    15    41    16    42    17    43    18    44    19    45    20\r\n  Columns 40 through 52\r\n    46    21    47    22    48    23    49    24    50    25    51    26    52\r\n<\/pre><p>Here is the result of two successive out-faro shuffles of a fresh deck.<\/p><pre class=\"codeinput\">   v = 1:52;\r\n   v = v(pout);\r\n   deck_view(v)\r\n   title(1)\r\n<\/pre><img decoding=\"async\" vspace=\"5\" hspace=\"5\" src=\"https:\/\/blogs.mathworks.com\/images\/cleve\/shuffle_blog_02.png\" alt=\"\"> <pre class=\"codeinput\">   v = v(pout);\r\n   deck_view(v)\r\n   title(2)\r\n<\/pre><img decoding=\"async\" vspace=\"5\" hspace=\"5\" src=\"https:\/\/blogs.mathworks.com\/images\/cleve\/shuffle_blog_03.png\" alt=\"\"> <p>The four Aces have moved to the front and the four Kings are bringing up the rear.<\/p><h4>It takes only 8 Out-Faro shuffles.<a name=\"7915e655-82a9-476e-b2a3-ee3a48fe402e\"><\/a><\/h4><p>Let's start over with a fresh deck, apply the <tt>pout<\/tt> permutation eight times, and capture the results in an animated gif.  The deck is returned to its original state in just 8 steps.<\/p><pre class=\"language-matlab\">v = 1:52;\r\ndeck_view(v)\r\ntitle(0)\r\n<span class=\"keyword\">for<\/span> t = 1:8\r\n   v = v(pout)\r\n   deck_view(v)\r\n   title(t)\r\n<span class=\"keyword\">end<\/span>\r\n<\/pre><p><img decoding=\"async\" vspace=\"5\" hspace=\"5\" src=\"https:\/\/blogs.mathworks.com\/images\/cleve\/pout_movie.gif\" alt=\"\"> <\/p><h4>In-Faro<a name=\"d753e65b-9c9c-48a0-83fe-745464d42b5a\"><\/a><\/h4><p>Here is the indexing vector for the in-faro suffle.<\/p><pre class=\"codeinput\">   pin = reshape([27:52; 1:26],[1,52])\r\n<\/pre><pre class=\"codeoutput\">pin =\r\n  Columns 1 through 13\r\n    27     1    28     2    29     3    30     4    31     5    32     6    33\r\n  Columns 14 through 26\r\n     7    34     8    35     9    36    10    37    11    38    12    39    13\r\n  Columns 27 through 39\r\n    40    14    41    15    42    16    43    17    44    18    45    19    46\r\n  Columns 40 through 52\r\n    20    47    21    48    22    49    23    50    24    51    25    52    26\r\n<\/pre><p>It takes 52 in-faro shuffles to get back to the original state.<\/p><p><img decoding=\"async\" vspace=\"5\" hspace=\"5\" src=\"https:\/\/blogs.mathworks.com\/images\/cleve\/pin_movie.gif\" alt=\"\"> <\/p><h4>Permutation Matrices<a name=\"65bf5a08-2414-4562-b17d-20e39cfacfbb\"><\/a><\/h4><p>Both of the faro shuffles can be represented by permutation matrices. Can you see how their <tt>spy<\/tt> plots differ?<\/p><pre class=\"codeinput\">   I = eye(52);\r\n   close\r\n   Pout = I(pout,:);\r\n   spy(Pout)\r\n   title(<span class=\"string\">'Pout'<\/span>)\r\n<\/pre><img decoding=\"async\" vspace=\"5\" hspace=\"5\" src=\"https:\/\/blogs.mathworks.com\/images\/cleve\/shuffle_blog_04.png\" alt=\"\"> <pre class=\"codeinput\">   Pin = I(pin,:);\r\n   spy(Pin)\r\n   title(<span class=\"string\">'Pin'<\/span>)\r\n<\/pre><img decoding=\"async\" vspace=\"5\" hspace=\"5\" src=\"https:\/\/blogs.mathworks.com\/images\/cleve\/shuffle_blog_05.png\" alt=\"\"> <p>It turns out that the smallest value of <tt>t<\/tt> for which the matrix power <tt>P^t<\/tt> is equal to the identity matrix is <tt>t = 8<\/tt> for <tt>P = Pout<\/tt> and <tt>t = 52<\/tt> for <tt>P = Pin<\/tt>.<\/p><h4>Eigenvalues.<a name=\"04fc6bff-488a-47a4-b45a-1d9b46ce550c\"><\/a><\/h4><p>All of this is explained by <i>eigenvalues<\/i>.  The matrix <tt>Pout<\/tt> has order 52, but only 8 distinct eigenvalues, namely the 8-th roots of unity.<\/p><pre class=\"codeinput\">   plot(eig(Pout),<span class=\"string\">'o'<\/span>)\r\n   title(<span class=\"string\">'eig(Pout)'<\/span>)\r\n   axis(1.25*[-1 1 -1 1])\r\n   axis(<span class=\"string\">'square'<\/span>)\r\n<\/pre><img decoding=\"async\" vspace=\"5\" hspace=\"5\" src=\"https:\/\/blogs.mathworks.com\/images\/cleve\/shuffle_blog_06.png\" alt=\"\"> <p>On the other hand, <tt>Pin<\/tt> has 52 distinct eigenvalues, the 52-nd roots of unity.<\/p><pre class=\"codeinput\">   plot(eig(Pin),<span class=\"string\">'o'<\/span>)\r\n   title(<span class=\"string\">'eig(Pin)'<\/span>)\r\n   axis(1.25*[-1 1 -1 1])\r\n   axis(<span class=\"string\">'square'<\/span>)\r\n<\/pre><img decoding=\"async\" vspace=\"5\" hspace=\"5\" src=\"https:\/\/blogs.mathworks.com\/images\/cleve\/shuffle_blog_07.png\" alt=\"\"> <h4>Multiplicities<a name=\"8039b563-72e7-41c8-91a6-91b0ac32463c\"><\/a><\/h4><p>The eigenvalues of <tt>Pout<\/tt> occur with different multiplicites. Can you explain where these counts come from?<\/p><pre class=\"codeinput\">   e = eig(Pout);\r\n   z = exp(pi\/4*1i)\r\n   count = zeros(1,8);\r\n   <span class=\"keyword\">for<\/span> k = 0:7\r\n      count(k+1) = sum(abs(e-z^k)&lt;52*eps);\r\n   <span class=\"keyword\">end<\/span>\r\n   disp(<span class=\"string\">' '<\/span>)\r\n   disp(<span class=\"string\">'multiplicites = '<\/span>)\r\n   disp(<span class=\"string\">'     1     z     i    z^3   -1    z^5   -i    z^7'<\/span>)\r\n   disp(count)\r\n<\/pre><pre class=\"codeoutput\">z =\r\n   0.7071 + 0.7071i\r\n \r\nmultiplicites = \r\n     1     z     i    z^3   -1    z^5   -i    z^7\r\n     9     6     6     6     7     6     6     6\r\n<\/pre><h4>Deck_view.<a name=\"c22c6db7-a398-4d49-b49f-62e4d52b9a03\"><\/a><\/h4><p>Here is the listing of <tt>deck_view<\/tt>.<\/p><pre class=\"codeinput\">   type <span class=\"string\">deck_view<\/span>\r\n<\/pre><pre class=\"codeoutput\">\r\nfunction deck_view(v)\r\n% deck_view(v) displays the card deck v.\r\n\r\n   % Prepare the figure window.\r\n   f = clf;\r\n   f.Position = [200 300 600 150];\r\n   f.NumberTitle = 'off';\r\n   f.ToolBar = 'none';\r\n   f.MenuBar = 'none';\r\n   f.PaperPositionMode = 'auto';\r\n   \r\n   % Prepare the axes.\r\n   ax = axes;\r\n   ax.Position = [0 0 1 .88];\r\n   ax.XLim = [-1 54];\r\n   ax.YLim = [-1 15];\r\n   ax.XTick = '';\r\n   ax.YTick = '';\r\n   ax.Box = 'on';\r\n   \r\n   % Colors for spades, hearts, clubs, diamonds.\r\n   shcd = [0 0 0; 1 0 0; 0 .5 0; 0 0 .5];\r\n   \r\n   % Plot one text character per card.\r\n   pips = 'A23456789TJQK';\r\n   for i = 1:52\r\n      j = mod(v(i)-1,13)+1;\r\n      k = floor((v(i)-1)\/13)+1;\r\n      t = text(i,j,pips(j));\r\n      t.FontSize = 10;\r\n      t.Color = shcd(k,:);\r\n   end\r\nend\r\n<\/pre><h4>An informative video.<a name=\"7cef78d6-ae15-4fb1-a04b-21e959d1d499\"><\/a><\/h4><p>Kevin Houston is a mathematician at the University of Leeds in the UK who can also do perfect shuffles.  Here is a link to his YouTube video. <a href=\"https:\/\/www.youtube.com\/watch?v=OFjgPGPQ0NA\">Perfect Shuffle<\/a>.<\/p><script language=\"JavaScript\"> <!-- \r\n    function grabCode_c16f789030014c68a5365ca1cb6fe708() {\r\n        \/\/ Remember the title so we can use it in the new page\r\n        title = document.title;\r\n\r\n        \/\/ Break up these strings so that their presence\r\n        \/\/ in the Javascript doesn't mess up the search for\r\n        \/\/ the MATLAB code.\r\n        t1='c16f789030014c68a5365ca1cb6fe708 ' + '##### ' + 'SOURCE BEGIN' + ' #####';\r\n        t2='##### ' + 'SOURCE END' + ' #####' + ' c16f789030014c68a5365ca1cb6fe708';\r\n    \r\n        b=document.getElementsByTagName('body')[0];\r\n        i1=b.innerHTML.indexOf(t1)+t1.length;\r\n        i2=b.innerHTML.indexOf(t2);\r\n \r\n        code_string = b.innerHTML.substring(i1, i2);\r\n        code_string = code_string.replace(\/REPLACE_WITH_DASH_DASH\/g,'--');\r\n\r\n        \/\/ Use \/x3C\/g instead of the less-than character to avoid errors \r\n        \/\/ in the XML parser.\r\n        \/\/ Use '\\x26#60;' instead of '<' so that the XML parser\r\n        \/\/ doesn't go ahead and substitute the less-than character. \r\n        code_string = code_string.replace(\/\\x3C\/g, '\\x26#60;');\r\n\r\n        copyright = 'Copyright 2016 The MathWorks, Inc.';\r\n\r\n        w = window.open();\r\n        d = w.document;\r\n        d.write('<pre>\\n');\r\n        d.write(code_string);\r\n\r\n        \/\/ Add copyright line at the bottom if specified.\r\n        if (copyright.length > 0) {\r\n            d.writeln('');\r\n            d.writeln('%%');\r\n            if (copyright.length > 0) {\r\n                d.writeln('% _' + copyright + '_');\r\n            }\r\n        }\r\n\r\n        d.write('<\/pre>\\n');\r\n\r\n        d.title = title + ' (MATLAB code)';\r\n        d.close();\r\n    }   \r\n     --> <\/script><p style=\"text-align: right; font-size: xx-small; font-weight:lighter;   font-style: italic; color: gray\"><br><a href=\"javascript:grabCode_c16f789030014c68a5365ca1cb6fe708()\"><span style=\"font-size: x-small;        font-style: italic;\">Get \r\n      the MATLAB code <noscript>(requires JavaScript)<\/noscript><\/span><\/a><br><br>\r\n      Published with MATLAB&reg; R2015b<br><\/p><\/div><!--\r\nc16f789030014c68a5365ca1cb6fe708 ##### SOURCE BEGIN #####\r\n%% Perfect Shuffles of Playing Cards\r\n% When a deck of playing cards is shuffled perfectly, the result is not\r\n% random.  A perfect shuffle places the cards in a mathematically precise\r\n% order.  As a result, when the most common version of a perfect shuffle\r\n% is repeated eight times, the deck returns to its original state.\r\n\r\n%% A Deck of Playing Cards\r\n% Fresh out of its package, a deck of playing cards always has the Ace of\r\n% Spades first, followed by the rest of the spades.  The hearts, in order,\r\n% are next, followed by the clubs (shown here in green), and finally the\r\n% diamonds (blue).  The King of Diamonds is last.  Here is a view of a\r\n% fresh deck.\r\n\r\n   v = 1:52;\r\n   deck_view(v)\r\n   title(0)\r\n\r\n%% Faro Shuffles\r\n% A perfect shuffle is also known  as a _faro shuffle_, because it is\r\n% used frequently in the classic card game, Faro.  The deck is cut into two\r\n% packs, each containing exactly half of the cards.  Then the two packs are\r\n% merged by precisely interleaving the cards.\r\n\r\n%%\r\n% There are two variants.  In an _out-faro_ shuffle, the merger\r\n% is started with the top card from the first half and eventually completed\r\n% with the last card from the second half.  So with an out-faro shuffle of\r\n% a fresh deck, the Ace of Spades remains on top and the King of Diamonds\r\n% remains on the bottom.  An _in-faro_ shuffle is started with the second\r\n% half.  So the Ace of Spades and the King of Diamonds are inserted in\r\n% the second and next to last positions respectively.\r\n\r\n%% Out-Faro\r\n% A shuffle is a permutation of the elements of a vector representing the\r\n% deck.  Here is the index vector that produces an out-faro shuffle.\r\n% A rectangular matrix is created with |1:26| in the first row and |27:52|\r\n% in the second.  So its first column is |[1;27]|, its second column is\r\n% |[2;28]|, and so on.  The |reshape| operation, which is carried out by\r\n% columns, then generates the desired index vector.\r\n\r\n   pout = reshape([1:26; 27:52],[1,52])\r\n   \r\n%%\r\n% Here is the result of two successive out-faro shuffles of a fresh deck.\r\n\r\n   v = 1:52;\r\n   v = v(pout);\r\n   deck_view(v)\r\n   title(1)\r\n   \r\n%%\r\n   v = v(pout);\r\n   deck_view(v)\r\n   title(2)\r\n   \r\n%%\r\n% The four Aces have moved to the front and the four Kings are bringing\r\n% up the rear.\r\n \r\n%% It takes only 8 Out-Faro shuffles.\r\n%\r\n% Let's start over with a fresh deck, apply the |pout| permutation eight\r\n% times, and capture the results in an animated gif.  The deck is returned\r\n% to its original state in just 8 steps.\r\n%   \r\n%   v = 1:52;\r\n%   deck_view(v)\r\n%   title(0)\r\n%   for t = 1:8\r\n%      v = v(pout)\r\n%      deck_view(v)\r\n%      title(t)\r\n%   end\r\n%\r\n% <<pout_movie.gif>>\r\n%\r\n\r\n%% In-Faro\r\n% Here is the indexing vector for the in-faro suffle.\r\n\r\n   pin = reshape([27:52; 1:26],[1,52])\r\n   \r\n%%\r\n% It takes 52 in-faro shuffles to get back to the original state.\r\n%\r\n% <<pin_movie.gif>>\r\n%\r\n\r\n%% Permutation Matrices\r\n% Both of the faro shuffles can be represented by permutation matrices.\r\n% Can you see how their |spy| plots differ?\r\n\r\n   I = eye(52);\r\n   close\r\n   Pout = I(pout,:);\r\n   spy(Pout)\r\n   title('Pout')\r\n   \r\n   \r\n %%\r\n \r\n   Pin = I(pin,:);\r\n   spy(Pin)\r\n   title('Pin')\r\n\r\n%%\r\n% It turns out that the smallest value of |t| for which the matrix power\r\n% |P^t| is equal to the identity matrix is |t = 8| for |P = Pout| and\r\n% |t = 52| for |P = Pin|.\r\n\r\n%% Eigenvalues.\r\n% All of this is explained by _eigenvalues_.  The matrix |Pout| has order\r\n% 52, but only 8 distinct eigenvalues, namely the 8-th roots of unity.\r\n\r\n   plot(eig(Pout),'o')\r\n   title('eig(Pout)')\r\n   axis(1.25*[-1 1 -1 1])\r\n   axis('square')\r\n   \r\n   \r\n%%\r\n% On the other hand, |Pin| has 52 distinct eigenvalues, the 52-nd roots\r\n% of unity.\r\n\r\n   plot(eig(Pin),'o')\r\n   title('eig(Pin)')\r\n   axis(1.25*[-1 1 -1 1])\r\n   axis('square')\r\n\r\n%% Multiplicities\r\n% The eigenvalues of |Pout| occur with different multiplicites.\r\n% Can you explain where these counts come from?\r\n\r\n   e = eig(Pout);\r\n   z = exp(pi\/4*1i)\r\n   count = zeros(1,8);\r\n   for k = 0:7\r\n      count(k+1) = sum(abs(e-z^k)<52*eps);\r\n   end\r\n   disp(' ')\r\n   disp('multiplicites = ')\r\n   disp('     1     z     i    z^3   -1    z^5   -i    z^7')\r\n   disp(count)\r\n   \r\n   \r\n%% Deck_view.\r\n% Here is the listing of |deck_view|.\r\n\r\n   type deck_view\r\n\r\n%% An informative video.\r\n% Kevin Houston is a mathematician at the University of Leeds in the UK\r\n% who can also do perfect shuffles.  Here is a link to his YouTube video.\r\n% <https:\/\/www.youtube.com\/watch?v=OFjgPGPQ0NA Perfect Shuffle>.\r\n\r\n##### SOURCE END ##### c16f789030014c68a5365ca1cb6fe708\r\n-->","protected":false},"excerpt":{"rendered":"<div class=\"overview-image\"><img src=\"https:\/\/blogs.mathworks.com\/cleve\/files\/feature_image\/pout_movie.gif\" class=\"img-responsive attachment-post-thumbnail size-post-thumbnail wp-post-image\" alt=\"\" decoding=\"async\" loading=\"lazy\" \/><\/div><!--introduction--><p>When a deck of playing cards is shuffled perfectly, the result is not random.  A perfect shuffle places the cards in a mathematically precise order.  As a result, when the most common version of a perfect shuffle is repeated eight times, the deck returns to its original state.... <a class=\"read-more\" href=\"https:\/\/blogs.mathworks.com\/cleve\/2016\/02\/01\/perfect-shuffles-of-playing-cards\/\">read more >><\/a><\/p>","protected":false},"author":78,"featured_media":1324,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[11,13,5,6],"tags":[],"_links":{"self":[{"href":"https:\/\/blogs.mathworks.com\/cleve\/wp-json\/wp\/v2\/posts\/1323"}],"collection":[{"href":"https:\/\/blogs.mathworks.com\/cleve\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blogs.mathworks.com\/cleve\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blogs.mathworks.com\/cleve\/wp-json\/wp\/v2\/users\/78"}],"replies":[{"embeddable":true,"href":"https:\/\/blogs.mathworks.com\/cleve\/wp-json\/wp\/v2\/comments?post=1323"}],"version-history":[{"count":3,"href":"https:\/\/blogs.mathworks.com\/cleve\/wp-json\/wp\/v2\/posts\/1323\/revisions"}],"predecessor-version":[{"id":1326,"href":"https:\/\/blogs.mathworks.com\/cleve\/wp-json\/wp\/v2\/posts\/1323\/revisions\/1326"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/blogs.mathworks.com\/cleve\/wp-json\/wp\/v2\/media\/1324"}],"wp:attachment":[{"href":"https:\/\/blogs.mathworks.com\/cleve\/wp-json\/wp\/v2\/media?parent=1323"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.mathworks.com\/cleve\/wp-json\/wp\/v2\/categories?post=1323"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.mathworks.com\/cleve\/wp-json\/wp\/v2\/tags?post=1323"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}