<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
<channel>
<title>Algorithms Q&amp;A - Recent questions and answers in Branch &amp; Bound</title>
<link>https://notexponential.com/qa/branch-%26-bound</link>
<description>Powered by Question2Answer</description>
<item>
<title>Answered: Employee to project assignment reward problem</title>
<link>https://notexponential.com/398/employee-to-project-assignment-reward-problem?show=954#a954</link>
<description>&lt;p&gt;&lt;strong&gt;Problem Formulation&lt;/strong&gt;: We represent each possible combination of assignments as a node in a decision tree. Each level&amp;nbsp; d in this tree corresponds to the assignment of&amp;nbsp; d employees.&lt;/p&gt;&lt;p&gt;&lt;strong&gt;Initial Node&lt;/strong&gt;: Begin with a baseline scenario where no employee is assigned to any project.&lt;/p&gt;&lt;p&gt;&lt;strong&gt;Expansion Mechanism&lt;/strong&gt;: At any given node, create offspring nodes by allocating the next available employee to each possible project. This branching continues until all employees are allocated.&lt;/p&gt;&lt;p&gt;&lt;strong&gt;Upper Bound Estimation&lt;/strong&gt;: For each node, compute the maximum possible revenue that can be achieved from that point onwards. This includes the revenue already secured from current assignments plus the highest possible revenue from remaining unassigned employees, ensuring that no project is repeated in the estimations.&lt;/p&gt;&lt;p&gt;&lt;strong&gt;Pruning Strategy&lt;/strong&gt;: Eliminate any node from further consideration if its upper bound is less than the revenue of the best-known complete assignment. This step is crucial in reducing the search space.&lt;/p&gt;&lt;p&gt;&lt;strong&gt;Solution Exploration&lt;/strong&gt;: Whenever a node represents a full set of assignments, evaluate its total revenue. If this revenue exceeds that of the best solution found so far, update the optimal solution.&lt;/p&gt;&lt;p&gt;&lt;strong&gt;Traversal Approach&lt;/strong&gt;: Implement a systematic traversal method, like Best-First Search, which prioritizes nodes with higher revenue potential, to navigate through the decision tree.&lt;/p&gt;&lt;p&gt;&lt;strong&gt;Algorithm Completion&lt;/strong&gt;: The process concludes once all nodes have been either fully examined or pruned.&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;Optimal Assignment&lt;/strong&gt;: The algorithm&#039;s output is the best assignment found, representing the optimal allocation of employees to projects for maximum total revenue.&lt;/p&gt;</description>
<category>Branch &amp; Bound</category>
<guid isPermaLink="true">https://notexponential.com/398/employee-to-project-assignment-reward-problem?show=954#a954</guid>
<pubDate>Sat, 16 Dec 2023 18:54:19 +0000</pubDate>
</item>
<item>
<title>Answered: You are given a Boolean formula involving variables X1, X2, ... Xn.</title>
<link>https://notexponential.com/549/you-are-given-a-boolean-formula-involving-variables-x1-x2-xn?show=949#a949</link>
<description>&lt;p&gt;The concept revolves around constructing a rooted tree as a solution space, beginning from a root node where no truth values have been assigned to any of the &#039;n&#039; variables. Two child nodes emerge from this root, each representing one of the binary states (true or false) of a chosen variable &#039;X&lt;sub&gt;i&lt;/sub&gt;&#039;. Subsequent child nodes are generated, each focusing on a different variable. This structure results in a tree of height &#039;n&#039; and 2&lt;sup&gt;n&lt;/sup&gt;&amp;nbsp;leaf nodes, indicating a potential for exponential time complexity in the worst case of the branch and bound algorithm. However, practical scenarios often allow for substantial pruning of the tree, greatly reducing time complexity.&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;For bounds, in a maximization problem, the lower bound represents a feasible solution, attainable in O(n) time, based on the truth status of certain clauses. The upper bound is the total number of clauses not confirmed as false.&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;The efficiency of the algorithm largely depends on the ordering criteria. A suggested approach is to prioritize variables based on their &#039;incidence&#039; count, which is the frequency of a variable&#039;s appearance in the clauses, adjusted by the frequency of its negation. This method significantly impacts the practical execution time of the algorithm.&lt;/p&gt;</description>
<category>Branch &amp; Bound</category>
<guid isPermaLink="true">https://notexponential.com/549/you-are-given-a-boolean-formula-involving-variables-x1-x2-xn?show=949#a949</guid>
<pubDate>Sat, 16 Dec 2023 18:06:34 +0000</pubDate>
</item>
<item>
<title>Answered: Solve a set of inter-related recurrence relations</title>
<link>https://notexponential.com/775/solve-a-set-of-inter-related-recurrence-relations?show=946#a946</link>
<description>T(n)= T(n-2)+(n-1)^2+n*log(n)&lt;br /&gt;
&lt;br /&gt;
Since n*logn is asymptotically compared to (n-1)^2&lt;br /&gt;
&lt;br /&gt;
T(n)=T(n-4)+(n-1)^2+(n-3)^2&lt;br /&gt;
&lt;br /&gt;
T(n)= c+(n-1)^2 + (n-3)^2 + ... [ where c is constant]&lt;br /&gt;
&lt;br /&gt;
T(n)= O(n^3)&lt;br /&gt;
&lt;br /&gt;
Now R(n)= R(n-2) + n^2 + (n-1)*log(n-1)&lt;br /&gt;
&lt;br /&gt;
Since n*logn is asymptotically smaller compared to n^2&lt;br /&gt;
&lt;br /&gt;
R(n) = R(n-2) + n^2&lt;br /&gt;
&lt;br /&gt;
R(n) = n^2 + (n-2)^2 + (n-3)^2 + ....&lt;br /&gt;
&lt;br /&gt;
R(n)= O(n^3)&lt;br /&gt;
&lt;br /&gt;
Hence T(n) = Theta(R(n))</description>
<category>Branch &amp; Bound</category>
<guid isPermaLink="true">https://notexponential.com/775/solve-a-set-of-inter-related-recurrence-relations?show=946#a946</guid>
<pubDate>Sat, 16 Dec 2023 17:30:43 +0000</pubDate>
</item>
<item>
<title>Answered: How can we solve the 8 puzzle problem using Branch &amp; Bound approach?</title>
<link>https://notexponential.com/630/how-can-solve-the-puzzle-problem-using-branch-bound-approach?show=888#a888</link>
<description>&lt;p&gt;&lt;strong&gt;Solution Space:&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;background-color:transparent; color:#000000; font-family:Arial,sans-serif; font-size:10pt&quot;&gt;Imagine a tree structure where each node represents the arrangement of the n-puzzle tiles. The root node represents the starting arrangement. Each node branches out into child nodes, representing the possible moves (in this case it is sliding a tile). Using this tree structure we explore all possible paths to reach the required arrangement of tiles(solution).&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;Bounds:&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;u&gt;Lower Bound:&lt;/u&gt;&lt;span style=&quot;background-color:transparent; color:#000000; font-family:Arial,sans-serif; font-size:10pt&quot;&gt;&amp;nbsp; we use misplaced tile heuristic which calculates the number of tiles not in their correct goal positions. So we explore paths requiring least number of moves.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;u&gt;Upper Bound:&lt;/u&gt;&lt;span style=&quot;background-color:transparent; color:#000000; font-family:Arial,sans-serif; font-size:10pt&quot;&gt;&amp;nbsp; we use manhattan distance heuristic which calculates the sum of distances of misplaced tiles from their goal positions. This gives us the upper limit on remaining moves.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;background-color:transparent; color:#000000; font-family:Arial,sans-serif; font-size:10pt&quot;&gt;Estimated Cost will be the&amp;nbsp;sum of the lower and upper bounds. Using this we can prioritize paths with fewer estimated moves to complete the puzzle.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;3. Ordering Criteria:&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;background-color:transparent; color:#000000; font-family:Arial,sans-serif; font-size:10pt&quot;&gt;Explore the nodes with lower estimated costs first so we complete puzzle with the minimum number of moves. Prune any node whose estimated cost exceeds the current best solution. This eliminates exploring paths that will require more moves than the best solution so far.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;background-color:transparent; color:#434343; font-family:Arial,sans-serif; font-size:10pt&quot;&gt;references&lt;/span&gt;&lt;span style=&quot;background-color:transparent; color:#000000; font-family:Arial,sans-serif; font-size:10pt&quot;&gt;: &lt;/span&gt;&lt;a rel=&quot;nofollow&quot; href=&quot;https://www.cs.uml.edu/ecg/uploads/AIfall12/tuccar_project.pdf&quot;&gt;&lt;span style=&quot;background-color:transparent; color:#1155cc; font-family:Arial,sans-serif; font-size:10pt&quot;&gt;Analyzing the A* Search Heuristics with the Solutions of the 8-Puzzle&lt;/span&gt;&lt;/a&gt;,&amp;nbsp;&lt;br&gt;&lt;a rel=&quot;nofollow&quot; href=&quot;https://medium.com/swlh/looking-into-k-puzzle-heuristics-6189318eaca2&quot;&gt;looking-into-k-puzzle-heuristics&lt;/a&gt;.&lt;br&gt;&amp;nbsp;&lt;/p&gt;</description>
<category>Branch &amp; Bound</category>
<guid isPermaLink="true">https://notexponential.com/630/how-can-solve-the-puzzle-problem-using-branch-bound-approach?show=888#a888</guid>
<pubDate>Sun, 10 Dec 2023 19:11:42 +0000</pubDate>
</item>
<item>
<title>Answered: Given jobs, resources and cost matrix, what assignment minimizes the overall cost?</title>
<link>https://notexponential.com/457/given-jobs-resources-matrix-assignment-minimizes-overall?show=884#a884</link>
<description>&lt;p&gt;In the enumeration tree, node (i, j) represents job i is assigned to resource j.&lt;br&gt;&lt;br&gt;Lower Bound Calculation&lt;br&gt;We calculate the lower bound at a node by 2 following principles:&lt;br&gt;1. A job must be assigned to a resource.&lt;br&gt;2. A resource must be assigned with a job.&lt;br&gt;&lt;br&gt;Upper Bound Calculation&lt;br&gt;Greedy: At each step, select an unselected job, assign it to the resource with minimum cost.&lt;br&gt;&lt;br&gt;In the enumeration tree, if the lower bound of a node is greater than or equals the current upper bound, which means no improvement is made to a feasible solution, we do pruning.&lt;img alt=&quot;&quot; src=&quot;https://notexponential.com/?qa=blob&amp;amp;qa_blobid=6407264589614943342&quot; style=&quot;height:327px; width:600px&quot;&gt;&lt;/p&gt;</description>
<category>Branch &amp; Bound</category>
<guid isPermaLink="true">https://notexponential.com/457/given-jobs-resources-matrix-assignment-minimizes-overall?show=884#a884</guid>
<pubDate>Sat, 09 Dec 2023 22:59:35 +0000</pubDate>
</item>
<item>
<title>Answered: The lower bound for the Traveling Salesman Problem</title>
<link>https://notexponential.com/404/the-lower-bound-for-the-traveling-salesman-problem?show=662#a662</link>
<description>read the book of algorithm, a question is the same</description>
<category>Branch &amp; Bound</category>
<guid isPermaLink="true">https://notexponential.com/404/the-lower-bound-for-the-traveling-salesman-problem?show=662#a662</guid>
<pubDate>Thu, 02 May 2019 03:37:34 +0000</pubDate>
</item>
</channel>
</rss>