Download as:
Rating : ⭐⭐⭐⭐⭐
Price: $10.99
Language:EN
Pages: 4
Words: 1142

Floor set sitenumber sitenumber endendgoexec generate here your stuff

|+50

|

X <-- Site 3 (-46, 35) |

|

|+20

| X <-- Site 2 (18, 17)

-50 -40 -30 -20 -10 | +10 +20 +30 +40 +50

|---------|---------|---------|---------|---------O---------|---------|---------|---------|---------|

|

|

|

|-30

|

|

The FUPIRP comes to rest at the last point reached, it does not return to the origin.

This is a variation of a travelling salesman problem. The expected solution will use brute force, which is appropriate in this case (the number of points are very small, and the cost of making the FUPIRP travel an imperfect path is very expensive). A brute force solution calculates all possible paths, and picks the shortest one. Numerous other potential solutions exist.

Second, construct the stored procedure GET_SHORTEST_FURIRP_PATH which will output (select) a result set

as follows:

HINT: This is the correct solution given the points shown in the example...

You *MAY NOT* alter the table structures, procedures, or views I have put in this file except where comments

(generated by the provided "GENERATE_FUPIRP_SITES" procedure)

5 EXTRA CREDIT points if your solution embodies a brute force travelling salesman algorithm.

* I will execute your procedure GET_SHORTEST_FUPIPR_PATHS and see what happens.

* If I get bad results in either of theose, I will determine if partial credit should be awarded.

* NO CREDIT will be given to a solution that does not run and does not have any description of what was done.

GOOD LUCK. My advice to you is to start early.

go

create table FUPIRP_SITES (

)

go

as begin

delete from FUPIRP_SITES

insert into FUPIRP_SITES

select @siteNumber, 'Site #' + convert(nvarchar, @siteNumber),

go

exec GENERATE_FUPIRP_SITES

create view FUPIRP_PATHS (StartSite, EndSite, Distance) as

-- *** PART 1:

select 0, 0, 0 -- you should delete this line.

go

-- *** PART 2:

-- Write this procedure so it calculates the shortest past from the

go

Copyright © 2009-2023 UrgentHomework.com, All right reserved.