<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-GB">
	<id>https://wiki.kram.nz/index.php?action=history&amp;feed=atom&amp;title=Example_1</id>
	<title>Example 1 - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.kram.nz/index.php?action=history&amp;feed=atom&amp;title=Example_1"/>
	<link rel="alternate" type="text/html" href="https://wiki.kram.nz/index.php?title=Example_1&amp;action=history"/>
	<updated>2026-04-27T09:56:33Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.45.3</generator>
	<entry>
		<id>https://wiki.kram.nz/index.php?title=Example_1&amp;diff=775&amp;oldid=prev</id>
		<title>Mark: 4 revision(s)</title>
		<link rel="alternate" type="text/html" href="https://wiki.kram.nz/index.php?title=Example_1&amp;diff=775&amp;oldid=prev"/>
		<updated>2008-11-03T05:07:59Z</updated>

		<summary type="html">&lt;p&gt;4 revision(s)&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;====Example 1==== &lt;br /&gt;
&lt;br /&gt;
Show that &amp;quot;&amp;#039;&amp;#039; f(n) is O(n^2)&amp;#039;&amp;#039;&amp;quot; when &amp;quot;&amp;#039;&amp;#039;f(n) = 5 * n(n + 100)&amp;#039;&amp;#039;&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To do this, we have to show that &amp;#039;&amp;#039; f(n) ≤ C * (n^2)&amp;#039;&amp;#039;  (or equivalently, &amp;#039;&amp;#039; 5 * n(n + 100) ≤ C * (n^2) &amp;#039;&amp;#039; - as per the definition) when n is bigger than the value n0 (which we will determine).&lt;br /&gt;
&lt;br /&gt;
We might do this by first arbitrarily picking a value of C or n0.  If, for example we choose c = 10, then the equation becomes &lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039; 5 * n(n + 100) ≤ 10 * (n^2) &amp;#039;&amp;#039;   simplified, giving   &amp;#039;&amp;#039; n(n + 100) ≤ 2 * (n^2) &amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Now, we just have find a value of n0, whereby when &amp;#039;&amp;#039; n0 ≤ n  &amp;#039; the inequality becomes true.&lt;br /&gt;
&lt;br /&gt;
In this case, if we solve the inequality for &amp;#039;&amp;#039; n, n ≤ 0 or n ≥ 100 &amp;#039;&amp;#039;.  So, when &amp;#039;&amp;#039; n ≥ 100 &amp;#039;&amp;#039;, the inequality is true, and we can give &amp;#039;&amp;#039;n0&amp;#039;&amp;#039; ANY value that is bigger than 100.&lt;br /&gt;
&lt;br /&gt;
Since it is possible to find a set of constant values for &amp;#039;&amp;#039;C&amp;#039;&amp;#039; and &amp;#039;&amp;#039;n0&amp;#039;&amp;#039;, such that &amp;#039;&amp;#039; f(n) ≤ C * g(n) &amp;#039;&amp;#039; (when &amp;#039;&amp;#039; n ≥ n0 &amp;#039;&amp;#039;), we show that &amp;#039;&amp;#039; f(n) is O(n^2) &amp;#039;&amp;#039;.&lt;/div&gt;</summary>
		<author><name>Mark</name></author>
	</entry>
</feed>