Design a brute force algorithm to solve the shortest path

Assignment Help Computer Engineering
Reference no: EM133359993

Question: Let S be a set of points in a 2-dimensional plane. The convex hull of set S is the smallest convex set containing S. It is assumed that not all the points in S are on a straight line. The points in the convex hull can be viewed as fence posts that support a fence surrounding all the points in S. Let s1 and s2 be two points in the hull. A path from s1 to s2 is a sequence 1 of points in the hull. By viewing points in the hull as fence posts, we may consider a path as a sequence of posts holding a fence segment. The problem of finding shortest path around is to find the shortest path from s1 to s2 that cannot cross inside the fenced area, but it goes along the fence. From s1 to s2, there are two paths along the fence, going in the two directions. The problem is to find the shorter one.

1 Design a brute force algorithm to solve the shortest path around problem and analyze its efficiency.

2 Design a recursive divide-and-conquer algorithm of Θ(n log n) to solve the shortest path around problem, set up a recurrence to analyze the number of repetitions of the basic operation to compute the hull (for the best case), and determine the efficiency class. Use the Master Theorem to verify the efficiency class that you determine.

3 Implement the two algorithms and test them using data A2 Q2.txt. The file contains 30,000 points (pairs of x-y coordinates). Your programs will be graded by using this data file and two points s1 and s2 that are in the hull of the points in the file. Your programs are required to display the number of points on the path, the length of the path, and x-y coordinates of the points (in the order from s1 to s2 inclusive). C code

 

Reference no: EM133359993

Questions Cloud

What is the amount accrued for lighting and heating : What is the amount accrued for lighting and heating, and amount prepaid for insurance at the year ended 31 December 2016
Article-spirit in the discipline of christian spirituality : What is main relevance of the article "First Steps into the Discipline: On the 'spirit' in the Discipline of Christian Spirituality."
Calculate the net advantage to leasing : Calculate the net advantage to leasing (NAL) the restaurant equipment. It is assumed that the old equipment has no resale value whereas the new equipment would
Assertiveness cultural dimensions : United States related to the performance orientation and assertiveness cultural dimensions found in the result of the GLOBE Project?
Design a brute force algorithm to solve the shortest path : Design a brute force algorithm to solve the shortest path around problem and analyze its efficiency. Design a recursive divide-and-conquer algorithm
How does the cost of goods sold to total receipts : How does the cost of goods sold to total receipts ratio in that publication compare to the ratios on the 2015 IRS Schedule C
Describe and explain nyas journey everyday : Describe and explain Nyas journey everyday and How would you feel if you had such an essential responsibility like her
Evaluate an approach that makes use of divine command ethics : Articulate, explain, and evaluate in each case an approach that makes use of divine command ethics.
Write a function product to compute the product of arbitrary : Write a function product to compute the product of arbitrary two integers. Take care of the sign. product(2,~3) > ~6 Write a function delnthc to delete

Reviews

Write a Review

Computer Engineering Questions & Answers

  Mathematics in computing

Binary search tree, and postorder and preorder traversal Determine the shortest path in Graph

  Ict governance

ICT is defined as the term of Information and communication technologies, it is diverse set of technical tools and resources used by the government agencies to communicate and produce, circulate, store, and manage all information.

  Implementation of memory management

Assignment covers the following eight topics and explore the implementation of memory management, processes and threads.

  Realize business and organizational data storage

Realize business and organizational data storage and fast access times are much more important than they have ever been. Compare and contrast magnetic tapes, magnetic disks, optical discs

  What is the protocol overhead

What are the advantages of using a compiled language over an interpreted one? Under what circumstances would you select to use an interpreted language?

  Implementation of memory management

Paper describes about memory management. How memory is used in executing programs and its critical support for applications.

  Define open and closed loop control systems

Define open and closed loop cotrol systems.Explain difference between time varying and time invariant control system wth suitable example.

  Prepare a proposal to deploy windows server

Prepare a proposal to deploy Windows Server onto an existing network based on the provided scenario.

  Security policy document project

Analyze security requirements and develop a security policy

  Write a procedure that produces independent stack objects

Write a procedure (make-stack) that produces independent stack objects, using a message-passing style, e.g.

  Define a suitable functional unit

Define a suitable functional unit for a comparative study between two different types of paint.

  Calculate yield to maturity and bond prices

Calculate yield to maturity (YTM) and bond prices

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd