<?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>Wolfram Blog</title>
	<atom:link href="http://blog.wolfram.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.wolfram.com</link>
	<description>News, views, &#38; ideas from the front lines at Wolfram Research</description>
	<lastBuildDate>Thu, 09 Feb 2012 03:54:42 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Announcing Wolfram&#124;Alpha Pro</title>
		<link>http://blog.wolfram.com/2012/02/08/announcing-wolframalpha-pro/</link>
		<comments>http://blog.wolfram.com/2012/02/08/announcing-wolframalpha-pro/#comments</comments>
		<pubDate>Thu, 09 Feb 2012 03:40:46 +0000</pubDate>
		<dc:creator>Stephen Wolfram</dc:creator>
				<category><![CDATA[Wolfram News]]></category>

		<guid isPermaLink="false">http://blog.internal.wolfram.com/?p=9673</guid>
		<description><![CDATA[Today I&#8217;m excited to be able to announce the launch of Wolfram&#124;Alpha Pro&#8212;the biggest single step in the development of Wolfram&#124;Alpha since its original introduction.

Over the two and a half years since we first launched, Wolfram&#124;Alpha has been growing rapidly in content and capabilities. But today&#8217;s introduction of Wolfram&#124;Alpha Pro in effect adds a whole new [...]]]></description>
			<content:encoded><![CDATA[<p>Today I&#8217;m excited to be able to announce the launch of <a href="http://www.wolframalpha.com/pro" target="_self">Wolfram|Alpha Pro</a>&#8212;the biggest single step in the development of Wolfram|Alpha since its original introduction.</p>
<p><img class="aligncenter size-full wp-image-2359" style="border:0px" title="Wolfram|Alpha Pro" src="http://blog.stephenwolfram.com/data/uploads/2012/02/mainpro.png" alt="Wolfram|Alpha Pro" width="505" height="103" /></p>
<p>Over the two and a half years since we first launched, <a href="http://www.wolframalpha.com" target="_self">Wolfram|Alpha</a> has been growing rapidly in content and capabilities. But today&#8217;s introduction of Wolfram|Alpha Pro in effect adds a whole new model for interacting with Wolfram|Alpha&#8212;and brings all sorts of fundamentally new and remarkable capabilities.</p>
<p>Starting today, everyone has access to Wolfram|Alpha Pro at <a href="http://www.wolframalpha.com">wolframalpha.com</a>. Unlike the &#8220;tourist&#8221; version of Wolfram|Alpha, though, you have to log in, and, yes, to get full capabilities there&#8217;s a subscription ($4.99/month, or $2.99/month for students). (Right now, you can try it for free with a <a href="http://www.wolframalpha.com/pro" target="_self">trial subscription</a>.)</p>
<p>So, what does Wolfram|Alpha Pro do?</p>
<p><img class="aligncenter size-full wp-image-2410" style="border:0px" title="Wolfram|Alpha Pro features" src="http://blog.stephenwolfram.com/data/uploads/2012/02/features-1.png" alt="Wolfram|Alpha Pro features" width="505" height="205" /><span id="more-9673"></span></p>
<p>There are some big things here. But at the level of the Wolfram|Alpha interface, they&#8217;re just summarized by little icons.</p>
<p>Let&#8217;s talk first about output. Once you&#8217;ve logged in, you have access to your history, and you can define favorites. You can also set preferences, like what location Wolfram|Alpha should assume, or what unit system you want to use. And you can do things like change the overall size of Wolfram|Alpha output.</p>
<p>As soon as you mouse over a Wolfram|Alpha output pod, you&#8217;ll immediately see:</p>
<p><img src="http://blog.stephenwolfram.com/data/uploads/2012/02/output-overlay1.png" alt="Wolfram|Alpha Pro output options" title="Wolfram|Alpha Pro output options" width="505" height="82" style="border:0px" class="aligncenter size-full wp-image-2461" /></p>
<p><img class="alignnone size-full wp-image-2342" style="border:0px" title="Zoom" src="http://blog.stephenwolfram.com/data/uploads/2012/02/icon-zoom.png" alt="Zoom" width="16" height="15" /> (or, actually, clicking almost anywhere in the pod) does something very simple, but useful: it gives you an enlarged version of the pod, so you can for example see all the details of elaborate plots.</p>
<p><img class="alignright size-full wp-image-2348" style="border:0px; float:right" title="Customize" src="http://blog.stephenwolfram.com/data/uploads/2012/02/customize.png" alt="Customize" width="161" height="131" /><img class="alignnone size-full wp-image-2345" style="border:0px" title="Customize" src="http://blog.stephenwolfram.com/data/uploads/2012/02/icon-customize.png" alt="Customize" width="16" height="12" /> does something a lot of people have asked for: lets you customize output from Wolfram|Alpha, and get it in various formats&#8212;so you can put it directly into your presentation, or whatever.</p>
<p style="clear:none">Another much-requested capability, accessed with <img class="alignnone size-full wp-image-2354" style="border:0px" title="Data download" src="http://blog.stephenwolfram.com/data/uploads/2012/02/icon-datadownload.png" alt="Data download" width="15" height="15" />, is being able to download the raw data behind a Wolfram|Alpha output&#8212;say as a spreadsheet or the like.</p>
<p><img src="http://blog.stephenwolfram.com/data/uploads/2012/02/datadownload1.png" alt="Data download" title="Data download" width="505" height="220" style="border:0px" class="aligncenter size-full wp-image-2456" /></p>
<p>(Needless to say, spreadsheets can&#8217;t faithfully represent the full breadth of data, units, etc. that Wolfram|Alpha generates, so Wolfram|Alpha Pro uses tricks like having separate sheets for &#8220;Raw Data&#8221; and &#8220;Formatted Data&#8221;.)</p>
<p>When one says &#8220;downloading data&#8221;, one might think just of data behind tables and plots. But Wolfram|Alpha Pro can download all sorts of other data too: 3D geometry data (say to use for a modeling program or a 3D printer), sound data, graph connectivity data, molecular specification data, etc.&#8212;in altogether more than <a href="http://www.wolframalpha.com/input/pro/downloadexamples/" target="_self">60 formats</a>.</p>
<p>In addition to handling material in individual pods, Wolfram|Alpha also lets you download a complete output page as PDF&#8212;or CDF.</p>
<p><a href="http://www.wolfram.com/cdf" target="_self">CDF (Computable Document Format)</a> is the format that we introduced last year to let people create documents containing computations. It&#8217;s already gaining a lot of momentum in areas like textbooks and interactive reports. But now CDF is also part of Wolfram|Alpha Pro.</p>
<p>In all sorts of output pods, there&#8217;ll be a button labeled &#8220;Enable interactivity&#8221;. Click it and the pod will turn into CDF, that you can immediately interact with.</p>
<p>At a basic level, you&#8217;ll be able to resize any graphic, and rotate 3D graphics. But many kinds of graphics and other outputs will also sprout controls that let you directly modify and interact with them. (Often there’s a &#8220;More controls&#8221; section that opens out to give lots of additional controls.) And because CDF computation is done locally on your computer, the interaction is typically very zippy.</p>
<p><a href="http://www.wolframalpha.com/input/?i=sin(x+y)"><img class="aligncenter size-full wp-image-2361" style="border:0px" title="Sin(x y)" src="http://blog.stephenwolfram.com/data/uploads/2012/02/cdf1.png" alt="Sin(x y)" width="505" height="581" /></a></p>
<p>An interesting feature of CDF in Wolfram|Alpha Pro is that it effectively lets you create interactive programs directly from free-form linguistic input. You can tell Wolfram|Alpha to animate with respect to some variable, or somesuch, and it&#8217;ll generate a CDF that does that.</p>
<p>So there are all sorts of new things associated with output in Wolfram|Alpha Pro. But what about input?</p>
<p>Right below the main input box there&#8217;s a row of icons. Each of them brings out a &#8220;tray&#8221; for some special kind of input.</p>
<p><img src="http://blog.stephenwolfram.com/data/uploads/2012/02/icons-in-tray1.png" alt="Icons in the tray" title="Icons in the tray" width="505" height="74" style="border:0px" class="aligncenter size-full wp-image-2458" /></p>
<p><img src="http://blog.stephenwolfram.com/data/uploads/2012/02/icon-keyboard1.png" alt="Keyboard" title="Keyboard" width="19" height="12" style="border:0px" class="alignnone size-full wp-image-2457" /> gives a special character keyboard, modeled after the soft keyboards that exist in Wolfram|Alpha mobile apps.</p>
<p><img class="aligncenter size-full wp-image-2364" style="border:0px" title="Wolfram|Alpha Pro keyboard" src="http://blog.stephenwolfram.com/data/uploads/2012/02/keyboard.png" alt="Wolfram|Alpha Pro keyboard" width="505" height="246" /></p>
<p>The other icons all relate to a big idea of Wolfram|Alpha Pro. With ordinary Wolfram|Alpha and its free-form linguistics, we&#8217;ve really opened up the kind of textual input that you expect a computer to be able to handle. But a big idea of Wolfram|Alpha is to go still further, and to allow input that isn&#8217;t text at all.</p>
<p><img class="alignnone size-full wp-image-2385" style="border:0px" title="Image" src="http://blog.stephenwolfram.com/data/uploads/2012/02/icon-image.png" alt="Image" width="17" height="13" /> lets you give an image as input.</p>
<p><img src="http://blog.stephenwolfram.com/data/uploads/2012/02/image1.png" alt="Image input" title="Image input" width="505" height="432" style="border:0px" class="aligncenter size-full wp-image-2459" /></p>
<p>Once you&#8217;ve got the image in, it&#8217;ll be indicated by a little yellow box in the Wolfram|Alpha input field. And if you just hit Enter, Wolfram|Alpha Pro will do an automatic analysis of your image.</p>
<p><a href="http://www.wolframalpha.com/input/?i=+&#038;examplefile=1&#038;fileinput=ImageInput%2FQuinSconce.png"><img class="aligncenter size-full wp-image-2374" style="border:0px" title="QuinSconce.png" src="http://blog.stephenwolfram.com/data/uploads/2012/02/ImageAsInput-2.png" alt="QuinSconce.png" width="505" height="624" /></a></p>
<p>There&#8217;s some general analysis that always gets done, but a lot of the analysis depends on your image. If there&#8217;s text in the image, it&#8217;ll get OCR&#8217;d. If there are separate components, they&#8217;ll be identified. And so on.</p>
<p>But in addition to purely automatic analysis, you can tell Wolfram|Alpha Pro what to do with your image, just using standard free-form linguistics. In a sense, Wolfram|Alpha Pro is a direct beneficiary of the very powerful image handling capabilities that were added in recent versions of <a href="http://www.wolfram.com/mathematica" target="_self"><em>Mathematica</em></a>. But the end result is that it&#8217;s able to do a very large range of image processing and image analysis&#8212;both &#8220;Photoshop-style&#8221;, and of a type usually seen only in specialized, expensive, image processing systems.</p>
<p>Particularly powerful is combining image upload with CDF&#8212;and getting interactive interfaces for image processing.</p>
<p><a href="http://www.wolframalpha.com/input/?i=gradient+filter+with+radius+x&#038;examplefile=1&#038;fileinput=ImageInput%2FQuinSconce.png"><img src="http://blog.stephenwolfram.com/data/uploads/2012/02/image3b.png" alt="QuinSconce.png gradient filter with radius x" title="QuinSconce.png gradient filter with radius x" width="504" height="458" style="border:0px" class="aligncenter size-full wp-image-2460" /></a></p>
<p>So what about other kinds of files? Well, Wolfram|Alpha Pro can handle <a href="http://www.wolframalpha.com/input/pro/downloadexamples/" target="_self">about 60 types</a>.</p>
<p><img class="aligncenter size-full wp-image-2377" style="border:0px" title="File types supported by Wolfram|Alpha Pro" src="http://blog.stephenwolfram.com/data/uploads/2012/02/fileupload1.png" alt="File types supported by Wolfram|Alpha Pro" width="505" height="444" /></p>
<p>In each case, it can do general automatic analysis of what&#8217;s in the file. And you can specifically tell it what you want to do. For different types of files, the results are very different. Like here&#8217;s the result of uploading a sound file:</p>
<p><a href="http://www.wolframalpha.com/input/?i=+&#038;examplefile=1&#038;fileinput=FileUpload%2FLogisticMapBifurcation.flac"><img class="aligncenter size-full wp-image-2380" style="border:0px" title="LogisticMapBifurcation.flac" src="http://blog.stephenwolfram.com/data/uploads/2012/02/fileupload-audio.png" alt="LogisticMapBifurcation.flac" width="505" height="813" /></a></p>
<p>And here&#8217;s a general analysis of a pure binary file:</p>
<p><a href="http://www.wolframalpha.com/input/?i=+&#038;examplefile=1&#038;fileinput=FileUpload%2FUnixBinary.bin"><img class="aligncenter size-full wp-image-2378" style="border:0px" title="UnixBinary.bin" src="http://blog.stephenwolfram.com/data/uploads/2012/02/fileupload2.png" alt="UnixBinary.bin" width="505" height="1631" /></a></p>
<p>What about files that contain data? Here&#8217;s where it gets even more exciting. And actually the data doesn&#8217;t need to be laid out in a spreadsheet or CSV or whatever. <img class="alignnone size-full wp-image-2388" style="border:0px" title="Data input" src="http://blog.stephenwolfram.com/data/uploads/2012/02/icon-datainput.png" alt="Data input" width="18" height="13" /> lets you just copy a <a href="http://www.wolframalpha.com/examples/DataInput.html" target="_self">block of data from anywhere</a>, and feed it to Wolfram|Alpha Pro.</p>
<p>To many people who&#8217;ve seen preliminary versions of Wolfram|Alpha Pro, this is then the part that&#8217;s most surprising and remarkable: Wolfram|Alpha Pro will automatically analyze the data, and generate a report about it.</p>
<p><a href="http://www.wolframalpha.com/input/?i=+&#038;examplefile=1&#038;datasetfile=DataInput%2Fcategories-currency"><img src="http://blog.stephenwolfram.com/data/uploads/2012/02/data11.png" alt="Categories-currency" title="Categories-currency" width="505" height="2387" style="border:0px" class="aligncenter size-full wp-image-2466" /></a></p>
<p>The report is completely tailored to the particular data you give&#8212;and it can look very different for different kinds of data. Usually, though, it&#8217;ll contain some mixture of visualizations and analyses. It&#8217;ll have all kinds of charts and graphs and tables&#8212;often together with explicit conclusions generated by statistical and other methods.</p>
<p><a href="http://www.wolframalpha.com/input/?i=+&#038;examplefile=1&#038;datasetfile=DataInput%2Fdates-categories"><img src="http://blog.stephenwolfram.com/data/uploads/2012/02/data41.png" alt="Dates-categories" title="Dates-categories" width="503" height="1764" style="border:0px" class="aligncenter size-full wp-image-2463" /></a></p>
<p>And of course, it&#8217;s not just a static report. There are always all sorts of buttons and pull-downs that allow you to drill down, select different options, and so on. But the notion is that when you upload your data to Wolfram|Alpha Pro, it&#8217;ll immediately be able to tell you interesting things about it.</p>
<p><img src="http://blog.stephenwolfram.com/data/uploads/2012/02/data-graphs.png" alt="Different types of graphs generated with Wolfram|Alpha Pro" title="Different types of graphs generated with Wolfram|Alpha Pro" width="505" height="674" style="border:0px" class="aligncenter size-full wp-image-2455" /></p>
<p>I&#8217;ll write more about this elsewhere, but in a sense the concept is to imagine what a good data scientist would do if confronted with your data, then just immediately and automatically do that&#8212;and show you the results.</p>
<p>We&#8217;re certainly not finished with everything that&#8217;s possible, but already in the version of Wolfram|Alpha Pro that we&#8217;re releasing today, I think what we can do with data is pretty impressive. Of course, it helps that we can build on all the sophisticated data and statistics-related capabilities that are now built in to <em>Mathematica</em>. And it also helps that we can make use of all the other parts of Wolfram|Alpha.</p>
<p>For example, if you read in data with dates, or units, or place names, or whatever, Wolfram|Alpha Pro is able to call on Wolfram|Alpha&#8217;s linguistic capabilities to understand whatever forms were entered. And when it comes to output, Wolfram|Alpha Pro can freely use the built-in knowledge in Wolfram|Alpha. So, for example, it can immediately place on a map cities or countries or whatever given in the data. But what is more, it can use its built-in knowledge to let you do things like automatically normalizing by population.</p>
<p><a href="http://www.wolframalpha.com/input/?i=+&#038;examplefile=1&#038;datasetfile=DataInput%2Fcountries-currency-numbers"><img src="http://blog.stephenwolfram.com/data/uploads/2012/02/population.png" alt="Countries-currency-number" title="Countries-currency-number" width="505" height="405" style="border:0px" class="aligncenter size-full wp-image-2468" /></a></p>
<p>As everywhere in Wolfram|Alpha, we&#8217;re aiming for very broad and deep coverage. We want to implement every method and algorithm that&#8217;s relevant to analyzing data, and then we want to apply these automatically whenever and wherever they make sense. Already we&#8217;ve got lots of data handling and visualization, lots of standard and not-so-standard statistical methods, and lots of new methods, many original to Wolfram|Alpha Pro.</p>
<p>Taken with the other capabilities of Wolfram|Alpha Pro, it&#8217;s all a pretty major extension of ordinary Wolfram|Alpha&#8212;supporting a whole new model of using Wolfram|Alpha. In a sense the new capabilities emphasize more than ever the computational nature of Wolfram|Alpha: the ability to do complete, fresh, computations for every query.</p>
<p>We&#8217;ve been able to go a remarkably long way with the basic paradigm of ordinary Wolfram|Alpha. But now Wolfram|Alpha Pro dramatically extends this paradigm&#8212;and it&#8217;s going to be exciting to see all the new things that become conceivable. But for now, I hope that as many people as possible will use Wolfram|Alpha Pro, and will take advantage of the largest single step in the development of Wolfram|Alpha since it was first launched.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.wolfram.com/2012/02/08/announcing-wolframalpha-pro/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Happy 10*9*8+7+6-5+4*321 !</title>
		<link>http://blog.wolfram.com/2012/02/02/happy-109876-54321/</link>
		<comments>http://blog.wolfram.com/2012/02/02/happy-109876-54321/#comments</comments>
		<pubDate>Thu, 02 Feb 2012 19:52:42 +0000</pubDate>
		<dc:creator>Christopher Carlson</dc:creator>
				<category><![CDATA[Recreational Computation]]></category>

		<guid isPermaLink="false">http://blog.internal.wolfram.com/?p=9630</guid>
		<description><![CDATA[I was amazed to see this tweet from our friends at the Museum of Mathematics:
10*9*8+7+6-5+4*321Happy New Year!
&#8212; Museum of Math (@MoMath1) January 3, 2012

A quick check with Mathematica verified that, yes indeed, 10*9*8+7+6-5+4*321 = 2012. Wow! How in the world did anyone discover that rare factoid? And how long will it be until another year [...]]]></description>
			<content:encoded><![CDATA[<p>I was amazed to see this <a href="https://twitter.com/#!/MoMath1/statuses/154234973644263424" target="_blank">tweet</a> from our friends at the <a href="http://momath.org/" target="_blank">Museum of Mathematics</a>:</p>
<blockquote class="twitter-tweet"><p>10*9*8+7+6-5+4*321Happy New Year!</p>
<p>&mdash; Museum of Math (@MoMath1) <a href="https://twitter.com/MoMath1/status/154234973644263424" data-datetime="2012-01-03T16:17:37+00:00">January 3, 2012</a></p></blockquote>
<p><script src="//platform.twitter.com/widgets.js" charset="utf-8"></script></p>
<p>A quick check with <a href="http://www.wolfram.com/mathematica" target="_self"><i>Mathematica</i></a> verified that, yes indeed, 10*9*8+7+6-5+4*321 = 2012. Wow! How in the world did anyone discover that rare factoid? And how long will it be until another year arrives that can be similarly expressed?</p>
<p>That&#8217;s the sort of question that&#8217;s so easy to answer with <i>Mathematica</i> that I couldn&#8217;t not have a look. It turns out that what seemed to me like a rare jewel is as common as dirt. In fact, there is only one year in the next 100 that can&#8217;t be expressed by interspersing +, -, *, /, or nothing between the numbers in order from 10 to 1! In subsequent correspondence with George Hart, the museum&#8217;s Chief of Content, he told me that he learned the idea from Hans Havermann, who wrote about it in a <a href="http://gladhoboexpress.blogspot.com/2011/01/countdown.html" target="_blank">blog post</a> last year. I&#8217;ve discovered what he had up his sleeve: abundant computing.<span id="more-9630"></span></p>
<p>Let&#8217;s call an expression like the one above, with the numbers 10, 9, &#8230;, 1 interspersed with operators, a 10-expression. To check what years could be formulated as 10-expressions, I strung together the component characters into character strings and then told <i>Mathematica</i> to interpret those as mathematical expressions. Since there are 5 different operators and 9 operator positions between the 10 numbers, there are 5<sup>9</sup> = 1953125 different calculations to make. With brutish force, I generated every one of them and had a look at the result.</p>
<p>This is how it works. Here are the numbers:</p>
<p><img src="http://blog.wolfram.com/data/uploads/2012/02/Happy2012-In1.png" alt="numbers = {&quot;10&quot;, &quot;9&quot;, &quot;8&quot;, &quot;7&quot;, &quot;6&quot;, &quot;5&quot;, &quot;4&quot;, &quot;3&quot;, &quot;2&quot;, &quot;1&quot;} ;" title="numbers = {&quot;10&quot;, &quot;9&quot;, &quot;8&quot;, &quot;7&quot;, &quot;6&quot;, &quot;5&quot;, &quot;4&quot;, &quot;3&quot;, &quot;2&quot;, &quot;1&quot;} ;" width="448" height="18" class="alignleft size-full wp-image-9636" /></p>
<p>And the operators:</p>
<p><img src="http://blog.wolfram.com/data/uploads/2012/02/Happy2012-In2.png" alt="ops = {&quot;&quot;, &quot;+&quot;, &quot;-&quot;, &quot;*&quot;, &quot;/&quot;};" title="ops = {&quot;&quot;, &quot;+&quot;, &quot;-&quot;, &quot;*&quot;, &quot;/&quot;};" width="244" height="17" style="border:0px" class="alignleft size-full wp-image-9638" /></p>
<p>The set of all 1953125 possible combinations of the 5 operators in 9 positions is given by:</p>
<p><img src="http://blog.wolfram.com/data/uploads/2012/02/Happy2012-In3.png" alt="opTuples = Tuples[ops, 9];" title="opTuples = Tuples[ops, 9];" width="226" height="17" style="border:0px" class="alignleft size-full wp-image-9639" /></p>
<p><tt>opTuples</tt> is a list, each element of which is a list of 9 operators. For example:</p>
<p><img src="http://blog.wolfram.com/data/uploads/2012/02/Happy2012-In4.png" alt="opTuples[[1426451]]" title="opTuples[[1426451]]" width="185" height="18" style="border:0px" class="alignleft size-full wp-image-9640" /></p>
<p><img src="http://blog.wolfram.com/data/uploads/2012/02/Happy2012-Out4.png" alt="{&quot;*&quot;, &quot;*&quot;, &quot;+&quot;, &quot;+&quot;, &quot;-&quot;, &quot;+&quot;, &quot;*&quot;, &quot;&quot;, &quot;&quot;}" title="{&quot;*&quot;, &quot;*&quot;, &quot;+&quot;, &quot;+&quot;, &quot;-&quot;, &quot;+&quot;, &quot;*&quot;, &quot;&quot;, &quot;&quot;}" width="195" height="17" class="alignleft size-full wp-image-9641" /></p>
<p>I interspersed each such tuple among the 10 numbers using <i>Mathematica</i>&#8217;s <a href="http://reference.wolfram.com/mathematica/ref/Riffle.html" target="_self"><tt>Riffle</tt></a> function, which effectively shuffles two lists together, and applied <a href="http://reference.wolfram.com/mathematica/ref/StringJoin.html" target="_self"><tt>StringJoin</tt></a> to concatenate that into a single string that expresses an arithmetic calculation:</p>
<p><img src="http://blog.wolfram.com/data/uploads/2012/02/Happy2012-In5.png" alt="expressionString = StringJoin @@ Riffle[numbers, opTuples[[1426451]]]" title="expressionString = StringJoin @@ Riffle[numbers, opTuples[[1426451]]]" width="404" height="32" style="border:0px" class="alignleft size-full wp-image-9642" /></p>
<p><img src="http://blog.wolfram.com/data/uploads/2012/02/Happy2012-Out5.png" alt="&quot;10*9*8+7+6-5+4*321&quot;" title="&quot;10*9*8+7+6-5+4*321&quot;" width="172" height="16" style="border:0px" class="alignleft size-full wp-image-9643" /></p>
<p>Applying <a href="http://reference.wolfram.com/mathematica/ref/ToExpression.html" target="_self"><tt>ToExpression</tt></a> to that string evaluates the corresponding mathematical expression and returns the value it represents:</p>
<p><img src="http://blog.wolfram.com/data/uploads/2012/02/Happy2012-In6.png" alt="ToExpression[expressionString]" title="ToExpression[expressionString]" width="259" height="16" style="border:0px" class="alignleft size-full wp-image-9644" /></p>
<p><img src="http://blog.wolfram.com/data/uploads/2012/02/Happy2012-Out6.png" alt="2012" title="2012" width="74" height="17" style="border:0px" class="alignleft size-full wp-image-9645" /></p>
<p>I encapsulated those operations in the function <tt>ShowNExpressions</tt> that calculates all the possibilities, selects those in a given range of dates, and nicely formats the result. Imagine my surprise when I applied it to the next 100 years, and it appeared that <i>every one</i> of them was expressible as a 10-expression, and most of them in more than one way (on closer examination I saw that one year, 2102, was missing). Here&#8217;s the beginning of that list:</p>
<p><img src="http://blog.wolfram.com/data/uploads/2012/02/Happy2012-In7.png" alt="ShowNExpressions[numbers, ops, {2012, 2016}]" title="ShowNExpressions[numbers, ops, {2012, 2016}]" width="350" height="17" style="border:0px" class="alignleft size-full wp-image-9646" /></p>
<p><img src="http://blog.wolfram.com/data/uploads/2012/02/Happy2012-Out7.png" alt="{  {2012, &quot;10*9*8+7+6-5+4*321&quot;}, {2012, &quot;10+9*87-65+4*321&quot;}, {2012, &quot;109-8*7+654*3-2-1&quot;}, {2013, &quot;10*9*8*7/6/5*4*3-2-1&quot;}, {2013, &quot;10*98/7*6/5*4*3-2-1&quot;}, {2013, &quot;109-8*7+654*3-2*1&quot;}, {2013, &quot;109-8*7+654*3-2/1&quot;}, {2014, &quot;10*9*8*7/6/5*4*3-2*1&quot;}, {2014, &quot;10*9*8*7/6/5*4*3-2/1&quot;}, {2014, &quot;10*9*8+7+6*5*43-2-1&quot;}, {2014, &quot;10*98/7*6/5*4*3-2*1&quot;}, {2014, &quot;10*98/7*6/5*4*3-2/1&quot;}, {2014, &quot;109-8*7+654*3-2+1&quot;}, {&quot;&quot;, &quot;&quot;}, {2015, &quot;10*9*8*7/6/5*4*3-2+1&quot;}, {2015, &quot;10*9*8+7+6*5*43-2*1&quot;}, {2015, &quot;10*9*8+7+6*5*43-2/1&quot;}, {2015, &quot;10*98/7*6/5*4*3-2+1&quot;}, {2015, &quot;10*98/7/6/5*432-1&quot;}, {&quot;&quot;, &quot;&quot;},  {2016, &quot;10+9+8*7*6*5-4+321&quot;}, {2016, &quot;10*9*8+7+6*5*43-2+1&quot;}, {2016, &quot;10-9+8*7+654*3-2-1&quot;}, {2016, &quot;10*9-8-7+654*3-21&quot;}, {2016, &quot;10+9*8-7+654*3-21&quot;},  {2016, &quot;10+9+8*7+654*3-21&quot;}, {2016, &quot;10*98/7/6/5*432*1&quot;}, {2016, &quot;10*98/7/6/5*432/1&quot;}, {2016, &quot;109-8*7+654*3+2-1&quot;}, {2016, &quot;109+87+65*4/3*21&quot;} }" title="{  {2012, &quot;10*9*8+7+6-5+4*321&quot;}, {2012, &quot;10+9*87-65+4*321&quot;}, {2012, &quot;109-8*7+654*3-2-1&quot;}, {2013, &quot;10*9*8*7/6/5*4*3-2-1&quot;}, {2013, &quot;10*98/7*6/5*4*3-2-1&quot;}, {2013, &quot;109-8*7+654*3-2*1&quot;}, {2013, &quot;109-8*7+654*3-2/1&quot;}, {2014, &quot;10*9*8*7/6/5*4*3-2*1&quot;},  {2014, &quot;10*9*8*7/6/5*4*3-2/1&quot;},  {2014, &quot;10*9*8+7+6*5*43-2-1&quot;}, {2014, &quot;10*98/7*6/5*4*3-2*1&quot;}, {2014, &quot;10*98/7*6/5*4*3-2/1&quot;}, {2014, &quot;109-8*7+654*3-2+1&quot;}, {2015, &quot;10*9*8*7/6/5*4*3-2+1&quot;}, {2015, &quot;10*9*8+7+6*5*43-2*1&quot;}, {2015, &quot;10*9*8+7+6*5*43-2/1&quot;}, {2015, &quot;10*98/7*6/5*4*3-2+1&quot;}, {2015, &quot;10*98/7/6/5*432-1&quot;}, {2016, &quot;10+9+8*7*6*5-4+321&quot;}, {2016, &quot;10*9*8+7+6*5*43-2+1&quot;}, {2016, &quot;10-9+8*7+654*3-2-1&quot;}, {2016, &quot;10*9-8-7+654*3-21&quot;}, {2016, &quot;10+9*8-7+654*3-21&quot;}, {2016, &quot;10+9+8*7+654*3-21&quot;}, {2016, &quot;10*98/7/6/5*432*1&quot;}, {2016, &quot;10*98/7/6/5*432/1&quot;}, {2016, &quot;109-8*7+654*3+2-1&quot;}, {2016, &quot;109+87+65*4/3*21&quot;} }" width="224" height="507" style="border:0px" class="alignleft size-full wp-image-9647" /></p>
<p>It turns out that if you have enough numbers in the sequence, you can express any year with some combination of operators. Ten numbers is just about the sweet spot. With 9-expressions, you get only 79% of the next 100 years. With 10-expressions you get 99%. 11-expressions go way overboard, giving an average of 51 different ways to express each year.</p>
<p>There&#8217;s nothing special about the sequence 10, 9, &#8230;, 1. The sequence 1, 2, &#8230;, 9 works, too (in 6 different ways):</p>
<p><img src="http://blog.wolfram.com/data/uploads/2012/02/Happy2012-In8.png" alt="ShowNExpressions[ToString /@ Range[9], ops, {2012, 2012}]" title="ShowNExpressions[ToString /@ Range[9], ops, {2012, 2012}]" width="435" height="17" style="border:0px" class="alignleft size-full wp-image-9649" /></p>
<p><img src="http://blog.wolfram.com/data/uploads/2012/02/Happy2012-Out8.png" alt="{{2012, &quot;1-2-3+4*567*8/9&quot;}, {2012, &quot;1+2/3*45*67-8+9&quot;}, {2012, &quot;1+2345*6/7-8+9&quot;}, {2012, &quot;12+34*56+7+89&quot;}, {2012, &quot;123+45*6*7+8-9&quot;}, {2012, &quot;1234-5-6+789&quot;}}" title="{{2012, &quot;1-2-3+4*567*8/9&quot;}, {2012, &quot;1+2/3*45*67-8+9&quot;}, {2012, &quot;1+2345*6/7-8+9&quot;}, {2012, &quot;12+34*56+7+89&quot;}, {2012, &quot;123+45*6*7+8-9&quot;}, {2012, &quot;1234-5-6+789&quot;}}" width="193" height="97" style="border:0px" class="alignleft size-full wp-image-9650" /></p>
<p>My colleague Ed Pegg explored this variation when he was playing with a draft of this post. He sent the last of those expressions to National Public Radio Puzzlemaster Will Shortz, who used it as the <a href="http://www.npr.org/2012/01/29/146034893/this-puzzle-is-the-pits" target="_blank">January 29 Sunday Puzzle</a> (sorry, the deadline for solutions has passed!).</p>
<p>Other number sequences work as well. You can express 2012 using the first 9 digits of <i>&#960;</i> (2 ways):</p>
<p><img src="http://blog.wolfram.com/data/uploads/2012/02/Happy2012-Example1.png" alt="{ {2012, &quot;3*141*5-9*2*6+5&quot;}, {2012, &quot;3*141*5-92-6-5&quot;} }" title="{ {2012, &quot;3*141*5-9*2*6+5&quot;}, {2012, &quot;3*141*5-92-6-5&quot;} }" width="144" height="27" style="border:0px" class="alignleft size-full wp-image-9651" /></p>
<p>And the first 9 Fibonacci numbers (3 ways):</p>
<p><img src="http://blog.wolfram.com/data/uploads/2012/02/Happy2012-Example-2.png" alt="{ {2012, &quot;1-1-23+5-8*13+2134&quot;}, {2012, &quot;1-123-5-8+13+2134&quot;}, {2012, &quot;1-123+5+8-13+2134&quot;} }" title="{ {2012, &quot;1-1-23+5-8*13+2134&quot;}, {2012, &quot;1-123-5-8+13+2134&quot;}, {2012, &quot;1-123+5+8-13+2134&quot;} }" width="165" height="43" style="border:0px" class="alignleft size-full wp-image-9665" /></p>
<p>My telephone number works, and it&#8217;s likely that yours does, too, if it doesn&#8217;t contain too many zeros.</p>
<p>I found another pleasant surprise in the operator patterns of different expressions for the same year. Take, for example, 2040.</p>
<p><img src="http://blog.wolfram.com/data/uploads/2012/02/Happy2012-Example3.png" alt="{ {2040, &quot;10*9-8-7+654*3+2+1&quot;}, {2040, &quot;10+9*8-7+654*3+2+1&quot;}, {2040, &quot;10+9+8*7+654*3+2+1&quot;}, {2040, &quot;10-9+8*7+654*3+21&quot;}, {2040, &quot;10*98*7*6/5/4+3-21&quot;} }" title="{ {2040, &quot;10*9-8-7+654*3+2+1&quot;}, {2040, &quot;10+9*8-7+654*3+2+1&quot;}, {2040, &quot;10+9+8*7+654*3+2+1&quot;}, {2040, &quot;10-9+8*7+654*3+21&quot;}, {2040, &quot;10*98*7*6/5/4+3-21&quot;} }" width="167" height="76" style="border:0px" class="alignleft size-full wp-image-9653" /></p>
<p>The first three expressions for that year have the same &#8220;+654*3+2+1&#8243; suffix, which means that their prefixes all express the same number. But there&#8217;s a curious pattern there, where multiplication marches right, gobbling up minuses and depositing pluses in its wake. Is it a fluke, or is there something general going on?</p>
<p>I calculated that pattern for 10-expressions and saw that regardless of the position of the multiplication, you do indeed get the same number:</p>
<p><img src="http://blog.wolfram.com/data/uploads/2012/02/Happy2012-In9.png" alt="Grid[MakeNExpression[numbers, #] &amp; /@  Table[Join[Table[&quot;+&quot;, {i - 1}], {&quot;*&quot;}, Table[&quot;-&quot;, {9 - i}]], {i, 1, 9}]]" title="Grid[MakeNExpression[numbers, #] &amp; /@  Table[Join[Table[&quot;+&quot;, {i - 1}], {&quot;*&quot;}, Table[&quot;-&quot;, {9 - i}]], {i, 1, 9}]]" width="459" height="47" style="border:0px" class="alignleft size-full wp-image-9654" /></p>
<p><img src="http://blog.wolfram.com/data/uploads/2012/02/Happy2012-Out9.png" alt="{ {54, &quot;10*9-8-7-6-5-4-3-2-1&quot;}, {54, &quot;10+9*8-7-6-5-4-3-2-1&quot;}, {54, &quot;10+9+8*7-6-5-4-3-2-1&quot;}, {54, &quot;10+9+8+7*6-5-4-3-2-1&quot;}, {54, &quot;10+9+8+7+6*5-4-3-2-1&quot;}, {54, &quot;10+9+8+7+6+5*4-3-2-1&quot;}, {54, &quot;10+9+8+7+6+5+4*3-2-1&quot;}, {54, &quot;10+9+8+7+6+5+4+3*2-1&quot;}, {54, &quot;10+9+8+7+6+5+4+3+2*1&quot;} }" title="{ {54, &quot;10*9-8-7-6-5-4-3-2-1&quot;}, {54, &quot;10+9*8-7-6-5-4-3-2-1&quot;}, {54, &quot;10+9+8*7-6-5-4-3-2-1&quot;}, {54, &quot;10+9+8+7*6-5-4-3-2-1&quot;}, {54, &quot;10+9+8+7+6*5-4-3-2-1&quot;}, {54, &quot;10+9+8+7+6+5*4-3-2-1&quot;}, {54, &quot;10+9+8+7+6+5+4*3-2-1&quot;}, {54, &quot;10+9+8+7+6+5+4+3*2-1&quot;}, {54, &quot;10+9+8+7+6+5+4+3+2*1&quot;} }" width="209" height="146" style="border:0px" class="alignleft size-full wp-image-9655" /></p>
<p>That, of course, doesn&#8217;t show that it always works that way, but we can ask <i>Mathematica</i> to prove the general case. This expression gives the value expressed by the sequential integers <i>m</i> to <i>n</i> with multiplication in position <i>p</i>. The simplified result does not contain <i>p</i>, which shows that the value does not depend on the position of the multiplication, regardless of the number sequence.</p>
<p><img src="http://blog.wolfram.com/data/uploads/2012/02/Happy2012-In10.png" alt="Expression giving the value expressed by the sequential integers m to n with multiplication in position p" title="Expression giving the value expressed by the sequential integers m to n with multiplication in position p" width="305" height="46" style="border:0px" class="alignleft size-full wp-image-9656" /></p>
<p><img src="http://blog.wolfram.com/data/uploads/2012/02/Happy2012-Out10.png" alt="1/2 (-2 - m + m^2 + n + n^2)" title="1/2 (-2 - m + m^2 + n + n^2)" width="178" height="35" style="border:0px" class="alignleft size-full wp-image-9657" /></p>
<p>In an age when natural resources are growing ever more scarce, computing resources are growing ever more abundant. The extravagantly wasteful computation above—calculating nearly two million numbers in order to filter out the few hundred I was interested in—took 48 seconds on my laptop. It would have taken many weeks on the university mainframe computer when I was an undergraduate. The very fact that I could be extravagant—and didn&#8217;t have to spend any time trying to be clever or efficient—meant that I could explore and discover new things. Hans Havermann knew this already: it&#8217;s abundant computing that makes these rare jewels as common as dirt.</p>
<p><a href="http://blog.wolfram.com/data/uploads/2012/02/Happy2012_Blog.nb" target="_self">Download this post as a <i>Mathematica</i> notebook</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.wolfram.com/2012/02/02/happy-109876-54321/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>C and a Box of Chocolates: Video Presentations from the Wolfram Technology Conference 2011</title>
		<link>http://blog.wolfram.com/2012/01/25/c-and-a-box-of-chocolates-video-presentations-from-the-wolfram-technology-conference-2011/</link>
		<comments>http://blog.wolfram.com/2012/01/25/c-and-a-box-of-chocolates-video-presentations-from-the-wolfram-technology-conference-2011/#comments</comments>
		<pubDate>Wed, 25 Jan 2012 16:55:18 +0000</pubDate>
		<dc:creator>Wolfram Blog Team</dc:creator>
				<category><![CDATA[Wolfram News]]></category>

		<guid isPermaLink="false">http://blog.internal.wolfram.com/?p=9610</guid>
		<description><![CDATA[Tips for analyzing your social networks with Mathematica, workshops for publishing with CDF, real-world solutions for your financial applications—these are just a few of the many highlights from the Wolfram Technology Conference 2011.
If you missed a talk or weren&#8217;t able to attend, we&#8217;ve now made videos of select presentations available on the Presentations and Talks [...]]]></description>
			<content:encoded><![CDATA[<p>Tips for analyzing your social networks with <i>Mathematica</i>, workshops for publishing with CDF, real-world solutions for your financial applications—these are just a few of the many highlights from the <a href="http://www.wolfram.com/events/technology-conference/2011/" target="_self">Wolfram Technology Conference 2011</a>.</p>
<p>If you missed a talk or weren&#8217;t able to attend, we&#8217;ve now made <a href="http://www.wolfram.com/events/technology-conference/2011/videos.html" target="_self">videos of select presentations</a> available on the <a href="http://www.wolfram.com/events/technology-conference/2011/presentations.html" target="_self">Presentations and Talks</a> section of the conference website.<span id="more-9610"></span></p>
<p>Learn how and when to use new <I>Mathematica</i> 8 features for C language integration in this video presentation by Todd Gayley, Wolfram&#8217;s Director of Java Technology, and Joel Klein, a Wolfram Kernel Developer: </p>
<p><iframe width="500" height="284" src="http://www.youtube.com/embed/QA-hNq5UlcA?rel=0" frameborder="0" allowfullscreen></iframe> </p>
<p>And check out why Yves Klett of the Institute of Aircraft Design and the University of Stuttgart, Germany, calls <i>Mathematica</i> &#8220;An Engineer&#8217;s Box of Chocolates&#8221;:</p>
<p><iframe width="500" height="284" src="http://www.youtube.com/embed/Cb0CH60AIfM?rel=0" frameborder="0" allowfullscreen></iframe></p>
<p>Attending the conference gets you access to even more in-depth talks and interactive sessions as well as an inside look at emerging Wolfram technologies. Save the date for the Wolfram Technology Conference 2012 taking place October 17–19 in Champaign, Illinois. </p>
]]></content:encoded>
			<wfw:commentRss>http://blog.wolfram.com/2012/01/25/c-and-a-box-of-chocolates-video-presentations-from-the-wolfram-technology-conference-2011/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The Wolfram Education Portal Is Here!</title>
		<link>http://blog.wolfram.com/2012/01/18/the-wolfram-education-portal-is-here/</link>
		<comments>http://blog.wolfram.com/2012/01/18/the-wolfram-education-portal-is-here/#comments</comments>
		<pubDate>Wed, 18 Jan 2012 23:50:40 +0000</pubDate>
		<dc:creator>Wolfram Blog Team</dc:creator>
				<category><![CDATA[Education]]></category>

		<guid isPermaLink="false">http://blog.internal.wolfram.com/?p=9148</guid>
		<description><![CDATA[
Teachers, are you looking for a new way to integrate technology into your classroom? How about through a dynamic textbook or pre-generated lesson plans? Students, are you looking for some extra help or practice in your classes? How about using interactive demonstrations and widgets to help understand the concepts you are learning? The Wolfram Education [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://blog.wolfram.com/data/uploads/2012/01/WA-blog_mainimage.png" alt="Wolfram Education Portal (Beta)" title="Wolfram Education Portal (Beta)" width="500" height="77" style="border:0px" class="aligncenter size-full wp-image-9264" /></p>
<p>Teachers, are you looking for a new way to integrate technology into your classroom? How about through a dynamic textbook or pre-generated lesson plans? Students, are you looking for some extra help or practice in your classes? How about using interactive demonstrations and widgets to help understand the concepts you are learning? The <a href="http://education.wolfram.com/" target="_self">Wolfram Education Portal</a> is the answer for students and teachers alike!</p>
<p>We are happy to announce the launch of the free Beta version of the Wolfram Education Portal. The portal comes equipped with a dynamic and interactive textbook, lesson plans aligned to the common core standards, and many other supplemental materials for your courses, including Wolfram Demonstrations, widgets, and videos. The Education Portal currently contains full materials for Algebra and partial materials for Calculus, but will continue to grow and improve with your comments and feedback.<span id="more-9148"></span></p>
<p>We developed the interactive textbook by working with the <a href="http://www.ck12.org/flexbook/" target="_blank">CK-12 Foundation</a>, a non-profit organization with the mission to produce free and open source K-12 materials aligned to state curriculum standards and customized to meet student and teacher needs. The available <i>Algebra</i> textbook takes CK-12&#8217;s Algebra I FlexBook and makes it dynamic with our technologies.</p>
<p>In the future we hope to add many cool and exciting features for teachers and students to explore, including community features, problem generators, web-based course apps, and the ability to create your very own personalized content!</p>
<p>The Wolfram Education Portal was built with the technology from <a href="http://www.wolfram.com/mathematica" target="_self"><em>Mathematica</em></a>, and <a href="http://www.wolframalpha.com" target="_self">Wolfram|Alpha</a>, and the <a href="http://www.wolfram.com/cdf" target="_self">Computable Document Format (CDF)</a>. Please take a minute to check out the education portal in its beta phase and let us know how we can make it better suit your needs.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.wolfram.com/2012/01/18/the-wolfram-education-portal-is-here/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>The Longest Word Ladder Puzzle Ever</title>
		<link>http://blog.wolfram.com/2012/01/11/the-longest-word-ladder-puzzle-ever/</link>
		<comments>http://blog.wolfram.com/2012/01/11/the-longest-word-ladder-puzzle-ever/#comments</comments>
		<pubDate>Wed, 11 Jan 2012 16:20:43 +0000</pubDate>
		<dc:creator>Jon McLoone</dc:creator>
				<category><![CDATA[Recreational Computation]]></category>

		<guid isPermaLink="false">http://blog.internal.wolfram.com/?p=9176</guid>
		<description><![CDATA[UPDATE: The solution to the puzzle and more comments from Jon have been added at the bottom of the post.
On the long flight to the recent Wolfram Technology Conference, I ended up on the puzzle page of a newspaper. My attention was drawn to a word ladder puzzle, where you must fill in a sequence [...]]]></description>
			<content:encoded><![CDATA[<p><b><i>UPDATE: The solution to the puzzle and more comments from Jon have been added at the bottom of the post.</b></i></p>
<p>On the long flight to the recent <a href="http://www.wolfram.com/events/technology-conference/2011/" target="_self">Wolfram Technology Conference</a>, I ended up on the puzzle page of a newspaper. My attention was drawn to a <a href="http://en.wikipedia.org/wiki/Word_ladder" target="_blank">word ladder</a> puzzle, where you must fill in a sequence of words from clues, but each word differs from the previous by only a single letter. Here, for example, is a simple puzzle already solved:</p>
<table border="1" bordercolor="#000000" style="background-color:#FFFFFF" width="100%" cellpadding="3" cellspacing="0">
<tr>
<td WIDTH="15%">best</td>
<td>from a position of superiority or authority</td>
</tr>
<tr>
<td WIDTH="15%">bast</td>
<td>strong woody fibers obtained especially from the phloem of<br /> from various plants</td>
</tr>
<tr>
<td WIDTH="15%">bash</td>
<td>a vigorous blow</td>
</tr>
<tr>
<td WIDTH="15%">bath</td>
<td>a vessel containing liquid in which something is immersed<br /> (as to process it or to maintain it at a constant temperature or to lubricate it)</td>
</tr>
<tr>
<td WIDTH="15%">math</td>
<td>a science (or group of related sciences) dealing with the logic<br /> of quantity and shape and arrangement</td>
</tr>
</table>
<p></p>
<p>I wasn&#8217;t going to do a blog entry on this, as it is a very similar task to my &#8220;<a href="http://blog.wolfram.com/2011/03/17/the-distance-between-zero-and-hero-exploring-synonym-chains-with-mathematica/" target="_self">Exploring Synonym Chains</a>&#8221; post that I wrote some time ago, but that changed with a chance conversation at the (excellent) Technology Conference. Proving that one never stops learning, Charles Pooh, one of our graph theory developers, pointed out to me that my synonyms item could have been done much better. I had broken one of the very rules that I wrote about in my &#8220;<a href="http://blog.wolfram.com/2011/12/07/10-tips-for-writing-fast-mathematica-code/" target="_self">10 Tips for Fast <i>Mathematica</i> Code</a>&#8221; entry—&#8221;Use built-in functions.&#8221; I had effectively re-implemented the built-in <i>Mathematica</i> commands <a href="http://reference.wolfram.com/mathematica/ref/GraphPeriphery.html" target="_self"><tt>GraphPeriphery</tt></a> and <a href="http://reference.wolfram.com/mathematica/ref/GraphDiameter.html" target="_self"><tt>GraphDiameter</tt></a>.</p>
<p>So, armed with these two new functions, let&#8217;s find the longest word ladder puzzle that can be made using <i>Mathematica</i>&#8217;s English dictionary.<span id="more-9176"></span></p>
<p>Some word ladder puzzles allow you to add or remove letters, but I am going to look only at the version where all words are the same length. Knowing that there can be no connections between different lengths means that we can be more efficient by considering each word length separately. So I start by generating dictionaries of words of specific lengths. Because I intend to use the words&#8217; definitions as my clues, I will only look at words where I know at least one definition for the word, and I will also exclude words that contain non-letters or capitals (e.g. hyphenated words and proper names). The function caches its result, as we only want to do this once:</p>
<p><img src="http://blog.wolfram.com/data/uploads/2012/01/WordLadders-In1.png" alt="nWords[n_] := nWords[n] = DeleteCases[Cases[WordData[], word_String /; (StringLength[word] === n &amp;&amp; StringMatchQ[word, RegularExpression[&quot;[a-z]+&quot;]] &amp;&amp; Length[WordData[word, &quot;Definitions&quot;]] &gt; 0)], &quot;-Redacted word-&quot;];" title="nWords[n_] := nWords[n] = DeleteCases[Cases[WordData[], word_String /; (StringLength[word] === n &amp;&amp; StringMatchQ[word, RegularExpression[&quot;[a-z]+&quot;]] &amp;&amp; Length[WordData[word, &quot;Definitions&quot;]] &gt; 0)], &quot;-Redacted word-&quot;];" width="458" height="123" style="border:0px" class="alignleft size-full wp-image-9191" /></p>
<p>Next we construct the graph of words that have an edit distance of one, that is, only a single letter difference. The conceptually simple way is&#8230;</p>
<p><img src="http://blog.wolfram.com/data/uploads/2012/01/WordLadders-In2.png" alt="wordLadderGraph[n_] := wordLadderGraph[n] = AdjacencyGraph[nWords[n], Outer[EditDistance, nWords[n], nWords[n]] /. p_Integer /; p =!= 1 &#8594; 0]" title="wordLadderGraph[n_] := wordLadderGraph[n] = AdjacencyGraph[nWords[n], Outer[EditDistance, nWords[n], nWords[n]] /. p_Integer /; p =!= 1 &#8594; 0]" width="371" height="77" style="border:0px" class="alignleft size-full wp-image-9192" /></p>
<p>&#8230;but we are unnecessarily checking the edit distance in both directions, when we know it is symmetric. And we are also including &#8220;aloof&#8221; words (completely unconnected—so named by <a href="http://en.wikipedia.org/wiki/Donald_Knuth" target="_blank">Donald Knuth</a> because &#8220;aloof&#8221; is one of them). So this version, while more complicated, is faster and yields simpler graphs:</p>
<p><img src="http://blog.wolfram.com/data/uploads/2012/01/WordLadders-In3.png" alt="wordLadderGraph[n_] := wordLadderGraph[n] = Graph@Flatten@ Last@Reap@ Do[If[EditDistance[nWords[n][[a]], nWords[n][[b]]] == 1, Sow[nWords[n][[a]] &#8596; nWords[n][[b]]]], {a, 2, Length[nWords[n]]}, {b, 1, a - 1}];" title="wordLadderGraph[n_] := wordLadderGraph[n] = Graph@Flatten@ Last@Reap@ Do[If[EditDistance[nWords[n][[a]], nWords[n][[b]]] == 1, Sow[nWords[n][[a]] &#8596; nWords[n][[b]]]], {a, 2, Length[nWords[n]]}, {b, 1, a - 1}];" width="462" height="138" style="border:0px" class="alignleft size-full wp-image-9193" /></p>
<p>Knuth studied word ladders with five letters and observed that most five-letter words can be connected. We can easily replicate this observation:</p>
<p><img src="http://blog.wolfram.com/data/uploads/2012/01/WordLadders-In4.png" alt="wordLadderGraph[5]" title="wordLadderGraph[5]" width="174" height="16" style="border:0px" class="alignleft size-full wp-image-9194" /></p>
<p><img src="http://blog.wolfram.com/data/uploads/2012/01/WordLadders-Out4.png" alt="Graph of words with five letters" title="Graph of words with five letters" width="470" height="419" style="border:0px" class="alignleft size-full wp-image-9195" /></p>
<p>We can count the five-letter aloof words:</p>
<p><img src="http://blog.wolfram.com/data/uploads/2012/01/WordLadders-In5.png" alt="Length[Complement[nWords[5], VertexList[wordLadderGraph[5]]]]" title="Length[Complement[nWords[5], VertexList[wordLadderGraph[5]]]]" width="289" height="31" style="border:0px" class="alignleft size-full wp-image-9197" /></p>
<p><img src="http://blog.wolfram.com/data/uploads/2012/01/WordLadders-Out5.png" alt="817" title="817" width="65" height="15" style="border:0px" class="alignleft size-full wp-image-9198" /></p>
<p>Apparently, Knuth couldn&#8217;t tackle the six-letter words at the time, as it was too difficult. But we will analyze all the way up to 23-letter words. It turns out that the disconnectedness increases with word length. Here, for example, is the graph for six letters:</p>
<p><img src="http://blog.wolfram.com/data/uploads/2012/01/WordLadders-In6.png" alt="wordLadderGraph[6]" title="wordLadderGraph[6]" width="172" height="18" style="border:0px" class="alignleft size-full wp-image-9199" /></p>
<p><img src="http://blog.wolfram.com/data/uploads/2012/01/WordLadders-Out6.png" alt="Graph for six-letter words" title="Graph for six-letter words" width="473" height="433" style="border:0px" class="alignleft size-full wp-image-9200" /></p>
<p>The number of aloof words also goes up to 2,756 in the graph for six letters.</p>
<p>You can make incredibly long ladders, but ones that behave like bat &#8594; cat &#8594; fat &#8594; hat are rather annoying, because you can get directly from &#8220;bat&#8221; to &#8220;hat&#8221; without going through the other steps. So I am going to assert that the only good word ladders follow the shortest path of valid words. This view is supported, I think, by <a href="http://en.wikipedia.org/wiki/Lewis_Carroll" target="_blank">Charles Dodgson</a> (Lewis Carroll), who claimed to have invented word ladders. He did work on the shortest paths in word ladders, including the result that the shortest evolution from &#8220;ape&#8221; to &#8220;man&#8221; was six steps. Either because I have a more modern set of words, or because Dodgson needed <i>Mathematica</i>, I make it five steps:</p>
<p><img src="http://blog.wolfram.com/data/uploads/2012/01/WordLadders-In7.png" alt="FindShortestPath[wordLadderGraph[3], ape, man]" title="FindShortestPath[wordLadderGraph[3], ape, man]" width="396" height="18" style="border:0px" class="alignleft size-full wp-image-9201" /></p>
<p><img src="http://blog.wolfram.com/data/uploads/2012/01/WordLadders-Out7.png" alt="{ape, apt, opt, oat, mat, man}" title="{ape, apt, opt, oat, mat, man}" width="245" height="16" style="border:0px" class="alignleft size-full wp-image-9202" /></p>
<p>Using the looser definition of &#8220;no two consecutive steps may change the same letter,&#8221; <i>Games Magazine</i> held a competition in 1993 to find the longest word ladders, and its readers managed 26 steps. But we can do better then that. </p>
<p>We need to find which connected subgraph of which word length has the longest shortest distance between any two of its words. That&#8217;s a tough sentence to parse, but the concept is summed up in one of the two commands that Charles Pooh told me about: <tt>GraphDiameter</tt>.</p>
<p><img src="http://blog.wolfram.com/data/uploads/2012/01/WordLadders-In8.png" alt="diameters = ParallelTable[GraphDiameter[Subgraph[wordLadderGraph[i], #]] &amp; /@ ConnectedComponents[wordLadderGraph[i]], {i, 23}];" title="diameters = ParallelTable[GraphDiameter[Subgraph[wordLadderGraph[i], #]] &amp; /@ ConnectedComponents[wordLadderGraph[i]], {i, 23}];" width="425" height="61" style="border:0px" class="alignleft size-full wp-image-9203" /></p>
<p>There is quite a lot of searching to do, but parallelizing it makes it take under 15 minutes on my laptop. We discover that the longest shortest word ladder is 49 words long:</p>
<p><img src="http://blog.wolfram.com/data/uploads/2012/01/WordLadders-In9.png" alt="Max[diameters]" title="Max[diameters]" width="144" height="17" style="border:0px" class="alignleft size-full wp-image-9204" /></p>
<p><img src="http://blog.wolfram.com/data/uploads/2012/01/WordLadders-Out9.png" alt="49" title="49" width="61" height="16" style="border:0px" class="alignleft size-full wp-image-9205" /></p>
<p>Because I kept the structure of the data as I generated it, the position of that value will tell me the word length and subgraph number that contains our prize.</p>
<p><img src="http://blog.wolfram.com/data/uploads/2012/01/WordLadders-In10.png" alt="Position[diameters, 49]" title="Position[diameters, 49]" width="207" height="17" style="border:0px" class="alignleft size-full wp-image-9206" /></p>
<p><img src="http://blog.wolfram.com/data/uploads/2012/01/WordLadders-Out10.png" alt="{{6, 23}}" title="{{6, 23}}" width="103" height="15" style="border:0px" class="alignleft size-full wp-image-9207" /></p>
<p>This turns out to be the main cluster of connected six-letter words.</p>
<p><img src="http://blog.wolfram.com/data/uploads/2012/01/WordLadders-In11.png" alt="bestGraph = Subgraph[wordLadderGraph[6], ConnectedComponents[wordLadderGraph[6]][[23]]]" title="bestGraph = Subgraph[wordLadderGraph[6], ConnectedComponents[wordLadderGraph[6]][[23]]]" width="388" height="35" style="border:0px" class="alignleft size-full wp-image-9208" /></p>
<p><img src="http://blog.wolfram.com/data/uploads/2012/01/WordLadders-Out11.png" alt="Graph of the main cluster of connected six-letter words" title="Graph of the main cluster of connected six-letter words" width="465" height="272" style="border:0px" class="alignleft size-full wp-image-9210" /></p>
<p>Now we use the other command that Charles introduced me to. <tt>GraphPeriphery</tt> finds those vertices that are at the maximal distance from each other.</p>
<p><img src="http://blog.wolfram.com/data/uploads/2012/01/WordLadders-In12.png" alt="GraphPeriphery[bestGraph]" title="GraphPeriphery[bestGraph]" width="224" height="17" style="border:0px" class="alignleft size-full wp-image-9211" /></p>
<p><img src="http://blog.wolfram.com/data/uploads/2012/01/WordLadders-Out12.png" alt="{charge, comedo}" title="{charge, comedo}" width="155" height="19" style="border:0px" class="alignleft size-full wp-image-9212" /></p>
<p>Luckily, we get two results. This means that they must be at either end of the word ladder. If we had more, we would have to figure out which element paired with which to produce the maximal path lengths. The next step is to generate the path:</p>
<p><img src="http://blog.wolfram.com/data/uploads/2012/01/WordLadders-In13.png" alt="puzzle = FindShortestPath[bestGraph, &quot;charge&quot;, &quot;comedo&quot;]" title="puzzle = FindShortestPath[bestGraph, &quot;charge&quot;, &quot;comedo&quot;]" width="433" height="18" style="border:0px" class="alignleft size-full wp-image-9216" /></p>
<p>I am not going to show you the result as that would ruin the puzzle, but here it is highlighted on the graph:</p>
<p><img src="http://blog.wolfram.com/data/uploads/2012/01/WordLadders-In14.png" alt="HighlightGraph[bestGraph, PathGraph[puzzle], GraphHighlightStyle &#8594; &quot;Thick&quot;]" title="HighlightGraph[bestGraph, PathGraph[puzzle], GraphHighlightStyle &#8594; &quot;Thick&quot;]" width="357" height="34" style="border:0px" class="alignleft size-full wp-image-9217" /></p>
<p><img src="http://blog.wolfram.com/data/uploads/2012/01/WordLadders-Out14.png" alt="Graph highlighting the shortest path to solve the puzzle" title="Graph highlighting the shortest path to solve the puzzle" width="469" height="216" style="border:0px" class="alignleft size-full wp-image-9218" /></p>
<p>We now have to make the clues. I will use the built-in <a href="http://reference.wolfram.com/mathematica/ref/WordData.html" target="_self"><tt>WordData</tt></a> definitions, picking one of them at random. Since lots of words have multiple meanings, you get a slightly different puzzle each time.</p>
<p>Before the result, an admission of cheating and a warning: unfortunately, the solution that this code finds turns out to contain a rather adult-themed word and clue. In an effort to keep the Wolfram Blog family-friendly, I manually removed the word from the dictionary (the redacted word in the first line of code). Run the code for yourself if you want the adult version. Of course, the whole result is dependent on the dictionary you use anyway, though larger dictionaries do not necessarily lead to longer word ladders, since they also increase connectedness.</p>
<p>Here is the family-friendly version; have fun:</p>
<p><img src="http://blog.wolfram.com/data/uploads/2012/01/WordLadders-In15.png" alt="Style[Grid[Transpose[{Join[{&quot;charge&quot;}, Table[&quot;&quot;, {48}], {&quot;comedo&quot;}], Map[RandomChoice[Last /@ WordData[#, &quot;Definitions&quot;]] &amp;, puzzle]}], Frame &#8594; All, Alignment &#8594; Left, ItemSize &#8594; {{6, 35}, Automatic}, FrameStyle &#8594; Gray], FontFamily &#8594; &quot;Georgia&quot;]" title="Style[Grid[Transpose[{Join[{&quot;charge&quot;}, Table[&quot;&quot;, {48}], {&quot;comedo&quot;}], Map[RandomChoice[Last /@ WordData[#, &quot;Definitions&quot;]] &amp;, puzzle]}], Frame &#8594; All, Alignment &#8594; Left, ItemSize &#8594; {{6, 35}, Automatic}, FrameStyle &#8594; Gray], FontFamily &#8594; &quot;Georgia&quot;]" width="456" height="106" style="border:0px" class="alignleft size-full wp-image-9219" /></p>
<table border="1" bordercolor="#000000" style="background-color:#FFFFFF" width="100%" cellpadding="3" cellspacing="0">
<tr>
<td WIDTH="15%">charge</td>
<td>a quantity of explosive to be set off at one time</td>
</tr>
<tr>
<td WIDTH="15%"></td>
<td>exchange or replace with another, usually of the same kind or category</td>
</tr>
<tr>
<td WIDTH="15%"></td>
<td>occurring or appearing or singled out by chance</td>
</tr>
<tr>
<td WIDTH="15%"></td>
<td>of uncertain outcome; especially fraught with risk</td>
</tr>
<tr>
<td WIDTH="15%"></td>
<td>a rhythmical work song originally sung by sailors</td>
</tr>
<tr>
<td WIDTH="15%"></td>
<td>small crude shelter used as a dwelling</td>
</tr>
<tr>
<td WIDTH="15%"></td>
<td>European scaleless blenny</td>
</tr>
<tr>
<td WIDTH="15%"></td>
<td>a simple version of hockey played by children on the streets (or on ice or on a field) using a ball or can as the puck</td>
</tr>
<tr>
<td WIDTH="15%"></td>
<td>the characteristic sounds made by a horse</td>
</tr>
<tr>
<td WIDTH="15%"></td>
<td>habitually complaining</td>
</tr>
<tr>
<td WIDTH="15%"></td>
<td>a person given to excessive complaints and crying and whining</td>
</tr>
<tr>
<td WIDTH="15%"></td>
<td>any of numerous small silvery North American cyprinid fishes especially of the genus Notropis</td>
</tr>
<tr>
<td WIDTH="15%"></td>
<td>shake, as from cold</td>
</tr>
<tr>
<td WIDTH="15%"></td>
<td>a razor powered by an electric motor</td>
</tr>
<tr>
<td WIDTH="15%"></td>
<td>someone who has or gives or receives a part or a share</td>
</tr>
<tr>
<td WIDTH="15%"></td>
<td>an effigy in the shape of a man to frighten birds away from seeds</td>
</tr>
<tr>
<td WIDTH="15%"></td>
<td>an electronic pulse counter used to count pulses that occur too rapidly to be recorded individually</td>
</tr>
<tr>
<td WIDTH="15%"></td>
<td>an official who affixes a seal to a document</td>
</tr>
<tr>
<td WIDTH="15%"></td>
<td>a person skilled in a particular type of therapy</td>
</tr>
<tr>
<td WIDTH="15%"></td>
<td>a machine that cuts the heads off grain and moves them into a wagon</td>
</tr>
<tr>
<td WIDTH="15%"></td>
<td>someone who reads proof in order to find errors and mark corrections</td>
</tr>
<tr>
<td WIDTH="15%"></td>
<td>give an interpretation or rendition of</td>
</tr>
<tr>
<td WIDTH="15%"></td>
<td>an owner of property who receives payment for its use by another person</td>
</tr>
<tr>
<td WIDTH="15%"></td>
<td>someone who rants and raves; speaks in a violent or loud manner</td>
</tr>
<tr>
<td WIDTH="15%"></td>
<td>an enlisted soldier who serves in the ranks of the armed forces</td>
</tr>
<tr>
<td WIDTH="15%"></td>
<td>desire strongly or persistently</td>
</tr>
<tr>
<td WIDTH="15%"></td>
<td>a programmer for whom computing is its own reward; may enjoy the challenge of breaking into other computers but does no harm</td>
</tr>
<tr>
<td WIDTH="15%"></td>
<td>small striped semiterrestrial eastern American squirrel with cheek pouches</td>
</tr>
<tr>
<td WIDTH="15%"></td>
<td>long slender feather on the necks of e.g. turkeys and pheasants</td>
</tr>
<tr>
<td WIDTH="15%"></td>
<td>challenge aggressively</td>
</tr>
<tr>
<td WIDTH="15%"></td>
<td>(paper making) a frame used to form paper pulp into sheets</td>
</tr>
<tr>
<td WIDTH="15%"></td>
<td>(statistics) any of nine points that divided a distribution of ranked scores into equal intervals where each interval contains one-tenth of the scores</td>
</tr>
<tr>
<td WIDTH="15%"></td>
<td>make dirty or spotty, as by exposure to air; also used metaphorically</td>
</tr>
<tr>
<td WIDTH="15%"></td>
<td>give a definition for the meaning of a word</td>
</tr>
<tr>
<td WIDTH="15%"></td>
<td>make more complex, intricate, or richer</td>
</tr>
<tr>
<td WIDTH="15%"></td>
<td>express discontent</td>
</tr>
<tr>
<td WIDTH="15%"></td>
<td>the act of despoiling a country in warfare</td>
</tr>
<tr>
<td WIDTH="15%"></td>
<td>a deep narrow steep-sided valley (especially one formed by running water)</td>
</tr>
<tr>
<td WIDTH="15%"></td>
<td>in a raving manner</td>
</tr>
<tr>
<td WIDTH="15%"></td>
<td>migratory</td>
</tr>
<tr>
<td WIDTH="15%"></td>
<td>capturing cattle or horses with a lasso</td>
</tr>
<tr>
<td WIDTH="15%"></td>
<td>brick that is laid sideways at the top of a wall</td>
</tr>
<tr>
<td WIDTH="15%"></td>
<td>of the relatively near future</td>
</tr>
<tr>
<td WIDTH="15%"></td>
<td>orienting or directing homeward or to a destination</td>
</tr>
<tr>
<td WIDTH="15%"></td>
<td>hulled corn with the bran and germ removed</td>
</tr>
<tr>
<td WIDTH="15%"></td>
<td>a sermon on a moral or religious topic</td>
</tr>
<tr>
<td WIDTH="15%"></td>
<td>having a feeling of home; cozy and comfortable</td>
</tr>
<tr>
<td WIDTH="15%"></td>
<td>according with custom or propriety</td>
</tr>
<tr>
<td WIDTH="15%"></td>
<td>light and humorous drama with a happy ending</td>
</tr>
<tr>
<td WIDTH="15%">comedo</td>
<td>a black-tipped plug clogging a pore of the skin</td>
</tr>
</table>
<p></p>
<p>If you want printable versions, here are <a href="http://blog.wolfram.com/data/uploads/2012/01/WordLadderPuzzle.cdf" target="_blank">CDF</a> and <a href="http://blog.wolfram.com/data/uploads/2012/01/WordLadderPuzzle.pdf" target="_blank">PDF</a> versions of the table.</p>
<p>I will post the solution to the puzzle in the comments section of the Wolfram Blog in a couple of weeks.</p>
<p><a href="http://blog.wolfram.com/data/uploads/2012/01/LongestWordLadderPuzzleEver.cdf" target="_blank">Download this post as a Computable Document Format (CDF) file</a>.</p>
<hr /></p>
<p><b><i>Update:</b></i></p>
<p>The solution to the generated puzzle is:</p>
<p>{&#8221;charge&#8221;, &#8220;change&#8221;, &#8220;chance&#8221;, &#8220;chancy&#8221;, &#8220;chanty&#8221;, &#8220;shanty&#8221;, &#8220;shanny&#8221;, &#8220;shinny&#8221;, &#8220;whinny&#8221;, &#8220;whiney&#8221;, &#8220;whiner&#8221;, &#8220;shiner&#8221;, &#8220;shiver&#8221;, &#8220;shaver&#8221;, &#8220;sharer&#8221;, &#8220;scarer&#8221;, &#8220;scaler&#8221;, &#8220;sealer&#8221;, &#8220;healer&#8221;, &#8220;header&#8221;, &#8220;reader&#8221;, &#8220;render&#8221;, &#8220;renter&#8221;, &#8220;ranter&#8221;, &#8220;ranker&#8221;, &#8220;hanker&#8221;, &#8220;hacker&#8221;, &#8220;hackee&#8221;, &#8220;hackle&#8221;, &#8220;heckle&#8221;, &#8220;deckle&#8221;, &#8220;decile&#8221;, &#8220;defile&#8221;, &#8220;define&#8221;, &#8220;refine&#8221;, &#8220;repine&#8221;, &#8220;rapine&#8221;, &#8220;ravine&#8221;, &#8220;raving&#8221;, &#8220;roving&#8221;, &#8220;roping&#8221;, &#8220;coping&#8221;, &#8220;coming&#8221;, &#8220;homing&#8221;, &#8220;hominy&#8221;, &#8220;homily&#8221;, &#8220;homely&#8221;, &#8220;comely&#8221;, &#8220;comedy&#8221;, &#8220;comedo&#8221;}</p>
<p>However, as some of the comments pointed out, the dictionary used for this lacked some obvious modified words such as plurals and verb conjugations. Dropping the requirement that we know definitions for the generated puzzle, and using a much larger dictionary, I have a revised result.</p>
<p><img src="http://blog.wolfram.com/data/uploads/2012/01/WordLadder-Edit-In1.png" alt="nWords[n_] := nWords[n] = Cases[Union[WordData[], DictionaryLookup[]], word_String /; (StringLength[word] === n &amp;&amp; StringMatchQ[word, RegularExpression[&quot;[a-z]+&quot;]])]" title="nWords[n_] := nWords[n] = Cases[Union[WordData[], DictionaryLookup[]], word_String /; (StringLength[word] === n &amp;&amp; StringMatchQ[word, RegularExpression[&quot;[a-z]+&quot;]])]" width="445" height="80" style="border:0px" class="alignleft size-full wp-image-9384" /></p>
<p>The larger dictionary provides greater connectivity, so the largest minimal word ladder is a little shorter at 46 words, and interestingly occurs in the seven-letter words.</p>
<p>{&#8221;gimlets&#8221;, &#8220;giblets&#8221;, &#8220;gibbets&#8221;, &#8220;gibbers&#8221;, &#8220;libbers&#8221;, &#8220;limbers&#8221;, &#8220;lumbers&#8221;, &#8220;cumbers&#8221;, &#8220;cambers&#8221;, &#8220;campers&#8221;, &#8220;carpers&#8221;, &#8220;carters&#8221;, &#8220;barters&#8221;, &#8220;batters&#8221;, &#8220;butters&#8221;, &#8220;putters&#8221;, &#8220;puttees&#8221;, &#8220;putties&#8221;, &#8220;patties&#8221;, &#8220;parties&#8221;, &#8220;parries&#8221;, &#8220;carries&#8221;, &#8220;carrier&#8221;, &#8220;currier&#8221;, &#8220;curlier&#8221;, &#8220;burlier&#8221;, &#8220;bullier&#8221;, &#8220;bullies&#8221;, &#8220;bellies&#8221;, &#8220;jellies&#8221;, &#8220;jollies&#8221;, &#8220;collies&#8221;, &#8220;collins&#8221;, &#8220;colling&#8221;, &#8220;coaling&#8221;, &#8220;coaming&#8221;, &#8220;foaming&#8221;, &#8220;flaming&#8221;, &#8220;flaking&#8221;, &#8220;fluking&#8221;, &#8220;fluxing&#8221;, &#8220;flexing&#8221;, &#8220;fleeing&#8221;, &#8220;freeing&#8221;, &#8220;treeing&#8221;, &#8220;theeing&#8221;}</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.wolfram.com/2012/01/11/the-longest-word-ladder-puzzle-ever/feed/</wfw:commentRss>
		<slash:comments>17</slash:comments>
		</item>
		<item>
		<title>Deliver Professional Applications with Wolfram Player Pro</title>
		<link>http://blog.wolfram.com/2012/01/06/deliver-professional-applications-with-wolfram-player-pro/</link>
		<comments>http://blog.wolfram.com/2012/01/06/deliver-professional-applications-with-wolfram-player-pro/#comments</comments>
		<pubDate>Fri, 06 Jan 2012 17:31:38 +0000</pubDate>
		<dc:creator>Bradley Harden</dc:creator>
				<category><![CDATA[Wolfram News]]></category>

		<guid isPermaLink="false">http://blog.internal.wolfram.com/?p=9154</guid>
		<description><![CDATA[Does this scenario sound familiar? You&#8217;ve created a real-time analytics interface for your internal data in Mathematica and you want to share it with your colleagues. But they don&#8217;t have, or typically need, Mathematica.
You aren&#8217;t alone. Many of our users have approached me with similar concerns. That&#8217;s why we created Wolfram Player Pro—the professional platform [...]]]></description>
			<content:encoded><![CDATA[<p>Does this scenario sound familiar? You&#8217;ve created a real-time analytics interface for your internal data in <a href="http://www.wolfram.com/mathematica" target="_self"><i>Mathematica</i></a> and you want to share it with your colleagues. But they don&#8217;t have, or typically need, <i>Mathematica</i>.</p>
<p>You aren&#8217;t alone. Many of our users have approached me with similar concerns. That&#8217;s why we created <a href="http://www.wolfram.com/player-pro/" target="_self">Wolfram <i>Player Pro</i></a>—the professional platform for running interactive applications based on Wolfram technology. </p>
<p><i>Player Pro</i> is a high-level deployment engine for application developers. We&#8217;ve just released a new version that supports almost all the functionality of <i>Mathematica</i> 8, giving you everything you need to deploy your applications to your colleagues or clients. And with this version, you can not only deploy reports, applets, and other material as full-featured desktop applications or documents, but also as interactive web tools using the new browser plugin.<span id="more-9154"></span></p>
<p>Over the years I&#8217;ve talked with many users who enjoyed using <i>Mathematica</i> in their work, but weren&#8217;t sure how to take it to the next level. <i>Player Pro</i> solved their problems—and it can help you too.</p>
<p>Many of our users want to share the things they create in <i>Mathematica</i>. Sometimes they distribute static images or convert their documents to a word processing format, but that reduces the value of their work. With the release of <i>Mathematica</i> 8, <a href="http://www.wolfram.com/cdf" target="_self">Computable Document Format (CDF)</a> has become the most convenient way to share interactive content. <i>Player Pro</i> not only supports CDF, but also more advanced applications requiring all the computational capabilities of <i>Mathematica</i>—data import, database connectivity, text input, and so on—so you can distribute analysis tools or computational applications that your colleagues or customers can use with their own data.</p>
<p>One example of what <i>Player Pro</i> is capable of is <a href="http://www.wolfram.com/products/applications/bestviewpoints/" target="_self"><i>BEST Viewpoints</i></a>, which was designed in <i>Mathematica</i> and runs as a <i>Player Pro</i> application. It provides a graphical user interface for data analysis and visualization, taking advantage of <i>Mathematica</i>&#8217;s integration of professional quality graphics and statistics capabilities. </p>
<p><img src="http://blog.wolfram.com/data/uploads/2012/01/BESTViewpointsScreenshot.png" alt="BEST Viewpoints" title="BEST Viewpoints" width="500" height="272" style="border:0px" class="aligncenter size-full wp-image-9165" /></p>
<p>Many users have asked me how they can keep their code from being viewed or reverse engineered by their clients. To encrypt source code, just use the <a href="http://reference.wolfram.com/mathematica/ref/Encode.html" target="_self"><tt>Encode</tt></a> command on a package or use <a href="http://reference.wolfram.com/mathematica/ref/DumpSave.html" target="_self"><tt>DumpSave</tt></a> to create a .mx binary file. Watch this screencast for an example (we recommend viewing it in full-screen mode).</p>
<p><iframe width="500" height="369" src="http://www.youtube.com/embed/5t3FrjlErsc?rel=0&#038;showinfo=0" frameborder="0" allowfullscreen></iframe></p>
<p>Some people who already use <i>Player Pro</i> have been asking us about license management. I&#8217;m happy to say that we&#8217;ve added support for this to the new version. Through our activation system, you can manage licenses for your customers or colleagues; once one person is finished with <i>Player Pro</i>, you can transfer his or her license to another user. Discounts are available for <a href="http://store.wolfram.com/arrive.cgi?URI=http://store.wolfram.com/view/app/playerpro/5pack.str" target="_self">bulk license purchases</a>.</p>
<p>With the power of <i>Mathematica</i> at a fraction of the cost, <i>Player Pro</i> can be your professional platform for deploying interactive applications.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.wolfram.com/2012/01/06/deliver-professional-applications-with-wolfram-player-pro/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to Count Cells, Annihilate Sailboats, and Warp the Mona Lisa</title>
		<link>http://blog.wolfram.com/2012/01/04/how-to-count-cells-annihilate-sailboats-and-warp-the-mona-lisa/</link>
		<comments>http://blog.wolfram.com/2012/01/04/how-to-count-cells-annihilate-sailboats-and-warp-the-mona-lisa/#comments</comments>
		<pubDate>Wed, 04 Jan 2012 17:00:20 +0000</pubDate>
		<dc:creator>Shadi Ashnai</dc:creator>
				<category><![CDATA[Image Processing]]></category>

		<guid isPermaLink="false">http://blog.internal.wolfram.com/?p=9041</guid>
		<description><![CDATA[In a recent series of Image Processing with Mathematica workshops held at universities across the United States, we presented Mathematica&#8217;s new image processing functionality and applied it on the spot to attendees&#8217; real-world problems. It was amazing to me to see how rapidly and flexibly Mathematica could be applied to solve complex image processing problems. [...]]]></description>
			<content:encoded><![CDATA[<p>In a recent series of <a href="http://www.wolfram.com/events/image-processing-2011/" target="_self">Image Processing with <em>Mathematica</em> workshops</a> held at universities across the United States, we presented <em>Mathematica</em>&#8217;s new image processing functionality and applied it on the spot to attendees&#8217; real-world problems. It was amazing to me to see how rapidly and flexibly <em>Mathematica</em> could be applied to solve complex image processing problems. For example, it might seem like writing a program to automatically count cells in an image would be a master&#8217;s research project, but amazingly you can do it with a few lines of <em>Mathematica</em> code.</p>
<p>Below I am using morphological operations and measurement tools to segment and analyze red blood cells in a microscopy image.</p>
<p><img class="alignleft size-full wp-image-9049" style="border:0px" src="http://blog.wolfram.com/data/uploads/2011/12/ImageProcessing-In1.png" alt="Using morphological operations and measurement tools to segment and analyze red blood cells in a microscopy image" width="177" height="66" /></p>
<p>Cell segmentation and hole filling can be done with an intensity thresholding using <a href="http://reference.wolfram.com/mathematica/ref/Binarize.html?q=Binarize" target="_self"><tt>Binarize</tt></a> and <a href="http://reference.wolfram.com/mathematica/ref/FillingTransform.html" target="_self"><tt>FillingTransform</tt></a>:</p>
<p><img class="alignleft size-full wp-image-9050" style="border:0px" src="http://blog.wolfram.com/data/uploads/2012/01/ImageProcessing-In2.png" alt="b = FillingTransform[ColorNegate[Binarize[rbc]]]" width="382" height="17" /></p>
<p><img class="alignleft size-full wp-image-9051" style="border:0px" src="http://blog.wolfram.com/data/uploads/2012/01/ImageProcessing-Out2.png" alt="Using Binarize and FillingTransform to show cell segmentation and hole filling" width="447" height="272" /><span id="more-9041"></span></p>
<p>As you may notice, some cells are overlapping, and this will eventually cause misleading measurements. In order to separate the overlapping cells, I extract a set of markers by finding local maximas of the <a href="http://reference.wolfram.com/mathematica/ref/DistanceTransform.html" target="_self"><tt>DistanceTransform</tt></a> and use these as markers in <a href="http://reference.wolfram.com/mathematica/ref/WatershedComponents.html" target="_self"><tt>WatershedComponents</tt></a>:</p>
<p><img class="alignleft size-full wp-image-9052" style="border:0px" src="http://blog.wolfram.com/data/uploads/2012/01/ImageProcessing-In3.png" alt="distT = DistanceTransform[b, Padding → 0]; marker = MaxDetect[ImageAdjust[distT], 0.02]; w = WatershedComponents[GradientFilter[b, 3], marker, Method → &quot;Rainfall&quot;]; Colorize[w]" width="411" height="77" /></p>
<p><img class="alignleft size-full wp-image-9053" style="border:0px" src="http://blog.wolfram.com/data/uploads/2012/01/ImageProcessing-Out6.png" alt="Finding local maximas of the DistanceTransform and using these as markers in WatershedComponents" width="448" height="272" /></p>
<p>Next, I select cells whose pixel counts fall between a reasonable cell size and use our powerful <a href="http://reference.wolfram.com/mathematica/ref/ComponentMeasurements.html" target="_self"><tt>ComponentMeasurements</tt></a> function to locate and analyze the cells:</p>
<p><img class="alignleft size-full wp-image-9054" style="border:0px" src="http://blog.wolfram.com/data/uploads/2012/01/ImageProcessing-In7.png" alt="cells = SelectComponents[w, &quot;Count&quot;, 500 &lt; # &lt; 3000 &amp;]; measures = ComponentMeasurements[cells, {&quot;Centroid&quot;, &quot;EquivalentDiskRadius&quot;, &quot;Label&quot;}]; Show[rbc, Graphics[{Blue, Circle @@ # &amp; /@ (measures[[All, 2, 1 ;; 2]]), MapThread[Text, {measures[[All, 2, 3]], measures[[All, 2, 1]]}]}]]" width="446" height="106" /></p>
<p><img class="alignleft size-full wp-image-9055" style="border:0px" src="http://blog.wolfram.com/data/uploads/2012/01/ImageProcessing-Out9.png" alt="Using ComponentMeasurements function to locate and analyze the cells" width="466" height="285" /></p>
<p>I can also use <tt>ComponentMeasurements</tt> to take measurements for all selected components. Here I plot the size distribution of the cells:</p>
<p><img class="alignleft size-full wp-image-9056" style="border:0px" src="http://blog.wolfram.com/data/uploads/2012/01/ImageProcessing-In10.png" alt="Histogram[ComponentMeasurements[cells, &quot;Count&quot;][[All, 2]], 20, AxesLabel → {&quot;pixels&quot;}, PlotLabel → &quot;Histogram of cells' pixel counts&quot;]" width="441" height="46" /></p>
<p><img class="alignleft size-full wp-image-9058" style="border:0px" src="http://blog.wolfram.com/data/uploads/2012/01/ImageProcessing-Out10.png" alt="Histogram of cells' pixel counts" width="415" height="227" /></p>
<p>Image restoration is another major topic in image processing. It is sometimes used to visually enhance the image quality or make the details more visible.</p>
<p>Below, I use our new <a href="http://reference.wolfram.com/mathematica/ref/Inpaint.html" target="_self"><tt>Inpaint</tt></a> function to retouch a crack in an old picture:</p>
<p><img class="alignleft size-full wp-image-9059" src="http://blog.wolfram.com/data/uploads/2012/01/ImageProcessing-In11.png" alt="Inporting a photo of Abraham Lincoln" width="207" height="110" /></p>
<p>In order to locate the crack, I create and use an oriented derivative filter:</p>
<p><img class="alignleft size-full wp-image-9060" style="border:0px" src="http://blog.wolfram.com/data/uploads/2012/01/ImageProcessing-In12.png" alt="OrientedDerivativeFilter[img_, α_, σ_: 1] := Module[{Lxx = ImageData[DerivativeFilter[img, {0, 2}, σ]], Lxy = ImageData[DerivativeFilter[img, {1, 1}, σ]], Lyy = ImageData[DerivativeFilter[img, {2, 0}, σ]]}, Image[Cos[\α]^2 Lxx + 2 Cos[α] Sin[α] Lxy + Sin[α]^2 Lyy]];" width="463" height="94" /></p>
<p>This function takes the image derivative along the specified orientation. Here you can see the result of the function on an image of a disk:</p>
<p><img class="alignleft size-full wp-image-9061" style="border:0px" src="http://blog.wolfram.com/data/uploads/2012/01/ImageProcessing-In13.png" alt="Bulding a Manipulate to show the result of an oriented derivative filter on an image of a disc" width="420" height="125" /></p>
<p><div class="WriCDF">
	<div style="margin: 0 auto; width: 300px;">
		<div id="A0a3760a5792f12cf6496ccc438ffdc9e" style="width:300px; height:200px; border:1px solid #A0A0A0; margin-bottom: 15px; text-align:center; background-color:#E8E8E8; color:#333333">
			<noscript>
			<p style="margin: 0; padding: 10px 10px 0">To view the full content of this page, please enable JavaScript in your browser. 
			Learn more <a href="http://www.wolframalpha.com/jsMac.html">here</a>.</p>
			</noscript>
        
			<p style="margin: 0; padding: 10px">To view this content, please install <em>Wolfram CDF Player</em>. You can install the free <em>CDF Player</em> <a href="http://demonstrations.wolfram.com/download-cdf-player.html" title="Wolfram CDF Player">here</a>.</p>
		</div>
	</div>
	<script type="text/javascript">var cdf = new cdf_plugin(); cdf.addCDFObject("A0a3760a5792f12cf6496ccc438ffdc9e", "http://blog.wolfram.com/data/uploads/2012/01/ImageProcessing-CDF13.cdf", 300, 200);</script>
</div>
</p>
<p>To create the crack mask, I take the oriented derivative of my Lincoln image along 120º and compute straight and strong edges in that image:</p>
<p><img class="alignleft size-full wp-image-9062" style="border:0px" src="http://blog.wolfram.com/data/uploads/2012/01/ImageProcessing-In14.png" alt="crack = EdgeDetect[ImageAdjust[OrientedDerivativeFilter[lincoln, 120°]], 2.5, 0.11, &quot;StraightEdges&quot; → 0.25]" width="441" height="64" /></p>
<p><img src="http://blog.wolfram.com/data/uploads/2012/01/ImageProcessing-Out14-1.png" alt="Mask for the crack in the image" title="Mask for the crack in the image" width="232" height="222" style="border:0px" class="alignleft size-full wp-image-9136" /></p>
<p>In order to completely cover the crack, I use morphological <a href="http://reference.wolfram.com/mathematica/ref/Dilation.html" target="_self"><tt>Dilation</tt></a> and then use <a href="http://reference.wolfram.com/mathematica/ref/DeleteSmallComponents.html" target="_self"><tt>DeleteSmallComponents</tt></a> to delete components that do not belong to the large crack:</p>
<p><img class="alignleft size-full wp-image-9064" style="border:0px" src="http://blog.wolfram.com/data/uploads/2012/01/ImageProcessing-In15.png" alt="mask = DeleteSmallComponents[Dilation[crack, DiskMatrix[2]]]" width="464" height="16" /></p>
<p><img src="http://blog.wolfram.com/data/uploads/2012/01/ImageProcessing-Out15-1.png" alt="Mask for the entire crack" title="Mask for the entire crack" width="234" height="222" style="border:0px" class="alignleft size-full wp-image-9137" /></p>
<p>Now, removing the crack is as simple as running <tt>Inpaint</tt> on the original image and the created mask:</p>
<p><img class="alignleft size-full wp-image-9066" style="border:0px" src="http://blog.wolfram.com/data/uploads/2012/01/ImageProcessing-In16.png" alt="result = Inpaint[lincoln, mask]" width="259" height="16" /></p>
<p><img src="http://blog.wolfram.com/data/uploads/2012/01/ImageProcessing-Out16-1.png" alt="Repaired Abraham Lincoln image" title="Repaired Abraham Lincoln image" width="230" height="220" style="border:0px" class="alignleft size-full wp-image-9138" /></p>
<p>Let&#8217;s take a look at the before and after images side by side:</p>
<p><img class="alignleft size-full wp-image-9068" style="border:0px" src="http://blog.wolfram.com/data/uploads/2012/01/ImageProcessing-In17.png" alt="Grid[{{ImageTake[lincoln, 150]}, {ImageTake[result, 150]}}]" width="457" height="17" /></p>
<p><img src="http://blog.wolfram.com/data/uploads/2012/01/ImageProcessing-Out17-1.png" alt="Side-by-side comparison of the two Abraham Lincoln images" title="Side-by-side comparison of the two Abraham Lincoln images" width="416" height="309" style="border:0px" class="alignleft size-full wp-image-9139" /></p>
<p><tt>Inpaint</tt> by default uses a texture synthesis algorithm and therefore can also be used to remove large objects from an image. Here is an example:</p>
<p><img class="alignleft size-full wp-image-9070" style="border:0px" src="http://blog.wolfram.com/data/uploads/2012/01/ImageProcessing-In18.png" alt="Using Inpaint to remove large objects from an image" width="275" height="65" /></p>
<p><img class="alignleft size-full wp-image-9071" style="border: 0px" src="http://blog.wolfram.com/data/uploads/2012/01/ImageProcessing-Out18.png" alt="Image of a harbor with two sailboats removed using Inpaint" width="363" height="245" /></p>
<p>Here is again a side-by-side look at the before and after images:</p>
<p><img class="alignleft size-full wp-image-9072" style="border:0px;margin-left: 40px" src="http://blog.wolfram.com/data/uploads/2012/01/ImageProcessing-SideBySideImages.png" alt="Side-by-side comparison of before and after photos" width="320" height="309" /></p>
<p>Restoration techniques such as smoothing, denoising, and deblurring are sometimes essential as preprocessing steps in an image processing task. We have introduced many smoothing functions in <a href="http://www.wolfram.com/mathematica" target="_self"><em>Mathematica</em></a> 8. Below I have an example where an edge-preserving smoothing can help a segmentation task. The image is a kidney ultrasound, and we want to segment the angiomyolipoma (the large, light blob at the upper left):</p>
<p><img class="alignleft size-full wp-image-9073" style="border:0px" src="http://blog.wolfram.com/data/uploads/2012/01/ImageProcessing-In19.png" alt="Importing an image of a kidney ultrasound" width="202" height="69" /></p>
<p>I am using our new <a href="http://reference.wolfram.com/mathematica/ref/PeronaMalikFilter.html" target="_self"><tt>PeronaMalikFilter</tt></a>, which is an inhomogeneous diffusion method used for smoothing the image while preserving the edges:</p>
<p><img class="alignleft size-full wp-image-9074" style="border:0px" src="http://blog.wolfram.com/data/uploads/2012/01/ImageProcessing-In20.png" alt="p = PeronaMalikFilter[ultrasound, 20, 0.02, 2]" width="358" height="17" /></p>
<p><img class="alignleft size-full wp-image-9075" style="border:0px" src="http://blog.wolfram.com/data/uploads/2012/01/ImageProcessing-Out20.png" alt="Result of using PeronaMalikFilter" width="303" height="262" /></p>
<p>Once the image is smoothed, an intensity thresholding can detect the bright tumor, and then we apply a selection based on the size of the bright object. Below is the tumor highlighted in the original image:</p>
<p><img class="alignleft size-full wp-image-9076" style="border:0px" src="http://blog.wolfram.com/data/uploads/2012/01/ImageProcessing-In21.png" alt="ImageApply[# {1, .5, 1} &amp;, ultrasound, Masking → SelectComponents[Binarize[p], &quot;Area&quot;, # &gt; 5000 &amp;]]" width="461" height="33" /></p>
<p><img class="alignleft size-full wp-image-9077" style="border:0px" src="http://blog.wolfram.com/data/uploads/2012/01/ImageProcessing-Out21.png" alt="The tumor highlighted in the original image" width="302" height="260" /></p>
<p>I also demoed <em>Mathematica</em>&#8217;s transformation and registration capabilities starting with <a href="http://reference.wolfram.com/mathematica/ref/ImageTransformation.html" target="_self"><tt>ImageTransformation</tt></a>, our new and optimized image transformation that can take any function to spatially transform image pixel coordinates.</p>
<p>Here is an example where a sine wave is added to the <em>x</em> coordinates of the <em>Mona Lisa</em>.</p>
<p><img class="alignleft size-full wp-image-9078" style="border:0px" src="http://blog.wolfram.com/data/uploads/2012/01/ImageProcessing-In22.png" alt="Using ImageTransformation on an image of the Mona Lisa" width="365" height="150" /></p>
<p><div class="WriCDF">
	<div style="margin: 0 auto; width: 320px;">
		<div id="A4f7d0fb41ba5ff190ba4687ed0515368" style="width:320px; height:300px; border:1px solid #A0A0A0; margin-bottom: 15px; text-align:center; background-color:#E8E8E8; color:#333333">
			<noscript>
			<p style="margin: 0; padding: 10px 10px 0">To view the full content of this page, please enable JavaScript in your browser. 
			Learn more <a href="http://www.wolframalpha.com/jsMac.html">here</a>.</p>
			</noscript>
        
			<p style="margin: 0; padding: 10px">To view this content, please install <em>Wolfram CDF Player</em>. You can install the free <em>CDF Player</em> <a href="http://demonstrations.wolfram.com/download-cdf-player.html" title="Wolfram CDF Player">here</a>.</p>
		</div>
	</div>
	<script type="text/javascript">var cdf = new cdf_plugin(); cdf.addCDFObject("A4f7d0fb41ba5ff190ba4687ed0515368", "http://blog.wolfram.com/data/uploads/2012/01/ImageProcessing-CDF23.cdf", 320, 300);</script>
</div>
</p>
<p>Or a custom function to create a fisheye effect:</p>
<p><img class="alignleft size-full wp-image-9079" style="border:0px" src="http://blog.wolfram.com/data/uploads/2012/01/ImageProcessing-In24.png" alt="f[x_, y_] := With[{r = N@Sqrt[(x - .5)^2 + (y - .5)^2], a = ArcTan[x - .5, y - .5], R = 0.5}, rn = r*r/R; {rn*Cos[a] + .5, rn*Sin[a] + .5}]; ImageTransformation[mona, f[#[[1]], #[[2]]] &amp;, Padding → Transparent]" width="356" height="124" /></p>
<p><img class="alignleft size-full wp-image-9080" style="border:0px" src="http://blog.wolfram.com/data/uploads/2012/01/ImageProcessing-Out25.png" alt="Fisheye effect on the Mona Lisa" width="249" height="205" /></p>
<p>I also showed the integration of <a href="http://www.wolframalpha.com" target="_self">Wolfram|Alpha</a> into <em>Mathematica</em> and its current image processing capabilities. We are expanding the extent of these capabilities on a daily basis. Here is a quick example:</p>
<p><img class="alignleft size-full wp-image-9081" style="border:0px" src="http://blog.wolfram.com/data/uploads/2012/01/ImageProcessing-In26.png" alt="apply embossing effect to mona" width="330" height="66" /></p>
<p><img class="alignleft size-full wp-image-9082" style="border:0px" src="http://blog.wolfram.com/data/uploads/2012/01/ImageProcessing-Out26.png" alt="The Mona Lisa with an embossing effect" width="246" height="205" /></p>
<p>In addition, using the <a href="http://reference.wolfram.com/mathematica/ref/Compile.html" target="_self"><tt>Compile</tt></a> function, DLL linking, and new <a href="http://www.wolfram.com/mathematica/new-in-8/cuda-and-opencl-support/" target="_self">CUDA or OpenCL</a> linking (which can all increase the performance of a program) were among the most popular topics.</p>
<p>Below I have an example where I would like to apply a function to all pixel values in an image using <a href="http://reference.wolfram.com/mathematica/ref/ImageApply.html" target="_self"><tt>ImageApply</tt></a>. While the two versions give exactly the same result, the computation is ten times faster when using the <a href="http://reference.wolfram.com/mathematica/ref/CompiledFunction.html" target="_self"><tt>CompiledFunction</tt></a>:</p>
<p><img class="alignleft size-full wp-image-9083" style="border:0px" src="http://blog.wolfram.com/data/uploads/2012/01/ImageProcessing-In27.png" alt="f[x_] := {Sin[Pi x*4], Sin[Pi x], Sin[Pi x * 3]}" width="370" height="19" /></p>
<p><img class="alignleft size-full wp-image-9084" style="border:0px" src="http://blog.wolfram.com/data/uploads/2012/01/ImageProcessing-In28.png" alt="c = Compile[{{x, _Real}}, {Sin[Pi x*4], Sin[Pi x], Sin[Pi x * 3]}];" width="351" height="32" /></p>
<p><img class="alignleft size-full wp-image-9085" style="border:0px" src="http://blog.wolfram.com/data/uploads/2012/01/ImageProcessing-In29.png" alt="Using AbsoluteTiming to compare both functions" width="452" height="120" /></p>
<p><img class="alignleft size-full wp-image-9086" style="border:0px" src="http://blog.wolfram.com/data/uploads/2012/01/ImageProcessing-Out29.png" alt="Comparing two images and the time it took to create them" width="313" height="372" /></p>
<p>Here is what some attendees had to say about the Image Processing with <em>Mathematica</em> events:</p>
<blockquote><p>[The] talk and Workshop focus on my thermography problem were an &#8220;eye opener,&#8221; even for a long-term user like myself. The imaging processing functions built in to <em>Mathematica</em> are so powerful and comprehensive that I will now probably require my students to use it on their Senior Project&#8230;.</p>
<p>&#8212;</p>
<p>As someone who has given quite a few technical presentations, I was very impressed with [the seminar]. This just confirms my belief in the quality of the product put out by Wolfram Research&#8230; I think that <em>Mathematica</em> is the single most impressive product I have ever used or seen. It is a bonus that Wolfram believes in its product enough to offer free seminars.</p></blockquote>
<p>We discussed many more image processing applications in the university workshops. If you were not able to attend, I encourage you to explore our image processing functions by starting from the main guide page for <a href="http://www.wolfram.com/solutions/industry/image-processing/" target="_self">image processing and analysis</a>. We also have several <a href="http://www.wolfram.com/services/education/" target="_self">training courses and seminars</a> available regularly.</p>
<p>Would you like a Wolfram developer to give a seminar near you? <a href="http://www.wolfram.com/events/roadshow/contact.en.cgi" target="_self">Request a <em>Mathematica</em> presentation, workshop, or event</a> in your area or at your organization.</p>
<p>Thank you to all of the attendees and other presenters for your participation and support. We enjoyed meeting all of you and hope to see you at future Wolfram events.</p>
<p><a href="http://blog.wolfram.com/data/uploads/2012/01/ImageProcessingTourBlog.cdf" target="_blank">Download this post as a Computable Document Format (CDF) file</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.wolfram.com/2012/01/04/how-to-count-cells-annihilate-sailboats-and-warp-the-mona-lisa/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Two Hundred Thousand Snowflake Greetings to You and Yours</title>
		<link>http://blog.wolfram.com/2011/12/28/two-hundred-thousand-snowflake-greetings-to-you-and-yours/</link>
		<comments>http://blog.wolfram.com/2011/12/28/two-hundred-thousand-snowflake-greetings-to-you-and-yours/#comments</comments>
		<pubDate>Wed, 28 Dec 2011 20:17:15 +0000</pubDate>
		<dc:creator>Christopher Carlson</dc:creator>
				<category><![CDATA[Wolfram News]]></category>

		<guid isPermaLink="false">http://blog.internal.wolfram.com/?p=8978</guid>
		<description><![CDATA[Take Stephen Wolfram&#8217;s theory of the universe, add a dash of symmetry, and what do you get? Snowflakes.
Cellular automata—the basis of Stephen&#8217;s theory—typically operate on rectlinear grids. But with suitable automata rules and a simple geometric transformation, you can achieve patterns with six-fold dihedral symmetry, the symmetry of snowflakes.

My colleague Ed Pegg Jr. showed that [...]]]></description>
			<content:encoded><![CDATA[<p>Take Stephen Wolfram&#8217;s theory of the universe, add a dash of symmetry, and what do you get? <a href="http://www.wolframscience.com/nksonline/page-371" target="_self">Snowflakes</a>.</p>
<p><a href="http://mathworld.wolfram.com/CellularAutomaton.html" target="_self">Cellular automata</a>—the basis of Stephen&#8217;s theory—typically operate on rectlinear grids. But with suitable automata rules and a simple geometric transformation, you can achieve patterns with six-fold dihedral symmetry, the symmetry of snowflakes.</p>
<p><img src="http://blog.wolfram.com/data/uploads/2011/12/MathematicaSnowflakes.png" alt="Three snowflakes built in Mathematica" title="Three snowflakes built in Mathematica" width="500" height="190" style="border:0px" class="aligncenter size-full wp-image-9009" /></p>
<p>My colleague Ed Pegg Jr. showed that idea nicely in his Demonstration &#8220;<a href="http://demonstrations.wolfram.com/SnowflakeLikePatterns/" target="_self">Snowflake-Like Patterns</a>&#8221;. I started with his Demonstration; added some ideas from Matthew Szudzik&#8217;s related Demonstration, &#8220;<a href="http://demonstrations.wolfram.com/SnowflakeGrowth/" target="_self">Snowflake Growth</a>&#8221;; and fine-tuned the rendering to recall Bentley&#8217;s classic <a href="http://en.wikipedia.org/wiki/Wilson_Bentley" target="_blank">snowflake photos</a>, arriving at this interactive snowflake generator.<span id="more-8978"></span></p>
<p><div class="WriCDF">
	<div style="margin: 0 auto; width: 505px;">
		<div id="A59efd22fea38d3b4e0bacaebdd5bb647" style="width:505px; height:640px; border:1px solid #A0A0A0; margin-bottom: 15px; text-align:center; background-color:#E8E8E8; color:#333333">
			<noscript>
			<p style="margin: 0; padding: 10px 10px 0">To view the full content of this page, please enable JavaScript in your browser. 
			Learn more <a href="http://www.wolframalpha.com/jsMac.html">here</a>.</p>
			</noscript>
        
			<p style="margin: 0; padding: 10px">To view this content, please install <em>Wolfram CDF Player</em>. You can install the free <em>CDF Player</em> <a href="http://demonstrations.wolfram.com/download-cdf-player.html" title="Wolfram CDF Player">here</a>.</p>
		</div>
	</div>
	<script type="text/javascript">var cdf = new cdf_plugin(); cdf.addCDFObject("A59efd22fea38d3b4e0bacaebdd5bb647", "http://blog.wolfram.com/data/uploads/2011/12/MathematicaSnowflakes_CDF.cdf", 505, 640);</script>
</div>
</p>
<p>I haven&#8217;t had time this morning to explore all 233,280 snowflakes contained in this little program, but I have discovered that there are some real surprises in there. Like rule 3174, which explodes in snowflake fireworks as you animate the steps from 1 to 64. Or the closed, self-avoiding curves of 3649 and 3313. Or 3516, like an intricate snowflake pattern on a Scandinavian winter sweater.</p>
<p>There are many more gems in there, and you can help find them. If you haven&#8217;t done so already, install the <a href="http://www.wolfram.com/cdf-player/" target="_self">Wolfram <i>CDF Player</i></a> browser plugin so the controls above come to life. Explore the possibilities, and if you find something interesting, send us a comment below with the coordinates of the snowflake, for example, {3313, 51} for rule 3313 at step 51. We&#8217;ll append images of the reader-supplied snowflakes to the post. Supply a title too, if you like. My colleague Andrew Moylan christened the initial {2653, 64} snowflake above &#8220;Dinner for Six.&#8221;</p>
<p>Here are some tips for easier exploring: enter a rule number directly by clicking the &#8220;+&#8221; icon to the right of the slider and typing in the input field. Press the Alt or Option key while dragging the sliders for fine control, and additionally Shift for even finer control.</p>
<p>From us and ours at Wolfram Research to you and yours, best wishes for the winter holidays. We&#8217;ll see you in the new year.</p>
<p><a href="http://blog.wolfram.com/data/uploads/2011/12/MathematicaSnowflakes_Download.cdf" target="_blank">Download this post as a Computable Document Format (CDF) file</a>.</p>
<table>
<tr>
<td><div id="attachment_9127" class="wp-caption alignleft" style="width: 255px"><img src="http://blog.wolfram.com/data/uploads/2011/12/1517-54.png" alt="{1517,54}&lt;br&gt;Nik, December 29, 2011" title="{1517,54}, Nik, December 29, 2011" width="245" height="245" style="border:0px" class="size-full wp-image-9127" /><p class="wp-caption-text">{1517,54}<br />Nik, December 29, 2011</p></div></td>
<td><div id="attachment_9128" class="wp-caption alignleft" style="width: 255px"><img src="http://blog.wolfram.com/data/uploads/2011/12/2633-64.png" alt="Fine Web, {2633,64}&lt;br&gt;Cetin Sert, December 29, 2011" title="Fine Web, {2633,64}, Cetin Sert, December 29, 2011" width="245" height="245" style="border:0px" class="size-full wp-image-9128" /><p class="wp-caption-text">Fine Web, {2633,64}<br />Cetin Sert, December 29, 2011</p></div></td>
</tr>
<tr>
<td><div id="attachment_9131" class="wp-caption alignleft" style="width: 255px"><img src="http://blog.wolfram.com/data/uploads/2011/12/2653-642.png" alt="Dinner for Six, {2653,64}&lt;br&gt;Andrew Moylan, December 28, 2011" title="Dinner for Six, {2653,64}, Andrew Moylan, December 28, 2011" width="245" height="245" style="border:0px" class="size-full wp-image-9131" /><p class="wp-caption-text">Dinner for Six, {2653,64}<br />Andrew Moylan, December 28, 2011</p></div></td>
<td><div id="attachment_9130" class="wp-caption alignleft" style="width: 255px"><img src="http://blog.wolfram.com/data/uploads/2011/12/1708-64.png" alt="Candy Bowl, {1708,64}&lt;br&gt;Andrew Walters, December 29, 2011" title="Candy Bowl, {1708,64}, Andrew Walters, December 29, 2011" width="245" height="245" style="border:0px" class="size-full wp-image-9130" /><p class="wp-caption-text">Candy Bowl, {1708,64}<br />Andrew Walters, December 29, 2011</p></div></td>
</tr>
<tr>
<td><div id="attachment_9231" class="wp-caption alignleft" style="width: 255px"><img src="http://blog.wolfram.com/data/uploads/2011/12/3432-64.png" alt="{3432,64}&lt;br&gt;Marcello, January 9, 2012" title="{3432,64} Marcello, January 9, 2012" width="245" height="245" style="border:0px" class="size-full wp-image-9231" /><p class="wp-caption-text">{3432,64}<br />Marcello, January 9, 2012</p></div></td>
<td><div id="attachment_9245" class="wp-caption alignleft" style="width: 255px"><img src="http://blog.wolfram.com/data/uploads/2011/12/3394-57.png" alt="Dancing Figures, {3394,57}&lt;br&gt;Vitaliy Kaurov, January 11, 2012" title="Dancing Figures, {3394,57}, Vitaliy Kaurov, January 11, 2012" width="245" height="245" style="border:0px" class="size-full wp-image-9245" /><p class="wp-caption-text">Dancing Figures, {3394,57}<br />Vitaliy Kaurov, January 11, 2012</p></div></td>
</tr>
<tr>
<td><div id="attachment_9246" class="wp-caption alignleft" style="width: 255px"><img src="http://blog.wolfram.com/data/uploads/2011/12/1338-64.png" alt="Dew in Spider Web, {1338,64}&lt;br&gt;Vitaliy Kaurov, January 11, 2012" title="Dew in Spider Web, {1338,64}, Vitaliy Kaurov, January 11, 2012" width="245" height="245" style="border:0px" class="size-full wp-image-9246" /><p class="wp-caption-text">Dew in Spider Web, {1338,64}<br />Vitaliy Kaurov, January 11, 2012</p></div></td>
<td><div id="attachment_9247" class="wp-caption alignleft" style="width: 255px"><img src="http://blog.wolfram.com/data/uploads/2011/12/946-64.png" alt="Turbine, {946,64}&lt;br&gt;Vitaliy Kaurov, January 11, 2012" title="Turbine, {946,64}, Vitaliy Kaurov, January 11, 2012" width="245" height="245" style="border:0px" class="size-full wp-image-9247" /><p class="wp-caption-text">Turbine, {946,64}<br />Vitaliy Kaurov, January 11, 2012</p></div></td>
</tr>
<tr>
<td><div id="attachment_9248" class="wp-caption alignleft" style="width: 255px"><img src="http://blog.wolfram.com/data/uploads/2011/12/1088-64.png" alt="Holding Hands, {1088,64}&lt;br&gt;Vitaliy Kaurov, January 11, 2012" title="Holding Hands, {1088,64}, Vitaliy Kaurov, January 11, 2012" width="245" height="245" style="border:0px" class="size-full wp-image-9248" /><p class="wp-caption-text">Holding Hands, {1088,64}<br />Vitaliy Kaurov, January 11, 2012</p></div></td>
<td><div id="attachment_9261" class="wp-caption alignleft" style="width: 255px"><img src="http://blog.wolfram.com/data/uploads/2011/12/349-69.png" alt="Harmonic, {349,69}&lt;br&gt;LaVerne Poussaint, January 13, 2012" title="Harmonic, {349,69}, LaVerne Poussaint, January 13, 2012" width="245" height="245" style="border:0px" class="size-full wp-image-9261" /><p class="wp-caption-text">Harmonic, {349,69}<br />LaVerne Poussaint, January 13, 2012</p></div></td>
</tr>
<tr>
<td><div id="attachment_9262" class="wp-caption alignleft" style="width: 255px"><img src="http://blog.wolfram.com/data/uploads/2011/12/2047-66.png" alt="Chandas, {2047,69}&lt;br&gt;LaVerne Poussaint, January 13, 2012" title="Chandas, {2047,69}, LaVerne Poussaint, January 13, 2012" width="245" height="245" style="border:0px" class="size-full wp-image-9262" /><p class="wp-caption-text">Chandas, {2047,69}<br />LaVerne Poussaint, January 13, 2012</p></div></td>
<td><div id="attachment_9671" class="wp-caption alignleft" style="width: 255px"><img src="http://blog.wolfram.com/data/uploads/2011/12/3174-58.png" alt="Time and Eternity, LI, {3174,58}&lt;br&gt;Brad Klee, February 2, 2012" title="Time and Eternity, LI, {3174,58}, Brad Klee, February 2, 2012" width="245" height="245" style=border:0px" class="size-full wp-image-9671" /><p class="wp-caption-text">Time and Eternity, LI, {3174,58}<br />Brad Klee, February 2, 2012</p></div></td>
</tr>
</table>
]]></content:encoded>
			<wfw:commentRss>http://blog.wolfram.com/2011/12/28/two-hundred-thousand-snowflake-greetings-to-you-and-yours/feed/</wfw:commentRss>
		<slash:comments>11</slash:comments>
		</item>
		<item>
		<title>Mathematica 8 Year in Review</title>
		<link>http://blog.wolfram.com/2011/12/19/mathematica-8-year-in-review/</link>
		<comments>http://blog.wolfram.com/2011/12/19/mathematica-8-year-in-review/#comments</comments>
		<pubDate>Mon, 19 Dec 2011 16:43:29 +0000</pubDate>
		<dc:creator>Wolfram Blog Team</dc:creator>
				<category><![CDATA[Wolfram News]]></category>

		<guid isPermaLink="false">http://blog.internal.wolfram.com/?p=8929</guid>
		<description><![CDATA[Mathematica 8 introduced powerful new advances in technical computing. Among them: free-form input and Wolfram&#124;Alpha integration; fully integrated, specialist technical functionality in a number of application areas; tools to develop faster and more powerful applications; and the Computable Document Format (CDF).
At the Wolfram Technology Conference 2011, the Wolfram directors who led the development of these [...]]]></description>
			<content:encoded><![CDATA[<p><i>Mathematica</i> 8 introduced powerful new advances in technical computing. Among them: <a href="http://www.wolfram.com/mathematica/new-in-8/free-form-linguistic-input/" target="_self">free-form input</a> and <a href="http://www.wolfram.com/mathematica/new-in-8/combine-knowledge-and-computation/" target="_self">Wolfram|Alpha integration</a>; fully integrated, specialist technical functionality in a number of <a href="http://www.wolfram.com/mathematica/new-in-8/application-areas.html" target="_self">application areas</a>; <a href="http://www.wolfram.com/mathematica/new-in-8/software-development.html" target="_self">tools to develop</a> faster and more powerful applications; and the <a href="http://www.wolfram.com/cdf/" target="_self">Computable Document Format (CDF)</a>.</p>
<p>At the <a href="http://www.wolfram.com/events/technology-conference-2011/" target="_self">Wolfram Technology Conference 2011</a>, the Wolfram directors who led the development of these new capabilities presented a <i>Mathematica</i> 8 Year in Review:</p>
<p><iframe width="500" height="284" src="http://www.youtube.com/embed/I5b_Y3r9HsE?rel=0&#038;showinfo=0" frameborder="0" allowfullscreen></iframe> <span id="more-8929"></span></p>
<p>Did you miss this year&#8217;s conference? Check out the <a href="http://www.wolfram.com/events/technology-conference-2011/presentations.html" target="_self">Presentations &#038; Talks page</a> for copies of the presentations and videos from select talks. </p>
]]></content:encoded>
			<wfw:commentRss>http://blog.wolfram.com/2011/12/19/mathematica-8-year-in-review/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Mathematica Q&amp;A Series: Converting to Conventional Mathematical Typesetting</title>
		<link>http://blog.wolfram.com/2011/12/15/mathematica-qa-series-converting-to-conventional-mathematical-typesetting/</link>
		<comments>http://blog.wolfram.com/2011/12/15/mathematica-qa-series-converting-to-conventional-mathematical-typesetting/#comments</comments>
		<pubDate>Thu, 15 Dec 2011 16:16:39 +0000</pubDate>
		<dc:creator>Vitaliy Kaurov</dc:creator>
				<category><![CDATA[Mathematica Q&A]]></category>

		<guid isPermaLink="false">http://blog.internal.wolfram.com/?p=8811</guid>
		<description><![CDATA[Got questions about Mathematica? The Wolfram Blog has answers! We&#8217;ll regularly answer selected questions from users around the web. You can submit your question directly to the Q&#38;A Team.
This week&#8217;s question comes from Jee:
How can I transform the output of partial differentiation such as f(1, 0)[x, y] to the mathematical form ?

Read below or watch [...]]]></description>
			<content:encoded><![CDATA[<p><span style="color: #808080;">Got questions about <a href="http://www.wolfram.com/mathematica/"><em>Mathematica</em></a>? The Wolfram Blog has answers! We&#8217;ll regularly answer selected questions from users around the web. You can <a href="http://blog.wolfram.com/ask-a-question/">submit your question directly to the Q&amp;A Team</a>.</span></p>
<p>This week&#8217;s question comes from Jee:</p>
<p><strong><em>How can I transform the output of partial differentiation such as f<sup>(1, 0)</sup>[x, y] to the mathematical form <img src="http://blog.wolfram.com/data/uploads/2011/12/TraditionalForm-InitialQuestion.jpg" alt="∂f(x, y)/∂x" title="∂f(x, y)/∂x" width="58" height="36" style="border:0px; margin-bottom:-18px; " class="valign=top size-full wp-image-8925" />?</em></strong></p>
<p></p>
<p>Read below or watch this screencast for the answer (we recommend viewing it in full-screen mode):</p>
<p><iframe width="500" height="369" src="http://www.youtube.com/embed/-xvLRjByJ08?rel=0&#038;showinfo=0" frameborder="0" allowfullscreen></iframe></p>
<p>We will assume that the reader is already familiar with the basics of differentiation in <i>Mathematica</i>. To quickly catch up with the topic, one should read the recent Q&amp;A blog post &#8220;<a href="http://blog.wolfram.com/2011/05/20/mathematica-qa-three-functions-for-computing-derivatives/" target="_self">Three Functions for Computing Derivatives</a>&#8221;.<span id="more-8811"></span></p>
<p>The typesetting in which derivatives are displayed in <i>Mathematica</i> may vary depending on the situation. Yet they are all interpreted through the function <a href="http://reference.wolfram.com/mathematica/ref/Derivative.html?q=Derivative" target="_self"><tt>Derivative</tt></a>, which is an equivalent of the differential operator in traditional mathematics. Take a look at the following list, where each element represents a different way differentiation can be entered:</p>
<p><img src="http://blog.wolfram.com/data/uploads/2011/12/TraditionalForm-In1.jpg" alt="Four different ways a derivative can be entered in Mathematica" title="Four different ways a derivative can be entered in Mathematica" width="490" height="25" style="border:0px" class="alignleft size-full wp-image-8835" /></p>
<p><img src="http://blog.wolfram.com/data/uploads/2011/12/TraditionalForm-Out1.jpg" alt="Four ways a derivative can be represented in Mathematica" title="Four ways a derivative can be represented in Mathematica" width="274" height="22" style="border:0px" class="alignleft size-full wp-image-8836" /></p>
<p>For the last element we used the key sequence Esc + d + t + Esc. Despite different appearances, the underlying expressions are of the same syntax, which can be revealed with the function <a href="http://reference.wolfram.com/mathematica/ref/InputForm.html?q=InputForm" target="_self"><tt>InputForm</tt></a>:</p>
<p><img src="http://blog.wolfram.com/data/uploads/2011/12/TraditionalForm-In2.jpg" alt="Grid[Transpose[{%, InputForm /@ %}], Frame &#8594; All, Alignment &#8594; Left]" title="Grid[Transpose[{%, InputForm /@ %}], Frame &#8594; All, Alignment &#8594; Left]" width="499" height="16" style="border:0px" class="alignleft size-full wp-image-8837" /></p>
<p><img src="http://blog.wolfram.com/data/uploads/2011/12/TraditionalForm-Out2-Left.jpg" alt="Table of the four ways a derivative can be shown in Mathematica" title="Table of the four ways a derivative can be shown in Mathematica" width="398" height="83" class="alignleft size-full wp-image-8914" /></p>
<p>If one deals with differentiation of undefined functions, the output will always be of the form shown in the left column, dictated by the underlying syntax of the right column. How does one go from this typesetting to other conventional mathematical notations? Well, we can start by using the function <a href="http://reference.wolfram.com/mathematica/ref/TraditionalForm.html?q=TraditionalForm" target="_self"><tt>TraditionalForm</tt></a>, which was created exactly for this purpose:</p>
<p><img src="http://blog.wolfram.com/data/uploads/2011/12/TraditionalForm-In3.jpg" alt="Derivative[2, 3][f][x, y] // TraditionalForm" title="Derivative[2, 3][f][x, y] // TraditionalForm" width="353" height="15" style="border:0px" class="alignleft size-full wp-image-8839" /></p>
<p><img src="http://blog.wolfram.com/data/uploads/2011/12/TraditionalForm-Out3-Large.jpg" alt="f^(2, 3)(x, y)" title="f^(2, 3)(x, y)" width="124" height="39" style="border:0px" class="alignleft size-full wp-image-8906" /></p>
<p>This is a type of traditional mathematical notation where partial derivatives are denoted by indexes in the function&#8217;s superscript. Yet this is not what Jee is looking for, which is a convention that uses the symbol &part;. The full list of <i>Mathematica</i> syntax that may be displayed via <tt>TraditionalForm</tt> as a conventional notation can be found in the extensive tables of the tutorial <a href="http://reference.wolfram.com/mathematica/tutorial/TraditionalFormReferenceInformation.html" target="_self"><tt>TraditionalForm</tt> Reference Information</a>. We can learn from it that the notation we need can be provided by the function <a href="http://reference.wolfram.com/mathematica/ref/D.html?q=D" target="_self"><tt>D</tt></a>:</p>
<p><img src="http://blog.wolfram.com/data/uploads/2011/12/TraditionalForm-In4.jpg" alt="D[f[x, y], {x, 2}, {y, 3}] // Defer // TraditionalForm" title="D[f[x, y], {x, 2}, {y, 3}] // Defer // TraditionalForm" width="402" height="17" style="border:0px" class="alignleft size-full wp-image-8841" /></p>
<p><img src="http://blog.wolfram.com/data/uploads/2011/12/TraditionalForm-Out4-Large.jpg" alt="Using the function D to provide notation with &part;" title="Using the function D to provide notation with &part;" width="115" height="57" style="border:0px" class="alignleft size-full wp-image-8907" /></p>
<p>The function <a href="http://reference.wolfram.com/mathematica/ref/Defer.html?q=Defe" target="_self"><tt>Defer</tt></a> was used to prevent <i>Mathematica</i> from automatic evaluation from the syntax of function <tt>D</tt> to the one of function <tt>Derivative</tt>. Great, but what if after some derivations we end up with an answer given in terms of indexed notation? How do we display it in terms of the symbol &part;? Well, we can construct a function that reads out the elements of syntax given by <tt>Derivative</tt>, puts them in the form of <tt>D</tt>, and applies <tt>TraditionalForm</tt>:</p>
<p><img src="http://blog.wolfram.com/data/uploads/2011/12/TraditionalForm-In5.jpg" alt="Constructing a function that reads out the elements of syntax given by Derivative, puts them in the form of D, and applies TraditionalForm" title="Constructing a function that reads out the elements of syntax given by Derivative, puts them in the form of D, and applies TraditionalForm" width="408" height="96" style="border:0px" class="alignleft size-full wp-image-8843" /></p>
<p>To better understand the structure of the function, consider the table below.</p>
<p><img src="http://blog.wolfram.com/data/uploads/2011/12/TraditionalForm-TableGraph.jpg" alt="Table to better understand the structure of the function" title="Table to better understand the structure of the function" width="398" height="234" style="border:0px" class="aligncenter size-full wp-image-8935" /></p>
<p>In the particular case considered, <tt>pdConv</tt> will read indexes <tt>0</tt>, <tt>1</tt>, and <tt>2</tt>; variables <tt>x</tt>, <tt>y</tt>, and <tt>z</tt>; and function name <tt>f</tt> from the syntax provided by <tt>Derivative</tt> and put them in the syntax of function <tt>D</tt>. The function <tt>pdConv</tt> will then use <tt>Defer</tt> and <tt>TraditionalForm</tt> to display the result in desired conventional typesetting. Note that zero- and first-order derivatives are &#8220;Special Cases&#8221; labeled in the last row. They should be displayed differently compared to higher-order derivatives, and are handled in the last line of <tt>pdConv</tt>.</p>
<p>Function <tt>pdConv</tt> will now work with any properly defined expression. Here is a computation that ends up displayed according to the underlying <tt>Derivative</tt> syntax:</p>
<p><img src="http://blog.wolfram.com/data/uploads/2011/12/TraditionalForm-In6.jpg" alt="D[x z f[x, y, z], {x, 4}, y, z]" title="D[x z f[x, y, z], {x, 4}, y, z]" width="235" height="17" style="border:0px" class="alignleft size-full wp-image-8845" /></p>
<p><img src="http://blog.wolfram.com/data/uploads/2011/12/TraditionalForm-Out6.jpg" alt="Computation that is displayed according to the underlying Derivative syntax" title="Computation that is displayed according to the underlying Derivative syntax" width="299" height="40" style="border:0px" class="alignleft size-full wp-image-8846" /></p>
<p>Applying our function <tt>pdConv</tt> will typeset this expression in terms of the symbol &part;:</p>
<p><img src="http://blog.wolfram.com/data/uploads/2011/12/TraditionalForm-In7.jpg" alt="% // pdConv" title="% // pdConv" width="118" height="15" style="border:0px" class="alignleft size-full wp-image-8847" /></p>
<p><img src="http://blog.wolfram.com/data/uploads/2011/12/TraditionalForm-Out7-Large.jpg" alt="Expression in terms of the symbol &part;" title="Expression in terms of the symbol &part;" width="486" height="61" style="border:0px" class="alignleft size-full wp-image-8908" /></p>
<p>After we copy and evaluate the output cell, the <tt>Defer</tt> function used inside <tt>pdConv</tt> will release its hold on the evaluation:</p>
<p><img src="http://blog.wolfram.com/data/uploads/2011/12/TraditionalForm-In8.jpg" alt="Expression in terms of the symbol &part;" title="Expression in terms of the symbol &part;" width="392" height="42" style="border:0px" class="alignleft size-full wp-image-8849" /></p>
<p><img src="http://blog.wolfram.com/data/uploads/2011/12/TraditionalForm-Out8.jpg" alt="Expression after the Defer function used inside pdConv releases its hold on the evaluation" title="Expression after the Defer function used inside pdConv releases its hold on the evaluation" width="301" height="40" style="border:0px" class="alignleft size-full wp-image-8850" /></p>
<p>And so this expression is still computable. For example an explicit function can be substituted instead of <i>f(x, y, z)</i> for further evaluation:</p>
<p><img src="http://blog.wolfram.com/data/uploads/2011/12/TraditionalForm-In9.jpg" alt="expf[x_, y_, z_] := z Sqrt[x y]" title="expf[x_, y_, z_] := z Sqrt[x y]" width="221" height="24" style="border:0px" class="alignleft size-full wp-image-8851" /></p>
<p><img src="http://blog.wolfram.com/data/uploads/2011/12/TraditionalForm-In10.jpg" alt="%% /. f &#8594; expf // Simplify" title="%% /. f &#8594; expf // Simplify" width="214" height="17" style="border:0px" class="alignleft size-full wp-image-8852" /></p>
<p><img src="http://blog.wolfram.com/data/uploads/2011/12/TraditionalForm-Out10.jpg" alt="(9 z)/(16 x^2 Sqrt[x y])" title="(9 z)/(16 x^2 Sqrt[x y])" width="114" height="40" style="border:0px" class="alignleft size-full wp-image-8853" /></p>
<p>Hence <i>Mathematica</i> allows computing with expressions in traditional mathematical typesetting if they are properly defined, unlike many other systems that only help to format and display the typesetting. The function <tt>pdConv</tt> acts simply as <tt>TraditionalForm</tt> with respect to any other part of an expression that is not related to <tt>Derivative</tt>:</p>
<p><img src="http://blog.wolfram.com/data/uploads/2011/12/TraditionalForm-In11.jpg" alt="Limit[Integrate[f[x], {x, 0, b}], b &#8594; Infinity] // pdConv" title="Limit[Integrate[f[x], {x, 0, b}], b &#8594; Infinity] // pdConv" width="428" height="19" style="border:0px" class="alignleft size-full wp-image-8854" /></p>
<p><img src="http://blog.wolfram.com/data/uploads/2011/12/TraditionalForm-Out11-Large.jpg" alt="Expression in traditional mathematical typesetting" title="Expression in traditional mathematical typesetting" width="152" height="57" style="border:0px" class="alignleft size-full wp-image-8910" /></p>
<p><a href="http://blog.wolfram.com/data/uploads/2011/12/MathematicaQA_TraditionalFormBlog.cdf" target="_blank">Click here to download this post as a Computable Document Format (CDF) file</a>.</p>
<p>If you have a question you&#8217;d like answered in this blog, you can <a href="http://blog.wolfram.com/ask-a-question/" target="_self">submit it to the Q&#038;A Team</a>. For daily bite-sized <i>Mathematica</i> tips, follow our <a href="https://twitter.com/#!/mathematicatip" target="_blank">@MathematicaTip</a> Twitter feed (or follow using <a href="http://api.twitter.com/1/statuses/user_timeline.rss?screen_name=mathematicatip" target="_blank">RSS</a>).</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.wolfram.com/2011/12/15/mathematica-qa-series-converting-to-conventional-mathematical-typesetting/feed/</wfw:commentRss>
		<slash:comments>11</slash:comments>
		</item>
	</channel>
</rss>

