depth first search prof. s m lee department of computer science

24
Depth First Search Prof. S M Lee Department of Computer Science

Upload: valerie-rice

Post on 02-Jan-2016

217 views

Category:

Documents


1 download

TRANSCRIPT

Depth First SearchProf. S M Lee

Department of Computer Science

''Nothing in life is to be feared. It is only to be understood.'' - Marie Curie

GamesProblem: a position in a Chess/Go/… gameSolution: a strategy to guarantee winning gameHarder than NP problems

it is not easy to check that a strategy wins

Presenting Search AbstractlyHelps to understand the abstract nature of search

search states, search spaces, search trees…know what particular search algorithms are trying to do

There are two kinds of search algorithm Complete

guaranteed to find solution or prove there is none

Incompletemay not find a solution even when it existsoften more efficient (or there would be no point)e.g. Genetic Algorithms

For now concerned with complete algorithms

Search StatesSearch states summarises the state of search A solution tells us everything we need to know

e.g. in SAT, whether each letter is UPPER or lower casein TSP, route taken round nodes of graph

This is a (special) example of a search stateit contains complete informationit solves the problem

In general a search state may not do either of those

it may not specify everything about a possible solutionit may not solve the problem or extend to a solution

Norbert Wiener

1894-1964

N. Wiener drove 150 miles to a math conference at Yale University. When the conference was over, he forgot he came by car, so he returned home by bus. The next morning, he went out to his garage to get his car, discovered it was missing, and complained the police that while he was away, someone stole his car.

Yuk Wing Lee (left) ,Amar G. Bose and Norbert Wiener

"We mathematicians who operate with nothing more expensive than paper and possibly printers' ink are quite reconciled to the fact that, if we are working in an active field, our discoveries will commence to be obsolete at the moment that they are written down or even at the moment they are conceived. We know that for a long time everything we do will be nothing more than the jumping off point for those who have the advantage of already being aware of our ultimate results. This is the meaning of the famous apothegm of Newton, when he said, "If I have seen further than other men, it is because I have stood on the shoulders of giants".(Nobert Wiener, “I am a Mathematician” )

Sometimes we discover unpleasant truths. Whenever we do so, we are in difficulties: suppressing them is scientifically dishonest, so we must tell them, but telling them, however, will fire back on us. If the truths are sufficiently impalatable, our audience is psychically incapable of accepting them and we will be written off as totally unrealistic, hopelessly idealistic, dangerously revolutionary, foolishly gullible or what have you. (Besides that, telling such truths is a sure way of making oneself unpopular in many circles, and, as such, it is an act that, in general, is not without personal risks. Vide Galileo Galilei.....) ---Edsger W.Dijkstra 18th June 1975

Edsger W.Dijkstra

(1930------6 August 2002), died in cancer