<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
<channel>
<title>Algorithms Q&amp;A - Recent questions and answers in Artificial Intelligence</title>
<link>https://notexponential.com/qa/artificial-intelligence</link>
<description>Powered by Question2Answer</description>
<item>
<title>Answered: 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?show=1099#a1099</link>
<description>Hello,&lt;br /&gt;
&lt;br /&gt;
Explanation:&lt;br /&gt;
&lt;br /&gt;
1. &amp;nbsp;Deterministic Transitions: The states follow a strict cycle: R -&amp;gt; G -&amp;gt; B -&amp;gt; R -&amp;gt; G. You cannot stay in a state or skip one.&lt;br /&gt;
&lt;br /&gt;
2. &amp;nbsp;Observation Check:&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;* &amp;nbsp;&amp;nbsp;Observation 4 appears at index 4. Only state Blue can emit 4 (probability 0.4). Therefore, the state at step 4 must be Blue.&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;* &amp;nbsp;&amp;nbsp;Working backward and forward from Step 4 (Blue) using the cycle R -&amp;gt; G -&amp;gt; B:&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;* &amp;nbsp;&amp;nbsp;Step 4: Blue&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;* &amp;nbsp;&amp;nbsp;Step 3: Red (precedes Blue)&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;* &amp;nbsp;&amp;nbsp;Step 2: Green (precedes Red)&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;* &amp;nbsp;&amp;nbsp;Step 1: Blue (precedes Green)? Let&amp;#039;s check the start.&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Let&amp;#039;s test the three possible starting positions for the cycle against the observations:&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;* &amp;nbsp;&amp;nbsp;Case 1: Start with Red (Sequence: R, G, B, R, G, B, R, G, B)&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;* &amp;nbsp;&amp;nbsp;Obs 1 (State R): P(1|R) = 0.4&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;* &amp;nbsp;&amp;nbsp;Obs 2 (State G): P(2|G) = 0.3&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;* &amp;nbsp;&amp;nbsp;Obs 3 (State B): P(3|B) = 0.1&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;* &amp;nbsp;&amp;nbsp;Obs 4 (State R): P(4|R) = 0 (Impossible)&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;* &amp;nbsp;&amp;nbsp;Case 2: Start with Green (Sequence: G, B, R, G, B, R, G, B, R)&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;* &amp;nbsp;&amp;nbsp;Obs 1 (State G): P(1|G) = 0.3&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;* &amp;nbsp;&amp;nbsp;Obs 2 (State B): P(2|B) = 0.1&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;* &amp;nbsp;&amp;nbsp;Obs 3 (State R): P(3|R) = 0.1&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;* &amp;nbsp;&amp;nbsp;Obs 4 (State G): P(4|G) = 0 (Impossible)&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;* &amp;nbsp;&amp;nbsp;Case 3: Start with Blue (Sequence: B, R, G, B, R, G, B, R, G)&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;* &amp;nbsp;&amp;nbsp;Obs 1 (State B): P(1|B) = 0.4&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;* &amp;nbsp;&amp;nbsp;Obs 2 (State R): P(2|R) = 0.5&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;* &amp;nbsp;&amp;nbsp;Obs 3 (State G): P(3|G) = 0.4&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;* &amp;nbsp;&amp;nbsp;Obs 4 (State B): P(4|B) = 0.4&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;* &amp;nbsp;&amp;nbsp;Obs 5 (State R): P(1|R) = 0.4&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;* &amp;nbsp;&amp;nbsp;Obs 6 (State G): P(3|G) = 0.4&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;* &amp;nbsp;&amp;nbsp;Obs 7 (State B): P(1|B) = 0.4&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;* &amp;nbsp;&amp;nbsp;Obs 8 (State R): P(2|R) = 0.5&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;* &amp;nbsp;&amp;nbsp;Obs 9 (State G): P(3|G) = 0.4 &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Only Case 3 is possible because it is the only one that allows Observation 4 to be emitted (by Blue) and Observation 4 to be emitted again? No, Obs 4 is only at index 4. But wait, in Case 1 and 2, the state at index 4 was R and G respectively, neither of which can emit 4. Only Blue emits 4. In the cycle $R \to G \to B$, Blue appears at positions 3, 6, 9 if starting at R; positions 2, 5, 8 if starting at G; and positions 1, 4, 7 if starting at B.&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Since Observation 4 is at index 4, the state at index 4 MUST be Blue. This aligns perfectly with Case 3 (Start with Blue).&lt;br /&gt;
&lt;br /&gt;
The sequence is Blue, Red, Green, Blue, Red, Green, Blue, Red, Green.</description>
<category>HMM</category>
<guid isPermaLink="true">https://notexponential.com/1047/mle-for-the-given-mdp-and-observation-sequence-color-cycler?show=1099#a1099</guid>
<pubDate>Mon, 27 Apr 2026 13:30:50 +0000</pubDate>
</item>
<item>
<title>Answered: MLE for given HMM and Observation Sequence</title>
<link>https://notexponential.com/1050/mle-for-given-hmm-and-observation-sequence?show=1098#a1098</link>
<description>Hello,&lt;br /&gt;
&lt;br /&gt;
The most likely explanation is that any sequence of states is equally likely.&lt;br /&gt;
&lt;br /&gt;
Reasons:&lt;br /&gt;
&lt;br /&gt;
1. &amp;nbsp;Uniform Emissions: Every state (Red, Green, Blue) emits every observation (1, 2, 3) with the exact same probability 1/3. Therefore, the observations provide no information to distinguish which state you are in.&lt;br /&gt;
&lt;br /&gt;
2. &amp;nbsp;Uniform Transitions: From any state, you transition to any other state (including staying) with the exact same probability 1/3.&lt;br /&gt;
&lt;br /&gt;
3. &amp;nbsp;Uniform Initial State: You start in any state with equal probability 1/3.&lt;br /&gt;
&lt;br /&gt;
Because every possible path through the states has the exact same mathematical probability, there is no single &amp;quot;most likely&amp;quot; sequence. All 3^13 possible state sequences are equally probable.</description>
<category>HMM</category>
<guid isPermaLink="true">https://notexponential.com/1050/mle-for-given-hmm-and-observation-sequence?show=1098#a1098</guid>
<pubDate>Mon, 27 Apr 2026 13:24:27 +0000</pubDate>
</item>
<item>
<title>Answered: MLE for given HMM and Observation Sequence</title>
<link>https://notexponential.com/1053/mle-for-given-hmm-and-observation-sequence?show=1097#a1097</link>
<description>Hello,&lt;br /&gt;
&lt;br /&gt;
The most likely explanation (state sequence) is that the system starts in Red, transitions to Green at some point, and then eventually transitions to Blue, where it stays for the remainder of the sequence.&lt;br /&gt;
&lt;br /&gt;
However, looking closely at the specific probabilities:&lt;br /&gt;
&lt;br /&gt;
1. &amp;nbsp;Emissions are uniform 1/3 for all symbols in all states. This means the observations themselves provide no information to distinguish between states. The likelihood depends entirely on the transition probabilities.&lt;br /&gt;
&lt;br /&gt;
2. &amp;nbsp;Transitions:&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;* &amp;nbsp;&amp;nbsp;From R: You can go to R, G, or B with equal probability 1/3.&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;* &amp;nbsp;&amp;nbsp;From G: You must go to G or B 1/2 each. You cannot go back to R.&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;* &amp;nbsp;&amp;nbsp;From B: You must stay in B p=1. This is an absorbing state.&lt;br /&gt;
&lt;br /&gt;
Since emissions don&amp;#039;t help, we want the path with the highest transition probability.&lt;br /&gt;
&lt;br /&gt;
* &amp;nbsp;&amp;nbsp;Staying in R forever has probability (1/3)^(T-1).&lt;br /&gt;
&lt;br /&gt;
* &amp;nbsp;&amp;nbsp;Moving to G and staying there has probability involving 1/3 for the first step and 1/2 for subsequent steps. Since 1/2 &amp;gt; 1/3, staying in G is more likely than staying in R.&lt;br /&gt;
&lt;br /&gt;
* &amp;nbsp;&amp;nbsp;Moving to B and staying there has probability involving 1/3 or 1/2 for the entry step, and 1 for all subsequent steps. Since 1 &amp;gt; 1/2 &amp;gt; 1/3, once you enter B, the probability cost for remaining steps is zero (log-probability is 0).&lt;br /&gt;
&lt;br /&gt;
Therefore, the single most likely specific path is the one that enters the absorbing state Blue as early as possible, because staying in Blue has a probability of 1 per step, which is higher than staying in Red 1/3 or Green 1/2.&lt;br /&gt;
&lt;br /&gt;
The earliest you can enter Blue is at step 2 R -&amp;gt; B.&lt;br /&gt;
&lt;br /&gt;
Path: R, B, B, B, ..., B&lt;br /&gt;
&lt;br /&gt;
Let&amp;#039;s compare:&lt;br /&gt;
&lt;br /&gt;
* &amp;nbsp;&amp;nbsp;Path R, R, R...: Prob = (1/3)^24&lt;br /&gt;
&lt;br /&gt;
* &amp;nbsp;&amp;nbsp;Path R, G, G... Prob = 1/3 * (1/2)^23&lt;br /&gt;
&lt;br /&gt;
* &amp;nbsp;&amp;nbsp;Path R, B, B...: Prob = 1/3 * 1^23 = 1/3&lt;br /&gt;
&lt;br /&gt;
Clearly, 1/3 is much larger than the others.&lt;br /&gt;
&lt;br /&gt;
The most likely state sequence is:&lt;br /&gt;
&lt;br /&gt;
Red, Blue, Blue, Blue, Blue, Blue, Blue, Blue, Blue, Blue, Blue, Blue, Blue, Blue, Blue, Blue, Blue, Blue, Blue, Blue, Blue, Blue, Blue, Blue, Blue</description>
<category>HMM</category>
<guid isPermaLink="true">https://notexponential.com/1053/mle-for-given-hmm-and-observation-sequence?show=1097#a1097</guid>
<pubDate>Mon, 27 Apr 2026 13:21:53 +0000</pubDate>
</item>
<item>
<title>Answered: Stationary Distribution for this conditional probability table</title>
<link>https://notexponential.com/705/stationary-distribution-this-conditional-probability-table?show=1079#a1079</link>
<description>&lt;p&gt;&lt;/p&gt;&lt;p class=&quot;p1&quot;&gt;Hello Professor,&lt;/p&gt;&lt;p class=&quot;p1&quot;&gt;Let the stationary distribution be:&lt;/p&gt;&lt;p class=&quot;p1&quot;&gt;pi = (s, c, r)&lt;/p&gt;&lt;p class=&quot;p1&quot;&gt;where:&lt;/p&gt;&lt;p class=&quot;p1&quot;&gt;s = probability of Sun&lt;br&gt;c = probability of Cloudy&lt;br&gt;r = probability of Rain&lt;/p&gt;&lt;p class=&quot;p1&quot;&gt;For a stationary distribution, the probabilities should stay the same after one transition. So we need:&lt;/p&gt;&lt;p class=&quot;p1&quot;&gt;pi = pi P&lt;/p&gt;&lt;p class=&quot;p1&quot;&gt;Using the table, the equations are:&lt;/p&gt;&lt;p class=&quot;p1&quot;&gt;s = 0.6s + 0.4c + 0.1r&lt;/p&gt;&lt;p class=&quot;p1&quot;&gt;c = 0.3s + 0.2c + 0.4r&lt;/p&gt;&lt;p class=&quot;p1&quot;&gt;r = 0.1s + 0.4c + 0.5r&lt;/p&gt;&lt;p class=&quot;p1&quot;&gt;Also, since these are probabilities:&lt;/p&gt;&lt;p class=&quot;p1&quot;&gt;s + c + r = 1&lt;/p&gt;&lt;p class=&quot;p1&quot;&gt;From the first equation:&lt;/p&gt;&lt;p class=&quot;p1&quot;&gt;s = 0.6s + 0.4c + 0.1r&lt;/p&gt;&lt;p class=&quot;p1&quot;&gt;0.4s = 0.4c + 0.1r&lt;/p&gt;&lt;p class=&quot;p1&quot;&gt;4s = 4c + r&lt;/p&gt;&lt;p class=&quot;p1&quot;&gt;r = 4s - 4c&lt;/p&gt;&lt;p class=&quot;p1&quot;&gt;From the second equation:&lt;/p&gt;&lt;p class=&quot;p1&quot;&gt;c = 0.3s + 0.2c + 0.4r&lt;/p&gt;&lt;p class=&quot;p1&quot;&gt;0.8c = 0.3s + 0.4r&lt;/p&gt;&lt;p class=&quot;p1&quot;&gt;Substitute r = 4s - 4c:&lt;/p&gt;&lt;p class=&quot;p1&quot;&gt;0.8c = 0.3s + 0.4(4s - 4c)&lt;/p&gt;&lt;p class=&quot;p1&quot;&gt;0.8c = 0.3s + 1.6s - 1.6c&lt;/p&gt;&lt;p class=&quot;p1&quot;&gt;2.4c = 1.9s&lt;/p&gt;&lt;p class=&quot;p1&quot;&gt;c = 19s / 24&lt;/p&gt;&lt;p class=&quot;p1&quot;&gt;Now use r = 4s - 4c:&lt;/p&gt;&lt;p class=&quot;p1&quot;&gt;r = 4s - 4(19s / 24)&lt;/p&gt;&lt;p class=&quot;p1&quot;&gt;r = 4s - 19s / 6&lt;/p&gt;&lt;p class=&quot;p1&quot;&gt;r = 24s / 6 - 19s / 6&lt;/p&gt;&lt;p class=&quot;p1&quot;&gt;r = 5s / 6&lt;/p&gt;&lt;p class=&quot;p1&quot;&gt;Now use the total probability equation:&lt;/p&gt;&lt;p class=&quot;p1&quot;&gt;s + c + r = 1&lt;/p&gt;&lt;p class=&quot;p1&quot;&gt;s + 19s / 24 + 5s / 6 = 1&lt;/p&gt;&lt;p class=&quot;p1&quot;&gt;s + 19s / 24 + 20s / 24 = 1&lt;/p&gt;&lt;p class=&quot;p1&quot;&gt;63s / 24 = 1&lt;/p&gt;&lt;p class=&quot;p1&quot;&gt;s = 24 / 63&lt;/p&gt;&lt;p class=&quot;p1&quot;&gt;s = 8 / 21&lt;/p&gt;&lt;p class=&quot;p1&quot;&gt;Now find c:&lt;/p&gt;&lt;p class=&quot;p1&quot;&gt;c = 19s / 24&lt;/p&gt;&lt;p class=&quot;p1&quot;&gt;c = 19 / 63&lt;/p&gt;&lt;p class=&quot;p1&quot;&gt;Now find r:&lt;/p&gt;&lt;p class=&quot;p1&quot;&gt;r = 5s / 6&lt;/p&gt;&lt;p class=&quot;p1&quot;&gt;r = 20 / 63&lt;/p&gt;&lt;p class=&quot;p1&quot;&gt;So the stationary distribution is:&lt;/p&gt;&lt;p class=&quot;p1&quot;&gt;Sun = 8 / 21&lt;/p&gt;&lt;p class=&quot;p1&quot;&gt;Cloudy = 19 / 63&lt;/p&gt;&lt;p class=&quot;p1&quot;&gt;Rain = 20 / 63&lt;/p&gt;&lt;p class=&quot;p1&quot;&gt;In decimal form:&lt;/p&gt;&lt;p class=&quot;p1&quot;&gt;Sun = 0.381&lt;/p&gt;&lt;p class=&quot;p1&quot;&gt;Cloudy = 0.302&lt;/p&gt;&lt;p class=&quot;p1&quot;&gt;Rain = 0.317&lt;/p&gt;&lt;p class=&quot;p1&quot;&gt;Final answer:&lt;/p&gt;&lt;p class=&quot;p1&quot;&gt;pi = (8 / 21, 19 / 63, 20 / 63)&lt;/p&gt;&lt;p class=&quot;p1&quot;&gt;This means that in the long run, the weather is sunny about 38.1% of the time, cloudy about 30.2% of the time, and rainy about 31.7% of the time&lt;/p&gt;&lt;p&gt;&lt;/p&gt;</description>
<category>Informed Search</category>
<guid isPermaLink="true">https://notexponential.com/705/stationary-distribution-this-conditional-probability-table?show=1079#a1079</guid>
<pubDate>Sun, 26 Apr 2026 13:16:22 +0000</pubDate>
</item>
<item>
<title>Answered: Heads - 2 in a row</title>
<link>https://notexponential.com/1014/heads-2-in-a-row?show=1078#a1078</link>
<description>&lt;p&gt;&lt;/p&gt;&lt;p class=&quot;p1&quot;&gt;Hello Professor,&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p class=&quot;p1&quot;&gt;Let F be the fair coin and B be the biased coin.&lt;/p&gt;&lt;p class=&quot;p1&quot;&gt;At the start:&lt;/p&gt;&lt;p class=&quot;p1&quot;&gt;P(F) = 1/2&lt;/p&gt;&lt;p class=&quot;p1&quot;&gt;P(B) = 1/2&lt;/p&gt;&lt;p class=&quot;p1&quot;&gt;The fair coin gives heads with probability 1/2, while the biased coin always gives heads.&lt;/p&gt;&lt;p class=&quot;p1&quot;&gt;First, we find the probability of getting heads on the first toss:&lt;/p&gt;&lt;p class=&quot;p1&quot;&gt;P(H1) = P(H1 | F)P(F) + P(H1 | B)P(B)&lt;/p&gt;&lt;p class=&quot;p1&quot;&gt;P(H1) = (1/2)(1/2) + (1)(1/2)&lt;/p&gt;&lt;p class=&quot;p1&quot;&gt;P(H1) = 1/4 + 1/2 = 3/4&lt;/p&gt;&lt;p class=&quot;p1&quot;&gt;Now, since we already saw heads on the first toss, we update the probability that the coin was biased:&lt;/p&gt;&lt;p class=&quot;p1&quot;&gt;P(B | H1) = [(1)(1/2)] / (3/4)&lt;/p&gt;&lt;p class=&quot;p1&quot;&gt;P(B | H1) = 2/3&lt;/p&gt;&lt;p class=&quot;p1&quot;&gt;So the probability that it was the fair coin is:&lt;/p&gt;&lt;p class=&quot;p1&quot;&gt;P(F | H1) = 1/3&lt;/p&gt;&lt;p class=&quot;p1&quot;&gt;Now we calculate the probability that the second toss is also heads:&lt;/p&gt;&lt;p class=&quot;p1&quot;&gt;P(H2 | H1) = P(H2 | B)P(B | H1) + P(H2 | F)P(F | H1)&lt;/p&gt;&lt;p class=&quot;p1&quot;&gt;P(H2 | H1) = (1)(2/3) + (1/2)(1/3)&lt;/p&gt;&lt;p class=&quot;p1&quot;&gt;P(H2 | H1) = 2/3 + 1/6&lt;/p&gt;&lt;p class=&quot;p1&quot;&gt;P(H2 | H1) = 5/6&lt;/p&gt;&lt;p class=&quot;p1&quot;&gt;Final answer:&lt;/p&gt;&lt;p class=&quot;p1&quot;&gt;5/6, or about 83.33%&lt;/p&gt;&lt;p class=&quot;p1&quot;&gt;So after seeing one head, it becomes more likely that the coin is the biased coin, which makes the probability of getting heads again higher than 1/2&lt;/p&gt;</description>
<category>HMM</category>
<guid isPermaLink="true">https://notexponential.com/1014/heads-2-in-a-row?show=1078#a1078</guid>
<pubDate>Sun, 26 Apr 2026 13:13:29 +0000</pubDate>
</item>
<item>
<title>Answered: 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?show=1077#a1077</link>
<description>&lt;p&gt;&lt;/p&gt;&lt;p class=&quot;p3&quot;&gt;&lt;/p&gt;&lt;p class=&quot;p1&quot;&gt;Hello Professor,&lt;/p&gt;&lt;p class=&quot;p1&quot;&gt;Since S5 has a terminal value of 100, the optimal strategy is to move toward S5. So for the states on the left side, S2, S3, and S4, the best action is R. For the states on the right side, S6, S7, and S8, the best action is L.&lt;/p&gt;&lt;p class=&quot;p1&quot;&gt;The terminal state values are:&lt;/p&gt;&lt;p class=&quot;p1&quot;&gt;V(S1) = 1.732&lt;/p&gt;&lt;p class=&quot;p1&quot;&gt;V(S5) = 100&lt;/p&gt;&lt;p class=&quot;p1&quot;&gt;V(S9) = 1.732&lt;/p&gt;&lt;p class=&quot;p1&quot;&gt;Because the MDP is symmetric around S5:&lt;/p&gt;&lt;p class=&quot;p1&quot;&gt;V(S2) = V(S8)&lt;/p&gt;&lt;p class=&quot;p1&quot;&gt;V(S3) = V(S7)&lt;/p&gt;&lt;p class=&quot;p1&quot;&gt;V(S4) = V(S6)&lt;/p&gt;&lt;p class=&quot;p1&quot;&gt;Let:&lt;/p&gt;&lt;p class=&quot;p1&quot;&gt;x = V(S2) = V(S8)&lt;/p&gt;&lt;p class=&quot;p1&quot;&gt;y = V(S3) = V(S7)&lt;/p&gt;&lt;p class=&quot;p1&quot;&gt;z = V(S4) = V(S6)&lt;/p&gt;&lt;p class=&quot;p1&quot;&gt;The discount factor is 0.9. There is no living reward, so the value comes only from discounted future values.&lt;/p&gt;&lt;p class=&quot;p1&quot;&gt;For S4, moving right gives:&lt;/p&gt;&lt;p class=&quot;p1&quot;&gt;z = 0.9(0.4(100) + 0.5z + 0.1z)&lt;/p&gt;&lt;p class=&quot;p1&quot;&gt;z = 0.9(40 + 0.6z)&lt;/p&gt;&lt;p class=&quot;p1&quot;&gt;z = 36 + 0.54z&lt;/p&gt;&lt;p class=&quot;p1&quot;&gt;0.46z = 36&lt;/p&gt;&lt;p class=&quot;p1&quot;&gt;z = 78.26&lt;/p&gt;&lt;p class=&quot;p1&quot;&gt;So:&lt;/p&gt;&lt;p class=&quot;p1&quot;&gt;V(S4) = V(S6) = 78.26&lt;/p&gt;&lt;p class=&quot;p1&quot;&gt;For S3, moving right gives:&lt;/p&gt;&lt;p class=&quot;p1&quot;&gt;y = 0.9(0.4z + 0.5(100) + 0.1y)&lt;/p&gt;&lt;p class=&quot;p1&quot;&gt;Substituting z = 78.26:&lt;/p&gt;&lt;p class=&quot;p1&quot;&gt;y = 0.9(0.4(78.26) + 50 + 0.1y)&lt;/p&gt;&lt;p class=&quot;p1&quot;&gt;y = 73.17 + 0.09y&lt;/p&gt;&lt;p class=&quot;p1&quot;&gt;0.91y = 73.17&lt;/p&gt;&lt;p class=&quot;p1&quot;&gt;y = 80.41&lt;/p&gt;&lt;p class=&quot;p1&quot;&gt;So:&lt;/p&gt;&lt;p class=&quot;p1&quot;&gt;V(S3) = V(S7) = 80.41&lt;/p&gt;&lt;p class=&quot;p1&quot;&gt;For S2, moving right gives:&lt;/p&gt;&lt;p class=&quot;p1&quot;&gt;x = 0.9(0.4y + 0.5z + 0.1x)&lt;/p&gt;&lt;p class=&quot;p1&quot;&gt;Substituting y = 80.41 and z = 78.26:&lt;/p&gt;&lt;p class=&quot;p1&quot;&gt;x = 0.9(0.4(80.41) + 0.5(78.26) + 0.1x)&lt;/p&gt;&lt;p class=&quot;p1&quot;&gt;x = 64.16 + 0.09x&lt;/p&gt;&lt;p class=&quot;p1&quot;&gt;0.91x = 64.16&lt;/p&gt;&lt;p class=&quot;p1&quot;&gt;x = 70.51&lt;/p&gt;&lt;p class=&quot;p1&quot;&gt;So:&lt;/p&gt;&lt;p class=&quot;p1&quot;&gt;V(S2) = V(S8) = 70.51&lt;/p&gt;&lt;p class=&quot;p1&quot;&gt;Therefore, the final values are:&lt;/p&gt;&lt;p class=&quot;p1&quot;&gt;V(S1) = 1.732&lt;/p&gt;&lt;p class=&quot;p1&quot;&gt;V(S2) = 70.51&lt;/p&gt;&lt;p class=&quot;p1&quot;&gt;V(S3) = 80.41&lt;/p&gt;&lt;p class=&quot;p1&quot;&gt;V(S4) = 78.26&lt;/p&gt;&lt;p class=&quot;p1&quot;&gt;V(S5) = 100&lt;/p&gt;&lt;p class=&quot;p1&quot;&gt;V(S6) = 78.26&lt;/p&gt;&lt;p class=&quot;p1&quot;&gt;V(S7) = 80.41&lt;/p&gt;&lt;p class=&quot;p1&quot;&gt;V(S8) = 70.51&lt;/p&gt;&lt;p class=&quot;p1&quot;&gt;V(S9) = 1.732&lt;/p&gt;&lt;p class=&quot;p1&quot;&gt;Final answer:&lt;/p&gt;&lt;p class=&quot;p1&quot;&gt;[1.732, 70.51, 80.41, 78.26, 100, 78.26, 80.41, 70.51, 1.732]&lt;/p&gt;&lt;p class=&quot;p1&quot;&gt;The values are not perfectly increasing as the states get closer to S5 because there is a chance of jumping two spaces. This means that being one step away from S5 is not always better than being two steps away, depending on the transition probabilities&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?show=1077#a1077</guid>
<pubDate>Sun, 26 Apr 2026 13:09:30 +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>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>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>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>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>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>
<item>
<title>What is the code level difference between graph search and tree search?</title>
<link>https://notexponential.com/703/what-code-level-difference-between-graph-search-tree-search</link>
<description>What is the code level difference between graph search and tree search?</description>
<category>Informed Search</category>
<guid isPermaLink="true">https://notexponential.com/703/what-code-level-difference-between-graph-search-tree-search</guid>
<pubDate>Mon, 03 Feb 2020 16:54:34 +0000</pubDate>
</item>
<item>
<title>Solve this GridWorld</title>
<link>https://notexponential.com/689/solve-this-gridworld</link>
<description>&lt;p&gt;Calculate the final V* values for the given grid world.&amp;nbsp; Fill in all missing cells.&amp;nbsp; All given values are terminal states.&amp;nbsp; Use value iteration/policy iteration, any method that you like.&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family:&amp;quot;Calibri&amp;quot;,sans-serif; font-size:11.0pt&quot;&gt;Assume 50% discount (that is, gamma = 0.5).&amp;nbsp; Assume 0.8, 0.1, 0.1 noise, that is, probability of going to the intended direction is 0.8, and probability of going left/right is 0.1 each.&lt;/span&gt;&lt;/p&gt;&lt;table border=&quot;1&quot; cellpadding=&quot;1&quot; style=&quot;width:500px&quot;&gt;&lt;caption&gt;GridWorld&lt;/caption&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style=&quot;text-align:center&quot;&gt;10&lt;/td&gt;&lt;td style=&quot;text-align:center&quot;&gt;10&lt;/td&gt;&lt;td style=&quot;text-align:center&quot;&gt;10&lt;/td&gt;&lt;td style=&quot;text-align:center&quot;&gt;10&lt;/td&gt;&lt;td style=&quot;text-align:center&quot;&gt;10&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td style=&quot;text-align:center&quot;&gt;10&lt;/td&gt;&lt;td style=&quot;text-align:center&quot;&gt;&lt;/td&gt;&lt;td style=&quot;text-align:center&quot;&gt;&lt;/td&gt;&lt;td style=&quot;text-align:center&quot;&gt;&lt;/td&gt;&lt;td style=&quot;text-align:center&quot;&gt;10&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td style=&quot;text-align:center&quot;&gt;10&lt;/td&gt;&lt;td style=&quot;text-align:center&quot;&gt;&lt;/td&gt;&lt;td style=&quot;text-align:center&quot;&gt;&lt;/td&gt;&lt;td style=&quot;text-align:center&quot;&gt;&lt;/td&gt;&lt;td style=&quot;text-align:center&quot;&gt;10&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td style=&quot;text-align:center&quot;&gt;10&lt;/td&gt;&lt;td style=&quot;text-align:center&quot;&gt;&lt;/td&gt;&lt;td style=&quot;text-align:center&quot;&gt;&lt;/td&gt;&lt;td style=&quot;text-align:center&quot;&gt;&lt;/td&gt;&lt;td style=&quot;text-align:center&quot;&gt;10&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td style=&quot;text-align:center&quot;&gt;10&lt;/td&gt;&lt;td style=&quot;text-align:center&quot;&gt;10&lt;/td&gt;&lt;td style=&quot;text-align:center&quot;&gt;10&lt;/td&gt;&lt;td style=&quot;text-align:center&quot;&gt;10&lt;/td&gt;&lt;td style=&quot;text-align:center&quot;&gt;10&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;p&gt;&amp;nbsp;&amp;nbsp;&lt;/p&gt;</description>
<category>Informed Search</category>
<guid isPermaLink="true">https://notexponential.com/689/solve-this-gridworld</guid>
<pubDate>Mon, 13 May 2019 20:24:23 +0000</pubDate>
</item>
<item>
<title>Admissible Heuristic for n-puzzle if multiple tiles can be slided at once</title>
<link>https://notexponential.com/684/admissible-heuristic-for-puzzle-multiple-tiles-slided-once</link>
<description>In the context of n-puzzle, consider a variation that we can slide multiple tiles in one row or column, if they are touching each other. &amp;nbsp;The cost of this slide operation is the same as that of sliding one tile.&lt;br /&gt;
&lt;br /&gt;
Design an admissible and useful heuristic for this problem.</description>
<category>Informed Search</category>
<guid isPermaLink="true">https://notexponential.com/684/admissible-heuristic-for-puzzle-multiple-tiles-slided-once</guid>
<pubDate>Tue, 07 May 2019 10:51:24 +0000</pubDate>
</item>
<item>
<title>8 puzzle that can be solved or not?</title>
<link>https://notexponential.com/641/8-puzzle-that-can-be-solved-or-not</link>
<description>Some of 8 puzzles can be solved if it is transferred from the #12345678. But there are 9! states. How to rule out many of the wrong states use rules that 8 puzzles have potential, like odd and even, the right rule is #12345678, every line only three place and so on.</description>
<category>Informed Search</category>
<guid isPermaLink="true">https://notexponential.com/641/8-puzzle-that-can-be-solved-or-not</guid>
<pubDate>Tue, 30 Apr 2019 22:49:15 +0000</pubDate>
</item>
<item>
<title>Is Harmonic Mean of admissible heuristics an admissible heuristic?</title>
<link>https://notexponential.com/629/harmonic-mean-admissible-heuristics-admissible-heuristic</link>
<description>Given a family of admissible heuristic functions h1, h2, .. hn. &amp;nbsp;Is the Harmonic Mean, H = n / (1/h1 + 1/h2 + ... 1/hn) an admissible function? &amp;nbsp;How would you define this function if one of the h functions is zero?</description>
<category>Informed Search</category>
<guid isPermaLink="true">https://notexponential.com/629/harmonic-mean-admissible-heuristics-admissible-heuristic</guid>
<pubDate>Tue, 09 Apr 2019 02:25:06 +0000</pubDate>
</item>
<item>
<title>Converting ternary constraint into binary constraints</title>
<link>https://notexponential.com/616/converting-ternary-constraint-into-binary-constraints</link>
<description>Show how a single ternary constraint such as &amp;quot;x + y = z&amp;quot; can be turned into three binary constraints by using an auxiliary variable.</description>
<category>Informed Search</category>
<guid isPermaLink="true">https://notexponential.com/616/converting-ternary-constraint-into-binary-constraints</guid>
<pubDate>Sat, 09 Feb 2019 15:59:04 +0000</pubDate>
</item>
<item>
<title>Manhattan Distances, but Linear Interference...</title>
<link>https://notexponential.com/614/manhattan-distances-but-linear-interference</link>
<description>&lt;p&gt;&lt;span style=&quot;color:#222222; font-family:Arial,Helvetica,sans-serif; font-size:small&quot;&gt;Manhattan Distance does not take into account linear conflicts. For example:&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;color:#222222; font-family:Arial,Helvetica,sans-serif; font-size:small&quot;&gt;- - 3,1 needs to be changed to -&amp;nbsp;1, -, 3&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;color:#222222; font-family:Arial,Helvetica,sans-serif; font-size:small&quot;&gt;[Only first row is being shown here, and the blank is assumed to be at the top left corner.]&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;color:#222222; font-family:Arial,Helvetica,sans-serif; font-size:small&quot;&gt;Manhattan Distance is 4, but tiles 1 and 3 interfere with each other while moving.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;color:#222222; font-family:Arial,Helvetica,sans-serif; font-size:small&quot;&gt;So, how can we improve this heuristic?&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;</description>
<category>Informed Search</category>
<guid isPermaLink="true">https://notexponential.com/614/manhattan-distances-but-linear-interference</guid>
<pubDate>Sat, 02 Feb 2019 16:11:04 +0000</pubDate>
</item>
<item>
<title>Give an example of a task environment that is..</title>
<link>https://notexponential.com/605/give-an-example-of-a-task-environment-that-is</link>
<description>&lt;p&gt;Give an example of a task environment that is..&amp;nbsp;&lt;/p&gt;&lt;ol&gt;&lt;li&gt;Episodic and Discrete&lt;/li&gt;&lt;li&gt;Continuous and Episodic&lt;/li&gt;&lt;li&gt;Continuous, Non-Deterministic and Non-Episodic.&lt;/li&gt;&lt;/ol&gt;&lt;div&gt;For each of the combinations above, give an example of a task environment.&lt;/div&gt;</description>
<category>Informed Search</category>
<guid isPermaLink="true">https://notexponential.com/605/give-an-example-of-a-task-environment-that-is</guid>
<pubDate>Fri, 25 Jan 2019 18:48:48 +0000</pubDate>
</item>
<item>
<title>Admissible Heuristic for n-Queens Problem</title>
<link>https://notexponential.com/542/admissible-heuristic-for-n-queens-problem</link>
<description>Given all queens are in their own columns, and a move is defined as picking up a queen and moving to any other row in the same column, what is an admissible heuristic for this problem?&lt;br /&gt;
&lt;br /&gt;
[We note that by the structure of the problem, we always have a queen in each column.]</description>
<category>Informed Search</category>
<guid isPermaLink="true">https://notexponential.com/542/admissible-heuristic-for-n-queens-problem</guid>
<pubDate>Sat, 24 Mar 2018 11:44:41 +0000</pubDate>
</item>
<item>
<title>In the context of informed search, what is the difference between complete, optimal and optimally efficient algorithm?</title>
<link>https://notexponential.com/540/informed-difference-complete-optimally-efficient-algorithm</link>
<description>In the context of informed search, what is the difference between complete, optimal and optimally efficient algorithm?&lt;br /&gt;
&lt;br /&gt;
Is A* complete?&lt;br /&gt;
&lt;br /&gt;
Is A* optimal?&lt;br /&gt;
&lt;br /&gt;
Is A* optimally efficient?</description>
<category>Informed Search</category>
<guid isPermaLink="true">https://notexponential.com/540/informed-difference-complete-optimally-efficient-algorithm</guid>
<pubDate>Mon, 19 Mar 2018 02:35:55 +0000</pubDate>
</item>
<item>
<title>N-Queens Count all conflicts in O(n) time</title>
<link>https://notexponential.com/495/n-queens-count-all-conflicts-in-o-n-time</link>
<description>&lt;p&gt;Count all the conflicts in a given n-Queen state.&amp;nbsp; It is easy to do in O(n&lt;sup&gt;2&lt;/sup&gt;) time.&amp;nbsp; Give an O(n) time algorithm to count all conflicts.&lt;/p&gt;</description>
<category>Informed Search</category>
<guid isPermaLink="true">https://notexponential.com/495/n-queens-count-all-conflicts-in-o-n-time</guid>
<pubDate>Sat, 03 Mar 2018 02:26:23 +0000</pubDate>
</item>
</channel>
</rss>