Explore BrainMass
Share

# Algorithms

Whilst we lack a formal, universally accepted definition of an algorithm, it is understood to mean the sequence of steps prescribed to carry out a task. The word 'algorithm' therefore includes everything from Google's search results display algorithm to IKEA furniture assembly instructions. This flexibility in definition is an advantage as it allows it to be used as a catch-all familiar term for the steps for calculations, data processing and automated reasoning. Almost all code can be broken down into algorithmic components - often one per function/subroutine/method.

To be more specific, an algorithm can be described as follows:

• requirements for an initial state from which the algorithm can begin executing
• requirements for initial input
• a finite series of well-defined instructions
• an end state where the algorithm terminates, possibly with output

The above could be described as an abstracted algorithm for algorithms itself.

One informal definition of an algorithm is that it is a "set of rules which precisely defines a sequence of operations"1 which actually defines all computer programs, mathematical and otherwise. In this respect, algorithms can be said to be the way computers turn data into meaningful, useful actions.

There are many forms of notation and language that can express algorithms. Day-to-day instructions are transmitted between people in natural language, such as a parent teaching a child how to tie their shoes, or an adult following tech support instructions over the phone. In a more computer-orientated setting, algorithms meant to be implemented as code are most often expressed in pseudocode or flowcharts for improved clarity, while algorithms that have already been implemented are written in a programming language or control table.

This medical algorithm, expressed as a flowchart, is meant for a human to follow, but by breaking it into steps, one can see how one might begin to automate it.

References:

1. Stone 1973:4

Icon credit AlMare

## Categories within Algorithms

### Searching

Solutions: 102

Search algorithms traverse a data set for an item with specific attributes.

### Sorting

Solutions: 103

Sorting algorithms rearrange collections of data into a specified order.

### Approximation Algorithm

Solutions: 4

Approximation algorithms return estimates or close copies of what the strict version would, but are often less costly and therefore more useful in the real world.

### Linear programming model for a restaurant

Please form a linear programming model for a restaurant. It sells 60 meals maximum. 15 minutes is required to prepare a fish plate and 30 minutes is required to prepare a beef plate. There is a total of 20 hours of kitchen staff labor available. The ratio of fish to beef dinners sold is 3:2 but 10% of the customers will order a

### Creating Visual Representations of Data

KENAI FJORDS NATIONAL PARK SKILLS  Save a workbook with a new name  Create a column chart  Move a chart to a new worksheet  Reorder worksheets  Apply a style to a chart  Insert a chart title  Format a chart title  Remove the legend from a chart  Insert a vertical axis title  Rotate

### The solution gives a complete c code of calculating volume rate per second using given formula.

Compute the volume of water in cubic feet, flowing through a pipe of diameter d in feet, with a velocity of v feet per second. The formula to compute the volume flow rate per second is given by: R = d /2 Area= π . r^2 Volume = area .v

### The guide gives detailed solutions for calculations of sequence number, source port number, and destination port number by three sending orders: host A to host B, host A before host B and host A after host B.

1. Hosts A and B are communicating over a TCP connection, and Host B has already received from Host A all bytes up through (and including) byte 248. Suppose Host A then sends two segments to Host B back-to-back. The first and second segments contain 40 and 60 bytes of data, respectively. In the first segment, the sequence number

### Internet use

Assuming your daily routine stayed the same, speculate the problems you would have if the Internet didn't exist. Speculate the problems of a familiar organization given the same scenario.

### Scope And Scope Creep

Scope is defined as "the sum of the products, services, and results to be provided as a project." Scope Creep is defined as "adding features and functionality (project scope) without addressing the effects on time, costs, and resources, or without customer approval." Considering these two definitions answer the following -

### Algorithms Problem

Suppose that the vertices for an instance of the travelling salesman problem are points in a plan and that the cost c(u; v) is the Euclidean distance between points u and v. Show (i.e., prove) that an optimal tour never crosses itself.

### Convert a two's complement binary value to equivalent decimal value.

