Preview

Backtracking Algorithms

Better Essays
Open Document
Open Document
1719 Words
Grammar
Grammar
Plagiarism
Plagiarism
Writing
Writing
Score
Score
Backtracking Algorithms
Chapter 7 Backtracking Algorithms
Truth is not discovered by proofs but by exploration. It is always experimental. — Simone Weil, The New York Notebook, 1942

Objectives • • • • • •
To appreciate how backtracking can be used as a solution strategy. To recognize the problem domains for which backtracking strategies are appropriate. To understand how recursion applies to backtracking problems. To be able to implement recursive solutions to problems involving backtracking. To comprehend the minimax strategy as it applies to two-player games. To appreciate the importance of developing abstract solutions that can be applied to many different problem domains.

Backtracking Algorithms

– 238 –

For many real-world problems, the solution process consists of working your way through a sequence of decision points in which each choice leads you further along some path. If you make the correct set of choices, you end up at the solution. On the other hand, if you reach a dead end or otherwise discover that you have made an incorrect choice somewhere along the way, you have to backtrack to a previous decision point and try a different path. Algorithms that use this approach are called backtracking algorithms. If you think about a backtracking algorithm as the process of repeatedly exploring paths until you encounter the solution, the process appears to have an iterative character. As it happens, however, most problems of this form are easier to solve recursively. The fundamental recursive insight is simply this: a backtracking problem has a solution if and only if at least one of the smaller backtracking problems that results from making each possible initial choice has a solution. The examples in this chapter are designed to illustrate this process and demonstrate the power of recursion in this domain.

7.1 Solving a maze by recursive backtracking
Once upon a time, in the days of Greek mythology, the Mediterranean island of Crete was ruled by a tyrannical king

