<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
<channel>
<title>Algorithms Q&amp;A - Recent questions and answers in Uninformed Search</title>
<link>https://notexponential.com/qa/artificial-intelligence/uninformed-search</link>
<description>Powered by Question2Answer</description>
<item>
<title>Answered: Searching Problem with Numbers</title>
<link>https://notexponential.com/769/searching-problem-with-numbers?show=793#a793</link>
<description>This problem could be solved using UCS if we use a search tree with &amp;#039;4&amp;#039; as the root. The branching factor is 3 with each branch having a different cost.&lt;br /&gt;
&lt;br /&gt;
Let&amp;#039;s use a notation of (&amp;#039;node name&amp;#039;,cost) when discussing this problem.&lt;br /&gt;
&lt;br /&gt;
(&amp;#039;4&amp;#039;,0) -&amp;gt; [ (&amp;#039;4&amp;#039;,1), (&amp;#039;2&amp;#039;,2), (&amp;#039;24&amp;#039;,3) ]&lt;br /&gt;
&lt;br /&gt;
The (&amp;#039;4&amp;#039;,1) is suboptimal as a repeated value and the (&amp;#039;2&amp;#039;,2) node leads to a dead end due to the factorial.&lt;br /&gt;
&lt;br /&gt;
The best option is to choose (&amp;#039;24&amp;#039;,3) as the next item.&lt;br /&gt;
&lt;br /&gt;
(&amp;#039;24&amp;#039;,3) -&amp;gt; [ (&amp;#039;24&amp;#039;,4), (&amp;#039;4.89...&amp;#039;,5), (&amp;#039;24!&amp;#039;,6) ]&lt;br /&gt;
&lt;br /&gt;
The (&amp;#039;4.89...&amp;#039;,5) leads to nodes &amp;#039;2&amp;#039; and &amp;#039;4&amp;#039; again based on the operations and the &amp;#039;24&amp;#039; node is the identity. We should continue with (&amp;#039;24!&amp;#039;,6).&lt;br /&gt;
&lt;br /&gt;
Since &amp;#039;24!&amp;#039; is a large number, we will certainly use the square root several times. Luckily, after 5 rounds, we get &amp;#039;5.54&amp;#039;, which the floor function can turn into the desired 5.&lt;br /&gt;
&lt;br /&gt;
(4,0) -&amp;gt; (24,3) -&amp;gt; (24!,6) -&amp;gt; (sqrt(24!),8) -&amp;gt; (sqrt(sqrt(24!),10) -&amp;gt; (sqrt(sqrt(sqrt(24!)),12) -&amp;gt; (sqrt(sqrt(sqrt(sqrt(24!)))),14) -&amp;gt; (sqrt(sqrt(sqrt(sqrt(sqrt(24!)))),16) = (&amp;#039;5.54&amp;#039;,16) -&amp;gt; (5,17)&lt;br /&gt;
&lt;br /&gt;
Thus, we can reach the desired state of &amp;#039;5&amp;#039; at a cost of 17 units.</description>
<category>Uninformed Search</category>
<guid isPermaLink="true">https://notexponential.com/769/searching-problem-with-numbers?show=793#a793</guid>
<pubDate>Sat, 04 Mar 2023 21:47:13 +0000</pubDate>
</item>
</channel>
</rss>