I need assistance in answering the following question: What is the decimal value of "01111111111111111101111111111102" (in two's complement)?

### 16-bit 1's Complement of Decimal Number 1000

I am very confused on how to answer the following question. It would really help me out a lot if I could get a step-by-step explanation of how to answer this. I want to know what the 16-bit 1's complement of 1000 will be? 1000 is a decimal number.

### Simple Recursion Function

My goal is, given this function prototype, I need the recursive definition of the function. int Location(ArrayType a, int first, int last, Element elm) { /* returns the location of elm in a[first], ... , a[last]. If not found, return 0 */ }

### Report on Inventory Models

Mercury Corporation Inventory Decision: Mercury Corporation manufactures running shoes. The factory is open 250 days a year. Mercury currently buys the laces for its shoes from Ti-Rite Company, but is considering manufacturing the laces in-house. Mercury's contract with Ti-Rite specifies a base price per lace of \$0.05. Ti-R

### Use Relational Algebra and Tuple Relational Calculus to express the given queries.

Consider the following relation schemas (in attached image). Primary keys are underlined. Use (1) Relational Algebra and (2) Tuple Relational Calculus to express the following queries: 1. Find the instruments (InstID) played by musician named 'John'. 2. Find the titles of the albums produced by musicians who play guitar or

### Which of the following is a critical path from milestone A to milestone K?

1. Which of the following is a critical path from milestone A to milestone K? 2. What is the slack time for the activity starting at milestone F? 3. What is the length of the critical path identified in question 1? 4. Which milestones are precursors to J? Please see attachment for complete question.

### Site Visit Planning and Implementation

Plan and implement strategies to determine the feasibility of available solutions with emphasis on site visits.

### Polling and Instructions Executed per Second

Machine M runs at 3 GHz. When running program P, its CPI = 1.5. (a) How many instructions will be executed during 1 second while running program P? (b) While running program P, the mouse has to be polled 30 times per second. The polling routine requires executing 200 instructions with a CPI of 2. What is the overhead, tha

### Process of normalization

Describe and illustrate the process of normalization for the following relation to Second (2NF), and Third (3NF). R(ABCDEF) Aâ?'B Dâ?'E Bâ?'C Eâ?'F Donâ??t worry about finding the minimal cover for this question. Just find the key and normalize the relation above to the 3NF

### Suppose we have a number of cabinets containing skeletons and bones.

Suppose we have a number of cabinets containing skeletons and bones. The size, shape, and bones connection are different. The question is What are the structural relationships among these organisms? Give any idea how algorithm should work? This is not really a question. I just want some direction and ideas. I am okay even w

### Query Questions and Results

Q4: Write a query to produce the result using the table website. Q4.a For URLs which start with HTTPS, return URL_NAME up to 1st slash Q4.b Count number of records for each location, but report location as 'home' and 'work' instead of 0 and 1 Q4.c Change '%3d' to equal sign (=) TABLE websites User ID Location URL_

### Assigning monetary values to risks

Is it always possible to assign monetary values for all items in the risk categories enumerated in say a risk register? Also, if assigning monetary values to risks, which quantitative methods would you recommend?

### Create a weighted scoring model to determine grades for a course.

Create a weighted scoring model to determine grades for a course. Final grades are based on three exams worth 20 percent, 15 percent, and 25 percent, respectively; homework is worth 15 percent; and a group project is worth 25 percent. Assume Student 1 earns 100 percent (or 100) on every item. Assume Student 2 earns 70 percent

### Google's Working Environment & the Future

I was watching a TV program that talked about Google providing a fun working environment for their employees, the facility could be somewhere in the west coast. The program was showing inside the facility they have a gym to work out, a half-court basketball court, couple of pool tables, plenty of games consoles, dry clean / laun

A particular leadership theory strand views leadership behavior largely in terms of the extent to which the leader is able to maintain the status-quo and run the organization efficiently (Transactional leadership) versus the extent to which the leader is able to envision, instigate and manage successful change (Transformational

### Give examples of IP addresses for a computer and gateway, and subnet mask for a small class "B" network connected to the Internet.

Let us say we are dealing with a small class "B" network connected to the Internet. What would examples of each of the following be if they all had to be able to agree and communicate with each other? a) An example of an IP address of one of the computers. b) An example of IP address for the gateway. c) An example of a

Find an algorithm to translate the representation of a graph from adjacency matrix to adjacency list. You may refer to the attachment for algorithm from adjacency list to adjacency matrix translation as a reference or guide. See the attached file.

### Maximum tolerable signal-to-noise ratio on the channel

Suppose that an analog communications channel has an intended capacity of 10 Mbps. The bandwidth is 4 MHz. According to Shannon's law, what is the maximum signal-to-noise ratio (in dB) that can be tolerated on this channel?

### Transmission time for shipping label

Speedy Package is a same-day package delivery service that operates in Chicago. Each package has a shipping label that is attached to the package and is also electronically scanned and entered into Speedy's data network when the package is picked up and when it is delivered. The electronic labels are transmitted via a device tha

### Circuit-Switched Infrastructure & Packet-Switched Infrastructure

1. Why is it technically easier to provide voice telephone service over a circuit-switched infrastructure than over a packet-switched infrastructure? 2. Despite the fact that it is technically difficult, why is there great interest in providing voice telephone service over a packet-switched infrastructure?

### Recursion implementation

Rewrite the following power() function so that it uses recursion. Provide a function main to test your implementation. #include <iostream> using namespace std; int power (int number, int exponent) { int retval = 1; for (int i = 0; i < exponent; i++) { retval = retval * number; } re

### Pop Function of Stack

Modify the pop() function of Stack so that it uses recursion. /** * pop - pops the top node from the stack. Return -1 if the stack is * empty. */ int Stack::pop() { int pop = -1; // Create a temporary set of node to hold the new stack int *tmp_nodes = new int[size]; memset(tmp_nodes, 0, sizeof(int)

### Binary Conversion to Decimal/Hex

Convert the 6-bit unsigned binary numbers shown below to decimal form. a. (110101)base2 b. (010101)base2 Convert the unsigned binary numbers shown below to hexadecimal form. a. (110101)base2 b. (11011001)base2