You May Also Find These Documents Helpful

  • Satisfactory Essays

    Nt1330 Unit 1 Assignment

    • 521 Words
    • 3 Pages

    I learned that sometimes you do not know what you are capable of doing until you try it. By learning everything that is involved in the creation of algorithms you can make sure that any program issue you encounter you will be able to address it.…

    • 521 Words
    • 3 Pages
    Satisfactory Essays
  • Powerful Essays

    The Army Problem Solving Process has become the rule of thumb for problem solving and is a methodological approach for making decisions. Followed correctly, it leads to the “best” decisions given the degree of uncertainty and complexity of a situation. The Army Problem Solving Process is a tool that provides a standard, systematic method to define and analyze a problem, gather information, develop criteria, generate and analyze possible solutions, choose the best solution and implement an action plan that solves the problem.1…

    • 1612 Words
    • 7 Pages
    Powerful Essays
  • Good Essays

    "An Individuals process of discovery can be provocative and confronting but it can ultimately lead to new perspectives of ourselves and others around us" (Robert Grey and related text) (900 words)…

    • 665 Words
    • 3 Pages
    Good Essays
  • Good Essays

    Physics Quiz

    • 3581 Words
    • 15 Pages

    A scientific hypothesis may turn out to be right or it may turn out to be wrong. If it is a valid hypothesis, there must be a test for proving that it is…

    • 3581 Words
    • 15 Pages
    Good Essays
  • Satisfactory Essays

    (1) philosophy can prove by means of reason unaided by revelation some truths proposed by Christian faith;…

    • 262 Words
    • 2 Pages
    Satisfactory Essays
  • Good Essays

    Minoan Research Paper

    • 271 Words
    • 2 Pages

    The largest and the most popular of the greek island is Crete. The island of Crete is located in the center of the eastern Mediterranean at the crossroads of Africa, Asia, and Europe. Crete forms a significant part of the economy and cultural heritage of Greece, while retaining its own local cultural traits such as its own poetry and music.…

    • 271 Words
    • 2 Pages
    Good Essays
  • Powerful Essays

    This is a suggested template that BIFM Training encourages candidates to use to ensure you answer all elements of this assessment, and remember how the marking system works. You do not have to use this template but you must cover all the elements and use the headings as below. The assessment criteria are in your course handbook, and contains more guidance than here.…

    • 1015 Words
    • 5 Pages
    Powerful Essays
  • Good Essays

    The basis of truth comes from the perspective of an individual is not quite accurate. One many come to the conclusion that they obtain enough proof to explain for example an action, In the end however, the inner purpose of the action is the entire truth which cannot be solved merely through research.…

    • 371 Words
    • 2 Pages
    Good Essays
  • Good Essays

    rhetorical essay

    • 712 Words
    • 3 Pages

    Einstein himself, who is generally revered as one of the greatest scientists in the scientific pantheon, had even remained uncertain of his own theory until it was proven empirically correct. And Barry likewise makes it clear to his readers that to believe exclusively in the “process of inquiry” is, above all else, a prerequisite for…

    • 712 Words
    • 3 Pages
    Good Essays
  • Better Essays

    Minoan Culture

    • 1698 Words
    • 7 Pages

    The island of Crete, which lies in the middle of the Mediterranean Sea, has been heavily contested by differing civilizations over the past three-thousand years. But before first conquests for the island began, a civilization developed on the island to such an advanced degree that it would become Greek legend. These first civilized inhabitants of Crete have become known as the Minoans, named after King Minos. In the two-thousand years of the Minoan people, they rose from simple farmers to a great civilization that came to a tragic end.…

    • 1698 Words
    • 7 Pages
    Better Essays
  • Good Essays

    For thousands of years, mankind has persistently pursued truth, knowledge, and understanding. For most, this pursuit is a driving force which usually doesn't end until one finds a "truth" that is satisfying to him or her. Even then, however, one may choose to look for an alternate truth that may be even more satisfying to them. This pursuit does not always follow the same path for everyone as there are different ideas as to how truth is actually obtained and which is the best way to obtain it. Two individuals and great philosophers of their time, Plato and Charles Peirce, each had their own ideas on how truth and knowledge could be obtained.…

    • 984 Words
    • 4 Pages
    Good Essays
  • Good Essays

    Mycenaean Civilization

    • 466 Words
    • 2 Pages

    At around 1400 BC the palace of Knossos was destroyed on Crete, as well as destruction all over the island. This wide spread destruction has led many to believe that Crete was not attacked by a foreign force, but that a revolt against the Mycanaean rulers had probably taken place.…

    • 466 Words
    • 2 Pages
    Good Essays
  • Powerful Essays

    “Amidst the wine dark seas lies Crete, a fair rich island populous beyond compute with ninety cities of mixed speech, where several languages coexist...the capital is Knosos, ruled by Minos, who from his ninth year talked familiarly with Zeus.”1…

    • 2156 Words
    • 9 Pages
    Powerful Essays
  • Good Essays

    Knowledge, the key to progress, has proven to be a human being’s most powerful and significant weapon. We gain knowledge when we put our brain to work at the problems we need to solve in life. It doesn’t matter what we are trying to accomplish, whether it be creating a new technology or learning how to put together a puzzle, the matter of fact is that both request great examination and research to resolve and learn. Scientific research is a technique used to investigate phenomena, correct previous understanding, and acquire new knowledge. Knowledge could lead us to a possible cure for cancer, an alternative for fossil fuels, and the creation of a revolutionary technology. Nevertheless, all these benefits are a reason why John M. Barry writes about scientific research with admiration, curiosity, and passion in which he blends a use of rhetorical strategies in order to give off an overall perspective of the necessity and mystery within scientific research.…

    • 849 Words
    • 4 Pages
    Good Essays
  • Good Essays

    What’s more, it is more obvious in realms such as science, The way in which people make discovery and progress in science is to prove the assertions made before wrong, Numerous discoveries have been made through such a process. To illustrate it , think about the discovery of the Theory of Relativity made by Einstein who prove the principles established by Sir Isaac Newton were incorrect through various experiments and then established his own prominent theory. Were he not find the deficiency in the theories of Newton, he could hardly be able to find his own theories. Moreover, the physicist Lutherfer also improved the model of the atomic by observing some blemishes in the model made by his teacher, In those examples, it is clear…

    • 839 Words
    • 4 Pages
    Good Essays