0% found this document useful (0 votes)
19 views5 pages

Question 1

The document discusses various search algorithms, highlighting A* search as the most efficient and optimal compared to BFS, IDS, and Greedy search. It also analyzes the effects of varying the weight parameter in heuristic path search on the number of expanded nodes and path length. Additionally, it covers mathematical derivations related to car acceleration and deceleration, as well as the evaluation of leaves in a tree structure with a focus on time complexity.

Uploaded by

huangde1212
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
19 views5 pages

Question 1

The document discusses various search algorithms, highlighting A* search as the most efficient and optimal compared to BFS, IDS, and Greedy search. It also analyzes the effects of varying the weight parameter in heuristic path search on the number of expanded nodes and path length. Additionally, it covers mathematical derivations related to car acceleration and deceleration, as well as the evaluation of leaves in a tree structure with a focus on time complexity.

Uploaded by

huangde1212
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 5

Question 1

(a)

(b)
BFS and IDS are complete and optimal but highly inefficient due to
expanding too many nodes. Greedy search is more efficient but
sacrifices path optimality. A* search emerges are the best, being both
highly efficient in terms of node expansions and always finding the
optimal path. The results demonstrate the power of an informed,
heuristic-guided search like A* compared to uninformed approaches.

Question 2

(a)
Let h’(n) = wh(n), and h’(n) ≤ h(n) for all n.
And because the A* Search is optimal when 0 ≤ w ≤ 1, so we have :
f’w(n) = g(n) + h’(n)
And we have:
fw(n) = (2 − w)g(n) + wh(n)
= g(n) + g(n) - wg(n) + h’(n)
= g(n) + h’(n) + (1-w)g(n)
And when 0 ≤ w ≤ 1, we have 0 ≤ (1-w)g(n) ≤ g(n), so:
g(n) + h’(n) ≤ fw(n), which is the same as minimizing f’w(n) = g(n) +
h’(n) for some function h’(n) with the property that h’(n) ≤ h(n) for all
n.
So the Heuristic Path Search is optimal when 0 ≤ w ≤ 1.
(b)
(c)
Analyzing the results for all three start states (start4, start5, start6), we
can observe the following trends as the value of w increases from 1.0
to 1.4:
Number of expanded nodes:
For all states, the number of expanded nodes decreases significantly as
the value of w increases from 1.0 to 1.3.This indicates that higher w
values make the search more focused on the heuristic, expanding
fewer nodes.
But the consistent increase in expanded nodes at w=1.4 suggests that
the heuristic may become less informative or even misleading at this
high value, causing the search to explore more nodes before finding a
solution. This could be due to the specific problem structure and how
the heuristic interacts with it.

Path length:
In contrast, the path length generally increases with higher w values.
This shows that focusing more on the heuristic (higher w) leads to
suboptimal, longer paths.
Question 3
(a)

(b)

Let s = Number of accelerations, also s = Number of decelerations.


We know that under continuous acceleration, the maximum distance the car can travel is:
s(s+1)/2
Then the maximum distance for deceleration is:
s(s-1)/2
Therefore, the minimum distance the car travels is (leaving aside the time when the speed
remains constant):
s(s+1)/2 + s(s-1)/2 = s2
Therefore, we expect the running distance of the car to be less than or equal to n.
If s2<n≤s(s +1), T = 2s + 1
If s(s +1)<n<(s +1)2, T = 2s + 2
If n = (s+1)2, T = 2s + 2
This matches the identity given in the hint. So in summary, M(n,0) = [ 2√ n ]

(c)

First, we consider the situation where the agent starts from position p with speed k. After k steps,
the agent will reach the position:
p + k(k+1)/2

Now we consider the original problem, that is, the agent starts from position 0 at speed k and the
target position is n. We can think of it as part of a larger path: Assume that the starting point of
this larger path is position p, and the agent starts from p at a speed of 0. According to the
conclusion of step 1, for the agent to reach position 0 at speed k, it needs to satisfy:
0 = p + k(k+1)/2 solve for p = -k(k+1)/2

In this larger path, the agent needs to start from position p = -k(k+1)/2 and finally reach position
n. According to the results of question (b), we know that the number of steps required to reach
position n from position p at 0 speed is:
M(n-p, 0) = ¿] = [√ n+k (k +1)/2 ]

However, in the original problem, the agent actually started from position 0 at speed k, which is
equivalent to skipping the first k steps of the larger path. Therefore, the actual number of steps
required by the agent is:
M(n,k) =¿ ] - k
Then the maximum distance for deceleration is:
k(k-1)/2, so n must be: n ≥ k(k-1)/2 and k ≥ 0.

Question 4

(a)
(b)
On my tree, the 10, 11, 8, 15, 14, 7, 5. Total 7 leaves are evaluated.
(c)

On my tree, total 17 leaves are evaluated.

(d)
Time complexity : O(bd/2), where b is the branching factor (the average
number of child nodes for each node in the tree) and d is the depth of
the tree.
This is because the algorithm can, through efficient pruning, only check
half of the branches at each level on average.

You might also like