Hello, if you have any need, please feel free to consult us, this is my wechat: wx91due
Problem Set 1
PLEASE NOTE: All assignments are due at the start of class, 11:00 AM, NOT at the end of the day.
The “Best Independent Set” problem is defined as follows:
Input: An undirected graph G, in which each vertex is marked by a positive value ; and a target value T.
For instance, in Graph 1 below, with T = 16, there are three solutions: { C,D }, { A,E }, and { B,E }.
In Graph 2, with T = 16 there are two solutions: { G,H,K } and { H,I }.
The N-Queens problem is actually a special case of this, with the vertices being the squares on the chess board, an edge between two vertices if the squares attack, all vertices have value 1, and the target value is N.
Problem 1
Consider the following state space for systematically solving the problem:
State: A set of vertices, no two of which are connected by an edge.
Successor to state S: Add some vertex V to S such that (a) V is alphabetically later than the vertices in S (to guarantee systematic search); (b) V is not connected to any vertex in S.
Start state: The empty set.
Goal state: A state that attains the target value.
Show the part of the state space that would be generated if you use depth-first search in this state space to find the solution to graph 2 with T = 16. You should show this as a tree. I recommend drawing trees for assignments left-to-right typewriter format like this:
Problem 2
Problem 3
B. Describe an instance of Best Independent Set where doing a depth-first search will construct 1000 (or more) times as many states as doing a breadth-first search. (Hint:There is an instance where the correct solution contains only one vertex.)
Problem 4
Consider the Best Independent Set on a graph in general with n vertices (not on the specific examples above).
What is the maximal depth D of the state space? What is the branching factor B?
Give a bound on the number of states in the state space (you should be able to get a bound much smaller than BD.)
Problem 5
Error function: Max(0,T−(Total value of the vertices in S)) + sum of the cost of all edges that connect two vertices in S where the cost of an edge is considered to be the value of its lower end.
For example, in graph 1, suppose S= { A,C } and T = 16.