<?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>thinkMoult &#187; Random</title>
	<atom:link href="http://thinkmoult.com/tag/random/feed/" rel="self" type="application/rss+xml" />
	<link>http://thinkmoult.com</link>
	<description>Seriously who ever reads this description.</description>
	<lastBuildDate>Sun, 22 Jan 2012 04:58:16 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Still alive</title>
		<link>http://thinkmoult.com/2011/10/03/still-alive/</link>
		<comments>http://thinkmoult.com/2011/10/03/still-alive/#comments</comments>
		<pubDate>Mon, 03 Oct 2011 12:02:07 +0000</pubDate>
		<dc:creator>Dion Moult</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[alive]]></category>
		<category><![CDATA[brainfart]]></category>
		<category><![CDATA[Random]]></category>

		<guid isPermaLink="false">http://thinkmoult.com/?p=1599</guid>
		<description><![CDATA[Today I was reminded about the lack of activity on my blog and on WIPUP, so tonight amidst my other projects I have sat down and I&#8217;m here writing. The last post was back near the end of my first semester, first year in architecture at the University of Sydney. Since then I&#8217;ve spent a [...]
No related posts.]]></description>
			<content:encoded><![CDATA[<p>Today I was reminded about the lack of activity on my blog and on <a href="http://live.wipup.org/">WIPUP</a>, so tonight amidst my other projects I have sat down and I&#8217;m here writing.</p>
<p>The last post was back near the end of my first semester, first year in architecture at the University of Sydney. Since then I&#8217;ve spent a lovely winter break with relatives, attended the newly formed <a href="http://blendersydneyusergroup.blogspot.com/">Sydney&#8217;s Blender User Group&#8217;</a>s two meetings, had a short trip to Adelaide to experience <a href="http://flux2011.com/">FLUX: Student Architecture Congress</a> (which was great, thankyouverymuch), performed as musical director (and terrible actor) for the <a href="http://www.architecturerevue.com/">Architecture Revue</a>, released as well as started several large-scale projects from my webdevelopment work (of which I am not linking due to NDAs), worked on some music compositions, attended some of the <a href="http://www.sydneyoperahouse.com/festivalofdangerousideas/default.aspx">Festival of Dangerous Ideas</a>, am now also available on G+, started up a band, teaching some music, read at least 10 books, learning some violin, migrated away from a KDE infrastructure (I still do forum moderation, though), ploughed through most of my second semester (almost done, eh?), turned 19, and I&#8217;m now back alive in the online world.</p>
<p>That was a pretty good in-a-nutshell of the past 4 months, 16 weeks, or third of a year. I&#8217;m personally not too happy with the create:consume ratio I&#8217;ve had, but I guess it was a necessary dip in the cycle to get back into a worthy production mode. To make a first step I&#8217;ve uploaded a short (terrible) <a href="http://live.wipup.org/updates/view/442/">experimental soundscape</a> I did with some friends a couple weeks back.</p>
<p>More to come.</p>
<p>No related posts.</p>]]></content:encoded>
			<wfw:commentRss>http://thinkmoult.com/2011/10/03/still-alive/feed/</wfw:commentRss>
		<slash:comments>12</slash:comments>
		</item>
		<item>
		<title>Tech tip #4: Copy a random set of files from a directory.</title>
		<link>http://thinkmoult.com/2010/01/12/tech-tip-4-copy-a-random-set-of-files-from-a-directory/</link>
		<comments>http://thinkmoult.com/2010/01/12/tech-tip-4-copy-a-random-set-of-files-from-a-directory/#comments</comments>
		<pubDate>Tue, 12 Jan 2010 03:15:25 +0000</pubDate>
		<dc:creator>Dion Moult</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[copy]]></category>
		<category><![CDATA[directory]]></category>
		<category><![CDATA[file]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[Random]]></category>
		<category><![CDATA[recursive]]></category>
		<category><![CDATA[tech tip]]></category>

		<guid isPermaLink="false">http://thinkmoult.com/2010/01/12/tech-tip-4-copy-a-random-set-of-files-from-a-directory/</guid>
		<description><![CDATA[More for archival purposes than anything, today I wanted to copy some songs out of my serious mess of a music &#34;collection&#34; onto my microSD card. I didn&#8217;t want to have to choose and I haven&#8217;t rated my songs so that wouldn&#8217;t help. Instead I wanted a random selection of songs. I&#8217;m not a bashmaster [...]
No related posts.]]></description>
			<content:encoded><![CDATA[<p>More for archival purposes than anything, today I wanted to copy some songs out of my serious mess of a music &quot;collection&quot; onto my microSD card. I didn&#8217;t want to have to choose and I haven&#8217;t rated my songs so that wouldn&#8217;t help. Instead I wanted a random selection of songs. I&#8217;m not a bashmaster (absolutely pathetic at it, actually) but this is what I ended up using &#8211; after symlinking all of the various directories I had my files under together:</p>
<p>find -L /home/drive/music -type f -name &quot;*.mp3&quot; | sort -R | tail -n100 | while read file; do cp &quot;$file&quot; /media/disk/music/; done</p>
<p>-n100 represents how many files are going to be copied. Hope it helps somebody! Of course any improvements are welcome.</p>
<p>No related posts.</p>]]></content:encoded>
			<wfw:commentRss>http://thinkmoult.com/2010/01/12/tech-tip-4-copy-a-random-set-of-files-from-a-directory/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>A little math probablility problem.</title>
		<link>http://thinkmoult.com/2009/07/07/a-little-math-probablility-problem/</link>
		<comments>http://thinkmoult.com/2009/07/07/a-little-math-probablility-problem/#comments</comments>
		<pubDate>Tue, 07 Jul 2009 14:28:13 +0000</pubDate>
		<dc:creator>Dion Moult</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[bored]]></category>
		<category><![CDATA[lol]]></category>
		<category><![CDATA[maths]]></category>
		<category><![CDATA[nrich]]></category>
		<category><![CDATA[Random]]></category>

		<guid isPermaLink="false">http://thinkmoult.com/?p=739</guid>
		<description><![CDATA[I was originally planning tomorrow to post the new Perspective Magazine for you to ogle at (distribution on Friday!) but I shall delay that and you shall be rewarded for waiting with a PDF you can download of the magazine. Ooh. Instead tonight I had some free time (because tomorrow I shall be skiving school [...]
No related posts.]]></description>
			<content:encoded><![CDATA[<p>I was originally planning tomorrow to post the<a href="http://thinkmoult.com/2009/06/21/perspective-in-progress/"> new Perspective Magazine</a> for you to ogle at (distribution on Friday!) but I shall delay that and you shall be rewarded for waiting with a PDF you can download of the magazine. Ooh.</p>
<p>Instead tonight I had some free time (because tomorrow I shall be <span style="text-decoration: line-through;">skiving school</span> spending time productively at home) So I decided to look at an NRICH problem. Yes, that&#8217;s right. I was so bored I decided to do math. Edit: Apparently I didn&#8217;t notice the star rating system so it seems as though I picked an easy one.</p>
<p><a href="http://nrich.maths.org/public/viewer.php?obj_id=6550">Click to see problem: Succession in Randomia</a></p>
<p>Let&#8217;s consider a probability tree:</p>
<p style="text-align: center;"><a href="http://thinkmoult.com/wp-content/uploads/2009/07/Diagram2.png"><img class="size-full wp-image-741 aligncenter" title="Diagram2" src="http://thinkmoult.com/wp-content/uploads/2009/07/Diagram2.png" border="0" alt="Diagram2" width="356" height="181" /></a></p>
<p>&#8230; OK. The first thing we notice is that it looks prettier. Let&#8217;s see the series for B now: 1/4 + 1/16 + 1/64 + &#8230; . This is identical to T. We can do the same for L and say we have 2/8 + 2/32 + 2/128 &#8230; which is exactly the same as B and T. Plugging it into a/1-r (r being 1/4) we get 1/3 for all three. Hence we can say that in fact it is a completely unbiased way of choosing a successor.</p>
<p>My answer to that question is therefore: &#8220;<strong>Yeah they have an equal chance</strong>&#8221;</p>
<p>Well, I wasn&#8217;t going to stop here. Why don&#8217;t I simulate it? Here is the coding that simulates the situation (the cheapest brute force technique to tackle the problem):</p>
<p>If you don&#8217;t know programming, go take a read through the code anyway and see if you can get a grasp of what&#8217;s going on :)</p>
<p><code>&lt;?php<br />
// The number of times each king as won.<br />
$bingo = 0;<br />
$toto = 0;<br />
$lotto = 0;</p>
<p>// How many times we are going to do the crowning ceremony<br />
$ceremonies = 10000;</p>
<p>// Loop through these instructions to carry out the crowning ceremony.<br />
for ($i = 1; $i < $ceremonies+1; $i++)<br />
{<br />
    $win = FALSE; # Nobody has become king yet.<br />
    $oddeven = 1; # Because the first throw is odd. Assume 1 = odd, 0 = even.<br />
    $firsttoss = TRUE; # We are tossing for the first time.</p>
<p>    // This variable is used later to determine which variable $x or $y is<br />
    // reassigned a value and which keeps the previous toss value.<br />
    $a = 0;</p>
<p>    // Keep on tossing the coins until somebody wins the kingdom.<br />
    while ($win == FALSE)<br />
    {<br />
        // Here we only flip one coin, this will alternate between $x and $y.<br />
        // The one ($x or $y) that isn't assigned a new value will retain the<br />
        // previous toss value so we can find out whether or not we have got<br />
        // two HH or TT in a row.<br />
        // Assume H = 1, T = 2<br />
        if ($a == 0) {<br />
            $x = rand(1,2);<br />
            $a = $a + 1;<br />
        } elseif ($a > 0) {<br />
            $y = rand(1,2);<br />
            $a = 0;<br />
        }</p>
<p>        if ($firsttoss == TRUE) {<br />
            // Nobody can win on the first toss.<br />
            $firsttoss = FALSE;<br />
        } else {<br />
            // If it is HH and ODD...<br />
            if ($x == 1 &#038;&#038; $y == 1 &#038;&#038; $oddeven == 1) {<br />
                // Lotto will become King.<br />
                $lotto = $lotto + 1;</p>
<p>                // Somebody has won the Kingdom.<br />
                $win = TRUE;<br />
            }</p>
<p>            // If it is TT and ODD...<br />
            if ($x == 2 &#038;&#038; $y == 2 &#038;&#038; $oddeven == 1) {<br />
                // Lotto will become King.<br />
                $lotto = $lotto + 1;</p>
<p>                // Somebody has won the Kingdom.<br />
                $win = TRUE;<br />
            }</p>
<p>            // If it is HH and EVEN...<br />
            if ($x == 1 &#038;&#038; $y == 1 &#038;&#038; $oddeven == 0) {<br />
                // Bingo will become King.<br />
                $bingo = $bingo + 1;</p>
<p>                // Somebody has won the Kingdom.<br />
                $win = TRUE;<br />
            }</p>
<p>            // If it is TT and EVEN...<br />
            if ($x == 2 &#038;&#038; $y == 2 &#038;&#038; $oddeven == 0) {<br />
                // Toto will become King.<br />
                $toto = $toto + 1;</p>
<p>                // Somebody has won the Kingdom.<br />
                $win = TRUE;<br />
            }<br />
        }</p>
<p>        // ... If nobody has won anything ...<br />
        if ($win != TRUE) {<br />
            // We flip again, so Odd->Even or Even->Odd.<br />
            if ($oddeven == 0) {<br />
                $oddeven = 1;<br />
            } else {<br />
                $oddeven = 0;<br />
            }<br />
        }<br />
    }<br />
}</p>
<p>// Tell the computer to print out what results we have.<br />
echo 'Bingo: '. $bingo .'<br />';<br />
echo 'Toto: '. $toto .'<br />';<br />
echo 'Lotto: '. $lotto .'<br />';<br />
?&gt;</code></p>
<p>I ran it and here is an example result I get. Out of 10,000 ceremonies, this is the number of times each king has won:</p>
<p><strong>Bingo: 3322<br />
Toto: 3340<br />
Lotto: 3338</strong></p>
<p>Pretty close, eh?</p>
<p>No related posts.</p>]]></content:encoded>
			<wfw:commentRss>http://thinkmoult.com/2009/07/07/a-little-math-probablility-problem/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The end is nigh!</title>
		<link>http://thinkmoult.com/2008/11/02/the-end-is-nigh/</link>
		<comments>http://thinkmoult.com/2008/11/02/the-end-is-nigh/#comments</comments>
		<pubDate>Sun, 02 Nov 2008 12:40:41 +0000</pubDate>
		<dc:creator>Dion Moult</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[camp]]></category>
		<category><![CDATA[Random]]></category>
		<category><![CDATA[windows]]></category>

		<guid isPermaLink="false">http://thinkmoult.com/?p=240</guid>
		<description><![CDATA[You know the end is nigh when October ends. You know the end is nigh when you have an idea blockage and instead perform a medley of short compositions. You know the end is nigh when you dress up as an Ipod commercial for Halloween. You know the end is nigh when 9 people are [...]
No related posts.]]></description>
			<content:encoded><![CDATA[<ul>
<li>You know the end is nigh when October ends.</li>
<li>You know the end is nigh when you have an idea blockage and instead perform a medley of short compositions.</li>
<li>You know the end is nigh when you dress up as an Ipod commercial for Halloween.</li>
<li>You know the end is nigh when 9 people are chasing you for stuff in <em>one day</em>.</li>
<li>You know the end is nigh when you are chasing 9 (different) people for stuff <em>also in one day</em>.</li>
<li>You know the end is nigh when you want to get 9 (also unrelated) major tasks completed <em>in that very same day</em>.</li>
<li>You know the end is nigh when I actually follow my promise to do a post every 2 days (yeah cheapskate posts like these count too)</li>
</ul>
<p>On a completely unrelated note, tomorrow I will be leaving for a camp, where I will spend my days trekking in the jungles, whilstling away the beads of sweat that erode canyons into my forehead. This means that there won&#8217;t be any blog posts (ha, don&#8217;t even ask about Twitter) during that time.</p>
<p>Oh and to make it slightly more interesting, if you read <a href="http://thinkmoult.com/2008/10/31/windows-7/">my previous post about Windows 7</a>, here is <a href="http://arstechnica.com/news.ars/post/20081028-first-look-at-windows-7.html">more interesting information</a>.</p>
<p>Finally, some past articles now have (related) information posted at the top.</p>
<p>No related posts.</p>]]></content:encoded>
			<wfw:commentRss>http://thinkmoult.com/2008/11/02/the-end-is-nigh/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

