Introduction to Algorithms
3rd Edition
ISBN: 9780262033848
Author: Thomas H. Cormen, Ronald L. Rivest, Charles E. Leiserson, Clifford Stein
Publisher: MIT Press
expand_more
expand_more
format_list_bulleted
Concept explainers
Question
Chapter 35.2, Problem 2E
Program Plan Intro
To show that 2-CNF-SATand reduce 2 CNF-SAT to an efficiently solvable problem.
Expert Solution & Answer
Want to see the full answer?
Check out a sample textbook solutionStudents have asked these similar questions
The monotone restriction (MR) on the heuristic function is defined as
h (nj ) 2 h (ni ) - c (ni , nj ).
Please prove the following:
1. If h(n)
Machine Learning Problem
Perform the optimization problem of finding the minimum of J(x) = (2x-3)2 by:
(i) defining theta, J(theta), h(theta) as defined in the Stanford Machine Learning videos in Coursera;
(ii) plotting J(theta) vs theta by hand then use a program
(iii) determining its minimum using gradient descent approach starting from a random initial value of theta = 5. Perform the search for the minimum using the gradient descent approach by hand calculations, i.e., step 1, step 2, etc. showing your work completely
2. In the standard MST problem, we want to minimize the sum of the edges in a
spanning tree. Consider a different objective function where we want to minimize
the weight of the most expensive edge in the spanning tree.
(a) Will an optimal solution for the first objective function always be an optimal
solution for the second objective function? Prove or give a counterexample.
(b) Will an optimal solution for the second objective function always be an optimal
solution for the first objective function? Prove or give a counterexample.
Chapter 35 Solutions
Introduction to Algorithms
Ch. 35.1 - Prob. 1ECh. 35.1 - Prob. 2ECh. 35.1 - Prob. 3ECh. 35.1 - Prob. 4ECh. 35.1 - Prob. 5ECh. 35.2 - Prob. 1ECh. 35.2 - Prob. 2ECh. 35.2 - Prob. 3ECh. 35.2 - Prob. 4ECh. 35.2 - Prob. 5E
Ch. 35.3 - Prob. 1ECh. 35.3 - Prob. 2ECh. 35.3 - Prob. 3ECh. 35.3 - Prob. 4ECh. 35.3 - Prob. 5ECh. 35.4 - Prob. 1ECh. 35.4 - Prob. 2ECh. 35.4 - Prob. 3ECh. 35.4 - Prob. 4ECh. 35.5 - Prob. 1ECh. 35.5 - Prob. 2ECh. 35.5 - Prob. 3ECh. 35.5 - Prob. 4ECh. 35.5 - Prob. 5ECh. 35 - Prob. 1PCh. 35 - Prob. 2PCh. 35 - Prob. 3PCh. 35 - Prob. 4PCh. 35 - Prob. 5PCh. 35 - Prob. 6PCh. 35 - Prob. 7P
Knowledge Booster
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.Similar questions
- In this question you will explore the Traveling Salesperson Problem (TSP). (a) In every instance (i.e., example) of the TSP, we are given n cities, where each pair of cities is connected by a weighted edge that measures the cost of traveling between those two cities. Our goal is to find the optimal TSP tour, minimizing the total cost of a Hamiltonian cycle in G. Although it is NP-complete to solve the TSP, we found a simple 2-approximation by first generating a minimum-weight spanning tree of G and using this output to determine our TSP tour. Prove that our output is guaranteed to be a 2-approximation, provided the Triangle Inequality holds. In other words, if OP T is the total cost of the optimal solution, and AP P is the total cost of our approximate solution, clearly explain why AP P ≤ 2 × OP T.arrow_forward8. A school is creating class schedules for its students. The students submit their requested courses and then a program will be designed to find the optimal schedule for all students. The school has determined that finding the absolute best schedule cannot be solved in a reasonable time. Instead they have decided to use a simpler algorithm that produces a good but non-optimal schedule in a more reasonable amount of time. Which principle does this decision best demonstrate? A. Unreasonable algorithms may sometimes also be undecidable B. Heuristics can be used to solve some problems for which no reasonable algorithm exists C. Two algorithms that solve the same problem must also have the same efficiency D. Approximate solutions are often identical to optimal solutions 0000arrow_forward8. A school is creating class schedules for its students. The students submit their requested courses and then a program will be designed to find the optimal schedule for all students. The school has determined that finding the absolute best schedule cannot be solved in a reasonablo time. Instead they have decided to use a simpler algorithm that produces a good but non-optimal schedule in a more reasonable amount of time. Which principle does this decision best demonstrate? O A Unreasonable algorithms may sometimes also be undecidable O B. Heuristics can be used to solve some problems for which no reasonable algorithm exsts O C. efficiency Two algorithms that solve the same problem must also have the same O B. Approximate solutions are often identical to optimal solutionsarrow_forward
- Q1a In every instance (i.e., example) of the TSP, we are given n cities, where each pair of cities is connected by a weighted edge that measures the cost of traveling between those two cities. Our goal is to find the optimal TSP tour, minimizing the total cost of a Hamiltonian cycle in G. Although it is NP-complete to solve the TSP, there is a simple 2-approximation achieved by first generating a minimum-weight spanning tree of G and using this output to determine our TSP tour. Prove that our output is guaranteed to be a 2-approximation, provided the Triangle Inequality holds. In other words, if OPT is the total cost of the optimal solution, and APP is the total cost of our approximate solution, clearly explain why APP ≤ 2* OPT. 1b Let G be this weighted undirected graph, containing 7 vertices and 11 edges. | A 5 D 1 9 6 B 15 F 8 7 8 11 5 E 9 с G For each of the 10 edges that do not appear (AC, AE, AF, AG, BF, BG, CD, CF, CG, DG), assign a weight of 1000. It is easy to see that the…arrow_forwardhe heuristic path algorithm is a best-first search in which the objective function is f(n) = (4 −w)g(n) + wh(n). For what values of w is this algorithm guaranteed to be optimal? What kind of search does this perform when w = 0? When w = 1? When w = 4?arrow_forwardQUESTION 9 What is one advantage of AABB over Bounding Spheres? Computing the optimal AABB for a set of points is easy to program and can be run in linear time. Computing the optimal bounding sphere is a much more difficult problem. The volume of AABB can be an integer, while the volume of a Bounding Sphere is always irrational. An AABB can surround a Bounding Sphere, while a Bounding Sphere cannot surround an AABB. To draw a Bounding Ball you need calculus knowledge.arrow_forward
- ..... A source with symbols = 1, 2, 3 the probabilities are (2/3) (1/3)k-¹. Find an optimal binary code set for the source and show that it satisfies the Kraft inequality.arrow_forwardThe branching part of the branch and bound algorithm that Solver uses to solve integer optimization models means that the algorithm [a] creates subsets of solutions through which to search[b] searches through only a limited set of feasible integer solutions [c] identifies an incumbent solution which is optimal [d] uses a decision tree to find the optimal solution 2. The LP relaxation of an integer programming (IP) problem is typically easy to solve and provides a bound for the IP model. [a] True [b] Falsearrow_forwardDevelop a dynamic programming algorithm for the knapsack problem: given n items of know weights w1, . . . , wn and values v1, . . . ,vn and a knapsack of capacity W, find the most valuable subset of the items that fit into the knapsack. We assume that all the weights and the knapsack’s capacity are positive integers, while the item values are positive real numbers. (This is the 0-1 knapsack problem). Analyze the structure of an optimal solution. Give the recursive solution. Give a solution to this problem by writing pseudo code procedures. Analyze the running time for your algorithms.arrow_forward
- How to Prove that the 0/1 KNAPSACK problem is NP-Hard. (One way to prove this is toprove the decision version of 0/1 KNAPSACK problem is NP-Complete. In this problem,we use PARTITION problem as the source problem.)(a) Give the decision version of the O/1 KNAPSACK problem, and name it as DK.(b) Show that DK is NP-complete (by reducing PARTITION problem to DK).(c) Explain why showing DK, the decision version of the O/1 KNAPSACK problem, isNP-Complete is good enough to show that the O/1 KNAPSACK problem is NP -hard.arrow_forwardSubject : Artificial Intelligence Consider a best first search (BFS) algorithm that tries to find the optimal goal state with minimal cost. Consider heuristics h1, h2 with h1(n) > h2(n) for all states n. BFS with h1 is guaranteed to expand fewer nodes or an equal number of nodes to arrive at the optimal goal state than BFS with h2 Select one: True Falsearrow_forwardAs we know, the heuristic or approximation algorithms may not give an optimum solution to the problem but they are polynomial efficient. (a) Propose an approximation algorithm for travelling salesman problem (TSP) and discuss about its time complexity and limitation. (b) Give two example inputs, in which the algorithm in (a) gives the best and not-the- best solutions, respectively. The number of nodes should be between six and eight.arrow_forward
arrow_back_ios
SEE MORE QUESTIONS
arrow_forward_ios
Recommended textbooks for you
- Operations Research : Applications and AlgorithmsComputer ScienceISBN:9780534380588Author:Wayne L. WinstonPublisher:Brooks Cole
Operations Research : Applications and Algorithms
Computer Science
ISBN:9780534380588
Author:Wayne L. Winston
Publisher:Brooks Cole