Recently, is very not the state ah.
First, since the home, is very swollen, about 10 days has not updated the blog, and the summer school of Things although may understand at that time, but now from the beginning to review, all kinds of not, my God, I was how ...
Second, the beginning of the school, the characteristics of their own water out again, a variety of water groups, is really too waste of time and life ah. Very embarrassed, this kind of thing is unable to control, can only say, I am a flood ratio ... Change, and then let people give me a ban on the word.
Third, just start school, this semester do not want to skip class, want to put up, although others said the results may not be too important, but I can not ah, I have their own knowledge, this semester course is mainly 1 probability theory 2 data structure 3JAVA4 logic and Algebra 5 University Physics 6 digital logic. In general, data structures and Java must be well learned, probability theory, logic and algebra, and digital logic to learn most of the time. As for the big things, basically give up ... It is really not good to learn, no thought of this kind of thing last semester felt out.
Four, since the summer training began, their exercise program is ineffective, and now start to resume training, every Wednesday, five, day running. Each speed should be gradually raised to the last hour can run 10 kilometers on the line. Then there are some ideas for DFS and BFS, from someone else on the internet.
Generally speaking, wide search is often used to find a single shortest route, or a small scale path search, it is characterized by "search is the best solution", and deep search is used to find multiple solutions or "steps are known (such as 3 steps must meet the conditions)" problem, it's space efficiency is high, but found not necessarily the optimal solution, The entire search must be recorded and completed, so deep search requires very efficient pruning (optimization).
Like the shortest path to search these are obviously if the use of extensive search, because the characteristics of the extensive search is a layer down to search, to ensure that the current search is the best solution, of course, the shortest path is only one aspect of the application, like what the least state conversion can be applied.
Deep Search is a first Shang tree, and then another tree, it and wide search compared to have a relatively small memory needs of the advantages, the eight Queens problem is a typical application, this kind of problem is obviously can not be used to solve the wide search. Or like the graph theory inside the search algorithm, the number of the ordinal sequence of sequential traversal, etc., are deep search
The difference between deep and wide search is that the order is different.
The implementation of deep search is similar to the stack, each selection of the top element to expand,
Wide search is the use of queues, the first extension of the node to expand the priority.
Search the shape of the tree: Deep search the number of layers, wide search is very wide.
Deep Search is appropriate to find all the options, the wide search is used to find the best solution
The difference between deep search and wide search:
Deep search does not guarantee that the first encounter target is the shortest path, so to search all possible paths, so to backtrack, the tag is done after the cancellation, so the same point may be visited many times. and wide search because of its from near node expansion order, nodes are always accessed with the shortest path. If a node is accessed for the second time, the path of the second is certainly not shorter than the first, so there is no need to extend from the node to the periphery-the first time the node has been accessed, the second extension will only get a worse solution. So the markings that have been done need not be removed. Therefore the same point can only be accessed at most once. Every time a node is accessed, the edges connected to it are checked once. So at worst, all edges are checked once, so the time complexity is O (E).