81 views

Uploaded by Milan Antony

save

- Lecture 8
- Exploratory Input
- lec14
- Defence Final
- Aaa
- Kirk Seidel
- Analysis
- Graph Theory
- The Influence of Ambimorphic Modalities on Operating Systems
- J2_paper
- 10.1.1.100
- 2011 Introduction to theory of computation
- Scimakelatex.28649.Michael Fassbender
- A Survey of 3sum-Hard Problems
- The Traveling Salesman Problem .pdf
- Algo Assignment
- David Soloveichik and Erik Winfree- Complexity of Compact Proofreading for Self-assembled Patterns
- Data Structures & Algorithms (2007)
- Database Management System-2
- BT0072 Computer Networks -2
- BT0072 Computer Networks -1
- Fundamentals of IT(2)
- Logic Design 1
- Fundamentals of IT(1)
- Logic Design 2
- BT0072 Computer Networks -1
- BT0088 Cryptography and Network Security1
- Database Management System-1
- C Programming and Data Structures-1
- BT0062 Fundamentals of IT(2)
- BT9002 Grid Computing-2
- BT0088 Cryptography and Network Security2
- C Programming and Data Structures-2
- Multimedia Systems 1
- Multimedia Systems 2
- Computer Networks 2
- Computer Networks 1
- Rdbms With Mysql-1
- OOPS With Java-2
- Rdbms With Mysql-2
- Computer Organization and Architecture-1
- TCP-IP-2
- TCP-IP-1
- OOPS With Java-1
- Operating Systems 1
- Computer Organization and Architecture-2
- Website Design 2
- Operating Systems 2

You are on page 1of 7

Branch and Bound strategy is a general algorithm for finding optimal solutions of various optimization problems, especially in discrete and combinatorial optimization. It consists of a systematic enumeration of all candidate solutions, where large subsets of fruitless candidates are discarded en masse, by using upper and lower estimated bounds of the quantity being optimized. In the following, we have n kinds of items, 1 through n. Each kind of item i has a value vi and a weight wi. We usually assume that all values and weights are nonnegative. To simplify the representation, we can also assume that the items are listed in increasing order of weight. The maximum weight that we can carry in the bag is W. The most common formulation of the problem is the 0-1 knapsack problem, which restricts the number xi of copies of each kind of item to zero or one. Mathematically the 0-1-knapsack problem can be formulated as:

• maximize • subject to

The bounded knapsack problem restricts the number xi of copies of each kind of item to a maximum integer value ci. Mathematically the bounded knapsack problem can be formulated as:

• maximize • subject to

The unbounded knapsack problem (UKP) places no upper bound on the number of copies of each kind of item. Of particular interest is the special case of the problem with these properties: • it is a decision problem, • it is a 0-1 problem, • for each kind of item, the weight equals the value: wi = vi. 1. Algorithm U Bound(cp, cw, k, m)

2. // cp is the current profit total, cw is the current 3. // weight total; k is the index of the last removed 4. // item; and m is the knapsack size 5. // w[i] and p[i] are respectively the weight and profit 6. // of the ith object 7. { 8. b:=cp; c:=cw; 9. for I:=k+1 to n do 10. { 11. if (c+w[i] m) then 12. { 13. c:c+w[i]; b:=b-p[i]; 14. } 15. } 16. return b; 17. } 18. 19. 20. One early application of knapsack algorithms was in the construction and scoring of tests in which the test-takers have a choice as to which questions they answer. On tests with a homogeneous distribution of point values for each question, it is a fairly simple process to provide the test-takers with such a choice. For example, if an exam contains 12 questions each worth 10 points, the test-taker need only answer 10 questions to achieve a maximum possible score of 100 points. However, on tests with a heterogeneous distribution of point values—that is, when different questions or sections are worth different amounts of points— it is more difficult to provide choices. Feuerman and Weiss proposed a system in which students are given a heterogeneous test with a total of 125 possible points. The students are asked to answer all of the questions to the best of their abilities. Of the possible subsets of problems whose total point values add up to 100, a knapsack algorithm would determine which subset gives each student the highest possible score 2.Explain the NP hard and the NP complete problems? The best algorithms for

their solutions have computing times that cluster into two groups. The first group consists of problems whose

solution are bounded by polynomials of small

degree.

The second group is made up to problems whose best-known algorithms are non-polynomial. salesperson

Examples we have seen include the traveling

and the knapsack problems for which the best algorithms given in this text have complexities O (n22n) and O

(2n/2) respectively. In the quest to develop efficient algorithms, no one has been able to develop a polynomial time algorithm for any very important are greater

problem in the second group. This is because algorithms whose computing

times

then, polynomial very quickly require such vast amounts of time to execute that even moderate-size problems

cannot be solved. The theory of NP-completeness, which we present here, does not provide a method of obtaining polynomial time group. Nor does it

algorithms for problems in the second

