Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask Computer Engineering Expert

This sununer, after having passed CS341 with a wonderfully high mark, you decide to take on another test of endurance by walking along El Camino de Santiago'. This trail traditionally starts in St Jean Pied de Port and finishes in Santiago de Compostela. The trail is about 780 km long and travels across most of Northern Spain. Suppose you decide to hike at most dim each day. At the end of each day, you will rest in one of the several albergues2 that can be found in the many villages along the Camino. Being a diligent CS student, you understand the importance of collecting data and so, before the journey, you will have generated a list of n albergues. Each entry in the list is simply the name of the I' albergue and its distance from the starting point: x[i] measured in km. Describe a greedy algorithm that will give you a list of m albergues specifying where you will rest if you wish to do the walk in the minimum number of days. Provide an inductive proof that your algoritlun works.
To make answers uniform, everyone should assume that the walk starts from the first albergue at St Jean Pied de Port. So x[1] = 0 and the output list of m albergues should begin with this albergue. You may also assume that the maximum distance between two consecutive albergues is less than d.

The year is 2029. Ex-Blade Runner Rick Deckard has been sent by the Tyrell Corporation to the planet Tyrell-III to identify conunon models of replicants (http://en.wikipedia.orgiwiki/Replicant).


Tyrell-III has n replicants and each has a particular model specification. There are many models. Unfortunately, there was an insurgency on the planet and some of the replicants destroyed a critical database that held replicant data. Because of this, the

Tyrell Corporation does not know the model specifications for the replicants but it does know that there are 13 "conunon" models. Decker is told that a model is said to be common if there are at least n/13 instances of that model.
Deckard has been given a very sophisticated electronic device that, when attached to two replicants, will tell Deckard whether the two replicants have the same model specification. This operation is called a query. Unfortunately (again), replicants tend to be somewhat uncooperative and Deckard can only carry out a query at substantial risk to the continuation of his life. Consequently, the Tyrell Corporation wants him to identify all cominon models using the minimum number of queries.
We model the problem as follows:

We have an array R[l..n] of n entries (each entry being a particular model specification). The only possible operation allowed on R is a query of the form: Check(R[i],R[j]) that returns True if R[i] and R[i] are equal (the corresponding replicants have the same model specification) and False otherwise. For an array R of size n, an entry e is called common if at least n /13 entries of R are equal to e. We want to design an algoritlun that returns all common entries using 0(n log n) calls to Check.

a) Prove that there can be at most 13 distinct common entries in R.

b) Let e be a common entry in R[1..n]. Prove that e is a common entry in at least one of the arrays R[1..Ln/2_1] andR[Ln/2_1+1..n].

c) Give a precise pseudo-code description of a divide-and-conquer algoritlun that finds all common entries of an array R[1..n] in time e(n log n). Prove that your algorithm is correct and analyze its time complexity. Hint: Use part (b) in the design and part (a) in the analysis of your algorithm.

Computer Engineering, Engineering

  • Category:- Computer Engineering
  • Reference No.:- M91615283
  • Price:- $20

Priced at Now at $20, Verified Solution

Have any Question?


Related Questions in Computer Engineering

Answer the following question take a cube graph q3 and add

Answer the following Question : Take a cube graph Q3 and add both face diagonals to one of the cube faces. The resulting graph is not planar, so by Kuratowski's theorem it contains a subdivision of K5 or of K3,3. Draw th ...

Question suppose that 80 community delegates discussed the

Question : Suppose that 80 community delegates discussed the transportation problems on Oahu. 30 of them favor expanding the bus system, 34 favor introduction of rail, and 44 favor building more highways. 15 favor a comb ...

Given the following table keynbspand fdsnbspnbsprepair

Given the following table, key and FDs,   REPAIR (RepairInvoiceNumber, RepairDate, RepairCost, RepairEmployeeName, RepairEmployeePhone, SerialNumber, Type, TankCapacity) Candidate Keys: RepairInvoiceNumber, and (RepairDa ...

A simple repetitive song with varying verse the ants go

A simple repetitive song with varying verse, "The Ants Go Marching" provides a simple assignment for remembering the basic Control Structures - loops, switch statements, if-then-else statements, etc., that you learned in ...

Scenario you have been asked to develop a company policy on

Scenario: You have been asked to develop a company policy on what should be done in the event of a data breach, such as unauthorized access to your company's customer database. What sort of process would you use to devel ...

Question define and briefly discuss the following

Question: Define and briefly discuss the following brainstorming techniques, the delphi technique, brainstorming, or nominal group technique. 1. you are required to write an initial post (300 words). 2. Also discuss adva ...

Take the input of numbers and reverse the order of elements

Take the input of numbers and reverse the order of elements in that vector using recursion.

1 what is the purpose of exclusive gates such as the xor

1. What is the purpose of exclusive gates such as the XOR and XNOR? 2. What function do these gates perform?

What type of monopoly is sydney water describe the main

What type of monopoly is Sydney Water? Describe the main characteristics of this monopoly type in general and in relation to Sydney Water.

Please discuss the followingas demand increased for these

Please discuss the following: As demand increased for these mortgage backed securities, lenders reacted by relaxing their approval standards to increase production. No longer were "all" borrowers required to document the ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As