<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
<channel>
<title>Algorithms Q&amp;A - Recent questions</title>
<link>https://notexponential.com/questions</link>
<description>Powered by Question2Answer</description>
<item>
<title>MLE for given HMM and Observation Sequence (Needs Computation)</title>
<link>https://notexponential.com/1100/mle-for-given-hmm-and-observation-sequence-needs-computation</link>
<description>&lt;p style=&quot;margin-top: 0px; font-family: Helvetica, Arial, sans-serif; font-size: 14px;&quot;&gt;We are given an MDP&amp;nbsp;with&amp;nbsp;3 states: Red, Green, Blue (RGB).&amp;nbsp;&lt;/p&gt;&lt;p style=&quot;margin-top: 0px; font-family: Helvetica, Arial, sans-serif; font-size: 14px;&quot;&gt;&lt;strong&gt;Emission probabilities:&lt;/strong&gt;&amp;nbsp;&amp;nbsp;&lt;/p&gt;&lt;p style=&quot;margin-top: 0px; font-family: Helvetica, Arial, sans-serif; font-size: 14px;&quot;&gt;R --&amp;gt; 1 (p=1/2), 2&amp;nbsp;(p=1/4), 3 (p=1/4)&lt;/p&gt;&lt;p style=&quot;margin-top: 0px; font-family: Helvetica, Arial, sans-serif; font-size: 14px;&quot;&gt;G --&amp;gt; 1 (p=1/4), 2&amp;nbsp;(p=1/2), 3 (p=1/4)&lt;/p&gt;&lt;p style=&quot;margin-top: 0px; font-family: Helvetica, Arial, sans-serif; font-size: 14px;&quot;&gt;B --&amp;gt; 1 (p=1/6), 2&amp;nbsp;(p=1/6), 3 (p=1/6), 4 (p=1/2)&lt;/p&gt;&lt;p style=&quot;margin-top: 0px; font-family: Helvetica, Arial, sans-serif; font-size: 14px;&quot;&gt;&lt;strong&gt;Transition Matrix&lt;/strong&gt;&lt;/p&gt;&lt;p style=&quot;margin-top: 0px; font-family: Helvetica, Arial, sans-serif; font-size: 14px;&quot;&gt;R --&amp;gt; R (p=1/3), G&amp;nbsp;(p=1/3), B (p=1/3)&lt;/p&gt;&lt;p style=&quot;margin-top: 0px; font-family: Helvetica, Arial, sans-serif; font-size: 14px;&quot;&gt;G --&amp;gt; G&amp;nbsp;(p=1/2), B (p=1/2)&lt;/p&gt;&lt;p style=&quot;margin-top: 0px; font-family: Helvetica, Arial, sans-serif; font-size: 14px;&quot;&gt;B --&amp;gt; B (p=1)&lt;/p&gt;&lt;p style=&quot;margin-top: 0px; font-family: Helvetica, Arial, sans-serif; font-size: 14px;&quot;&gt;These are the observations: 1, 2, 3, 1, 1, 2, 1, 2, 3, 1, 1&lt;/p&gt;&lt;p style=&quot;margin-top: 0px; font-family: Helvetica, Arial, sans-serif; font-size: 14px;&quot;&gt;What is the most likely explanation for this observation sequence?&lt;br&gt;Initial state is R.&lt;/p&gt;</description>
<guid isPermaLink="true">https://notexponential.com/1100/mle-for-given-hmm-and-observation-sequence-needs-computation</guid>
<pubDate>Tue, 28 Apr 2026 20:03:38 +0000</pubDate>
</item>
<item>
<title>MLE for given HMM and Observation Sequence</title>
<link>https://notexponential.com/1053/mle-for-given-hmm-and-observation-sequence</link>
<description>&lt;p&gt;&lt;/p&gt;&lt;div class=&quot;qa-q-view-tags&quot; style=&quot;clear: both; margin-bottom: 12px; color: rgb(51, 51, 51); font-family: Helvetica, Arial, sans-serif; font-size: 14px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: normal; background-color: rgb(255, 255, 255); text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;qa-q-view-content qa-post-content&quot; style=&quot;word-break: break-word; margin-bottom: 16px; color: rgb(51, 51, 51); font-family: Helvetica, Arial, sans-serif; font-size: 14px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: normal; background-color: rgb(255, 255, 255); text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;&quot;&gt;&lt;div&gt;&lt;p style=&quot;margin-top: 0px; font-family: Helvetica, Arial, sans-serif; font-size: 14px;&quot;&gt;We are given an MDP&amp;nbsp;with&amp;nbsp;3 states: Red, Green, Blue (RGB).&amp;nbsp;&lt;/p&gt;&lt;p style=&quot;margin-top: 0px; font-family: Helvetica, Arial, sans-serif; font-size: 14px;&quot;&gt;&lt;strong&gt;Emission probabilities:&lt;/strong&gt;&amp;nbsp;&amp;nbsp;&lt;/p&gt;&lt;p style=&quot;margin-top: 0px; font-family: Helvetica, Arial, sans-serif; font-size: 14px;&quot;&gt;R --&amp;gt; 1 (p=1/3), 2&amp;nbsp;(p=1/3), 3 (p=1/3)&lt;/p&gt;&lt;p style=&quot;margin-top: 0px; font-family: Helvetica, Arial, sans-serif; font-size: 14px;&quot;&gt;G --&amp;gt; 1 (p=1/3), 2&amp;nbsp;(p=1/3), 3 (p=1/3)&lt;/p&gt;&lt;p style=&quot;margin-top: 0px; font-family: Helvetica, Arial, sans-serif; font-size: 14px;&quot;&gt;B --&amp;gt; 1 (p=1/3), 2&amp;nbsp;(p=1/3), 3 (p=1/3)&lt;/p&gt;&lt;p style=&quot;margin-top: 0px; font-family: Helvetica, Arial, sans-serif; font-size: 14px;&quot;&gt;&lt;strong&gt;Transition Matrix&lt;/strong&gt;&lt;/p&gt;&lt;p style=&quot;margin-top: 0px; font-family: Helvetica, Arial, sans-serif; font-size: 14px;&quot;&gt;R --&amp;gt; R (p=1/3), G&amp;nbsp;(p=1/3), B (p=1/3)&lt;/p&gt;&lt;p style=&quot;margin-top: 0px; font-family: Helvetica, Arial, sans-serif; font-size: 14px;&quot;&gt;G --&amp;gt; G&amp;nbsp;(p=1/2), B (p=1/2)&lt;/p&gt;&lt;p style=&quot;margin-top: 0px; font-family: Helvetica, Arial, sans-serif; font-size: 14px;&quot;&gt;B --&amp;gt; B (p=1)&lt;/p&gt;&lt;p style=&quot;margin-top: 0px; font-family: Helvetica, Arial, sans-serif; font-size: 14px;&quot;&gt;These are the observations: 1, 2, 3, 1, 1, 2, 1, 2, 3, 1, 1, 2, 2, 1, 3, 2, 2, 1, 1, 2, 1, 1, 1, 2, 1&lt;/p&gt;&lt;p style=&quot;margin-top: 0px; font-family: Helvetica, Arial, sans-serif; font-size: 14px;&quot;&gt;What is the most likely explanation for this observation sequence?&lt;br&gt;Initial state is R.&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;</description>
<category>HMM</category>
<guid isPermaLink="true">https://notexponential.com/1053/mle-for-given-hmm-and-observation-sequence</guid>
<pubDate>Sat, 25 Apr 2026 15:40:44 +0000</pubDate>
</item>
<item>
<title>MLE for given HMM and Observation Sequence</title>
<link>https://notexponential.com/1050/mle-for-given-hmm-and-observation-sequence</link>
<description>&lt;p style=&quot;margin-top: 0px; font-family: Helvetica, Arial, sans-serif; font-size: 14px;&quot;&gt;We are given an MDP&amp;nbsp;with&amp;nbsp;3 states: Red, Green, Blue (RGB).&amp;nbsp;&lt;/p&gt;&lt;p style=&quot;margin-top: 0px; font-family: Helvetica, Arial, sans-serif; font-size: 14px;&quot;&gt;&lt;strong&gt;Emission probabilities:&lt;/strong&gt;&amp;nbsp;&amp;nbsp;&lt;/p&gt;&lt;p style=&quot;margin-top: 0px; font-family: Helvetica, Arial, sans-serif; font-size: 14px;&quot;&gt;R --&amp;gt; 1 (p=1/3), 2&amp;nbsp;(p=1/3), 3 (p=1/3)&lt;/p&gt;&lt;p style=&quot;margin-top: 0px; font-family: Helvetica, Arial, sans-serif; font-size: 14px;&quot;&gt;G --&amp;gt; 1 (p=1/3), 2&amp;nbsp;(p=1/3), 3 (p=1/3)&lt;/p&gt;&lt;p style=&quot;margin-top: 0px; font-family: Helvetica, Arial, sans-serif; font-size: 14px;&quot;&gt;B --&amp;gt; 1 (p=1/3), 2&amp;nbsp;(p=1/3), 3 (p=1/3)&lt;/p&gt;&lt;p style=&quot;margin-top: 0px; font-family: Helvetica, Arial, sans-serif; font-size: 14px;&quot;&gt;&lt;strong&gt;Transition Matrix&lt;/strong&gt;&lt;/p&gt;&lt;p style=&quot;margin-top: 0px; font-family: Helvetica, Arial, sans-serif; font-size: 14px;&quot;&gt;R --&amp;gt; R (p=1/3), G&amp;nbsp;(p=1/3), B (p=1/3)&lt;/p&gt;&lt;p style=&quot;margin-top: 0px; font-family: Helvetica, Arial, sans-serif; font-size: 14px;&quot;&gt;G --&amp;gt; R (p=1/3), G&amp;nbsp;(p=1/3), B (p=1/3)&lt;/p&gt;&lt;p style=&quot;margin-top: 0px; font-family: Helvetica, Arial, sans-serif; font-size: 14px;&quot;&gt;B --&amp;gt; R (p=1/3), G&amp;nbsp;(p=1/3), B (p=1/3)&lt;/p&gt;&lt;p style=&quot;margin-top: 0px; font-family: Helvetica, Arial, sans-serif; font-size: 14px;&quot;&gt;These are the observations: 1, 2, 3, 1, 1, 2, 1, 2, 3, 1, 1, 2, 2&lt;/p&gt;&lt;p style=&quot;margin-top: 0px; font-family: Helvetica, Arial, sans-serif; font-size: 14px;&quot;&gt;What is the most likely explanation for this observation sequence?&lt;br&gt;Initial state is not known and is equally likely from all states.&lt;/p&gt;</description>
<category>HMM</category>
<guid isPermaLink="true">https://notexponential.com/1050/mle-for-given-hmm-and-observation-sequence</guid>
<pubDate>Sat, 25 Apr 2026 13:26:54 +0000</pubDate>
</item>
<item>
<title>MLE for the given MDP and Observation Sequence (RGB Color Cycler)</title>
<link>https://notexponential.com/1047/mle-for-the-given-mdp-and-observation-sequence-color-cycler</link>
<description>&lt;p&gt;We are given an MDP&amp;nbsp;with&amp;nbsp;3 states: Red, Green, Blue (RGB).&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;Emission probabilities:&lt;/strong&gt;&amp;nbsp;&amp;nbsp;&lt;/p&gt;&lt;p&gt;R --&amp;gt; 1 (p=0.4), 2, (p=0.5), 3 (p-0.1)&lt;/p&gt;&lt;p&gt;G --&amp;gt; 1 (p=0.3), 2 (p=0.3), 3 (p=0.4)&amp;nbsp;&lt;/p&gt;&lt;p&gt;B --&amp;gt; 1 (p=0.4), 2 (p=0.1), 3 (p=0.1), 4 (p=0.4).&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;Transition Matrix:&lt;/strong&gt;&amp;nbsp;R -&amp;gt; G (p = 1.0), G -&amp;gt; B (p = 1.0), B -&amp;gt; R (p = 1.0).&amp;nbsp;&lt;/p&gt;&lt;p&gt;These are the observations: 1, 2, 3, 4, 1, 3, 1, 2, 3&lt;/p&gt;&lt;p&gt;What is the most likely explanation for this observation sequence?&lt;br&gt;Initial state is not known and is equally likely from all states.&lt;/p&gt;</description>
<category>HMM</category>
<guid isPermaLink="true">https://notexponential.com/1047/mle-for-the-given-mdp-and-observation-sequence-color-cycler</guid>
<pubDate>Sat, 25 Apr 2026 01:09:37 +0000</pubDate>
</item>
<item>
<title>Heads - 2 in a row</title>
<link>https://notexponential.com/1014/heads-2-in-a-row</link>
<description>I have two coins, Fair coin - gives H and T with 0.5 probability each, and a Biased coin, always gives H.&lt;br /&gt;
&lt;br /&gt;
I pick one of the two coins randomly and toss it. It comes up as heads. I toss it again. What is the probability that it comes up as heads again?</description>
<category>HMM</category>
<guid isPermaLink="true">https://notexponential.com/1014/heads-2-in-a-row</guid>
<pubDate>Tue, 14 Apr 2026 21:06:07 +0000</pubDate>
</item>
<item>
<title>Why is it useful to compute the marginal distribution instead of working with the full joint distribution?</title>
<link>https://notexponential.com/996/compute-marginal-distribution-instead-working-distribution</link>
<description>&lt;p&gt;Suppose we model weather using two variables:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;X: Weather condition (Sunny, Cloudy, Rainy)&lt;/li&gt;&lt;li&gt;Y: Whether people carry an umbrella (Yes, No)&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;You are given the &lt;strong&gt;joint distribution&lt;/strong&gt;:&lt;/p&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;&lt;/th&gt;&lt;th&gt;Umbrella (Yes)&lt;/th&gt;&lt;th&gt;Umbrella (No)&lt;/th&gt;&lt;th&gt;Total&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;Sunny&lt;/td&gt;&lt;td&gt;0.05&lt;/td&gt;&lt;td&gt;0.35&lt;/td&gt;&lt;td&gt;0.40&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Cloudy&lt;/td&gt;&lt;td&gt;0.15&lt;/td&gt;&lt;td&gt;0.15&lt;/td&gt;&lt;td&gt;0.30&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Rainy&lt;/td&gt;&lt;td&gt;0.25&lt;/td&gt;&lt;td&gt;0.05&lt;/td&gt;&lt;td&gt;0.30&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;strong&gt;Total&lt;/strong&gt;&lt;/td&gt;&lt;td&gt;0.45&lt;/td&gt;&lt;td&gt;0.55&lt;/td&gt;&lt;td&gt;1.00&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;hr&gt;&lt;h3&gt;&lt;strong&gt;Core Question&lt;/strong&gt;&lt;/h3&gt;&lt;p&gt;&lt;strong&gt;If you are only interested in predicting whether people carry umbrellas, regardless of the actual weather:&amp;nbsp;&lt;/strong&gt;&lt;strong&gt;Why is it useful to compute the marginal distribution of umbrella usage instead of working with the full joint distribution? What do you gain and what do you lose by marginalizing out the weather variable?&lt;/strong&gt;&lt;/p&gt;&lt;h3&gt;&lt;strong&gt;Some Discussion Points&lt;/strong&gt;&lt;/h3&gt;&lt;p&gt;&lt;/p&gt;&lt;ol&gt;&lt;li&gt;&lt;strong&gt;Relevance to Modeling&lt;/strong&gt;&lt;ul&gt;&lt;li&gt;In what situations would an AI system care only about P(Y) rather than P(X,Y)?&lt;/li&gt;&lt;li&gt;Is marginalization equivalent to “ignoring causes” in this context?&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Hidden Variables / Latent State&lt;/strong&gt;&lt;ul&gt;&lt;li&gt;If weather were &lt;em&gt;unobserved&lt;/em&gt;, how would marginalization help in modeling behavior?&lt;/li&gt;&lt;li&gt;How does this relate to hidden state models (e.g., HMMs in AI)?&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Decision-Making&lt;/strong&gt;&lt;ul&gt;&lt;li&gt;Suppose a city planner wants to estimate umbrella demand.&lt;/li&gt;&lt;li&gt;Is P(Y)&amp;nbsp;sufficient, or do they need P(Y/X)?&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Information Loss&lt;/strong&gt;&lt;ul&gt;&lt;li&gt;What important causal relationship disappears when we marginalize out weather?&lt;/li&gt;&lt;li&gt;Could two very different weather patterns produce the same marginal umbrella usage?&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;/ol&gt;</description>
<category>MDP</category>
<guid isPermaLink="true">https://notexponential.com/996/compute-marginal-distribution-instead-working-distribution</guid>
<pubDate>Tue, 07 Apr 2026 22:16:23 +0000</pubDate>
</item>
<item>
<title>Solve this grid world.</title>
<link>https://notexponential.com/982/solve-this-grid-world</link>
<description>&lt;p&gt;Solve the final V* values for the given grid world.&amp;nbsp; All given values are exit states.&amp;nbsp; Fill in all missing cells.&amp;nbsp; Don’t use value iteration.&amp;nbsp; Show all your work/logic/steps, etc.&lt;/p&gt;&lt;p&gt;Assume: Gamma = 0.9.&amp;nbsp; Noise Model: [0.8, 0.1, 0.1], that is, 80% chance of going in the intended direction and 10% in each of perpendicular ones.&lt;/p&gt;&lt;p&gt;Using pen and paper is preferable.&lt;/p&gt;&lt;div&gt;&lt;/div&gt;</description>
<category>Informed Search</category>
<guid isPermaLink="true">https://notexponential.com/982/solve-this-grid-world</guid>
<pubDate>Tue, 06 May 2025 15:13:38 +0000</pubDate>
</item>
<item>
<title>Admissible Heuristic for Chutes and Ladders</title>
<link>https://notexponential.com/981/admissible-heuristic-for-chutes-and-ladders</link>
<description>You are a player of Chutes and Ladders. You are going from cell 1 to cell 100, using standard 6 faced dice. There are “chutes” and “ladders” that hurt and help, respectively.&lt;br /&gt;
Explain an algorithm to calculate an admissible heuristic starting square i.</description>
<category>Informed Search</category>
<guid isPermaLink="true">https://notexponential.com/981/admissible-heuristic-for-chutes-and-ladders</guid>
<pubDate>Tue, 06 May 2025 15:12:07 +0000</pubDate>
</item>
<item>
<title>Weird N Puzzle</title>
<link>https://notexponential.com/980/weird-n-puzzle</link>
<description>You are given a weirdly shaped n puzzle (sliding puzzle).&lt;br /&gt;
&lt;br /&gt;
The best way to imagine the shape is that think of 10 x 10 n puzzle (a rather large one), and that some tiles in the center are just fixed - they don&amp;#039;t move. (See Slack for an example).&lt;br /&gt;
&lt;br /&gt;
For this problem, what is a good heuristic, from an A Star algorithm perspective? Clearly Manhattan Distance still works, but is that the best?</description>
<category>Informed Search</category>
<guid isPermaLink="true">https://notexponential.com/980/weird-n-puzzle</guid>
<pubDate>Tue, 04 Mar 2025 16:03:53 +0000</pubDate>
</item>
<item>
<title>I have all the (unsorted) cards</title>
<link>https://notexponential.com/979/i-have-all-the-unsorted-cards</link>
<description>You are given 52 playing cards, organized in 4 columns and 13 rows. However, these are all Aces, in 4 different colors: red, blue, green and yellow. These are all jumbled up. You are supposed to organize them such that each column has one color of Aces only. You can decide which color you want to go in which column. The only move that you can move is to swap/exchange two cards that horizontally or vertically adjacent. That is, just vertical or horizontal movement, like the n-puzzle, and no diagonal moves.&lt;br /&gt;
&lt;br /&gt;
Analyze the problem, and present an algorithm for this. Present your heuristic. No need to explain how A-Star works itself. Describe without using any pseudocode.</description>
<category>Informed Search</category>
<guid isPermaLink="true">https://notexponential.com/979/i-have-all-the-unsorted-cards</guid>
<pubDate>Tue, 04 Mar 2025 15:50:53 +0000</pubDate>
</item>
<item>
<title>Analyze Double Loop - j starts from i*i</title>
<link>https://notexponential.com/976/analyze-double-loop-j-starts-from-i-i</link>
<description>&lt;p&gt;&lt;span style=&quot;font-family:Helvetica,Arial,sans-serif; font-size:14px&quot;&gt;for (int i = 1 to n) {&lt;/span&gt;&lt;br style=&quot;font-family: Helvetica, Arial, sans-serif; font-size: 14px;&quot;&gt;&lt;span style=&quot;font-family:Helvetica,Arial,sans-serif; font-size:14px&quot;&gt;&amp;nbsp;&amp;nbsp;for (int j = i*i to n) {&lt;/span&gt;&lt;br style=&quot;font-family: Helvetica, Arial, sans-serif; font-size: 14px;&quot;&gt;&lt;span style=&quot;font-family:Helvetica,Arial,sans-serif; font-size:14px&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family:Helvetica,Arial,sans-serif; font-size:14px&quot;&gt;&amp;nbsp; &amp;nbsp;sum += a[i]*b[j]&lt;/span&gt;&lt;br style=&quot;font-family: Helvetica, Arial, sans-serif; font-size: 14px;&quot;&gt;&lt;span style=&quot;font-family:Helvetica,Arial,sans-serif; font-size:14px&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family:Helvetica,Arial,sans-serif; font-size:14px&quot;&gt;&amp;nbsp;}&lt;/span&gt;&lt;br style=&quot;font-family: Helvetica, Arial, sans-serif; font-size: 14px;&quot;&gt;&lt;span style=&quot;font-family:Helvetica,Arial,sans-serif; font-size:14px&quot;&gt;}&lt;/span&gt;&lt;/p&gt;</description>
<category>Asymptotic Analysis</category>
<guid isPermaLink="true">https://notexponential.com/976/analyze-double-loop-j-starts-from-i-i</guid>
<pubDate>Fri, 22 Nov 2024 15:11:57 +0000</pubDate>
</item>
<item>
<title>Analyze Triple Loop - j and k start with i^2 and j^2 respectively</title>
<link>https://notexponential.com/975/analyze-triple-loop-j-and-k-start-with-i-2-and-j-2-respectively</link>
<description>for (int i = 1 to n) {&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;for (int j = i*i to n) {&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;for (int k = j*j to n) {&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;sum += a[i]*b[j]*c[k]&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;}&lt;br /&gt;
&lt;br /&gt;
}</description>
<category>Asymptotic Analysis</category>
<guid isPermaLink="true">https://notexponential.com/975/analyze-triple-loop-j-and-k-start-with-i-2-and-j-2-respectively</guid>
<pubDate>Mon, 04 Nov 2024 16:01:18 +0000</pubDate>
</item>
<item>
<title>Give an example of a graph that has 6 vertices, 9 edges, but does not have a clique on 3 vertices</title>
<link>https://notexponential.com/917/give-example-graph-that-vertices-edges-does-clique-vertices</link>
<description>Give an example of a graph that has 6 vertices, 9 edges, but does not have a clique on 3 vertices</description>
<category>Graph Theory</category>
<guid isPermaLink="true">https://notexponential.com/917/give-example-graph-that-vertices-edges-does-clique-vertices</guid>
<pubDate>Tue, 12 Dec 2023 03:28:42 +0000</pubDate>
</item>
<item>
<title>True or False: Every graph of 6 vertices must have either an Independent Set of size &gt;= 3 or a clique of size &gt;= 3.</title>
<link>https://notexponential.com/898/true-false-every-graph-vertices-either-independent-clique</link>
<description>True or False: Every graph of 6 vertices must have either an Independent Set of size &amp;gt;= 3 or a clique of size &amp;gt;= 3.&lt;br /&gt;
&lt;br /&gt;
Eithe prove the statement, or provide a counter example.</description>
<guid isPermaLink="true">https://notexponential.com/898/true-false-every-graph-vertices-either-independent-clique</guid>
<pubDate>Mon, 11 Dec 2023 00:36:19 +0000</pubDate>
</item>
<item>
<title>“Discovery of the Sun”</title>
<link>https://notexponential.com/889/discovery-of-the-sun</link>
<description>&lt;p&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;margin-top:12.0pt&quot;&gt;A &quot;sun&quot; graph looks like a circle, with a hanging vertex on the each vertex on the loop.&lt;span style=&quot;mso-spacerun:yes&quot;&gt;&amp;nbsp; &lt;/span&gt;The problem to discover the sun is defined as follows: Given a graph G, identify, is there a sun graph inside the given graph G?&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;margin-top:12.0pt&quot;&gt;&lt;img alt=&quot;Sun Graph&quot; src=&quot;https://notexponential.com/?qa=blob&amp;amp;qa_blobid=8168016906999184092&quot; style=&quot;height:298px; width:314px&quot;&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;margin-top:12.0pt&quot;&gt;Prove that this problem is NP-complete using any of the known NP-complete problems as a starting point.&lt;/p&gt;&lt;p&gt;&lt;/p&gt;</description>
<guid isPermaLink="true">https://notexponential.com/889/discovery-of-the-sun</guid>
<pubDate>Sun, 10 Dec 2023 19:27:00 +0000</pubDate>
</item>
<item>
<title>Graph that has 2 long paths</title>
<link>https://notexponential.com/875/graph-that-has-2-long-paths</link>
<description>We are given a graph G. We need to identify whether there exist two long paths inside the graph G, such that those paths span the entire vertex set of G. &amp;nbsp;The two paths need to be disjoint (have no vertices or edges in common. This also means that the two paths need to start and end at different vertices. For example, the following graph G does have two long paths:&lt;br /&gt;
&lt;br /&gt;
0----0----0----0&lt;br /&gt;
| &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;|&lt;br /&gt;
0----0----0----0&lt;br /&gt;
&lt;br /&gt;
As another example, following graph does not have &amp;quot;2 long path&amp;quot; structure:&lt;br /&gt;
0-----0 &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;0------------0 0------------0&lt;br /&gt;
&lt;br /&gt;
For this problem, either given a polynomial time algorithm, or show that the problem is NP complete.</description>
<guid isPermaLink="true">https://notexponential.com/875/graph-that-has-2-long-paths</guid>
<pubDate>Sat, 09 Dec 2023 17:35:20 +0000</pubDate>
</item>
<item>
<title>Solve this recurrence relation: T(n) = T(n/2) + n/log n</title>
<link>https://notexponential.com/874/solve-this-recurrence-relation-t-n-t-n-2-n-log-n</link>
<description>Solve this recurrence relation: T(n) = T(n/2) + n/log n</description>
<guid isPermaLink="true">https://notexponential.com/874/solve-this-recurrence-relation-t-n-t-n-2-n-log-n</guid>
<pubDate>Sat, 09 Dec 2023 17:16:58 +0000</pubDate>
</item>
<item>
<title>Given an array of numbers, find triplets i,j,k such that a[i] + a[j] = a[k]</title>
<link>https://notexponential.com/860/given-an-array-of-numbers-find-triplets-i-j-k-such-that-a-i-a-j-a-k</link>
<description>You are given an array of numbers a[1..n]&lt;br /&gt;
&lt;br /&gt;
Give an algorithm to find triplets i,j,k such that a[i] + a[j] = a[k].&lt;br /&gt;
&lt;br /&gt;
The time complexity of your algorithm should be better than n^3, that is o(n^3) // small oh notation.</description>
<guid isPermaLink="true">https://notexponential.com/860/given-an-array-of-numbers-find-triplets-i-j-k-such-that-a-i-a-j-a-k</guid>
<pubDate>Sun, 03 Dec 2023 15:40:42 +0000</pubDate>
</item>
<item>
<title>Is there a solution to this PCP instance?</title>
<link>https://notexponential.com/856/is-there-a-solution-to-this-pcp-instance</link>
<description>X = [a, ab, bc, ad]&lt;br /&gt;
&lt;br /&gt;
Y = [bc, cab, dab, ac]</description>
<guid isPermaLink="true">https://notexponential.com/856/is-there-a-solution-to-this-pcp-instance</guid>
<pubDate>Fri, 01 Dec 2023 23:45:21 +0000</pubDate>
</item>
<item>
<title>MVCS of Alternating Positive and Negative Numbers - Which Statements are True?</title>
<link>https://notexponential.com/840/mvcs-alternating-positive-negative-numbers-which-statements</link>
<description>Given an Array A(1..n) of alternating positive and negative values, our objective is to find a contiguous subsequence A(i..j) such that the sum of the terms in the selected subsequence is maximized.&lt;br /&gt;
&lt;br /&gt;
With respect to this problem, which of these statements are true?&lt;br /&gt;
&lt;br /&gt;
1. The largest positive number must be in the optimal subsequence&lt;br /&gt;
&lt;br /&gt;
2. The largest negative number is not in the optimal subsequence.&lt;br /&gt;
&lt;br /&gt;
3. f a positive number is surrounded by negative numbers which are larger than the positive number (in magnitude, for example -11,10,-11), then that positive number will not be in the optimal subsequence. &lt;br /&gt;
&lt;br /&gt;
4. If a positive number is surrounded by negative numbers that are smaller than the positive number (in magnitude, for example, -5, 10, -5), then that positive number is in the optimal subsequence.&lt;br /&gt;
&lt;br /&gt;
Please note that the question ONLY asks you to determine which of the 4 statements are true. No algorithm is being asked here.</description>
<guid isPermaLink="true">https://notexponential.com/840/mvcs-alternating-positive-negative-numbers-which-statements</guid>
<pubDate>Mon, 13 Nov 2023 22:43:18 +0000</pubDate>
</item>
<item>
<title>Nested loop analysis, outer loop grows by sqrt n, inner randomly</title>
<link>https://notexponential.com/839/nested-loop-analysis-outer-loop-grows-by-sqrt-inner-randomly</link>
<description>&lt;pre class=&quot;Code&quot; style=&quot;margin: 0in;&quot;&gt;&lt;span style=&quot;font-size:12px&quot;&gt;&lt;span style=&quot;font-family:Lucida Sans Unicode,Lucida Grande,sans-serif&quot;&gt;j = 1
&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;p class=&quot;Code&quot; style=&quot;margin: 0in; font-size: 11pt; font-family: &amp;quot;Lucida Console&amp;quot;; color: rgb(0, 0, 0); text-align: left;&quot;&gt;&lt;span style=&quot;font-size:12px&quot;&gt;&lt;span style=&quot;font-family:Lucida Sans Unicode,Lucida Grande,sans-serif&quot;&gt;while (j &amp;lt; n) {&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size:10pt&quot;&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;Code&quot; style=&quot;margin: 0in; font-size: 11pt; font-family: &amp;quot;Lucida Console&amp;quot;; color: rgb(0, 0, 0); text-align: left;&quot;&gt;&lt;span style=&quot;font-size:12px&quot;&gt;&lt;span style=&quot;font-family:Lucida Sans Unicode,Lucida Grande,sans-serif&quot;&gt;&amp;nbsp;&amp;nbsp;k = j&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size:10pt&quot;&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;Code&quot; style=&quot;margin: 0in; font-size: 11pt; font-family: &amp;quot;Lucida Console&amp;quot;; color: rgb(0, 0, 0); text-align: left;&quot;&gt;&lt;span style=&quot;font-size:12px&quot;&gt;&lt;span style=&quot;font-family:Lucida Sans Unicode,Lucida Grande,sans-serif&quot;&gt;&amp;nbsp;&amp;nbsp;while (k &amp;lt; log n) {&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size:10pt&quot;&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;Code&quot; style=&quot;margin: 0in; font-size: 11pt; font-family: &amp;quot;Lucida Console&amp;quot;; color: rgb(0, 0, 0); text-align: left;&quot;&gt;&lt;span style=&quot;font-size:12px&quot;&gt;&lt;span style=&quot;font-family:Lucida Sans Unicode,Lucida Grande,sans-serif&quot;&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;if (random() &amp;lt; 0.5) {&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size:10pt&quot;&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;Code&quot; style=&quot;margin: 0in; font-size: 11pt; font-family: &amp;quot;Lucida Console&amp;quot;; color: rgb(0, 0, 0); text-align: left;&quot;&gt;&lt;span style=&quot;font-size:12px&quot;&gt;&lt;span style=&quot;font-family:Lucida Sans Unicode,Lucida Grande,sans-serif&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;k += k&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size:10pt&quot;&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;Code&quot; style=&quot;margin: 0in; font-size: 11pt; font-family: &amp;quot;Lucida Console&amp;quot;; color: rgb(0, 0, 0); text-align: left;&quot;&gt;&lt;span style=&quot;font-size:12px&quot;&gt;&lt;span style=&quot;font-family:Lucida Sans Unicode,Lucida Grande,sans-serif&quot;&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;} else {&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size:10pt&quot;&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;Code&quot; style=&quot;margin: 0in; font-size: 11pt; font-family: &amp;quot;Lucida Console&amp;quot;; color: rgb(0, 0, 0); text-align: left;&quot;&gt;&lt;span style=&quot;font-size:12px&quot;&gt;&lt;span style=&quot;font-family:Lucida Sans Unicode,Lucida Grande,sans-serif&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;k += 1&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size:10pt&quot;&gt;&lt;/span&gt;&lt;/p&gt;&lt;pre class=&quot;Code&quot; style=&quot;margin: 0in; font-size: 11pt; font-family: &amp;quot;Lucida Console&amp;quot;; color: rgb(0, 0, 0);&quot;&gt;&lt;span style=&quot;font-size:12px&quot;&gt;&lt;span style=&quot;font-family:Lucida Sans Unicode,Lucida Grande,sans-serif&quot;&gt;    }&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size:10pt&quot;&gt;&lt;/span&gt;&lt;/pre&gt;&lt;p class=&quot;Code&quot; style=&quot;margin: 0in; font-size: 11pt; font-family: &amp;quot;Lucida Console&amp;quot;; color: rgb(0, 0, 0); text-align: left;&quot;&gt;&lt;span style=&quot;font-size:12px&quot;&gt;&lt;span style=&quot;font-family:Lucida Sans Unicode,Lucida Grande,sans-serif&quot;&gt;&amp;nbsp;&amp;nbsp;}&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size:10pt&quot;&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;Code&quot; style=&quot;margin: 0in; font-size: 11pt; font-family: &amp;quot;Lucida Console&amp;quot;; color: rgb(0, 0, 0); text-align: left;&quot;&gt;&lt;span style=&quot;font-size:12px&quot;&gt;&lt;span style=&quot;font-family:Lucida Sans Unicode,Lucida Grande,sans-serif&quot;&gt;&amp;nbsp;&amp;nbsp;j += 0.1 * sqrt(n)&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size:10pt&quot;&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size:12px&quot;&gt;&lt;span style=&quot;font-family:Lucida Sans Unicode,Lucida Grande,sans-serif&quot;&gt;&lt;span style=&quot;color:#000000; line-height:15.3333px&quot;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;div&gt;&lt;/div&gt;</description>
<category>Asymptotic Analysis</category>
<guid isPermaLink="true">https://notexponential.com/839/nested-loop-analysis-outer-loop-grows-by-sqrt-inner-randomly</guid>
<pubDate>Fri, 10 Nov 2023 17:03:51 +0000</pubDate>
</item>
<item>
<title>Analyze the time complexity of this program</title>
<link>https://notexponential.com/837/analyze-the-time-complexity-of-this-program</link>
<description>j = 1&lt;br /&gt;
while (j &amp;lt; n) {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;k = j&lt;br /&gt;
&amp;nbsp;&amp;nbsp;while (k &amp;lt; n) {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;if (random() &amp;lt; 0.5) {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;k += 0.50 * log n&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;} else {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;k += 0.25 * log n&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;br /&gt;
&amp;nbsp;&amp;nbsp;}&lt;br /&gt;
&amp;nbsp;&amp;nbsp;j += 0.1 * sqrt(n)&lt;br /&gt;
}</description>
<guid isPermaLink="true">https://notexponential.com/837/analyze-the-time-complexity-of-this-program</guid>
<pubDate>Wed, 08 Nov 2023 21:13:42 +0000</pubDate>
</item>
<item>
<title>Solve this recurrence using master theorem: T(n) = 2 T(n/2) + n^0.75</title>
<link>https://notexponential.com/831/solve-this-recurrence-using-master-theorem-t-n-2-t-n-2-n-0-75</link>
<description></description>
<category>Asymptotic Analysis</category>
<guid isPermaLink="true">https://notexponential.com/831/solve-this-recurrence-using-master-theorem-t-n-2-t-n-2-n-0-75</guid>
<pubDate>Sun, 10 Sep 2023 19:08:00 +0000</pubDate>
</item>
<item>
<title>What is the last digit of number: 2^100</title>
<link>https://notexponential.com/828/what-is-the-last-digit-of-number-2-100</link>
<description>In other words, what is 2^100 mod 10</description>
<category>Math Basics</category>
<guid isPermaLink="true">https://notexponential.com/828/what-is-the-last-digit-of-number-2-100</guid>
<pubDate>Tue, 01 Aug 2023 01:36:25 +0000</pubDate>
</item>
<item>
<title>What is the most likely weather estimate?</title>
<link>https://notexponential.com/825/what-is-the-most-likely-weather-estimate</link>
<description>Consider the classic Viterbi example problem of determining the weather based on whether an individual carried an umbrella. The weather on a particular day matches the previous day 70% of the time. The individual will carry an umbrella on 90% of rainy days and 20% of non-rainy days.&lt;br /&gt;
&lt;br /&gt;
Given an umbrella sequence of [+u, +u, -u, +u, +u], what is the most likely explanation for the weather?</description>
<category>Artificial Intelligence</category>
<guid isPermaLink="true">https://notexponential.com/825/what-is-the-most-likely-weather-estimate</guid>
<pubDate>Sat, 13 May 2023 20:49:35 +0000</pubDate>
</item>
<item>
<title>Probability of rolling at least a 7 with two dice</title>
<link>https://notexponential.com/823/probability-of-rolling-at-least-a-7-with-two-dice</link>
<description>What is the probability of rolling at least a 7 when given two dice?</description>
<category>Math Basics</category>
<guid isPermaLink="true">https://notexponential.com/823/probability-of-rolling-at-least-a-7-with-two-dice</guid>
<pubDate>Thu, 11 May 2023 18:49:29 +0000</pubDate>
</item>
<item>
<title>Evaluate an MDP given several observed episodes</title>
<link>https://notexponential.com/821/evaluate-an-mdp-given-several-observed-episodes</link>
<description>Let&amp;#039;s say you are given a &amp;#039;+&amp;#039;-shaped MDP with five states and a gamma (discount rate) of 1:&lt;br /&gt;
&lt;br /&gt;
Given MDP&lt;br /&gt;
&lt;br /&gt;
_ A _&lt;br /&gt;
B C D&lt;br /&gt;
_ E _&lt;br /&gt;
&lt;br /&gt;
The input policy \Pi is as follows:&lt;br /&gt;
&lt;br /&gt;
A -&amp;gt; Terminal&lt;br /&gt;
B -&amp;gt; C&lt;br /&gt;
C -&amp;gt; D&lt;br /&gt;
D -&amp;gt; Terminal&lt;br /&gt;
E -&amp;gt; C&lt;br /&gt;
&lt;br /&gt;
Let&amp;#039;s say you have the following observed episodes (training) though:&lt;br /&gt;
&lt;br /&gt;
Episode 1:&lt;br /&gt;
B, east, C, -1&lt;br /&gt;
C, east, D, -1&lt;br /&gt;
D, exit, x, +10&lt;br /&gt;
&lt;br /&gt;
Episode 2:&lt;br /&gt;
B, east, C, -1&lt;br /&gt;
C, east, D, -1&lt;br /&gt;
D, exit, x, +10&lt;br /&gt;
&lt;br /&gt;
Episode 3:&lt;br /&gt;
E, north, C, -1&lt;br /&gt;
C, east, D, -1&lt;br /&gt;
D, exit, x, +10&lt;br /&gt;
&lt;br /&gt;
Episode 4:&lt;br /&gt;
E, north, C, -1&lt;br /&gt;
C, north, A, -1&lt;br /&gt;
A, exit, x, -10&lt;br /&gt;
&lt;br /&gt;
What are the output values based on these episodes?</description>
<category>MDP</category>
<guid isPermaLink="true">https://notexponential.com/821/evaluate-an-mdp-given-several-observed-episodes</guid>
<pubDate>Thu, 11 May 2023 12:58:02 +0000</pubDate>
</item>
<item>
<title>Robot States and Sensors</title>
<link>https://notexponential.com/819/robot-states-and-sensors</link>
<description>Suppose we have a robot that can be in one of two states: state 1 or state 2. The robot moves between states according to the following rules:&lt;br /&gt;
&lt;br /&gt;
If the robot is in state 1, it has a 70% chance of staying in state 1 and a 30% chance of transitioning to state 2.&lt;br /&gt;
&lt;br /&gt;
If the robot is in state 2, it has a 60% chance of staying in state 2 and a 40% chance of transitioning to state 1.&lt;br /&gt;
&lt;br /&gt;
The robot has two sensors: sensor 1 and sensor 2. The sensors are not perfect and sometimes give incorrect readings. The emission probabilities for each sensor are as follows:&lt;br /&gt;
&lt;br /&gt;
If the robot is in state 1, sensor 1 gives the correct reading with a probability of 0.8 and an incorrect reading with a probability of 0.2. If the robot is in state 2, sensor 1 gives the correct reading with a probability of 0.4 and an incorrect reading with a probability of 0.6.&lt;br /&gt;
&lt;br /&gt;
If the robot is in state 1, sensor 2 gives the correct reading with a probability of 0.3 and an incorrect reading with a probability of 0.7. If the robot is in state 2, sensor 2 gives the correct reading with a probability of 0.9 and an incorrect reading with a probability of 0.1.&lt;br /&gt;
&lt;br /&gt;
Assume that the robot starts in state 1 with equal probability and generates the following sensor readings over time:&lt;br /&gt;
&lt;br /&gt;
sensor 1: correct, correct, incorrect&lt;br /&gt;
&lt;br /&gt;
sensor 2: incorrect, correct, correct&lt;br /&gt;
&lt;br /&gt;
What is the most likely sequence of states that the robot went through to generate these observations?</description>
<category>HMM</category>
<guid isPermaLink="true">https://notexponential.com/819/robot-states-and-sensors</guid>
<pubDate>Mon, 08 May 2023 21:05:20 +0000</pubDate>
</item>
<item>
<title>Coin - Real or Biased</title>
<link>https://notexponential.com/799/coin-real-or-biased</link>
<description>There are two coins: Fair Coin: Heads and Tails with 50% Probability, and Biased Coin: Always lands on Heads. &amp;nbsp;Dealer uses either coin with equal probability. &lt;br /&gt;
&lt;br /&gt;
We see that the dealer tosses the coin, and it comes in a sequence as H, H, T. &amp;nbsp;We can immediately infer that the dealer is using the fair coin (because biased coin never lands on Tails).&lt;br /&gt;
&amp;nbsp;&lt;br /&gt;
In next run, the dealer tosses the coin, and it comes in a sequence as H, H, H. &amp;nbsp;What is the probability that the dealer is using the biased coin.&lt;br /&gt;
&lt;br /&gt;
The dealer does not switch coins during a single run.</description>
<category>Probability</category>
<guid isPermaLink="true">https://notexponential.com/799/coin-real-or-biased</guid>
<pubDate>Tue, 25 Apr 2023 17:40:07 +0000</pubDate>
</item>
<item>
<title>Comparison of Lottery Choices and MEU</title>
<link>https://notexponential.com/798/comparison-of-lottery-choices-and-meu</link>
<description>&lt;p class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 10pt; text-align: justify; line-height: 16.8667px; font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(0, 0, 0);&quot;&gt;Given these two lottery choices:&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 10pt 1in; line-height: 16.8667px; font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(0, 0, 0); text-indent: -0.25in; text-align: left;&quot;&gt;A: [0.75, $3k;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0.25, $0]&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 10pt 1in; line-height: 16.8667px; font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(0, 0, 0); text-indent: -0.25in; text-align: left;&quot;&gt;B: [1.0, $2k;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0.0, $0]&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 10pt 1in; line-height: 16.8667px; font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(0, 0, 0); text-align: left;&quot;&gt;and&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 10pt 1in; line-height: 16.8667px; font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(0, 0, 0); text-indent: -0.25in; text-align: left;&quot;&gt;C: [0.3, $3k;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0.7, $0]&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 10pt 1in; line-height: 16.8667px; font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(0, 0, 0); text-indent: -0.25in; text-align: left;&quot;&gt;&lt;span style=&quot;font-size:11pt; text-indent:-0.25in&quot;&gt;D: [0.4, $2k;&lt;/span&gt;&lt;span style=&quot;font-size:11pt; text-indent:-0.25in&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;font-size:11pt; text-indent:-0.25in&quot;&gt;0.6, $0]&lt;/span&gt;&lt;/p&gt;&lt;p&gt;People seem to prefer B over A, and C over D&lt;/p&gt;&lt;p&gt;What are the implications of this observation?&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;color:#000000; font-family:Calibri,sans-serif; font-size:11pt; line-height:16.8667px&quot;&gt;&lt;span style=&quot;font-size:11pt; line-height:16.8667px&quot;&gt;What is the contradiction here?&amp;nbsp; What assumption did you use to arrive at your contradiction?&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;</description>
<category>CSP</category>
<guid isPermaLink="true">https://notexponential.com/798/comparison-of-lottery-choices-and-meu</guid>
<pubDate>Sun, 16 Apr 2023 19:53:02 +0000</pubDate>
</item>
<item>
<title>Snake - A through Y on a 5 x 5 grid</title>
<link>https://notexponential.com/797/snake-a-through-y-on-a-5-x-5-grid</link>
<description>You are given a 5 x 5 grid, and this grid should hold the letters A through Y. &amp;nbsp;Some of the cells in the grid are already filled out. &amp;nbsp;The others can go anywhere, but the constraint is that adjacent letters (for example F and G) must be adjacent to each other, either horizontally or vertically. &amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
-&amp;nbsp; &amp;nbsp; -&amp;nbsp; &amp;nbsp; -&amp;nbsp; &amp;nbsp; -&amp;nbsp; &amp;nbsp; Y&lt;br /&gt;
R&amp;nbsp; &amp;nbsp; A&amp;nbsp; &amp;nbsp; -&amp;nbsp; &amp;nbsp; -&amp;nbsp; &amp;nbsp; -&lt;br /&gt;
-&amp;nbsp; &amp;nbsp; -&amp;nbsp; &amp;nbsp; -&amp;nbsp; &amp;nbsp; -&amp;nbsp; &amp;nbsp; -&lt;br /&gt;
-&amp;nbsp; &amp;nbsp; E&amp;nbsp; &amp;nbsp; -&amp;nbsp; &amp;nbsp; -&amp;nbsp; &amp;nbsp; -&lt;br /&gt;
-&amp;nbsp; &amp;nbsp; -&amp;nbsp; &amp;nbsp; -&amp;nbsp; &amp;nbsp; -&amp;nbsp; &amp;nbsp; K&lt;br /&gt;
&lt;br /&gt;
Design a solution for this constraint satisfaction problem. &amp;nbsp;(Solution should explain the variables, the domain values, the constraints, and how the constraint propagation would work.)</description>
<category>CSP</category>
<guid isPermaLink="true">https://notexponential.com/797/snake-a-through-y-on-a-5-x-5-grid</guid>
<pubDate>Sun, 16 Apr 2023 19:50:15 +0000</pubDate>
</item>
<item>
<title>Solve the V* values for this grid world MDP - 3 x 4</title>
<link>https://notexponential.com/796/solve-the-v-values-for-this-grid-world-mdp-3-x-4</link>
<description>&lt;p class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 10pt; text-align: justify; line-height: 16.8667px; font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(0, 0, 0);&quot;&gt;Estimate the final V* values for a given grid world.&amp;nbsp; Discount, noise, terminal states are all given.&amp;nbsp; You are given a 3x4 grid world and you want to find V* values.&amp;nbsp; There is a discount rate of 0.9 and noise of 0.8, 0.1, 0.1.&amp;nbsp; The first column has all terminal states with value -1 and the last column has terminal states with value 1.&amp;nbsp; There is no living reward.&lt;/p&gt;&lt;table border=&quot;1&quot; cellpadding=&quot;0&quot; style=&quot;border-collapse:collapse; border:none; margin-left:76.25pt; border-spacing: 0px;&quot; class=&quot;MsoTableGrid&quot;&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style=&quot;border-style:solid; border-width:1pt; height:0.5in; padding:0in 5.4pt; width:0.5in; width: 48px;&quot;&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;margin: 0in; text-align: center; line-height: normal; font-size: 11pt; font-family: Calibri, sans-serif; text-align: center;&quot;&gt;-1&lt;/p&gt;&lt;/td&gt;&lt;td style=&quot;border-bottom:1pt solid black; border-image:initial; border-left:none; border-right:1pt solid black; border-top:1pt solid black; height:0.5in; padding:0in 5.4pt; width:0.5in; width: 48px;&quot;&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;margin: 0in; text-align: center; line-height: normal; font-size: 11pt; font-family: Calibri, sans-serif; text-align: center;&quot;&gt;&amp;nbsp;&lt;/p&gt;&lt;/td&gt;&lt;td style=&quot;border-bottom:1pt solid black; border-image:initial; border-left:none; border-right:1pt solid black; border-top:1pt solid black; height:0.5in; padding:0in 5.4pt; width:0.5in; width: 48px;&quot;&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;margin: 0in; text-align: center; line-height: normal; font-size: 11pt; font-family: Calibri, sans-serif; text-align: center;&quot;&gt;&amp;nbsp;&lt;/p&gt;&lt;/td&gt;&lt;td style=&quot;border-bottom:1pt solid black; border-image:initial; border-left:none; border-right:1pt solid black; border-top:1pt solid black; height:0.5in; padding:0in 5.4pt; width:0.5in; width: 48px;&quot;&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;margin: 0in; text-align: center; line-height: normal; font-size: 11pt; font-family: Calibri, sans-serif; text-align: center;&quot;&gt;1&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td style=&quot;border-bottom:1pt solid black; border-image:initial; border-left:1pt solid black; border-right:1pt solid black; border-top:none; height:0.5in; padding:0in 5.4pt; width:0.5in; width: 48px;&quot;&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;margin: 0in; text-align: center; line-height: normal; font-size: 11pt; font-family: Calibri, sans-serif; text-align: center;&quot;&gt;-1&lt;/p&gt;&lt;/td&gt;&lt;td style=&quot;border-bottom:1pt solid black; border-left:none; border-right:1pt solid black; border-top:none; height:0.5in; padding:0in 5.4pt; width:0.5in; width: 48px;&quot;&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;margin: 0in; text-align: center; line-height: normal; font-size: 11pt; font-family: Calibri, sans-serif; text-align: center;&quot;&gt;&amp;nbsp;&lt;/p&gt;&lt;/td&gt;&lt;td style=&quot;border-bottom:1pt solid black; border-left:none; border-right:1pt solid black; border-top:none; height:0.5in; padding:0in 5.4pt; width:0.5in; width: 48px;&quot;&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;margin: 0in; text-align: center; line-height: normal; font-size: 11pt; font-family: Calibri, sans-serif; text-align: center;&quot;&gt;&amp;nbsp;&lt;/p&gt;&lt;/td&gt;&lt;td style=&quot;border-bottom:1pt solid black; border-left:none; border-right:1pt solid black; border-top:none; height:0.5in; padding:0in 5.4pt; width:0.5in; width: 48px;&quot;&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;margin: 0in; text-align: center; line-height: normal; font-size: 11pt; font-family: Calibri, sans-serif; text-align: center;&quot;&gt;1&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td style=&quot;border-bottom:1pt solid black; border-image:initial; border-left:1pt solid black; border-right:1pt solid black; border-top:none; height:0.5in; padding:0in 5.4pt; width:0.5in; width: 48px;&quot;&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;margin: 0in; text-align: center; line-height: normal; font-size: 11pt; font-family: Calibri, sans-serif; text-align: center;&quot;&gt;-1&lt;/p&gt;&lt;/td&gt;&lt;td style=&quot;border-bottom:1pt solid black; border-left:none; border-right:1pt solid black; border-top:none; height:0.5in; padding:0in 5.4pt; width:0.5in; width: 48px;&quot;&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;margin: 0in; text-align: center; line-height: normal; font-size: 11pt; font-family: Calibri, sans-serif; text-align: center;&quot;&gt;&amp;nbsp;&lt;/p&gt;&lt;/td&gt;&lt;td style=&quot;border-bottom:1pt solid black; border-left:none; border-right:1pt solid black; border-top:none; height:0.5in; padding:0in 5.4pt; width:0.5in; width: 48px;&quot;&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;margin: 0in; text-align: center; line-height: normal; font-size: 11pt; font-family: Calibri, sans-serif; text-align: center;&quot;&gt;&amp;nbsp;&lt;/p&gt;&lt;/td&gt;&lt;td style=&quot;border-bottom:1pt solid black; border-left:none; border-right:1pt solid black; border-top:none; height:0.5in; padding:0in 5.4pt; width:0.5in; width: 48px;&quot;&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;margin: 0in; text-align: center; line-height: normal; font-size: 11pt; font-family: Calibri, sans-serif; text-align: center;&quot;&gt;1&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;</description>
<category>Informed Search</category>
<guid isPermaLink="true">https://notexponential.com/796/solve-the-v-values-for-this-grid-world-mdp-3-x-4</guid>
<pubDate>Sun, 16 Apr 2023 19:47:18 +0000</pubDate>
</item>
<item>
<title>A* algorithm for fruit sorting</title>
<link>https://notexponential.com/794/a-algorithm-for-fruit-sorting</link>
<description>You are given 10 apples of different sizes, 10 bananas of different sizes and 10 oranges of different sizes, organized in a 3x10 array. &amp;nbsp;You want to organize them so that fruits go from top to bottom in ascending order of size. &amp;nbsp;Any fruit can be used in any column that you like. &amp;nbsp;The only move allowed is to swap two fruits horizontally or vertically. &amp;nbsp;You want to use A* algorithm to minimize the number of moves for this. &amp;nbsp;Explain your approach.</description>
<category>Informed Search</category>
<guid isPermaLink="true">https://notexponential.com/794/a-algorithm-for-fruit-sorting</guid>
<pubDate>Sun, 19 Mar 2023 16:44:14 +0000</pubDate>
</item>
<item>
<title>Snow White and 7 Conference Rooms</title>
<link>https://notexponential.com/778/snow-white-and-7-conference-rooms</link>
<description>You are the chief algorithm officer for Snow White Inc. &amp;nbsp;Because of your algorithmic abilities, Snow White Inc. is very successful and has hundreds of thousands of investors. &amp;nbsp;You are planning the next investor conference. &amp;nbsp;You want to make sure that all investors who know each other attend the meeting in different rooms. &amp;nbsp;You are trying to decide if the 7 conference rooms in the Snow White Inc. head quarters will be sufficient or not. &amp;nbsp;Prove that this decision problem is NP-complete by using one of the known NP-complete problems (CLIQUE, 3-SAT, Hamiltonian Path, Hamiltonian Cycle, Coloring, Independent Set, etc.)</description>
<category>NP-Completeness</category>
<guid isPermaLink="true">https://notexponential.com/778/snow-white-and-7-conference-rooms</guid>
<pubDate>Sun, 18 Dec 2022 10:55:44 +0000</pubDate>
</item>
<item>
<title>Solve a set of inter-related recurrence relations</title>
<link>https://notexponential.com/775/solve-a-set-of-inter-related-recurrence-relations</link>
<description>T(n) = R(n-1) + n log n&lt;br /&gt;
R(n) = T(n-1) + n^2</description>
<category>Branch &amp; Bound</category>
<guid isPermaLink="true">https://notexponential.com/775/solve-a-set-of-inter-related-recurrence-relations</guid>
<pubDate>Sat, 10 Dec 2022 22:01:12 +0000</pubDate>
</item>
<item>
<title>Example of a graph that is connected, has articulation point, needs 4 colors, and does not have a 4-clique</title>
<link>https://notexponential.com/774/example-graph-connected-articulation-point-colors-clique</link>
<description>Give an example of a graph that has all of the following properties. &amp;nbsp;(Note that you need to give a single graph as the answer.)&lt;br /&gt;
(i)&amp;nbsp; &amp;nbsp; It is connected&lt;br /&gt;
(ii)&amp;nbsp; &amp;nbsp; It has one articulation point.&lt;br /&gt;
(iii)&amp;nbsp; &amp;nbsp; The graph needs at least 4 colors for a valid vertex coloring&lt;br /&gt;
(iv)&amp;nbsp; &amp;nbsp; The graph does not have a 4-clique (that is, a clique of 4 vertices) as a subgraph.</description>
<category>Graph Theory</category>
<guid isPermaLink="true">https://notexponential.com/774/example-graph-connected-articulation-point-colors-clique</guid>
<pubDate>Sat, 10 Dec 2022 21:36:51 +0000</pubDate>
</item>
<item>
<title>Selecting lowest cost hotel rooms, with no adjacent rooms selected</title>
<link>https://notexponential.com/772/selecting-lowest-cost-hotel-rooms-adjacent-rooms-selected</link>
<description>&lt;p&gt;&lt;span style=&quot;color:#000000; font-family:Calibri,sans-serif; font-size:11pt; line-height:16.8667px&quot;&gt;You and your friends (k friends in total, including yourself) are going to Hawaii for a vacation.&amp;nbsp; In Hawaii, you are given a choice of n hotel rooms, in a straight line, numbered from 1 to n.&amp;nbsp; The cost of the i-th room is c[i].&amp;nbsp; You can select any k hotel rooms, but you want to ensure that no two selected hotel rooms selected are adjacent to each other.&amp;nbsp; Your objective is to minimize the cost.&amp;nbsp; Describe an efficient algorithm for this problem.&lt;/span&gt;&lt;/p&gt;</description>
<category>Dynamic Programming</category>
<guid isPermaLink="true">https://notexponential.com/772/selecting-lowest-cost-hotel-rooms-adjacent-rooms-selected</guid>
<pubDate>Sat, 10 Dec 2022 20:43:44 +0000</pubDate>
</item>
<item>
<title>Asymptotically compare 14 T(n/4) + O(n) and 7 R(n/2) + O(n).</title>
<link>https://notexponential.com/770/asymptotically-compare-14-t-n-4-o-n-and-7-r-n-2-o-n</link>
<description>&lt;p class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 10pt; text-align: justify; line-height: 16.8667px; font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(0, 0, 0);&quot;&gt;Asymptotically compare recurrence relations T and R.&amp;nbsp; Express your answer by writing asymptotic relation between T and R.&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 10pt; text-align: justify; line-height: 16.8667px; font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(0, 0, 0);&quot;&gt;T(n) = 14 T(n/4) + O(n).&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; R(n) = 7 R(n/2) + O(n).&lt;/p&gt;</description>
<category>Asymptotic Analysis</category>
<guid isPermaLink="true">https://notexponential.com/770/asymptotically-compare-14-t-n-4-o-n-and-7-r-n-2-o-n</guid>
<pubDate>Sat, 10 Dec 2022 20:38:22 +0000</pubDate>
</item>
<item>
<title>Searching Problem with Numbers</title>
<link>https://notexponential.com/769/searching-problem-with-numbers</link>
<description>&lt;p&gt;Start state = Number &quot;4&quot;&lt;br&gt;Target state = Number &quot;5&quot;&lt;br&gt;Successor function:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;factorial, cost = 3&lt;/li&gt;&lt;li&gt;square root, cost = 2&lt;/li&gt;&lt;li&gt;floor, cost 1.&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;1. Frame this problem as a regular AI &quot;search&quot; problem.&lt;br&gt;2. Find the shortest cost path from start node to target node.&lt;/p&gt;</description>
<category>Uninformed Search</category>
<guid isPermaLink="true">https://notexponential.com/769/searching-problem-with-numbers</guid>
<pubDate>Wed, 19 Jan 2022 00:57:10 +0000</pubDate>
</item>
<item>
<title>Solve or estimate this recurrence relation T(n) = 2 T(n/3) + T(n/2) + n</title>
<link>https://notexponential.com/768/solve-or-estimate-this-recurrence-relation-t-n-2-t-n-3-t-n-2-n</link>
<description></description>
<category>Divide &amp; Conquer</category>
<guid isPermaLink="true">https://notexponential.com/768/solve-or-estimate-this-recurrence-relation-t-n-2-t-n-3-t-n-2-n</guid>
<pubDate>Tue, 01 Jun 2021 21:39:32 +0000</pubDate>
</item>
<item>
<title>Use the limit method to prove the asymptotic relation between these 3 functions</title>
<link>https://notexponential.com/767/limit-method-prove-asymptotic-relation-between-functions</link>
<description>&lt;p&gt;Use the limit method to prove the asymptotic relation between these 3 functions:&lt;/p&gt;&lt;p&gt;n&amp;nbsp;&lt;/p&gt;&lt;p&gt;2n&lt;/p&gt;&lt;p&gt;n^2&lt;/p&gt;&lt;p&gt;&lt;strong&gt;The limit method says that: lim (n --&amp;gt; infinity)&amp;nbsp; f(n) / g(n)&amp;nbsp; &amp;nbsp;tends to 0, then f(n) = o(g(n)).&amp;nbsp; Similarly, if the limit tends to infinity, then f(n) = small omega (g(n)), and if the limit tends to a constant, then f(n) = theta (g(n)).&lt;/strong&gt;&lt;/p&gt;</description>
<category>Asymptotic Analysis</category>
<guid isPermaLink="true">https://notexponential.com/767/limit-method-prove-asymptotic-relation-between-functions</guid>
<pubDate>Tue, 25 May 2021 02:10:27 +0000</pubDate>
</item>
<item>
<title>Prove that there are infinite primes</title>
<link>https://notexponential.com/766/prove-that-there-are-infinite-primes</link>
<description>Prove that there are infinite primes by using proof by contradiction.</description>
<category>Math Basics</category>
<guid isPermaLink="true">https://notexponential.com/766/prove-that-there-are-infinite-primes</guid>
<pubDate>Sun, 23 May 2021 02:26:51 +0000</pubDate>
</item>
<item>
<title>Give a Proof by Induction that the sum of squares of first n natural numbers is n. (n+1). (2n + 1) / 6.</title>
<link>https://notexponential.com/764/give-proof-induction-that-the-squares-first-natural-numbers</link>
<description></description>
<category>Math Basics</category>
<guid isPermaLink="true">https://notexponential.com/764/give-proof-induction-that-the-squares-first-natural-numbers</guid>
<pubDate>Fri, 21 May 2021 16:15:28 +0000</pubDate>
</item>
<item>
<title>Disco Fever and Two Kinds of Tests</title>
<link>https://notexponential.com/763/disco-fever-and-two-kinds-of-tests</link>
<description>25% of the people in a city have Disco Fever. There are two tests for Disco Fever, Rapid Antigen Test (RAT) and Full Scan Test (FST). When a person goes to a doctor to test for Disco Fever, with probability 2/3 the doctor prescribes RAT, and with probability 1/3 the doctor prescribes FST.&lt;br /&gt;
&lt;br /&gt;
When RAT is done on a person, the outcome is as follows: If the person has the disease, the result is positive with probability 3/4. If the person does not have the disease, the result is positive with probability 1/4.&lt;br /&gt;
&lt;br /&gt;
When FST is done on a person, the outcome is as follows: If the person has the disease, the result is positive with probability 1 (that is, FST has no false negatives). If the person does not have the disease, the result is positive with probability 1/3.&lt;br /&gt;
&lt;br /&gt;
A person is picked uniformly at random from the town and is sent to a doctor to test for Disco Fever. The result comes out positive. What is the probability that the person has Disco Fever?</description>
<category>Probability</category>
<guid isPermaLink="true">https://notexponential.com/763/disco-fever-and-two-kinds-of-tests</guid>
<pubDate>Mon, 10 May 2021 00:52:23 +0000</pubDate>
</item>
<item>
<title>Newsletter optimization using HMM</title>
<link>https://notexponential.com/762/newsletter-optimization-using-hmm</link>
<description>&lt;p&gt;You are trying to sell a product by using an email newsletter (delivered weekly).&amp;nbsp; A visitor can be interested in the product due to 2 different interests. &amp;nbsp;If they are interested due to interest 1 (for example “soccer”), they may click a link (link 1) you have in the newsletter.&amp;nbsp; If they are interested due to interest 2 (for example “tennis”), they may click a different link (link 2).&amp;nbsp; Here is the probability table that shows the likelihood of viewer clicking these two links:&lt;/p&gt;&lt;table border=&quot;1&quot; cellpadding=&quot;0&quot;&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style=&quot;vertical-align:top; width:128px&quot;&gt;&lt;p&gt;&lt;strong&gt;Interest&lt;/strong&gt;&lt;/p&gt;&lt;/td&gt;&lt;td style=&quot;vertical-align:top; width:128px&quot;&gt;&lt;p&gt;&lt;strong&gt;Link 1&lt;/strong&gt;&lt;/p&gt;&lt;/td&gt;&lt;td style=&quot;vertical-align:top; width:128px&quot;&gt;&lt;p&gt;&lt;strong&gt;Link 2&lt;/strong&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td style=&quot;vertical-align:top; width:128px&quot;&gt;&lt;p&gt;No Interest&lt;/p&gt;&lt;/td&gt;&lt;td style=&quot;vertical-align:top; width:128px&quot;&gt;&lt;p&gt;0.01&lt;/p&gt;&lt;/td&gt;&lt;td style=&quot;vertical-align:top; width:128px&quot;&gt;&lt;p&gt;0.05&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td style=&quot;vertical-align:top; width:128px&quot;&gt;&lt;p&gt;Interest 1&lt;/p&gt;&lt;/td&gt;&lt;td style=&quot;vertical-align:top; width:128px&quot;&gt;&lt;p&gt;0.3&lt;/p&gt;&lt;/td&gt;&lt;td style=&quot;vertical-align:top; width:128px&quot;&gt;&lt;p&gt;0.6&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td style=&quot;vertical-align:top; width:128px&quot;&gt;&lt;p&gt;Interest 2&lt;/p&gt;&lt;/td&gt;&lt;td style=&quot;vertical-align:top; width:128px&quot;&gt;&lt;p&gt;0.4&lt;/p&gt;&lt;/td&gt;&lt;td style=&quot;vertical-align:top; width:128px&quot;&gt;&lt;p&gt;0.8&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td style=&quot;vertical-align:top; width:128px&quot;&gt;&lt;p style=&quot;text-align:left&quot;&gt;Interest 1 and Interest 2&lt;/p&gt;&lt;/td&gt;&lt;td style=&quot;vertical-align:top; width:128px&quot;&gt;&lt;p&gt;0.8&lt;/p&gt;&lt;/td&gt;&lt;td style=&quot;vertical-align:top; width:128px&quot;&gt;&lt;p&gt;0.95&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;We do not know the initial state of the visitor.&amp;nbsp; If the visitor has no interest in interest 1 or interest 2, she a 10% probability of developing either of those interests (independently) during the week. When she has one of the interests, there is&amp;nbsp;&amp;nbsp;a 20% probability of her developing the other interest as well.&amp;nbsp; Once an interest is developed, that interest is never lost.&lt;/p&gt;&lt;ol&gt;&lt;li&gt;Draw and explain an HMM to model this problem.&lt;/li&gt;&lt;li&gt;You make the following observations in 8 weeks of newsletter delivers: &amp;nbsp;&lt;/li&gt;&lt;/ol&gt;&lt;p&gt;No Click, Link 1, Link 1, No Click, Link 1, Link 1 and Link 2, Link 1 and Link 2, Link 2, Link 1 and Link What is the best explanation for the interest level of the visitor during those 8 weeks?&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;</description>
<category>HMM</category>
<guid isPermaLink="true">https://notexponential.com/762/newsletter-optimization-using-hmm</guid>
<pubDate>Sun, 02 May 2021 12:59:28 +0000</pubDate>
</item>
<item>
<title>Solve the V* values for this MDP - 5x5</title>
<link>https://notexponential.com/758/solve-the-v-values-for-this-mdp-5x5</link>
<description>&lt;table cellpadding=&quot;2&quot; border=&quot;0&quot; style=&quot;width:100%; border-spacing: 0px;&quot;&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td rowspan=&quot;2&quot; style=&quot;text-align:center !important; vertical-align:middle&quot;&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; style=&quot;vertical-align:top; width:100%&quot;&gt;&lt;p&gt;Estimate the final V* values for a given grid world.&amp;nbsp;&lt;/p&gt;&lt;ul&gt;&lt;li style=&quot;list-style-type:inherit&quot;&gt;Discount (gamma) is 0.9.&lt;/li&gt;&lt;li style=&quot;list-style-type:inherit&quot;&gt;Noise (probability is 0.8, 0.1, 0.1.&amp;nbsp; That is, when moving in a direction, there is 80% probablity of going in that direction and 10% probability of going in one of two perpendicular directions.&amp;nbsp;&amp;nbsp;&lt;/li&gt;&lt;li style=&quot;list-style-type:inherit&quot;&gt;Terminal states are given in the table.&amp;nbsp; All non terminal states are left blank and need to be solved.&lt;/li&gt;&lt;li style=&quot;list-style-type:inherit&quot;&gt;Living reward (R(s,a,s&#039;)) is 0.&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;Instead of iteration, use the solving approach.&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;table cellpadding=&quot;0&quot; border=&quot;1&quot;&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style=&quot;height:0.5in; width:0.5in&quot;&gt;&lt;p&gt;1&lt;/p&gt;&lt;/td&gt;&lt;td style=&quot;height:0.5in; width:0.5in&quot;&gt;&lt;p&gt;&lt;/p&gt;&lt;/td&gt;&lt;td style=&quot;height:0.5in; width:0.5in&quot;&gt;&lt;p&gt;0&lt;/p&gt;&lt;/td&gt;&lt;td style=&quot;height:0.5in; width:0.5in&quot;&gt;&lt;p&gt;&lt;/p&gt;&lt;/td&gt;&lt;td style=&quot;height:0.5in; width:0.5in&quot;&gt;&lt;p&gt;1&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td style=&quot;height:0.5in; width:0.5in&quot;&gt;&lt;p&gt;&lt;/p&gt;&lt;/td&gt;&lt;td style=&quot;height:0.5in; width:0.5in&quot;&gt;&lt;p&gt;&lt;/p&gt;&lt;/td&gt;&lt;td style=&quot;height:0.5in; width:0.5in&quot;&gt;&lt;p&gt;&lt;/p&gt;&lt;/td&gt;&lt;td style=&quot;height:0.5in; width:0.5in&quot;&gt;&lt;p&gt;&lt;/p&gt;&lt;/td&gt;&lt;td style=&quot;height:0.5in; width:0.5in&quot;&gt;&lt;p&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td style=&quot;height:0.5in; width:0.5in&quot;&gt;&lt;p&gt;0&lt;/p&gt;&lt;/td&gt;&lt;td style=&quot;height:0.5in; width:0.5in&quot;&gt;&lt;p&gt;&lt;/p&gt;&lt;/td&gt;&lt;td style=&quot;height:0.5in; width:0.5in&quot;&gt;&lt;p&gt;&lt;/p&gt;&lt;/td&gt;&lt;td style=&quot;height:0.5in; width:0.5in&quot;&gt;&lt;p&gt;&lt;/p&gt;&lt;/td&gt;&lt;td style=&quot;height:0.5in; width:0.5in&quot;&gt;&lt;p&gt;0&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td style=&quot;height:0.5in; width:0.5in&quot;&gt;&lt;p&gt;&lt;/p&gt;&lt;/td&gt;&lt;td style=&quot;height:0.5in; width:0.5in&quot;&gt;&lt;p&gt;&lt;/p&gt;&lt;/td&gt;&lt;td style=&quot;height:0.5in; width:0.5in&quot;&gt;&lt;p&gt;&lt;/p&gt;&lt;/td&gt;&lt;td style=&quot;height:0.5in; width:0.5in&quot;&gt;&lt;p&gt;&lt;/p&gt;&lt;/td&gt;&lt;td style=&quot;height:0.5in; width:0.5in&quot;&gt;&lt;p&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td style=&quot;height:0.5in; width:0.5in&quot;&gt;&lt;p&gt;1&lt;/p&gt;&lt;/td&gt;&lt;td style=&quot;height:0.5in; width:0.5in&quot;&gt;&lt;p&gt;&lt;/p&gt;&lt;/td&gt;&lt;td style=&quot;height:0.5in; width:0.5in&quot;&gt;&lt;p&gt;0&lt;/p&gt;&lt;/td&gt;&lt;td style=&quot;height:0.5in; width:0.5in&quot;&gt;&lt;p&gt;&lt;/p&gt;&lt;/td&gt;&lt;td style=&quot;height:0.5in; width:0.5in&quot;&gt;&lt;p&gt;1&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;</description>
<category>MDP</category>
<guid isPermaLink="true">https://notexponential.com/758/solve-the-v-values-for-this-mdp-5x5</guid>
<pubDate>Tue, 30 Mar 2021 14:38:01 +0000</pubDate>
</item>
<item>
<title>Algorithm for Power Plant CSP</title>
<link>https://notexponential.com/757/algorithm-for-power-plant-csp</link>
<description>&lt;p&gt;Design a solution for the given constraint satisfaction problem.&amp;nbsp; Solution should explain the variables, the domain values, the constraints, the heuristics, and how the constraint propagation would work.&lt;/p&gt;&lt;p style=&quot;text-align:left&quot;&gt;In a country, there are 15 power plants.&amp;nbsp; They produce different amount of power, that is given by the array P[i].&amp;nbsp;&amp;nbsp; The total power produced must equal at least X (for example 1000), but should not exceed 1500 to maintain a decent price.&amp;nbsp; For adequate workforce planning and employment reasons, at least one of the power plant near each city must operate each day.&lt;/p&gt;&lt;p style=&quot;text-align:left&quot;&gt;&lt;strong&gt;Partial example..&lt;/strong&gt;&lt;/p&gt;&lt;table border=&quot;1&quot; cellpadding=&quot;0&quot; style=&quot;border-spacing: 0px;&quot;&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style=&quot;vertical-align:top; width:208px&quot;&gt;&lt;p style=&quot;text-align:left&quot;&gt;Power Plant, i&lt;/p&gt;&lt;/td&gt;&lt;td style=&quot;vertical-align:top; width:208px&quot;&gt;&lt;p style=&quot;text-align:left&quot;&gt;P[i]&lt;/p&gt;&lt;/td&gt;&lt;td style=&quot;vertical-align:top; width:208px&quot;&gt;&lt;p style=&quot;text-align:left&quot;&gt;Associated Cities&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td style=&quot;vertical-align:top; width:208px&quot;&gt;&lt;p style=&quot;text-align:left&quot;&gt;P1&lt;/p&gt;&lt;/td&gt;&lt;td style=&quot;vertical-align:top; width:208px&quot;&gt;&lt;p style=&quot;text-align:left&quot;&gt;200&lt;/p&gt;&lt;/td&gt;&lt;td style=&quot;vertical-align:top; width:208px&quot;&gt;&lt;p style=&quot;text-align:left&quot;&gt;C1,C2&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td style=&quot;vertical-align:top; width:208px&quot;&gt;&lt;p style=&quot;text-align:left&quot;&gt;P2&lt;/p&gt;&lt;/td&gt;&lt;td style=&quot;vertical-align:top; width:208px&quot;&gt;&lt;p style=&quot;text-align:left&quot;&gt;200&lt;/p&gt;&lt;/td&gt;&lt;td style=&quot;vertical-align:top; width:208px&quot;&gt;&lt;p style=&quot;text-align:left&quot;&gt;C2, C3&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td style=&quot;vertical-align:top; width:208px&quot;&gt;&lt;p style=&quot;text-align:left&quot;&gt;P3&lt;/p&gt;&lt;/td&gt;&lt;td style=&quot;vertical-align:top; width:208px&quot;&gt;&lt;p style=&quot;text-align:left&quot;&gt;180&lt;/p&gt;&lt;/td&gt;&lt;td style=&quot;vertical-align:top; width:208px&quot;&gt;&lt;p style=&quot;text-align:left&quot;&gt;C2, C4, C6&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td style=&quot;vertical-align:top; width:208px&quot;&gt;&lt;p style=&quot;text-align:left&quot;&gt;P4&lt;/p&gt;&lt;/td&gt;&lt;td style=&quot;vertical-align:top; width:208px&quot;&gt;&lt;p style=&quot;text-align:left&quot;&gt;210&lt;/p&gt;&lt;/td&gt;&lt;td style=&quot;vertical-align:top; width:208px&quot;&gt;&lt;p style=&quot;text-align:left&quot;&gt;C5,C6&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td style=&quot;vertical-align:top; width:208px&quot;&gt;&lt;p style=&quot;text-align:left&quot;&gt;……&lt;/p&gt;&lt;/td&gt;&lt;td style=&quot;vertical-align:top; width:208px&quot;&gt;&lt;p style=&quot;text-align:left&quot;&gt;…..&lt;/p&gt;&lt;/td&gt;&lt;td style=&quot;vertical-align:top; width:208px&quot;&gt;&lt;p style=&quot;text-align:left&quot;&gt;……….&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td style=&quot;vertical-align:top; width:208px&quot;&gt;&lt;p style=&quot;text-align:left&quot;&gt;i-th power plant&lt;/p&gt;&lt;/td&gt;&lt;td style=&quot;vertical-align:top; width:208px&quot;&gt;&lt;p style=&quot;text-align:left&quot;&gt;P[i]&lt;/p&gt;&lt;/td&gt;&lt;td style=&quot;vertical-align:top; width:208px&quot;&gt;&lt;p style=&quot;text-align:left&quot;&gt;List of cities&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;p&gt;&lt;/p&gt;</description>
<category>CSP</category>
<guid isPermaLink="true">https://notexponential.com/757/algorithm-for-power-plant-csp</guid>
<pubDate>Wed, 24 Mar 2021 16:43:15 +0000</pubDate>
</item>
<item>
<title>Jumpy Car - Estimate/Solve the V* values for the following MDP</title>
<link>https://notexponential.com/755/jumpy-car-estimate-solve-the-v-values-for-the-following-mdp</link>
<description>&lt;p&gt;You are traveling on a straight road, but have a jumpy car.&amp;nbsp; The car sometimes &quot;jumps&quot; (moves double).&amp;nbsp; At other times, it doesn&#039;t move at all.&amp;nbsp; The following MDP has been created to model this behavior and the landscape.&lt;/p&gt;&lt;p&gt;Estimate the V* values (optimal values for the states) for this MDP:&lt;/p&gt;&lt;table border=&quot;1&quot; cellpadding=&quot;1&quot; style=&quot;width:500px&quot;&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;S1&lt;/td&gt;&lt;td&gt;S2&lt;/td&gt;&lt;td&gt;S3&lt;/td&gt;&lt;td&gt;S4&lt;/td&gt;&lt;td&gt;S5&lt;/td&gt;&lt;td&gt;S6&lt;/td&gt;&lt;td&gt;S7&lt;/td&gt;&lt;td&gt;S8&lt;/td&gt;&lt;td&gt;S9&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;sqrt(3)&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;100&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;sqrt(3)&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;p&gt;MDP is defined as follows: There are two actions L (Left) and R (Right).&amp;nbsp; When moving left, there is a 40% chance moving left, 50% chance of moving DOUBLE (2 spots left), and 10% chance of not moving at all.&amp;nbsp; Similarly, when moving right, there is a 40% chance moving right, 50% chance of moving DOUBLE (2 spots right), and 10% chance of not moving at all.&lt;/p&gt;&lt;p&gt;S1, S5 and S9&amp;nbsp;are terminal states with values sqrt(3), 100 and sqrt(3) respectively.&amp;nbsp;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Discount factor is 0.9&amp;nbsp;(so, gamma = 0.9).&lt;/p&gt;&lt;p&gt;There is no living reward, that is R(s,a,s’) = 0.&lt;/p&gt;</description>
<category>MDP</category>
<guid isPermaLink="true">https://notexponential.com/755/jumpy-car-estimate-solve-the-v-values-for-the-following-mdp</guid>
<pubDate>Mon, 01 Mar 2021 23:11:54 +0000</pubDate>
</item>
<item>
<title>Solve the V* values for this MDP</title>
<link>https://notexponential.com/754/solve-the-v-values-for-this-mdp</link>
<description>&lt;p&gt;For the given MDP, find the values for the states S2, S3 and S4. States S1 and S5 are terminal states with values 0 and 1 respectively. Living Reward (R) is 0. Transition function is defined as follows: When going Left or Right, there is a 90% probability that the move goes as planned and 10% probability that no move occurs. Discount rate gamma is 0.9&lt;/p&gt;&lt;table border=&quot;1&quot; cellpadding=&quot;1&quot; style=&quot;width:500px&quot;&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;S1&lt;/td&gt;&lt;td&gt;S2&lt;/td&gt;&lt;td&gt;S3&lt;/td&gt;&lt;td&gt;S4&lt;/td&gt;&lt;td&gt;S5&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;0&lt;/td&gt;&lt;td&gt;x2&lt;/td&gt;&lt;td&gt;x3&lt;/td&gt;&lt;td&gt;x4&lt;/td&gt;&lt;td&gt;1&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;p&gt;&lt;/p&gt;</description>
<category>MDP</category>
<guid isPermaLink="true">https://notexponential.com/754/solve-the-v-values-for-this-mdp</guid>
<pubDate>Tue, 23 Feb 2021 22:40:41 +0000</pubDate>
</item>
<item>
<title>Probability of rain in desert when a reliable weatherperson predicts one</title>
<link>https://notexponential.com/753/probability-rain-desert-reliable-weatherperson-predicts</link>
<description>&lt;p&gt;&lt;span style=&quot;color:black&quot;&gt;Antonio has an exciting soccer game coming up. &amp;nbsp;In recent years, it has rained only 5 days each year in the city where they live.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;color:black&quot;&gt;Unfortunately, the weatherperson&amp;nbsp;has predicted rain for that day. When it actually rains, she correctly forecasts rain 90% of the time. When it doesn&#039;t rain, she incorrectly forecasts rain only 10% of the time.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;color:black; font-family:Calibri,sans-serif; font-size:12pt&quot;&gt;What is the probability that it will rain on the day of Antonio’s soccer game?&lt;/span&gt;&lt;/p&gt;</description>
<category>Probability</category>
<guid isPermaLink="true">https://notexponential.com/753/probability-rain-desert-reliable-weatherperson-predicts</guid>
<pubDate>Sun, 21 Feb 2021 18:38:53 +0000</pubDate>
</item>
</channel>
</rss>