AI tree search. Time complexity of 8-queen, by placeing one by one without attack

Wendy

One approach to achieve goal state is to "add a queen to any square in the leftmost empty column such that it is not attacked by any other queen". And this approach will have a state space of 2057 (also wondering How to compute this?)

What is the time complexity if I am using Depth First search algorithm (which I think is the most suitable one)? How about the space complexity?

I am puzzled because the brunching of the search tree is reducing greatly when goes deep. O(8**8) looks too much for time complexity, even for worst case.

Thanks

Geoffrey De Smet

Depth First Search's time depends on how smart the algorithm is to decide which branch to investigate first.

N queens has a cheat: it has a heuristic (see description on wikipedia) which gives a perfect solution in polynomial time. If your Depth First Search's decisions simply mimic that heuristic's decisions, then your Dept First Search is poly time too.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

Running time complexity for binary search tree

From Dev

Time complexity of deletion in binary search tree

From Dev

GATE 2008: Time Complexity of Binary Search Tree

From Dev

Time complexity of deletion in binary search tree

From Dev

Time complexity in search of a list within a tree

From Dev

Time complexity of one algorithm cascaded into another?

From Dev

Time complexity for rebuilding binary search tree / quadtree / octtree?

From Dev

Tree sort: time complexity

From Dev

Understanding diagonal search of 8 queen puzzle

From Dev

NSDictionary Search Time Complexity

From Dev

Time Complexity of Binary Search?

From Dev

Determining the time & space complexity for nested loop with one constant factor

From Dev

Can I do a "one-time" file content search in Windows Server 2008 without adding the folder to the index?

From Dev

range search complexity of R tree and R* tree

From Dev

Search a pattern with less without losing the current one?

From Dev

Time complexity of recursion-tree

From Dev

Time complexity of recursion-tree

From Dev

search by one column without index or two one of them has index

From Dev

How to calculate the average time complexity of the nearest neighbor search using kd-tree?

From Dev

How to calculate the average time complexity of the nearest neighbor search using kd-tree?

From Dev

Search time complexity of this sql query

From Dev

8 CPU and one is at ~100% all the time

From Dev

Using "delete" on one pointer deletes a second pointer (Binary Search Tree)

From Dev

Binary search tree comparing one node type string with another

From Dev

Space complexity of validation of a binary search tree

From Dev

Space complexity of validation of a binary search tree

From Dev

displaying more than one possibility answer for n-queen problems

From Dev

displaying more than one possibility answer for n-queen problems

From Dev

Transform flat array to tree with one-time loop

Related Related

  1. 1

    Running time complexity for binary search tree

  2. 2

    Time complexity of deletion in binary search tree

  3. 3

    GATE 2008: Time Complexity of Binary Search Tree

  4. 4

    Time complexity of deletion in binary search tree

  5. 5

    Time complexity in search of a list within a tree

  6. 6

    Time complexity of one algorithm cascaded into another?

  7. 7

    Time complexity for rebuilding binary search tree / quadtree / octtree?

  8. 8

    Tree sort: time complexity

  9. 9

    Understanding diagonal search of 8 queen puzzle

  10. 10

    NSDictionary Search Time Complexity

  11. 11

    Time Complexity of Binary Search?

  12. 12

    Determining the time & space complexity for nested loop with one constant factor

  13. 13

    Can I do a "one-time" file content search in Windows Server 2008 without adding the folder to the index?

  14. 14

    range search complexity of R tree and R* tree

  15. 15

    Search a pattern with less without losing the current one?

  16. 16

    Time complexity of recursion-tree

  17. 17

    Time complexity of recursion-tree

  18. 18

    search by one column without index or two one of them has index

  19. 19

    How to calculate the average time complexity of the nearest neighbor search using kd-tree?

  20. 20

    How to calculate the average time complexity of the nearest neighbor search using kd-tree?

  21. 21

    Search time complexity of this sql query

  22. 22

    8 CPU and one is at ~100% all the time

  23. 23

    Using "delete" on one pointer deletes a second pointer (Binary Search Tree)

  24. 24

    Binary search tree comparing one node type string with another

  25. 25

    Space complexity of validation of a binary search tree

  26. 26

    Space complexity of validation of a binary search tree

  27. 27

    displaying more than one possibility answer for n-queen problems

  28. 28

    displaying more than one possibility answer for n-queen problems

  29. 29

    Transform flat array to tree with one-time loop

HotTag

Archive