<?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>Dave McDermid &#187; maths</title>
	<atom:link href="http://www.davemcdermid.co.uk/tag/maths/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.davemcdermid.co.uk</link>
	<description>Just another WordPress weblog</description>
	<lastBuildDate>Tue, 19 Jan 2010 00:59:30 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Of Patterns, Probabilities and Palindromes</title>
		<link>http://www.davemcdermid.co.uk/2009/01/of-patterns-probabilities-and-palindromes/</link>
		<comments>http://www.davemcdermid.co.uk/2009/01/of-patterns-probabilities-and-palindromes/#comments</comments>
		<pubDate>Mon, 26 Jan 2009 19:53:12 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Musings]]></category>
		<category><![CDATA[maths]]></category>
		<category><![CDATA[probability]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[websites]]></category>

		<guid isPermaLink="false">http://www.davemcdermid.co.uk/2009/01/of-patterns-probabilities-and-palindromes/</guid>
		<description><![CDATA[We discovered an interesting little problem last week. Interesting, that is, if you enjoy Maths a little more than is healthy. I was interested because what seemed to be a random problem when it should have been consistent, turned out just to be a random problem.
So here is what was happening. Our Sitewatcher was randomly [...]]]></description>
			<content:encoded><![CDATA[<p>We discovered an interesting little problem last week. Interesting, that is, if you enjoy Maths a little more than is healthy. I was interested because what seemed to be a random problem when it should have been consistent, turned out just to be a random problem.</p>
<p>So here is what was happening. Our <a href="http://www.davemcdermid.co.uk/2009/01/air-time/">Sitewatcher</a> was randomly showing a few sites returning 404 (page not found) errors. This was curious, because it was requesting the home page, and this page was certainly not missing. As it happens, there is a tiny weeny glitch  with a couple of sites in that they will return a 404 code on the home page if the number 404 features in the query-string. This doesn&#8217;t happen in normal circumstances, but as <a href="http://docs.jquery.com/Ajax/jQuery.ajax#options">cache:false</a> was being used with jQuery, it was appending a random number to the request.</p>
<p>So here is the question. What is the probability of the number 404 occurring in a random 10 digit sequence? Not so trivial. Particularly because the number is itself is a palindrome. It can overlap itself, causing the number to appear as often as 4 times, making the calculation a little tricky.</p>
<p>We reckoned, by rough estimations, for it to be 1 in ~125, but no doubt a serious mathematician can enlighten us.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.davemcdermid.co.uk/2009/01/of-patterns-probabilities-and-palindromes/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
