Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

6. (4 points) A company wants to launch an advertising campaign in a city. The company plans to send billboard trucks on the road and

image text in transcribed

6. (4 points) A company wants to launch an advertising campaign in a city. The company plans to send billboard trucks on the road and visit all n target locations. To minimize the logistics challenge and maximize the campaign effect, the manager wants to keep each truck travelling on a fixed cyclical route (in the form of a simple cycle) and each of these n target locations being visited by exactly one truck. However, the manager is unsure whether these requirements are achievable since the city road network consists of both one-way and two-way streets. The street configuration of the city is given by a list of integer pairs (x1,y1),,(xm,ym). Here, for each i=1,,m,xi and yi are distinct integers in {1,,n}, representing a direct road from xi to yi. If there is a two-way street between two locations a and b, then both (a,b) and (b,a) appear in the list. Give an efficient algorithm that determines whether it is possible to design a number of cyclical routes that visit all n locations such that each location is visited exactly once. The algorithm should produce a route plan or report that it is impossible. The algorithm must make use of an algorithm application of max-flow problem. (For simplicity, a cyclical route between two locations aba is allowed.) Hint: For each location a, create two nodes a and a in the flow network

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Fundamentals Study Guide

Authors: Dr. Sergio Pisano

1st Edition

B09K1WW84J, 979-8985115307

More Books

Students also viewed these Databases questions