To view this presentation, you'll need to enable Flash.

Show me how

After you enable Flash, refresh this webpage and the presentation should play.

Loading...

PPT – Backtracking PowerPoint presentation | free to download - id: 4ca606-MGEwO

The Adobe Flash plugin is needed to view this content

View by Category

Presentations

Products
Sold on our sister site CrystalGraphics.com

About This Presentation

Write a Comment

User Comments (0)

Transcript and Presenter's Notes

Backtracking

- Reading Material Chapter 13, Sections 1, 2, 4,

and 5.

Coping with Hard Problems

- There are three useful methodologies that could

be used to cope with problems having no efficient

algorithm to solve - A methodic examination of the implicit state

space induced by the problem instance under

study. - suitable for problems that exhibit good average

time complexity. - A probabilistic notion of accuracy where a

solution is a simple decision maker or test that

can accurately perform one task (either passing

or failing the alternative) and not say much

about the complementary option. An iteration

through this test will enable the construction of

the solution or the increase in the confidence

level in the solution to the desired degree. - Obtain an approximate solution
- Only some classes of hard problems admit such

polynomial time approximations. - We will study the first one.

Backtracking

- A systematic technique of searching
- To reduce the search space
- Can be considered as an organized exhaustive

search

3-Coloring Problem

- Optimization Problem
- Input G (V, E), an undirected graph with n

vertices and m edges. - Output A 3-coloring of G, if possible.
- A coloring can be represented as an n-tuple (c1,

c2, ..., cn) - The number of different possible colorings for a

graph is ........... - These possibilities can be represented as a

complete ternary tree

3-Coloring Search Tree

Search tree of all possible colorings of a graph

with 4 vertices (When could this be for a graph

with 5 vertices?)

Example

a

b

c

d

e

Example

- In the example
- Nodes are generated in a depth-first search

manner - No need to store the whole search tree, just the

current active path - What is the time complexity of the algorithm in

the worst case

Algorithm 3-ColorRec

Algorithm 3-ColorIter

3

The General Backtracking Method

- Assume that the solution is of the form (x1, x2,

..., xi) where 0 ? i ? n and n is a constant that

depends on the problem formulation. - Here, the solution is assumed to satisfy certain

constraints. - i in the case of the 3-coloring problem is fixed.
- i may vary from one solution to another.

The General Backtracking Method Example

- Consider the following version of the Partition

Problem - Input X x1, x2, ..., xn a set of n

integers, and an integer y. - Output Find a subset Y ? X such that the sum of

its elements is equal to y. - For example, consider X 10, 20, 30, 40, 50,

60 and y 60. There is more than one solution

to this problem What are they and what is their

length?

The General Backtracking Algorithm (1)

- Each xi in the solution vector belongs to a

finite linearly ordered set Xi. - The backtracking algorithm considers the elements

of the Cartesian product X1 ??X2 ? ... ? Xn in

lexicographic order. - Initially starting with the empty vector.
- Suppose that the algorithm has detected the

partial solution (x1, x2, ..., xj). It then

considers the vector v (x1, x2, ..., xj, xj1).

We have the following cases - If v represents a final solution to the problem,

the algorithm records it as a solution and either

terminates in case only one solution is desired

or continues to find other solutions. - (The advance Step) If v represents a partial

solution, the algorithm advances by choosing the

least element in the set Xj2.

The General Backtracking Algorithm (2)

- If v is neither a final nor a partial solution,

we have two sub-cases - If there are still more elements to choose from

in the set Xj1, the algorithm sets xj1 to the

next member of Xj1. - (The Backtrack Step) If there are no more

elements to choose from in the set Xj1, the

algorithm backtracks by setting xj to the next

member of Xj . If again there are no more

elements to choose from in the set Xj , the

algorithm backtracks by setting xj??1 to the next

member of Xj?1, and so on.

BacktrackRec

BacktrackIter

About PowerShow.com

PowerShow.com is a leading presentation/slideshow sharing website. Whether your application is business, how-to, education, medicine, school, church, sales, marketing, online training or just for fun, PowerShow.com is a great resource. And, best of all, most of its cool features are free and easy to use.