say that algorithms of this complexity do not exist. Instead, what we do is show that many of the problems for which there are 4 no known polynomial time algorithms are

computationally

related.

In

fact,

we

establish

two

classes of problems. These are given names, NP-hard and NP-Complete. A problem that is NP-Complete has the property that it can be solved in other NP-Complete polynomial time if and only if all problems can also be solved in

polynomial time.

If an NP-hard problem can be solved in

polynomial time, then all NP-Complete problems can be solved in polynomial time. All NP complete problems are

NP-hard, but some NP-hard problems are not known to be NP-complete. Although one can define many distinct problem classes having the properties stated above for the NP- hard and classes we study are related to

NP-complete classes, the

non-deterministic computations. The relationship of these classes to non deterministic computations together with the apparent power of nondeterminism lead to the

intuitive conclusion that no NP- complete or NP- hard problem is polynomially solvable.

3.Briefly explain the concept of trees? A tree is a connected graph without any circuits. The graph in Fig. , for instance, is a tree. Trees with one,

two, three and four

vertices are shown in Fig. . A graph therefore so must a

must have at least one vertex, and

tree. Some authors allow the null tree, a tree without any vertices. It follows immediately from the definition graph, that is, having

that a tree has to be a simple

neither a self-loop nor parallel edges (because they both form circuits). Trees appear in numerous instances. The genealogy of a family is often represented by means of tree (in fact

the term tree comes from family tree) A river with its tributaries and subtributaries can be represented by a tree. The sorting of mail according to according to a

zip code and the punched cards is done

tree (called decision tree or sorting tree).

Fig. 9.9 C might represent the flow of

//////////////////////////////////////////////////////// For full Version visit http://smudeassignments.blogspot.com/

This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivs 3.0 Unported License. To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/3.0/ or send a letter to Creative Commons, 444 Castro Street, Suite 900, Mountain View, California, 94041, USA. ///////////////////////////////////////////////////////

- Lecture 8Uploaded byMihai Nan
- Exploratory InputUploaded byNacho Elgorry
- lec14Uploaded byraw.junk
- Defence FinalUploaded bySpandana Ram
- AaaUploaded byrowsunmahato
- Kirk SeidelUploaded byEkky Nag Shaleh
- AnalysisUploaded byNagarajuRaginaboyina
- Graph TheoryUploaded byFrancisco Valladares Conde
- The Influence of Ambimorphic Modalities on Operating SystemsUploaded byMatheus Santa Lucci
- J2_paperUploaded byChethan Jayasimha
- 10.1.1.100Uploaded byIgor Timarac
- 2011 Introduction to theory of computationUploaded byr076755a
- Scimakelatex.28649.Michael FassbenderUploaded byMaty Acosta
- A Survey of 3sum-Hard ProblemsUploaded byshabunc
- The Traveling Salesman Problem .pdfUploaded byKhondoker Razzakul Haque
- Algo AssignmentUploaded byRahul Paul
- David Soloveichik and Erik Winfree- Complexity of Compact Proofreading for Self-assembled PatternsUploaded byGmso3
- Data Structures & Algorithms (2007)Uploaded byAnkit Gupta

- Database Management System-2Uploaded byMilan Antony
- BT0072 Computer Networks -2Uploaded byMilan Antony
- BT0072 Computer Networks -1Uploaded byMilan Antony
- Fundamentals of IT(2)Uploaded byMilan Antony
- Logic Design 1Uploaded byMilan Antony
- Fundamentals of IT(1)Uploaded byMilan Antony
- Logic Design 2Uploaded byMilan Antony
- BT0072 Computer Networks -1Uploaded byMilan Antony
- BT0088 Cryptography and Network Security1Uploaded byMilan Antony
- Database Management System-1Uploaded byMilan Antony
- C Programming and Data Structures-1Uploaded byMilan Antony
- BT0062 Fundamentals of IT(2)Uploaded byMilan Antony
- BT9002 Grid Computing-2Uploaded byMilan Antony
- BT0088 Cryptography and Network Security2Uploaded byMilan Antony
- C Programming and Data Structures-2Uploaded byMilan Antony
- Multimedia Systems 1Uploaded byMilan Antony
- Multimedia Systems 2Uploaded byMilan Antony
- Computer Networks 2Uploaded byMilan Antony
- Computer Networks 1Uploaded byMilan Antony
- Rdbms With Mysql-1Uploaded byMilan Antony
- OOPS With Java-2Uploaded byMilan Antony
- Rdbms With Mysql-2Uploaded byMilan Antony
- Computer Organization and Architecture-1Uploaded byMilan Antony
- TCP-IP-2Uploaded byMilan Antony
- TCP-IP-1Uploaded byMilan Antony
- OOPS With Java-1Uploaded byMilan Antony
- Operating Systems 1Uploaded byMilan Antony
- Computer Organization and Architecture-2Uploaded byMilan Antony
- Website Design 2Uploaded byMilan Antony
- Operating Systems 2Uploaded byMilan Antony