<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Nathaniel Johnston &#187; Math</title>
	<atom:link href="http://www.njohnston.ca/tag/math/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.njohnston.ca</link>
	<description>A blog of recreational math and quantum information theory</description>
	<lastBuildDate>Thu, 15 Dec 2011 16:11:28 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
		<item>
		<title>MATLAB Scripts for Computing Completely Bounded Norms via Semidefinite Programming</title>
		<link>http://www.njohnston.ca/2011/07/matlab-scripts-for-computing-the-completely-bounded-and-diamond-norms/</link>
		<comments>http://www.njohnston.ca/2011/07/matlab-scripts-for-computing-the-completely-bounded-and-diamond-norms/#comments</comments>
		<pubDate>Sat, 23 Jul 2011 20:45:06 +0000</pubDate>
		<dc:creator>Nathaniel</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Math]]></category>
		<category><![CDATA[Norms]]></category>
		<category><![CDATA[Operator Theory]]></category>
		<category><![CDATA[Quantum]]></category>
		<category><![CDATA[Research]]></category>

		<guid isPermaLink="false">http://www.nathanieljohnston.com/?p=1600</guid>
		<description><![CDATA[In operator theory, the completely bounded norm of a linear map on complex matrices is defined by , where is the usual norm on linear maps defined by and is the operator norm of [1]. The completely bounded norm is particularly useful when thinking of and as operator spaces. The dual of the completely bounded [...]]]></description>
			<content:encoded><![CDATA[<p>In operator theory, the <strong>completely bounded norm</strong> of a linear map on complex matrices <img src='http://www.njohnston.ca/wp-content/latex/678/67898204827161e3fef36f8f3daf3cbc-ffffff-000000-0.png' alt='\Phi : M_m \rightarrow M_n' title='\Phi : M_m \rightarrow M_n' class='latex' /> is defined by <img src='http://www.njohnston.ca/wp-content/latex/c2c/c2c41b2405db3113c73986729f6c9828-ffffff-000000-0.png' alt='\|\Phi\|_{cb} := \sup_{k \geq 1} \| id_k \otimes \Phi \|' title='\|\Phi\|_{cb} := \sup_{k \geq 1} \| id_k \otimes \Phi \|' class='latex' />, where <img src='http://www.njohnston.ca/wp-content/latex/f46/f46aa269b89be1dbf5a82292d46669a5-ffffff-000000-0.png' alt='\|\Phi\|' title='\|\Phi\|' class='latex' /> is the usual norm on linear maps defined by <img src='http://www.njohnston.ca/wp-content/latex/f61/f61552fb7cf6d301f35a5c5d5ddc05fa-ffffff-000000-0.png' alt='\|\Phi\| := \sup_{X \in M_m} \{ \|\Phi(X)\| : \|X\| \leq 1\}' title='\|\Phi\| := \sup_{X \in M_m} \{ \|\Phi(X)\| : \|X\| \leq 1\}' class='latex' /> and <img src='http://www.njohnston.ca/wp-content/latex/43e/43e67ae95af79d704be0bb1b4a4d023f-ffffff-000000-0.png' alt='\|X\|' title='\|X\|' class='latex' /> is the <a href="http://en.wikipedia.org/wiki/Operator_norm">operator norm</a> of <img src='http://www.njohnston.ca/wp-content/latex/021/02129bb861061d1a052c592e2dc6b383-ffffff-000000-0.png' alt='X' title='X' class='latex' /> [1]. The completely bounded norm is particularly useful when thinking of <img src='http://www.njohnston.ca/wp-content/latex/d1c/d1c301f6f3c03669dca093befe423031-ffffff-000000-0.png' alt='M_m' title='M_m' class='latex' /> and <img src='http://www.njohnston.ca/wp-content/latex/6fe/6fe15b3139707a5c8d2d140a27ac1684-ffffff-000000-0.png' alt='M_n' title='M_n' class='latex' /> as <a href="http://en.wikipedia.org/wiki/Operator_space">operator spaces</a>.</p>
<p>The <a href="http://en.wikipedia.org/wiki/Dual_norm">dual</a> of the completely bounded norm is called the <strong>diamond norm</strong>, which plays an important role in quantum information theory, as it can be used to measure the distance between <a href="http://en.wikipedia.org/wiki/Quantum_channel">quantum channels</a>. The diamond norm of <img src='http://www.njohnston.ca/wp-content/latex/2f5/2f51310acab41649af988ccebfe4186d-ffffff-000000-0.png' alt='\Phi' title='\Phi' class='latex' /> is typically denoted <img src='http://www.njohnston.ca/wp-content/latex/6d6/6d68a718fded22437389cd2c91c4b88d-ffffff-000000-0.png' alt='\|\Phi\|_{\diamond}' title='\|\Phi\|_{\diamond}' class='latex' />. For properties of the completely bounded and diamond norms, see [1,2,3].</p>
<p>A method for efficiently computing the completely bounded and diamond norms via <a href="http://en.wikipedia.org/wiki/Semidefinite_programming">semidefinite programming</a> was recently presented in [4]. The purpose of this post is to provide MATLAB scripts that implement this algorithm and demonstrate its usage.</p>
<h3>Download and Install</h3>
<p>In order to make use of these scripts to compute the completely bounded or diamond norm, you must download and install two things: the SeDuMi semidefinite program solver and the MATLAB scripts themselves.</p>
<ol>
<li><strong>SeDuMi</strong> – Please follow the instructions on the <a href="http://sedumi.ie.lehigh.edu/">SeDuMi website</a> to download and install it. If possible, you should install SeDuMi 1.1R3, <em>not</em> SeDuMi 1.21 or SeDuMi 1.3, since <a href="http://sedumi.ie.lehigh.edu/index.php?option=com_kunena&amp;Itemid=78&amp;func=view&amp;catid=9&amp;id=4623">there is a bug</a> with the newer versions when dealing with complex matrices.</li>
<li><strong>CB Norm MATLAB Package</strong> – Once SeDuMi is installed, <strong><a href="http://www.nathanieljohnston.com/wp-content/uploads/2011/07/MATLAB_cb_diamond_norm.zip">download the CB norm MATLAB scripts</a></strong>, unzip them, and place them in your MATLAB scripts directory. The zip file contains 10 MATLAB scripts.</li>
</ol>
<div>
<p>Once the scripts are installed, type &#8220;help CBNorm&#8221; or &#8220;help DiamondNorm&#8221; at the MATLAB prompt to learn how to use the CBNorm and DiamondNorm functions. Several usage examples are provided below.</p>
</div>
<h3>Usage Examples</h3>
<p>The representation of the linear map <img src='http://www.njohnston.ca/wp-content/latex/2f5/2f51310acab41649af988ccebfe4186d-ffffff-000000-0.png' alt='\Phi' title='\Phi' class='latex' /> that the CBNorm and DiamondNorm functions take as input is a pair of arrays of its left- and right- generalized Choi-Kraus operators. That is, an array of operators <img src='http://www.njohnston.ca/wp-content/latex/998/99825ef966d74346baaacab16892bdf2-ffffff-000000-0.png' alt='\{A_i\}' title='\{A_i\}' class='latex' /> and <img src='http://www.njohnston.ca/wp-content/latex/095/09536cf4e7246ac68ed5cbcdacc496c7-ffffff-000000-0.png' alt='\{B_i\}' title='\{B_i\}' class='latex' /> such that <img src='http://www.njohnston.ca/wp-content/latex/340/340038e055a61eb99131d3b059de47e8-ffffff-000000-0.png' alt='\Phi(X) = \sum_i A_i X B_i' title='\Phi(X) = \sum_i A_i X B_i' class='latex' /> for all <img src='http://www.njohnston.ca/wp-content/latex/021/02129bb861061d1a052c592e2dc6b383-ffffff-000000-0.png' alt='X' title='X' class='latex' />.</p>
<p><strong>Basic Examples</strong></p>
<p>If we wanted to compute the completely bounded and diamond norms of the map</p>
<p><img class="aligncenter size-full wp-image-1622" title="CB norm and diamond norm example" src="http://www.nathanieljohnston.com/wp-content/uploads/2011/07/img.png" alt="" width="357" height="53" /></p>
<p>the MATLAB input and output would be as follows:</p>
<pre>&gt;&gt; PhiA(:,:,1) = [1,1;1,0];
&gt;&gt; PhiA(:,:,2) = [1,0;1,2];
&gt;&gt; PhiB(:,:,1) = [1,0;0,1];
&gt;&gt; PhiB(:,:,2) = [1,2;1,1];
&gt;&gt; CBNorm(PhiA,PhiB)

ans =

    7.2684

&gt;&gt; DiamondNorm(PhiA,PhiB)

ans =

    7.4124</pre>
<p>So we see that its completely bounded norm is 7.2684 and its diamond norm is 7.4124.</p>
<p>If we instead want to compute the completely bounded or diamond norm of a completely positive map, we only need to provide its <a href="http://en.wikipedia.org/wiki/Choi's_theorem_on_completely_positive_maps#Kraus_operators">Kraus operators</a> – i.e., operators <img src='http://www.njohnston.ca/wp-content/latex/998/99825ef966d74346baaacab16892bdf2-ffffff-000000-0.png' alt='\{A_i\}' title='\{A_i\}' class='latex' /> such that <img src='http://www.njohnston.ca/wp-content/latex/2b8/2b82cbb6770a523d0d509a73d5dc2496-ffffff-000000-0.png' alt='\Phi(X) = \sum_i A_i X A_i^\dagger' title='\Phi(X) = \sum_i A_i X A_i^\dagger' class='latex' /> for all <img src='http://www.njohnston.ca/wp-content/latex/021/02129bb861061d1a052c592e2dc6b383-ffffff-000000-0.png' alt='X' title='X' class='latex' />. Furthermore, in this case semidefinite programming isn&#8217;t used at all, since [1, Proposition 3.6] tells us that <img src='http://www.njohnston.ca/wp-content/latex/210/2102a4bc9afa0d5cd84fee9001261eee-ffffff-000000-0.png' alt='\|\Phi\|_{cb} = \|\Phi(I)\|' title='\|\Phi\|_{cb} = \|\Phi(I)\|' class='latex' /> and <img src='http://www.njohnston.ca/wp-content/latex/c63/c630fcf2ab2be62560d9e572cb27788a-ffffff-000000-0.png' alt='\|\Phi\|_{\diamond} = \|\Phi^\dagger(I)\|' title='\|\Phi\|_{\diamond} = \|\Phi^\dagger(I)\|' class='latex' />, and computing <img src='http://www.njohnston.ca/wp-content/latex/2ad/2adcbb56307b242c5b028ec437908b06-ffffff-000000-0.png' alt='\|\Phi(I)\|' title='\|\Phi(I)\|' class='latex' /> is trivial. The following example demonstrates the usage of these scripts in this case, via a completely positive map <img src='http://www.njohnston.ca/wp-content/latex/851/85167929b253ca1ea53920366b774a98-ffffff-000000-0.png' alt='\Phi : M_3 \rightarrow M_2' title='\Phi : M_3 \rightarrow M_2' class='latex' /> with four (essentially random) Kraus operators:</p>
<pre>&gt;&gt; PhiA(:,:,1) = [1 0 0;0 1 1];
&gt;&gt; PhiA(:,:,2) = [-3 0 1;5 1 1];
&gt;&gt; PhiA(:,:,3) = [0 2 0;0 0 0];
&gt;&gt; PhiA(:,:,4) = [1 1 3;0 2 0];
&gt;&gt; CBNorm(PhiA)

ans =

   42.0000

&gt;&gt; DiamondNorm(PhiA)

ans =

   38.7303</pre>
<p><strong>Transpose Map</strong></p>
<p>Suppose we want to compute the completely bounded or diamond norm of the <a href="http://en.wikipedia.org/wiki/Transpose">transpose map</a> on <img src='http://www.njohnston.ca/wp-content/latex/6fe/6fe15b3139707a5c8d2d140a27ac1684-ffffff-000000-0.png' alt='M_n' title='M_n' class='latex' />. A generalized Choi-Kraus representation is given by defining <img src='http://www.njohnston.ca/wp-content/latex/b1d/b1dfdd3667d460c3f98c920f6a977a6a-ffffff-000000-0.png' alt='A_{ij} = B_{ij} = e_i e_j^\dagger' title='A_{ij} = B_{ij} = e_i e_j^\dagger' class='latex' />, where <img src='http://www.njohnston.ca/wp-content/latex/ab4/ab49e73769f3cbd300eb1c4158c60774-ffffff-000000-0.png' alt='\{e_i\}' title='\{e_i\}' class='latex' /> is the standard basis of <img src='http://www.njohnston.ca/wp-content/latex/66c/66c24a196de169a5a366387891c135f6-ffffff-000000-0.png' alt='\mathbb{C}^n' title='\mathbb{C}^n' class='latex' /> (i.e., <img src='http://www.njohnston.ca/wp-content/latex/678/6781228e0a0a6072d89c076e9a5ab4db-ffffff-000000-0.png' alt='A_{ij}' title='A_{ij}' class='latex' /> and <img src='http://www.njohnston.ca/wp-content/latex/d26/d2676387482fd5004b9efe3976817501-ffffff-000000-0.png' alt='B_{ij}' title='B_{ij}' class='latex' /> are the operators with matrix representation in the standard basis with a one in the <img src='http://www.njohnston.ca/wp-content/latex/527/5270ae675fac24f97e172dcd9b18fa92-ffffff-000000-0.png' alt='(i,j)' title='(i,j)' class='latex' />-entry and zeroes elsewhere). It is known that the completely bounded and diamond norms of the n-dimensional transpose map are both equal to n, which can be verified in small dimensions as follows:</p>
<div>
<pre>&gt;&gt; % 2-dimensional transpose
&gt;&gt; PhiA(:,:,1) = [1 0;0 0];
&gt;&gt; PhiA(:,:,2) = [0 1;0 0];
&gt;&gt; PhiA(:,:,3) = [0 0;1 0];
&gt;&gt; PhiA(:,:,4) = [0 0;0 1];
&gt;&gt; PhiB = PhiA;
&gt;&gt; CBNorm(PhiA,PhiB)

ans =

    2.0000

&gt;&gt; DiamondNorm(PhiA,PhiB)

ans =

    2.0000</pre>
<pre>&gt;&gt; % 3-dimensional transpose
&gt;&gt; I = eye(3);
&gt;&gt; for i=1:3
for j=1:3
PhiA(:,:,3*(i-1)+j) = I(:,i)*I(j,:);
end
end
&gt;&gt; PhiB = PhiA;
&gt;&gt; CBNorm(PhiA,PhiB)

ans =

    3.0000

&gt;&gt; DiamondNorm(PhiA,PhiB)

ans =

    3.0000</pre>
<p><strong>Difference of Unitary Channels</strong></p>
<p>Now consider the map <img src='http://www.njohnston.ca/wp-content/latex/6fa/6fa1e539e598879d3f9bced75c6beec5-ffffff-000000-0.png' alt='\Phi : M_2 \rightarrow M_2' title='\Phi : M_2 \rightarrow M_2' class='latex' /> defined by <img src='http://www.njohnston.ca/wp-content/latex/c11/c119de7efa049d114be300dd03b04b69-ffffff-000000-0.png' alt='\Phi(X) = X - UXU^\dagger' title='\Phi(X) = X - UXU^\dagger' class='latex' />, where <img src='http://www.njohnston.ca/wp-content/latex/4c6/4c614360da93c0a041b22e537de151eb-ffffff-000000-0.png' alt='U' title='U' class='latex' /> is the following unitary matrix:</p>
<p><img class="aligncenter size-full wp-image-1625" title="Unitary example" src="http://www.nathanieljohnston.com/wp-content/uploads/2011/07/uni.png" alt="" width="147" height="53" /></p>
<p>We know from [2, Theorem 12] that the CB norm and diamond norm of <img src='http://www.njohnston.ca/wp-content/latex/2f5/2f51310acab41649af988ccebfe4186d-ffffff-000000-0.png' alt='\Phi' title='\Phi' class='latex' /> are both equal to the diameter of the smallest closed disc containing all of the eigenvalues of <img src='http://www.njohnston.ca/wp-content/latex/4c6/4c614360da93c0a041b22e537de151eb-ffffff-000000-0.png' alt='U' title='U' class='latex' />. Because the eigenvalues of <img src='http://www.njohnston.ca/wp-content/latex/4c6/4c614360da93c0a041b22e537de151eb-ffffff-000000-0.png' alt='U' title='U' class='latex' /> are <img src='http://www.njohnston.ca/wp-content/latex/b17/b17ebfb4bc8fc72ad2f2825be0417645-ffffff-000000-0.png' alt='(1 \pm i)/\sqrt{2}' title='(1 \pm i)/\sqrt{2}' class='latex' />, the smallest closed disc containing its eigenvalues has diameter <img src='http://www.njohnston.ca/wp-content/latex/d21/d21848cdd835abcb491be1f151e9b6c6-ffffff-000000-0.png' alt='\sqrt{2}' title='\sqrt{2}' class='latex' />, so <img src='http://www.njohnston.ca/wp-content/latex/37c/37c2deab4cea73ec1ea5efc56809a274-ffffff-000000-0.png' alt='\|\Phi\|_{cb} = \|\Phi\|_{\diamond} = \sqrt{2}' title='\|\Phi\|_{cb} = \|\Phi\|_{\diamond} = \sqrt{2}' class='latex' />. This result can be verified as follows:</p>
<pre>&gt;&gt; PhiA(:,:,1) = [1 0;0 1];
&gt;&gt; PhiA(:,:,2) = [1 1;-1 1]/sqrt(2);
&gt;&gt; PhiB(:,:,1) = [1 0;0 1];
&gt;&gt; PhiB(:,:,2) = -[1 -1;1 1]/sqrt(2);
&gt;&gt; CBNorm(PhiA,PhiB)

ans =

    1.4142

&gt;&gt; DiamondNorm(PhiA,PhiB)

ans =

    1.4142</pre>
</div>
<p><strong>References</strong></p>
<ol>
<li>V. I. Paulsen. <em><a href="http://www.amazon.com/gp/product/0521816696?ie=UTF8&amp;tag=nathanieljohnston-20&amp;linkCode=as2&amp;camp=1789&amp;creative=390957&amp;creativeASIN=0521816696">Completely bounded maps and operator algebras</a>.</em> Cambridge University Press, 2003.</li>
<li>N. Johnston, D. W. Kribs, and V. I. Paulsen. <a href="http://www.nathanieljohnston.com/publications/computing-stabilized-norms-for-quantum-operations-via-the-theory-of-completely-bounded-maps/">Computing stabilized norms for quantum operations via the theory of completely bounded maps</a>. <em>Quantum Inf. Comput.</em>, 9:16-35, 2009.</li>
<li>J. Watrous. <a href="http://www.cs.uwaterloo.ca/~watrous/lecture-notes/701/21.pdf"><em>Theory of quantum information </em>lecture notes</a>.</li>
<li>J. Watrous. <a href="http://theoryofcomputing.org/articles/v005a011/">Semidefinite programs for completely bounded norms</a>. <em>Theory Comput.</em>, 5:217–238, 2009.</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://www.njohnston.ca/2011/07/matlab-scripts-for-computing-the-completely-bounded-and-diamond-norms/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Separability-Preserving Operators in Entanglement Theory</title>
		<link>http://www.njohnston.ca/2011/06/separability-preserving-operators-in-entanglement-theory/</link>
		<comments>http://www.njohnston.ca/2011/06/separability-preserving-operators-in-entanglement-theory/#comments</comments>
		<pubDate>Tue, 14 Jun 2011 20:19:40 +0000</pubDate>
		<dc:creator>Nathaniel</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Math]]></category>
		<category><![CDATA[Matrix Analysis]]></category>
		<category><![CDATA[Quantum]]></category>
		<category><![CDATA[Research]]></category>

		<guid isPermaLink="false">http://www.nathanieljohnston.com/?p=1527</guid>
		<description><![CDATA[One of the key concepts in quantum information theory is the difference between separable states and entangled states. A pure quantum state (that is, a unit vector) v ∈ Cn ⊗ Cn is said to be separable if it can be written as v = a ⊗ b for some a,b ∈ Cn; otherwise v [...]]]></description>
			<content:encoded><![CDATA[<p>One of the key concepts in quantum information theory is the difference between separable states and entangled states. A pure quantum state (that is, a unit vector) v ∈ <strong>C</strong><sup>n</sup> ⊗ <strong>C</strong><sup>n</sup> is said to be <em>separable</em> if it can be written as v = a ⊗ b for some a,b ∈ <strong>C</strong><sup>n</sup>; otherwise v is called <em>entangled</em>. In this post we will investigate what operators preserve the set of separable pure states, as well as what operators entangle all separable pure states.</p>
<h3>Separable Pure State Preservers and Entangling Gates</h3>
<p>In the design of quantum algorithms, <em>entangling gates</em> play a very important role. Entangling gates are unitary operators that are able to generate entanglement. A bit more specifically, a unitary operator U ∈ M<sub>n</sub> ⊗ M<sub>n</sub> (where M<sub>n</sub> is the space of n × n complex matrices) is called an entangling gate if there exists a separable pure state v = a ⊗ b ∈ <strong>C</strong><sup>n</sup> ⊗ <strong>C</strong><sup>n</sup> such that Uv is entangled. Conversely, we will say that a unitary operator U <em>preserves separability</em> if Uv is separable whenever v is separable.</p>
<p>In order to answer the question of what unitaries preserve separability, it is instructive to consider some simple examples (this is often a useful way to formulate conjectures regarding preserver problems). For example, it is clear that if U = A ⊗ B for some unitary operators A, B ∈ M<sub>n</sub>, then U preserves separability (because U(a ⊗ b) = Aa ⊗ Bb is separable). Another example of a unitary operator that preserves separability is the <em>swap</em> (or <em>flip</em>) operator S defined on separable states by S(a ⊗ b) = b ⊗ a (the action of S on the rest of <strong>C</strong><sup>n</sup> ⊗ <strong>C</strong><sup>n</sup> is determined by extending linearly). It turns out that these are essentially the only operators that preserve separability [1,2,3]:</p>
<p style="padding-left: 30px;"><strong>Theorem 1.</strong> Let U ∈ M<sub>n</sub> ⊗ M<sub>n</sub> be a unitary operator. Then U preserves separability (i.e., U is not an entangling gate) if and only if there exist unitary operators A, B ∈ M<sub>n</sub> such that either U = A ⊗ B or U = S(A ⊗ B).</p>
<p>As we already saw, the &#8220;if&#8221; direction of the above result is trivial – the meat and potatoes of the theorem comes from the &#8220;only if&#8221; direction (as is typically the case with results about linear preservers). Theorem 1 was first proved in [1] essentially by case analysis and checking the action of a separability-preserving unitary on a basis of <strong>C</strong><sup>n</sup> ⊗ <strong>C</strong><sup>n</sup>, and was subsequently re-proved using similar techniques (but with different motivations and connections) in [2]. The result was proved in [3] by using <a href="http://www.nathanieljohnston.com/2009/11/the-other-linear-map-isomorphism/">the vector-operator isomorphism</a> and the fact that a linear map Φ : M<sub>n</sub> → M<sub>n</sub> preserves the set of rank-1 operators if and only if there exist A, B ∈ M<sub>n</sub> such that either Φ(X) ≡ AXB or Φ(X) ≡ AX<sup>t</sup>B [4].</p>
<p>Theorem 1 also follows as a simple corollary of several related results that have recently been proved in [5,6]. A version of Theorem 1 for multipartite systems (i.e., systems that are the tensor product of more than two copies of <strong>C</strong><sup>n</sup>) can be found in [3] and [7].</p>
<h3>Universal Entangling Gates</h3>
<p>A <em>universal entangling gate</em> is, as its name suggests, a stronger form of an entangling gate – it is a unitary operator U such that U(a ⊗ b) is entangled for <em>all</em> a, b ∈ <strong>C</strong><sup>n</sup> (contrast this with entangling gates, which require only that U(a ⊗ b) is entangled for <em>some</em> a, b ∈ <strong>C</strong><sup>n</sup>). The structure of universal entangling gates is much less well-understood than that of entangling gates, though we can still at least say when they exist.</p>
<p>It is not difficult to convince yourself that universal entangling gates can&#8217;t exist in small dimensions. Let&#8217;s begin by supposing n = 2. The set of pure states in <strong>C</strong><sup>2</sup> ⊗ <strong>C</strong><sup>2</sup> can be regarded as a 7-dimensional real manifold (7 = 2 × (n × n) &#8211; 1, where we subtract one because pure states all have unit length), while the set of separable pure states in <strong>C</strong><sup>2</sup> ⊗ <strong>C</strong><sup>2</sup> can be regarded as a 5-dimensional real manifold (5 = (2 × n &#8211; 1) + (2 × n &#8211; 1) &#8211; 1, where the final one is subtracted because the overall phase of the first system relative to the second system is irrelevant). Thus, if U ∈ M<sub>2</sub> ⊗ M<sub>2</sub> were a universal entangler, it would have to send a 5-dimensional manifold into the 7 &#8211; 5 = 2 remaining dimensions of the space, which seems unlikely. Similarly, if n = 3 and U ∈ M<sub>3</sub> ⊗ M<sub>3</sub> were a universal entangler, it would have to send a 9-dimensional manifold into the 17 &#8211; 9 = 8 remaining dimensions of the space, which also seems unlikely.</p>
<p>Indeed, this type of argument was made rigorous via methods of algebraic geometry in [8], where the following result was proved:</p>
<p style="padding-left: 30px;"><strong>Theorem 2.</strong> There exists a universal entangling gate in M<sub>n</sub> ⊗ M<sub>n</sub> if and only if n ≥ 4.</p>
<p>Despite knowing when universal entangling gates exist, we still don&#8217;t have a characterization of such operators, nor do we even have many explicit examples (does anyone have an explicit example for 3 ⊗ 4 or 4 ⊗ 4 systems?). Similar techniques to those used in the proof of Theorem 2 should also shed light on when universal entangling gates exist in multipartite systems M<sub>n1</sub> ⊗ M<sub>n2</sub> ⊗ &#8230; ⊗ M<sub>nk</sub>, but to my knowledge this calculation has not been explicitly carried out.</p>
<p><strong>References:</strong></p>
<ol>
<li>M. Marcus and B. N. Moyls, <em><a href="http://projecteuclid.org/DPubS?service=UI&amp;version=1.0&amp;verb=Display&amp;handle=euclid.pjm/1103038893">Transformations on tensor product spaces</a></em>. Pacific Journal of Mathematics <strong>9</strong>, 1215–1221 (1959).</li>
<li>F. Hulpke, U. V. Poulsen, A. Sanpera, A. Sen De, U. Sen, and M. Lewenstein, <em>Unitarity as preservation of entropy and entanglement in quantum systems</em>. Foundations of Physics <strong>36</strong>, 477–499 (2006). E-print: <a href="http://arxiv.org/abs/quant-ph/0407118">arXiv:quant-ph/0407118</a></li>
<li>N. Johnston, <em><a href="http://www.nathanieljohnston.com/publications/characterizing-operations-preserving-separability-measures-via-linear-preserver-problems/">Characterizing Operations Preserving Separability Measures via Linear Preserver Problems</a></em>. To appear in Linear and Multilinear Algebra (2011). E-print: <a href="http://arxiv.org/abs/1008.3633">arXiv:1008.3633</a> [quant-ph]</li>
<li>L. Beasley, <em>Linear operators on matrices: the invariance of rank k matrices</em>. Linear Algebra and its Applications <strong>107</strong>, 161–167 (1988).</li>
<li>E. Alfsen and F. Shultz, <em>Unique decompositions, faces, and automorphisms of separable states</em>. Journal of Mathematical Physics <strong>51</strong>, 052201 (2010). E-print: <a href="http://arxiv.org/abs/0906.1761">arXiv:0906.1761</a> [math.OA]</li>
<li>S. Friedland, C.-K. Li, Y.-T. Poon, and N.-S. Sze, <em>The automorphism group of separable states in quantum information theory</em>. Journal of Mathematical Physics <strong>52</strong>, 042203 (2011). E-print: <a href="http://arxiv.org/abs/1012.4221">arXiv:1012.4221</a> [quant-ph]</li>
<li>R. Westwick, <em><a href="http://projecteuclid.org/DPubS?service=UI&amp;version=1.0&amp;verb=Display&amp;handle=euclid.pjm/1102991738">Transformations on tensor spaces</a></em>. Pacific Journal of Mathematics <strong>23</strong>, 613–620 (1967).</li>
<li>J. Chen, R. Duan, Z. Ji, M. Ying, J. Yu, <em>Existence of Universal Entangler</em>. Journal of Mathematical Physics <strong>49</strong>, 012103 (2008). E-print: <a href="http://arxiv.org/abs/0704.1473">arXiv:0704.1473</a> [quant-ph]</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://www.njohnston.ca/2011/06/separability-preserving-operators-in-entanglement-theory/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The Q-Toothpick Cellular Automaton</title>
		<link>http://www.njohnston.ca/2011/03/the-q-toothpick-cellular-automaton/</link>
		<comments>http://www.njohnston.ca/2011/03/the-q-toothpick-cellular-automaton/#comments</comments>
		<pubDate>Sat, 26 Mar 2011 13:48:46 +0000</pubDate>
		<dc:creator>Nathaniel</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Cellular automata]]></category>
		<category><![CDATA[Integer Sequences]]></category>
		<category><![CDATA[Math]]></category>

		<guid isPermaLink="false">http://www.nathanieljohnston.com/?p=1437</guid>
		<description><![CDATA[The Q-toothpick cellular automaton (defined earlier this month by Omar E. Pol) is described by the following simple rules: On an infinite square grid, draw a quarter circle from one corner of a square to the opposite corner of that square: Call an endpoint of a quarter circle (or a &#8220;Q-toothpick&#8221;) exposed if it does [...]]]></description>
			<content:encoded><![CDATA[<p>The Q-toothpick cellular automaton (<a href="https://oeis.org/A187210">defined earlier this month</a> by Omar E. Pol) is described by the following simple rules:</p>
<ol>
<li>On an infinite square grid, draw a quarter circle from one corner of a square to the opposite corner of that square:<img class="aligncenter size-full wp-image-1439" title="Step 1" src="http://www.nathanieljohnston.com/wp-content/uploads/2011/03/q1.png" alt="" width="52" height="52" /></li>
<li>Call an endpoint of a quarter circle (or a &#8220;Q-toothpick&#8221;) <em>exposed</em> if it does not touch the endpoint of any other quarter circle.</li>
<li>From each exposed endpoint, draw two more quarter circles, each of the same size as the first quarter circle you drew. Furthermore, the two quarter circles that you draw are the ones that can be drawn &#8220;smoothly&#8221; (without creating a 90° or 180° corner). Thus the next two generations of the automaton are (already-placed quarter circles are green, newly-added quarter circles are red):<br />
<table style="margin-left: auto; margin-right: auto; border-width: 0px;" border="0" cellspacing="0" cellpadding="6">
<tbody>
<tr>
<td style="border-width: 0px;" valign="top"><img class="aligncenter size-full wp-image-1440" title="Step 2" src="http://www.nathanieljohnston.com/wp-content/uploads/2011/03/q2.png" alt="" width="86" height="86" /></td>
<td style="border-width: 0px;"><img class="aligncenter size-full wp-image-1441" title="Step 3" src="http://www.nathanieljohnston.com/wp-content/uploads/2011/03/q3.png" alt="" width="120" height="120" /></td>
</tr>
</tbody>
</table>
</li>
</ol>
<p>The name &#8220;Q-toothpick&#8221; comes from its analogy to the more well-studied <em>toothpick automaton</em> (see Sloane&#8217;s <a href="https://oeis.org/A139250">A139250</a> and <a href="http://arxiv.org/abs/1004.3036">this paper</a>), in which toothpicks (rather than quarter circles) are repeatedly placed on a grid where exposed ends of other toothpicks lie. In this post, we will examine how this automaton evolves over time, and in particular we will investigate the types of shapes that it produces.</p>
<h3>Counting Q-Toothpicks</h3>
<p>While the Q-toothpick automaton appears quite random and unpredictable for the first few generations, evolving past generation 6 or so reveals several patterns. The following image depicts the evolution of the automaton for its first 19 generations.</p>
<div id="attachment_1438" class="wp-caption aligncenter" style="width: 640px"><a href="http://www.nathanieljohnston.com/wp-content/uploads/2011/03/Qtooth.gif"><img class="size-full wp-image-1438" title="Q-Toothpick Animation" src="http://www.nathanieljohnston.com/wp-content/uploads/2011/03/Qtooth.gif" alt="" width="630" height="630" /></a><p class="wp-caption-text">The first 19 generations of the Q-toothpick cellular automaton (red segments are pieces that are newly added in the current generation)</p></div>
<p>Perhaps the most notable pattern is that the grid is more or less filled up in an expanding square starting from the initial Q-toothpick. In fact, by inspecting generations <a href="http://www.nathanieljohnston.com/wp-content/uploads/2011/03/q4.png">4</a>, <a href="http://www.nathanieljohnston.com/wp-content/uploads/2011/03/q6.png">6</a>, <a href="http://www.nathanieljohnston.com/wp-content/uploads/2011/03/q10.png">10</a>, <a href="http://www.nathanieljohnston.com/wp-content/uploads/2011/03/q18.png">18</a>, we see that at generation 2<sup>n</sup> + 2 (n = 1, 2, 3, &#8230;) the automaton has roughly filled in a square of side length 2<sup>n+1</sup> + 1, and then evolution continues from there on out of the corners of that square. Also, the number of cells added (<a href="https://oeis.org/A187211">A187211</a>) at these generations can now easily be computed:</p>
<p>A187211(2<sup>n</sup> + 2) = 16 + 8(2<sup>n-1</sup> &#8211; 1) for n ≥ 3.</p>
<p>Furthermore, the growth in the following generations repeats itself. In particular, we have:</p>
<p>A187211(2<sup>n</sup> + 3) = 22 for n ≥ 1,<br />
A187211(2<sup>n</sup> + 4) = 40 for n ≥ 2,<br />
A187211(2<sup>n</sup> + 5) = 54 for n ≥ 2.</p>
<p>Similarly, for n ≥ 3, the four values of A187211(2<sup>n</sup> + 6) through A187211(2<sup>n</sup> + 9) are similarly constant (their values are 56, 70, 120, and 134). In general, for n ≥ k the 2<sup>k-1</sup> values of A187211(2<sup>n</sup> + 2<sup>k-1</sup> + 2) through A187211(2<sup>n</sup> + 2<sup>k</sup> + 1) are constant in n, though I am not aware of a general formula for what these constants are. If we ignore the first four generations and arrange the number of Q-toothpicks added in each generation in rows of length 2<sup>n</sup>, we obtain a table that begins as follows:</p>
<p>22, 20<br />
22, 40, 54, 40<br />
22, 40, 54, 56, 70, 120, 134, 72<br />
22, 40, 54, 56, 70, 120, 134, 88, 70, 120, 150, 168, 246, 360, 326, 136</p>
<p>C scripts are provided at the end of this post for computing the values of A187210 and A187211 (and hence the values in the above table).</p>
<h3>Shapes Traced Out by Q-Toothpicks</h3>
<div>In the graphic above that depicts the initial 19 generations of the Q-toothpick automaton, several shapes are traced out, including circles, diamonds, hearts, and several nameless blobs:</div>
<table style="margin-left: auto; margin-right: auto; border-width: 0px;" border="0" cellspacing="0" cellpadding="6">
<tbody>
<tr>
<td style="border-width: 0px;" valign="top"><img class="aligncenter size-full wp-image-1456" title="Circle" src="http://www.nathanieljohnston.com/wp-content/uploads/2011/03/s1.png" alt="" width="69" height="69" /></td>
<td style="border-width: 0px;" valign="top"><img class="aligncenter size-full wp-image-1461" title="Diamond" src="http://www.nathanieljohnston.com/wp-content/uploads/2011/03/s6.png" alt="" width="69" height="69" /></td>
<td style="border-width: 0px;" valign="top"><img class="aligncenter size-full wp-image-1457" title="Heart" src="http://www.nathanieljohnston.com/wp-content/uploads/2011/03/s2.png" alt="" width="103" height="86" /></td>
<td style="border-width: 0px;" valign="top"><img class="aligncenter size-full wp-image-1458" title="Fishbulb" src="http://www.nathanieljohnston.com/wp-content/uploads/2011/03/s3.png" alt="" width="86" height="86" /></td>
</tr>
</tbody>
</table>
<table style="margin-left: auto; margin-right: auto; border-width: 0px;" border="0" cellspacing="0" cellpadding="6">
<tbody>
<tr>
<td style="border-width: 0px;" valign="top"><img class="aligncenter size-full wp-image-1459" title="Unnamed Shape" src="http://www.nathanieljohnston.com/wp-content/uploads/2011/03/s4.png" alt="" width="103" height="103" /></td>
<td style="border-width: 0px;" valign="top"><img class="aligncenter size-full wp-image-1460" title="Unnamed Shape" src="http://www.nathanieljohnston.com/wp-content/uploads/2011/03/s5.png" alt="" width="171" height="103" /></td>
</tr>
</tbody>
</table>
<p>By far the most common of these shapes are circles, diamonds and hearts. The fourth shape appears only on the diagonal and it&#8217;s not difficult to see that it forever will make up the entirety of the diagonal (with the exception of the circle in the center). The fifth and sixth objects are the first two members of an infinite family of objects that appear as the automaton evolves. The fifth object first appears in generation <a href="http://www.nathanieljohnston.com/wp-content/uploads/2011/03/g9.png">9</a>, and sixth object (which is basically two copies of the fifth object) first appears in generation <a href="http://www.nathanieljohnston.com/wp-content/uploads/2011/03/g17.png">17</a>. The following object, which is basically made up of two copies of the sixth object (i.e., four copies of the fifth object) first appears in generation 33:</p>
<p><img class="aligncenter size-full wp-image-1462" title="Unnamed Object" src="http://www.nathanieljohnston.com/wp-content/uploads/2011/03/s7.png" alt="" width="307" height="103" /></p>
<p>In general, a new object of this type (made of 2<sup>n</sup> copies of the fifth object above) first appears in generation 2<sup>n+3</sup> + 1. In fact, these objects are the only ones that are traced out by this automaton. [<span style="color: #ff0000;">Edit:</span> this final claim is not true! See ebcube's <a href="http://www.conwaylife.com/forums/viewtopic.php?f=11&amp;t=663">great post</a> that shows a double-heart shape in generation 31.]</p>
<p><span style="color: #800000;"><strong>Update [March 28, 2011]:</strong></span> I have added a script that counts the number of circles, diamonds, and hearts in the nth generation of the Q-toothpick automaton, and another script that computes Sloane&#8217;s <a href="http://www.oeis.org/A187212">A187212</a>.</p>
<p><strong>Download:</strong></p>
<ul>
<li><a href="http://www.nathanieljohnston.com/wp-content/uploads/2011/03/A187210.c">A187210.c</a> – computes the total number of Q-toothpicks present in the nth generation</li>
<li><a href="http://www.nathanieljohnston.com/wp-content/uploads/2011/03/A187211.c">A187211.c</a> – computes the number of Q-toothpicks added in the nth generation</li>
<li><a href="http://www.nathanieljohnston.com/wp-content/uploads/2011/03/A187212.c">A187212.c</a> – computes the number of Q-toothpicks if we restrict them to the positive quadrant</li>
<li><a href="http://www.nathanieljohnston.com/wp-content/uploads/2011/03/count_shapes.c">count_shapes.c</a> – computes the number of circles, diamonds, and hearts in the nth generation</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.njohnston.ca/2011/03/the-q-toothpick-cellular-automaton/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>The Maximum Score in the Game &#8220;Entanglement&#8221; is 9080</title>
		<link>http://www.njohnston.ca/2011/01/the-maximum-score-in-the-game-entanglement-is-9080/</link>
		<comments>http://www.njohnston.ca/2011/01/the-maximum-score-in-the-game-entanglement-is-9080/#comments</comments>
		<pubDate>Fri, 21 Jan 2011 23:05:33 +0000</pubDate>
		<dc:creator>Nathaniel</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Integer Sequences]]></category>
		<category><![CDATA[Math]]></category>
		<category><![CDATA[Popular Culture]]></category>

		<guid isPermaLink="false">http://www.nathanieljohnston.com/?p=1381</guid>
		<description><![CDATA[Entanglement is a browser-based game that has gained a fair bit of popularity lately due to its recent inclusion in Google&#8217;s Chrome Web Store and Chrome 9. The way the game works is probably best understood by actually playing it, but here is my brief attempt: You are given a hexagonal tile with six paths [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: left;"><a href="http://entanglement.gopherwoodstudios.com">Entanglement</a> is a browser-based game that has gained a fair bit of popularity lately due to its recent inclusion in Google&#8217;s <a href="https://chrome.google.com/webstore/detail/aciahcmjmecflokailenpkdchphgkefd?hl=en-US">Chrome Web Store</a> and <a href="http://blog.gopherwoodstudios.com/2010/12/entanglement-to-be-pre-installed-on.html">Chrome 9</a>. The way the game works is probably best understood by actually playing it, but here is my brief attempt:</p>
<ul>
<li>You are given a hexagonal tile with six paths printed on it, with two path ends touching each side of the hexagon. One such tile is as follows:</li>
</ul>
<p><img class="aligncenter size-full wp-image-1384" title="Entanglement Tile" src="http://www.nathanieljohnston.com/wp-content/uploads/2011/01/egtile.png" alt="" width="135" height="120" /></p>
<ul>
<li>You may rotate, but not move the hexagon that has been provided to you.</li>
<li>Once you have selected an orientation of the hexagon, a path is traced along that hexagon, and you are provided a new hexagon that you may rotate at the end of your current path.</li>
<li>The goal of the game is to create the longest path possible without running into either the centre hexagon or the outer edge of the game board.</li>
</ul>
<p>To make things a bit more interesting, <a href="http://blog.gopherwoodstudios.com/2010/11/were-happy-to-introduce-latest-version.html">the game was updated in November 2010</a> to include a new scoring system that gives you 1 + 2 + 3 + &#8230; + n (the nth <a href="http://en.wikipedia.org/wiki/Triangular_number">triangular number</a>) points on a turn if you extend the length of your path by n on that turn. This encourages clever moves that significantly extend the length of the path all at once. The question that I am going to answer today is what the maximum score in Entanglement is under this scoring system (inspired by <a href="http://www.reddit.com/r/math/comments/f6i98/whats_the_best_possible_entanglement_game_score">this reddit thread</a>).</p>
<h3>On a Standard-Size Game Board</h3>
<p>The standard Entanglement game board is made up of a hexagonal ring of 6 hexagons, surrounded by a hexagonal ring of 12 hexagons, surrounded by a hexagonal ring of 18 hexagons, for a total of 36 hexagons. In order to maximize our score, we want to maximize how much we increase the length of our path on our final move. Thus, we want to just extend our path by a length of one on each of our first 35 moves, and then score big on the 36th move.</p>
<p>Well, each hexagon that we lay has six paths on it, for a total of 6*36 = 216 paths on the board. 35 of those paths will be used up by our first 35 moves. It is not possible to use all of the remaining 181 paths, however, because many of them lead into the edge of the game board or the central hexagon, and connecting to such a path immediately ends the game. Because there are 12 path ends that touch the central hexagon and 84 path ends that touch the outer border, there must be at least (12+84)/2 &#8211; 1 = 47 unused paths on the game board (we divided by 2 because each unused path takes up two path ends and we subtracted 1 because one of the paths will be used by us).</p>
<p>Thus we can add a length of at most 181 &#8211; 47 = 134 to our path on the 36th and final move of the game, giving a total score of at most 35 (from the first 35 moves of the game) + 1 + 2 + 3 + &#8230; + 134 = 35 + 9045 = 9080. Not only is this an upper bound of the possible scores, but it is actually attainable, as demonstrated by the following optimal game board:</p>
<p style="text-align: center;"><a href="http://www.nathanieljohnston.com/wp-content/uploads/2011/01/board.png"><img class="aligncenter size-full wp-image-1382" title="Optimal Entanglement Board" src="http://www.nathanieljohnston.com/wp-content/uploads/2011/01/board.png" alt="" width="544" height="608" /></a></p>
<p style="text-align: left;">Paths in red are unused, the green line depicts the portion of the path laid by the first 35 moves of the game, and the blue line depicts the portion of the path (of length 134) gained on the 36th move. One fun property of the above game board is that it is actually completely &#8220;unentangled&#8221; – no paths cross over any other paths.</p>
<h3>On a Larger or Smaller Game Board</h3>
<p style="text-align: left;">Other than being a good size for playability purposes, there is no reason why we couldn&#8217;t play Entanglement on a game board of larger or smaller radius (by radius I mean the number of rings of hexagons around the central hexagon – the standard game board has a radius of 3). We will compute the maximum score simply by mimicking our previous analysis for the standard game board. If the board has radius n, then there are 6 + 12 + 18 + &#8230; + 6n = 3n(n+1) hexagons, each of which contains 6 paths. Thus there are 18n(n+1) lengths of path, 3n(n+1)-1 of which are used in the first 3n(n+1)-1 moves of the game, and we want to add as many as possible of the remaining 15n(n+1)+1 lengths of path in the final move of the game. There are 12 path ends that touch the central hexagon and 12 + 24n path ends that touch the outer edge of the game board. Thus there are at least (12 + 12 + 24n)/2 &#8211; 1 = 11 + 12n unused paths on the game board.</p>
<p style="text-align: left;">Tallying the numbers up, we see that on the final move, we can add at most 15n(n+1)+1 &#8211; (11 + 12n) = 15n<sup>2</sup> + 3n &#8211; 10 length of path. If T(n) = n(n+1)/2 is the nth triangular number, then we see that it&#8217;s not possible to obtain more than 3n(n+1)-1 + T(15n<sup>2</sup> + 3n &#8211; 10) = (225/2)n<sup>4</sup> + 45n<sup>3</sup> &#8211; 135n<sup>2</sup> &#8211; (51/2)n + 44 points. In fact, this score is obtainable via the exact same construction as the optimal board in the n = 3 case – just extend the (counter)clockwise rotation of the path in the obvious way. Thus, the maximum score for a game of Entanglement on a board of radius n for n = 1, 2, 3, &#8230; is given by the sequence 41, 1613, 9080, 29462, 72479, &#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.njohnston.ca/2011/01/the-maximum-score-in-the-game-entanglement-is-9080/feed/</wfw:commentRss>
		<slash:comments>44</slash:comments>
		</item>
		<item>
		<title>Further Variants of the &#8220;Look-and-Say&#8221; Sequence</title>
		<link>http://www.njohnston.ca/2011/01/further-variants-of-the-look-and-say-sequence/</link>
		<comments>http://www.njohnston.ca/2011/01/further-variants-of-the-look-and-say-sequence/#comments</comments>
		<pubDate>Thu, 13 Jan 2011 09:52:42 +0000</pubDate>
		<dc:creator>Nathaniel</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Integer Sequences]]></category>
		<category><![CDATA[Math]]></category>

		<guid isPermaLink="false">http://www.nathanieljohnston.com/?p=1347</guid>
		<description><![CDATA[In two previous posts, I explored Conway&#8217;s famous &#8220;look-and-say&#8221; sequence 1, 11, 21, 1211, 111221, 312211, &#8230;, obtained by repeatedly describing the sequence&#8217;s previous term, as well as a simple binary variant of the sequence. In this post I will use similar techniques to explore some further variations of the sequence – a version where [...]]]></description>
			<content:encoded><![CDATA[<p>In <a href="http://www.nathanieljohnston.com/2010/10/a-derivation-of-conways-degree-71-look-and-say-polynomial/">two</a> previous <a href="http://www.nathanieljohnston.com/2010/11/the-binary-look-and-say-sequence/">posts</a>, I explored Conway&#8217;s famous &#8220;look-and-say&#8221; sequence 1, 11, 21, 1211, 111221, 312211, &#8230;, obtained by repeatedly describing the sequence&#8217;s previous term, as well as a simple binary variant of the sequence. In this post I will use similar techniques to explore some further variations of the sequence – a version where each term in the sequence is read in ternary, and a related sequence where no digit larger than 2 may be used when describing its terms.</p>
<p>As with the regular look-and-say sequence, the way we will attack these sequences is by constructing a &#8220;periodic table&#8221; of elementary non-interacting subsequences that all terms in the sequence are made up of. Then standard recurrence relation techniques will allow us to determine the rate of growth of the length of the terms in the sequences as well as the limiting distribution of the different digits in the sequence.</p>
<h3>The Ternary Look-and-Say Sequence</h3>
<p>Since we have already looked at the regular (i.e., decimal) look-and-say sequence, which is equivalent to the base-4 version of the sequence since it never contains a digit of 4 or larger, and we have also looked at the binary version of the sequence, it makes sense to ask what happens in the intermediate case of the ternary (base-3) version of the sequence: 1, 11, 21, 1211, 111221, 1012211, &#8230; (see <a href="http://oeis.org/A001388">A001388</a>).</p>
<p>As always, we begin by listing the noninteracting subsequences that make this version of the sequence tick. Not surprisingly, it is more complicated than the corresponding table (of 10 subsequences) in the binary case, but not as complicated as the corresponding table (of 92 subsequences) in the decimal case.</p>
<table style="margin-left: auto; margin-right: auto;">
<tbody>
<tr>
<th>#</th>
<th>Subsequence</th>
<th>Evolves Into</th>
</tr>
<tr>
<td><strong>1</strong></td>
<td>1</td>
<td>(3)</td>
</tr>
<tr>
<td><strong>2</strong></td>
<td>10</td>
<td>(5)</td>
</tr>
<tr>
<td><strong>3</strong></td>
<td>11</td>
<td>(19)</td>
</tr>
<tr>
<td><strong>4</strong></td>
<td>110</td>
<td>(21)</td>
</tr>
<tr>
<td><strong>5</strong></td>
<td>1110</td>
<td>(2)(4)</td>
</tr>
<tr>
<td><strong>6</strong></td>
<td>111210</td>
<td>(2)(8)</td>
</tr>
<tr>
<td><strong>7</strong></td>
<td>111221</td>
<td>(2)(16)</td>
</tr>
<tr>
<td><strong>8</strong></td>
<td>1121110</td>
<td>(22)(4)</td>
</tr>
<tr>
<td><strong>9</strong></td>
<td>112211</td>
<td>(23)</td>
</tr>
<tr>
<td><strong>10</strong></td>
<td>112221</td>
<td>(21)(20)</td>
</tr>
<tr>
<td><strong>11</strong></td>
<td>11222110</td>
<td>(21)(24)</td>
</tr>
<tr>
<td><strong>12</strong></td>
<td>1122211210</td>
<td>(21)(25)</td>
</tr>
<tr>
<td><strong>13</strong></td>
<td>1211</td>
<td>(7)</td>
</tr>
<tr>
<td><strong>14</strong></td>
<td>121110</td>
<td>(6)(4)</td>
</tr>
<tr>
<td><strong>15</strong></td>
<td>1221</td>
<td>(9)</td>
</tr>
<tr>
<td><strong>16</strong></td>
<td>12211</td>
<td>(10)</td>
</tr>
<tr>
<td><strong>17</strong></td>
<td>122110</td>
<td>(11)</td>
</tr>
<tr>
<td><strong>18</strong></td>
<td>1221121110</td>
<td>(12)(4)</td>
</tr>
<tr>
<td><strong>19</strong></td>
<td>21</td>
<td>(13)</td>
</tr>
<tr>
<td><strong>20</strong></td>
<td>211</td>
<td>(15)</td>
</tr>
<tr>
<td><strong>21</strong></td>
<td>2110</td>
<td>(17)</td>
</tr>
<tr>
<td><strong>22</strong></td>
<td>211210</td>
<td>(18)</td>
</tr>
<tr>
<td><strong>23</strong></td>
<td>212221</td>
<td>(14)(20)</td>
</tr>
<tr>
<td><strong>24</strong></td>
<td>22110</td>
<td>(26)</td>
</tr>
<tr>
<td><strong>25</strong></td>
<td>221121110</td>
<td>(27)(4)</td>
</tr>
<tr>
<td><strong>26</strong></td>
<td>222110</td>
<td>(2)(24)</td>
</tr>
<tr>
<td><strong>27</strong></td>
<td>22211210</td>
<td>(2)(25)</td>
</tr>
</tbody>
</table>
<p>The (27×27) transition matrix for this evolution rule is included in the text file at the end of this post. Its characteristic polynomial is</p>
<p><img class="aligncenter size-full wp-image-1363" title="Ternary Characteristic Polynomial" src="http://www.nathanieljohnston.com/wp-content/uploads/2011/01/char.gif" alt="" width="412" height="20" /></p>
<p>The maximal eigenvalue of the transition matrix is thus the largest root of x<sup>3</sup> &#8211; x &#8211; 1, which is approximately 1.324718. It follows that the number of digits in the terms of this sequence grows on average by about 32.5% from one term to the next.</p>
<h3>The Look-and-Say Sequence with Digits 1 and 2</h3>
<p>Closely related to the ternary version of the sequence is the sequence obtained by reading the previous term in the sequence, but with the restriction that you can never use a number larger than 2 (see <a href="http://oeis.org/A110393">A110393</a>). This sequence begins 1, 11, 21, 1211, 111221, 21112211, &#8230;, and the sixth term is obtained by reading the fifth term as &#8220;two ones, one one, two twos, one one&#8221;. Because only two different digits appear in this sequence, it is perhaps not surprising that its table of noninteracting subsequences is quite simple:</p>
<table style="margin-left: auto; margin-right: auto;">
<tbody>
<tr>
<th>#</th>
<th>Subsequence</th>
<th>Evolves Into</th>
</tr>
<tr>
<td><strong>1</strong></td>
<td>1</td>
<td>(2)</td>
</tr>
<tr>
<td><strong>2</strong></td>
<td>11</td>
<td>(5)</td>
</tr>
<tr>
<td><strong>3</strong></td>
<td>111</td>
<td>(7)</td>
</tr>
<tr>
<td><strong>4</strong></td>
<td>1211</td>
<td>(3)(6)(1)</td>
</tr>
<tr>
<td><strong>5</strong></td>
<td>21</td>
<td>(4)</td>
</tr>
<tr>
<td><strong>6</strong></td>
<td>22</td>
<td>(6)</td>
</tr>
<tr>
<td><strong>7</strong></td>
<td>2111</td>
<td>(1)(6)(3)</td>
</tr>
</tbody>
</table>
<p>The transition matrix associated with this evolution rule is</p>
<p><img class="aligncenter size-full wp-image-1349" title="One Two Transition Matrix" src="http://www.nathanieljohnston.com/wp-content/uploads/2011/01/onetwo.gif" alt="" width="262" height="154" /></p>
<p>As before, the average rate of growth of the number of digits in the terms of this sequence is determined by the magnitude of the largest eigenvalue of this matrix. A simple calculation reveals that this eigenvalue is √φ = 1.272&#8230;, where φ = (1 + √5)/2 is the <a href="http://en.wikipedia.org/wiki/Golden_ratio">golden ratio</a>. Furthermore, we can answer the question of how many 1s there are in the terms of this sequence compared to 2s by looking at the eigenvector corresponding to the maximal eigenvalue:</p>
<p><img class="aligncenter size-full wp-image-1352" title="OneTwo Eigenvector" src="http://www.nathanieljohnston.com/wp-content/uploads/2011/01/eig.gif" alt="" width="187" height="155" /></p>
<p>What this means is, for example, that the second elementary subsequence (11) occurs φ times as frequently as the fourth elementary subsequence (1211). By weighting the subsequences by the entries in this vector appropriately, we can calculate the limiting ratio of the number of ones to the number of twos as</p>
<p><img class="aligncenter size-full wp-image-1374" title="OneTwo Ratio" src="http://www.nathanieljohnston.com/wp-content/uploads/2011/01/ratio2.gif" alt="" width="277" height="47" /></p>
<p><strong>Download:</strong> <a href="http://www.nathanieljohnston.com/wp-content/uploads/2011/01/TransitionMatrices.txt"></a><a href="http://www.nathanieljohnston.com/wp-content/uploads/2011/01/TransitionMatrices1.txt">Transition matrices</a> [plaintext file]</p>
]]></content:encoded>
			<wfw:commentRss>http://www.njohnston.ca/2011/01/further-variants-of-the-look-and-say-sequence/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>The Binary &#8220;Look-and-Say&#8221; Sequence</title>
		<link>http://www.njohnston.ca/2010/11/the-binary-look-and-say-sequence/</link>
		<comments>http://www.njohnston.ca/2010/11/the-binary-look-and-say-sequence/#comments</comments>
		<pubDate>Sun, 07 Nov 2010 22:00:10 +0000</pubDate>
		<dc:creator>Nathaniel</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Integer Sequences]]></category>
		<category><![CDATA[Math]]></category>

		<guid isPermaLink="false">http://www.nathanieljohnston.com/?p=1278</guid>
		<description><![CDATA[The look-and-say sequence (which I talked about here) is the sequence that you get by starting with the number 1 and constructing the next term in the sequence by &#8220;reading&#8221; the previous term. So 1 becomes &#8220;one one&#8221;, or 11. That becomes &#8220;two ones&#8221;, or 21. That becomes &#8220;one two, one one&#8221;, or 1211, and [...]]]></description>
			<content:encoded><![CDATA[<p>The <a href="http://en.wikipedia.org/wiki/Look-and-say_sequence">look-and-say sequence</a> (which I talked about <a href="http://www.nathanieljohnston.com/2010/10/a-derivation-of-conways-degree-71-look-and-say-polynomial/">here</a>) is the sequence that you get by starting with the number 1 and constructing the next term in the sequence by &#8220;reading&#8221; the previous term. So 1 becomes &#8220;one one&#8221;, or 11. That becomes &#8220;two ones&#8221;, or 21. That becomes &#8220;one two, one one&#8221;, or 1211, and so on.</p>
<p>In this post, I am going to investigate the related <a href="http://www.research.att.com/~njas/sequences/A001387">binary version of the sequence</a>, which starts off 1, 11 much like the regular sequence. But then when reading 11, we read it as &#8220;two ones&#8221;. Since two in binary is 10, the next term in the sequence is 101. When reading that term, we read it as &#8220;one one, one zero, one one&#8221;, so the next term is 111011. That term is read as &#8220;three ones, one zero, two ones&#8221;, and since three is 11 in binary and two is 10 in binary, the next term is 11110101, and so on. In this post we will answer two questions in particular about this sequence:</p>
<p>1) On average, how much longer is the (n+1)<sup>th</sup> term in the sequence than the n<sup>th</sup> term in the sequence?</p>
<p>2) On average, what is the ratio of the number of ones to the number of zeroes in the sequence?</p>
<h3>Non-Interacting Subsequences</h3>
<p>Much like the regular look-and-say sequence, we are able to study this sequence by constructing a &#8220;basis&#8221; of non-interacting subsequences that every term in the binary look-and-say sequence is made up of. Fortunately, constructing such a family of subsequences for the binary version of the look-and-say sequence is much simpler than it is for the decimal version of the sequence – here we only need ten different basic subsequences (whereas we needed <a href="http://mathworld.wolfram.com/CosmologicalTheorem.html">92 different subsequences</a> for the regular look-and-say sequence!). These ten subsequences, and the subsequences they evolve into, are summarized in the following table.</p>
<table style="margin-left: auto; margin-right: auto;">
<tbody>
<tr>
<th>#</th>
<th>Subsequence</th>
<th>Evolves Into</th>
</tr>
<tr>
<td><strong>1</strong></td>
<td>1</td>
<td>(2)</td>
</tr>
<tr>
<td><strong>2</strong></td>
<td>11</td>
<td>(3)(1)</td>
</tr>
<tr>
<td><strong>3</strong></td>
<td>10</td>
<td>(5)</td>
</tr>
<tr>
<td><strong>4</strong></td>
<td>110</td>
<td>(3)(4)</td>
</tr>
<tr>
<td><strong>5</strong></td>
<td>1110</td>
<td>(6)</td>
</tr>
<tr>
<td><strong>6</strong></td>
<td>11110</td>
<td>(7)(4)</td>
</tr>
<tr>
<td><strong>7</strong></td>
<td>100</td>
<td>(9)</td>
</tr>
<tr>
<td><strong>8</strong></td>
<td>1100</td>
<td>(3)(8)</td>
</tr>
<tr>
<td><strong>9</strong></td>
<td>11100</td>
<td>(10)</td>
</tr>
<tr>
<td><strong>10</strong></td>
<td>111100</td>
<td>(7)(8)</td>
</tr>
</tbody>
</table>
<p>So for example, the first term in the sequence, 1, evolves into the subsequence (2), which is 11. That term then evolves into subsequence (3) followed by subsequence (1), or 101. That term then evolves into the subsequence (5) followed by the subsequence (2), or 111011, and so on. The reason that this representation of the sequence is useful is we can use it to describe the evolution of the binary look-and-say sequence entirely within a matrix T. In particular, we let T be the matrix with 1 in its (i,j) entry if the subsequence (i) appears in the evolution rule for subsequence (j), and 0 in its (i,j) entry otherwise:</p>
<p><img class="aligncenter size-full wp-image-1282" title="Transition Matrix" src="http://www.nathanieljohnston.com/wp-content/uploads/2010/11/1.gif" alt="" width="285" height="222" /></p>
<p>Now if <strong>v</strong> is a 10-dimensional vector whose ith entry indicates how many times the subsequence (i) appears in a particular term of the binary look-and-say sequence, it follows that the entries of T<strong>v</strong> tell us how many times each subsequence appears in the <em>next </em>term of the binary look-and-say sequence. So it follows from standard theory of linear homogeneous <a href="http://en.wikipedia.org/wiki/Recurrence_relation">recurrence relations</a> that we can now read off all of the long-term behaviour of the binary look-and-say sequence from the eigenvalues and eigenvectors of T.</p>
<h3>Rate of Growth of the Sequence</h3>
<p>The asymptotic rate of growth of the number of digits in the terms of the binary look-and-say sequence is simply the magnitude of the largest eigenvalue of the transition matrix T above. Using Maple it is simple to derive this value. If L<sub>n</sub> is the number of digits in the n<sup>th</sup> term of the binary look-and-say sequence, then</p>
<p><img class="aligncenter size-full wp-image-1294" title="Asymptotic Growth Rate" src="http://www.nathanieljohnston.com/wp-content/uploads/2010/11/dfsfdssdfsdf.gif" alt="" width="428" height="43" /></p>
<p>This limit is approximately 1.465571, which means that the binary version of this sequence grows much faster than the decimal version of the sequence (recall that the growth rate of the number of digits of the regular look and say sequence is approximately 1.303577). This limit is also the unique real root of the cubic x<sup>3</sup> &#8211; x<sup>2</sup> &#8211; 1, which follows from the fact that the <a href="http://en.wikipedia.org/wiki/Characteristic_polynomial">characteristic polynomial</a> of T is</p>
<p><img class="aligncenter size-full wp-image-1284" title="Characteristic Polynomial" src="http://www.nathanieljohnston.com/wp-content/uploads/2010/11/3.gif" alt="" width="258" height="25" /></p>
<h3>Ratio of Number of Ones to Zeroes</h3>
<p>If we let N<sub>n</sub> denote the number of ones in the n<sup>th</sup> term of the binary look-and-say sequence, and if we let Z<sub>n</sub> denote the number of zeroes in the n<sup>th</sup> term of the sequence, what is</p>
<p><sub><img class="aligncenter size-full wp-image-1285" title="Limiting Ratio" src="http://www.nathanieljohnston.com/wp-content/uploads/2010/11/11.gif" alt="" width="74" height="41" /></sub></p>
<p>In other words, what is the average ratio of ones to zeroes in this sequence? The following table shows the value of N<sub>n</sub>/Z<sub>n</sub> for n = 3, 4, &#8230;, 25, which might give some intuition to the problem:</p>
<table style="margin-left: auto; margin-right: auto;">
<tbody>
<tr>
<th>n</th>
<th>N<sub>n</sub>/Z<sub>n</sub></th>
</tr>
<tr>
<td><strong>3</strong></td>
<td>2.000</td>
</tr>
<tr>
<td><strong>4</strong></td>
<td>5.000</td>
</tr>
<tr>
<td><strong>5</strong></td>
<td>3.000</td>
</tr>
<tr>
<td><strong>6</strong></td>
<td>2.000</td>
</tr>
<tr>
<td><strong>7</strong></td>
<td>2.000</td>
</tr>
<tr>
<td><strong>8</strong></td>
<td>2.000</td>
</tr>
<tr>
<td><strong>9</strong></td>
<td>1.786</td>
</tr>
<tr>
<td><strong>10</strong></td>
<td>1.762</td>
</tr>
<tr>
<td><strong>11</strong></td>
<td>1.742</td>
</tr>
<tr>
<td><strong>12</strong></td>
<td>1.717</td>
</tr>
<tr>
<td><strong>13</strong></td>
<td>1.691</td>
</tr>
<tr>
<td><strong>14</strong></td>
<td>1.690</td>
</tr>
<tr>
<td><strong>15</strong></td>
<td>1.680</td>
</tr>
<tr>
<td><strong>16</strong></td>
<td>1.676</td>
</tr>
<tr>
<td><strong>17</strong></td>
<td>1.672</td>
</tr>
<tr>
<td><strong>18</strong></td>
<td>1.671</td>
</tr>
<tr>
<td><strong>19</strong></td>
<td>1.669</td>
</tr>
<tr>
<td><strong>20</strong></td>
<td>1.668</td>
</tr>
<tr>
<td><strong>21</strong></td>
<td>1.667</td>
</tr>
<tr>
<td><strong>22</strong></td>
<td>1.667</td>
</tr>
<tr>
<td><strong>23</strong></td>
<td>1.666</td>
</tr>
<tr>
<td><strong>24</strong></td>
<td>1.666</td>
</tr>
<tr>
<td><strong>25</strong></td>
<td>1.666</td>
</tr>
</tbody>
</table>
<p>Based on numerical estimates like those given in the table above, <a href="http://numeratus.net/enlightened/bls.html">it has been conjectured</a> that the limiting ratio is 5/3 (or some nearby value). We will now show that the limit does indeed exist, but its value is <em>not</em> 5/3 &#8212; it just happens to be really close to 5/3.</p>
<p>Much like the maximal eigenvalue of T tells us the overall growth rate of the sequence, the corresponding eigenvector tells us the distribution of the different subsequences that are present in the limit. Once we know the distribution of the individual subsequences, it is not difficult to find out the overall ratio of ones to zeroes by weighing the different subsequences appropriately. So our first step is to find the eigenvector corresponding to the maximal eigenvalue. To this end, it will be convenient to let</p>
<p><img class="aligncenter size-full wp-image-1289" title="Alpha Beta" src="http://www.nathanieljohnston.com/wp-content/uploads/2010/11/fred.png" alt="" width="163" height="80" /></p>
<p>α is the same as in the previous section, and β is exactly the growth rate limit that we computed. Then the eigenvector corresponding to the maximal eigenvalue of T is:</p>
<p><img class="aligncenter size-full wp-image-1290" title="Maximal Eigenvector" src="http://www.nathanieljohnston.com/wp-content/uploads/2010/11/eig.gif" alt="" width="80" height="222" /></p>
<p>What this means is that, in the limit, the fifth subsequence, 1110, is β times as frequently-occurring as the sixth subsequence, 11110 (for example). Now we just weigh each subsequence according to how many zeros and ones they contain, and we find the limiting ratio of ones to zeroes is</p>
<p><img class="aligncenter size-full wp-image-1293" title="Ones to Zeroes Ratio" src="http://www.nathanieljohnston.com/wp-content/uploads/2010/11/goog.gif" alt="" width="392" height="39" /></p>
<p>In particular, this ratio does <em>not </em>equal 5/3, but rather its decimal expansion begins 1.6657272222676&#8230; (which is less than 1/1000 away from 5/3).</p>
]]></content:encoded>
			<wfw:commentRss>http://www.njohnston.ca/2010/11/the-binary-look-and-say-sequence/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