You can use PowerShow.com to find and download example online PowerPoint ppt presentations on just about any topic you can imagine so you can learn how to improve your own slides and presentations for free. Or use it to find and download high-quality how-to PowerPoint ppt presentations with illustrated or animated slides that will teach you how to do something new, also for free. Or use it to upload your own PowerPoint slides so you can share them with your teachers, class, students, bosses, employees, customers, potential investors or the world. Or use it to create really cool photo slideshows - with 2D and 3D transitions, animation, and your choice of music - that you can share with your Facebook friends or Google+ circles. That's all free as well!

For a small fee you can get the industry's best online privacy or publicly promote your presentations and slide shows with top rankings. But aside from that it's free. We'll even convert your presentations and slide shows into the universal Flash format with all their original multimedia glory, including animation, 2D and 3D transition effects, embedded music or other audio, or even video embedded in slides. All for free. Most of the presentations and slideshows on PowerShow.com are free to view, many are even free to download. (You can choose whether to allow people to download your original PowerPoint presentations and photo slideshows for a fee or free or not at all.) Check out PowerShow.com today - for FREE. There is truly something for everyone!

You can use PowerShow.com to find and download example online PowerPoint ppt presentations on just about any topic you can imagine so you can learn how to improve your own slides and presentations for free. Or use it to find and download high-quality how-to PowerPoint ppt presentations with illustrated or animated slides that will teach you how to do something new, also for free. Or use it to upload your own PowerPoint slides so you can share them with your teachers, class, students, bosses, employees, customers, potential investors or the world. Or use it to create really cool photo slideshows - with 2D and 3D transitions, animation, and your choice of music - that you can share with your Facebook friends or Google+ circles. That's all free as well!

For a small fee you can get the industry's best online privacy or publicly promote your presentations and slide shows with top rankings. But aside from that it's free. We'll even convert your presentations and slide shows into the universal Flash format with all their original multimedia glory, including animation, 2D and 3D transition effects, embedded music or other audio, or even video embedded in slides. All for free. Most of the presentations and slideshows on PowerShow.com are free to view, many are even free to download. (You can choose whether to allow people to download your original PowerPoint presentations and photo slideshows for a fee or free or not at all.) Check out PowerShow.com today - for FREE. There is truly something for everyone!

presentations for free. Or use it to find and download high-quality how-to PowerPoint ppt presentations with illustrated or animated slides that will teach you how to do something new, also for free. Or use it to upload your own PowerPoint slides so you can share them with your teachers, class, students, bosses, employees, customers, potential investors or the world. Or use it to create really cool photo slideshows - with 2D and 3D transitions, animation, and your choice of music - that you can share with your Facebook friends or Google+ circles. That's all free as well!

For a small fee you can get the industry's best online privacy or publicly promote your presentations and slide shows with top rankings. But aside from that it's free. We'll even convert your presentations and slide shows into the universal Flash format with all their original multimedia glory, including animation, 2D and 3D transition effects, embedded music or other audio, or even video embedded in slides. All for free. Most of the presentations and slideshows on PowerShow.com are free to view, many are even free to download. (You can choose whether to allow people to download your original PowerPoint presentations and photo slideshows for a fee or free or not at all.) Check out PowerShow.com today - for FREE. There is truly something for everyone!

For a small fee you can get the industry's best online privacy or publicly promote your presentations and slide shows with top rankings. But aside from that it's free. We'll even convert your presentations and slide shows into the universal Flash format with all their original multimedia glory, including animation, 2D and 3D transition effects, embedded music or other audio, or even video embedded in slides. All for free. Most of the presentations and slideshows on PowerShow.com are free to view, many are even free to download. (You can choose whether to allow people to download your original PowerPoint presentations and photo slideshows for a fee or free or not at all.) Check out PowerShow.com today - for FREE. There is truly something for everyone!

Recommended

«

/ »

Page of

«

/ »

Promoted Presentations

Related Presentations

Page of

Home About Us Terms and Conditions Privacy Policy Presentation Removal Request Contact Us Send Us Feedback

Copyright 2018 CrystalGraphics, Inc. — All rights Reserved. PowerShow.com is a trademark of CrystalGraphics, Inc.

Copyright 2018 CrystalGraphics, Inc. — All rights Reserved. PowerShow.com is a trademark of CrystalGraphics, Inc.

The PowerPoint PPT presentation: "Backtracking" is the property of its rightful owner.

Do you have PowerPoint slides to share? If so, share your PPT presentation slides online with PowerShow.com. It's FREE!