HI. I have to make an algorithm for my CMSC class. I was given three problems. Can anyone give me any idea on how to solve these?? Pleaseeeeee. 1. (A1) Given a sequence of numbers, determine the linear equation in the form “an + b.” Example Input: 7 9 11 13 15 Output: 2x + 5 What should be the minimum length of the sequence to determine the linear equation? 2. (B6) Mr. Slowie, a shoemaker, has N orders from customers which he must satisfy. The old shoemaker can work only one job in each day, and jobs usually take several days. But because of the quality of his work, Mr. Slowie actually is quite popular and has many customers.Mr. Slowie also has a policy about delays: he agrees to deduct a certain amount of cents per dar from the total price. This amount is agreed upon by Mr. Slowie and the customer during the job order. Help the old showemaker by writing a program to find the sequence of jobswith minimum total fine. If there are multiple solutions possible, output only one solution.Example input: Jobs [in the form (completion time in days, daily penalty agreed)]a = (3,4), b = (1, 1000), c = (2,2) , d = (5,5) Output: b a c d 3. (C5) While visiting Makati, you were interested in the beautiful skyline. You were interested in reproducing the outline of the rectangular building’s projection.

Given the height, width and left x-coordinates of a number of rectangles, create an algorithm to compute the vertices of the skyline. Assume that the bottom of each rectangle is on the x-axis (y=0).

gzeli.pedregosa
0
Newbie Poster

rubberman
1,355
Nearly a Posting Virtuoso
Featured Poster

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.20 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.