hw2-answers - Homework #2: Chapters 3 and 5 1. [15 pts.] 1...

Info iconThis preview shows pages 1–4. Sign up to view the full content.

View Full Document Right Arrow Icon
1 Homework #2: Chapters 3 and 5 1. [15 pts.] Vaslui Urziceni Iasi Bucharest Pitesti Giurgiu Fagaras 1 4 5 6 7 h(n) = 302 h(n) = 298 h(n) = 385 h(n) = 162 h(n) = 272 h(n) = 0 h(n) = 345 2 Neamt h(n) = 237 3 Hirsova h(n) = 253 Sibiu h(n) = 96
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
2 2. [15 pts.] Vaslui Urziceni Iasi Bucharest Pitesti Giurgiu 1 4 5 f(n) = 142+302=444 f(n)=92+298 =390 f(n) = 240+385 =625 f(n) = 328+162 = 490 f(n) = 317+272 =589 f(n) = 0 +345 = 345 2 Neamt f(n) = 179+237 = 416 3 Hirsova f(n) = 227+253 = 480 f(n) = 505+0 = 0 Sibiu 8 6 Rimnicu Vilcea Craiova f(n) = 425+78 = 503 f(n) = 466+196 =662 f(n) = 571+196 =767 Craiova 7 Fagaras f(n) = 438+96 =534 This Craiova has a higher f(n) than the other one on the frontier, so it is not added.
Background image of page 2
3 3. [20 pts.] 1 - This node could be expanded anytime after 1 or not at all. 2 -Must be after 1 or not at all 2 4 3 1 5 7 8 6 2 4 3 1 8 5 7 6 2 3 1 4 5 7 8 6 2 4 3 1 5 7 8 6 2 4 3 1 5 7 8 6 f(n)=6 g(n)=0 h(n)=6 f(n)=8 g(n)=1 h(n)=7 f(n)=6 g(n)=1 h(n)=5 f(n)=8 g(n)=1 h(n)=7 f(n)=6
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 4
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 02/29/2012 for the course CSE 327 taught by Professor Heflin during the Spring '08 term at Lehigh University .

Page1 / 5

hw2-answers - Homework #2: Chapters 3 and 5 1. [15 pts.] 1...

This preview shows document pages 1 - 4. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online