<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title>Algorithm on Alok Regmi</title>
		<link>https://alokregmi.com/tags/algorithm/</link>
		<description>Recent content in Algorithm on Alok Regmi</description>
		<generator>Hugo</generator>
		<language>en-us</language>
		
		
		
		
			<lastBuildDate>Sat, 02 May 2020 03:44:10 +0545</lastBuildDate>
		
			<atom:link href="https://alokregmi.com/tags/algorithm/index.xml" rel="self" type="application/rss+xml" />
			<item>
				<title>Algorithms</title>
				<link>https://alokregmi.com/braindump/2020/04/algorithms/</link>
				<pubDate>Tue, 21 Apr 2020 06:02:46 +0545</pubDate>
				<guid>https://alokregmi.com/braindump/2020/04/algorithms/</guid>
				<description>&lt;h2 id=&#34;algorithms&#34;&gt;Algorithms&lt;/h2&gt;&#xA;&lt;p&gt;Basic rules of complexity definition for removing terms:&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;strong&gt;Multiplicative&lt;/strong&gt; constants can be omitted: 14n2 becomes n2.&lt;/li&gt;&#xA;&lt;li&gt;n^a dominates n^b if a &amp;gt; b: for instance, n^2 dominates n.&lt;/li&gt;&#xA;&lt;li&gt;Any exponential dominates any polynomial: 3^n dominates n^5 (it even dominates 2^n).&lt;/li&gt;&#xA;&lt;li&gt;Likewise, any polynomial dominates any logarithm: n dominates (log n)^3. This also means, for example, that n^2 dominates n* log n.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;p&gt;Techniques to &lt;em&gt;think&lt;/em&gt; of counter examples:&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Think small&lt;/li&gt;&#xA;&lt;li&gt;Think exhaustively: All possibilities by adding to general cases&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;Hunt&lt;/code&gt; for the weakness: understand the problem statement and try to find loopholes&lt;/li&gt;&#xA;&lt;li&gt;Go for a tie: Attacking greedy procedures&lt;/li&gt;&#xA;&lt;li&gt;Extreme &lt;strong&gt;examples&lt;/strong&gt;:&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;p&gt;Searching for &lt;code&gt;solution&lt;/code&gt; to problem needs you to know first the type of problem it falls into:&lt;/p&gt;</description>
			</item>
			<item>
				<title>Graph Algorithms</title>
				<link>https://alokregmi.com/braindump/2020/04/graph-algorithms/</link>
				<pubDate>Sun, 19 Apr 2020 15:59:47 +0545</pubDate>
				<guid>https://alokregmi.com/braindump/2020/04/graph-algorithms/</guid>
				<description>&lt;p&gt;Graph Algos:&lt;/p&gt;&#xA;&lt;p&gt;Know when to use adjacency list vs adjacency matrices: mostly adjacency lists are used&lt;/p&gt;&#xA;&lt;p&gt;Directed and undirected graphs: Undirected have vertex linked to both the nodes i.e. we need to insert edge for both nodes&lt;/p&gt;&#xA;&lt;p&gt;Initialization of graph will set edge matrix to null, degree matrix to zero, number of vertices to zero.&lt;/p&gt;&#xA;&lt;p&gt;Edgenode data structure is created which saves the node, weight of edge  and the next edgenode reference.&lt;/p&gt;</description>
			</item>
			<item>
				<title>Graph Algorithms</title>
				<link>https://alokregmi.com/ai/graph_algos/</link>
				<pubDate>Thu, 12 Mar 2020 00:00:00 +0000</pubDate>
				<guid>https://alokregmi.com/ai/graph_algos/</guid>
				<description>&lt;p&gt;Graph Algos:&lt;/p&gt;&#xA;&lt;p&gt;Know when to use adjacency list vs adjacency matrices: mostly adjacency lists are used&lt;/p&gt;&#xA;&lt;p&gt;Directed and undirected graphs: Undirected have vertex linked to both the nodes i.e. we need to insert edge for both nodes&lt;/p&gt;&#xA;&lt;p&gt;Initialization of graph will set edge matrix to null, degree matrix to zero, number of vertices to zero.&lt;/p&gt;&#xA;&lt;p&gt;Edgenode data structure is created which saves the node, weight of edge  and the next edgenode reference.&lt;/p&gt;</description>
			</item>
	</channel>
</rss>
