Explore BrainMass


Searching algorithms are aptly named - each on is a finite set of well-defined instructions to be used as steps for searching a collection of items for a member displaying a specific, desired attribute. These items could be stored in a list, array, dictionary, database or simply be a search space defined by a mathematical formula - or any combination thereof - and the search parameters can also be defined in any number of ways, so constructing an efficient, specially-tailored search algorithm can be challenging.


Direct search method graphically displayed on a Broyden function [ Constructed in MATLAB by Guillaume Jacquenot ]


When searching virtual space, search algorithms can be described as a sort of constrain satisfaction problem where the end state is a set of objects that meets some pre-determined constraints or limitations, e.g. all the prime numbers in a set of natural numbers given. These contraints need not be mathematical, however, they could be anything from the qually simple 'all the blue marbles in the marble collection' to a more abstract and hard-to-define, 'all the people in the country fit to lead their nation'. These properties are determined by the machine performing value assignments to chosen variables in order to compare or single out desirable objects. 

More technically, search algorithms are commonly constructed on the basis of mathematical equalities or in equalities (e.g. find all the people equal to or taller than 1.5m), or on functions that minimize or maximize a variable (e.g. find the tallest person). A subclass of search algorithms are those whose metaheuristic method involves viewing the items in the collection to be searched as vertices of a virtual graph joined by edges that represent attributes or other heuristic links. These algorithms scan the space by travelling from vertex to vertex via these edges in a special order. On the other hand, collections to be searched may be viewed as a tree. Unlike with a graph, algorithms for searching trees exist that are entirely guaranteed to find the exact or optimal solution if only they are given enough time to execute fully. 

Often, instead of searching out a particular single item, a sub-structure of the overall collection may be desired. Combinatorial search algorithms are of paramount use here. Given a discrete structure such as a finite group, string or graph, these algorithms can seek out a sub-structure whose every element displays the desired properties, or otherwise contains a maximum or minimum value of a given function.

Prim Algorithm and Kruskal's Algorithm

Given the graph on the attachment, perform the following traversals in questions 1 and 2. Show the steps. Use extra space if needed. 1. Depth-First Search 2. Breadth-First Search Give the weighted graph on the attachment; answer questions 3 - 4. Show the steps. Use extra space if needed. 3. Find the shortest p

JAVA- Data Structures and Algorithms

1. Show the list configuration resulting from each series of list operations using the List ADT of Figure 4.1. Assume that lists L1 and L2 are empty at the beginning of each series. Show where the current position is in the list. • L1.append(10); • L1.append(20); • L1.append(15); • L2.append(10); • L2.append(20

Planning a route for a robot to take from one city to another

Consider the problem of planning a route for a robot to take from one city to another. The basic action taken by the robot is Go (x,y), which takes it from city x to city y if there is a direct route between those cities. DirectRoute(x,y) is true if an only if there is a direct route from x to y; you can assume that all such fac

c++ search and sort

C++ program using Microsoft Visual Studio Sort & Search Evaluation You are to compare two sorting algorithms and to compare two searching algorithms by running and collecting data on each. Your data for sorting and searching will be strings of 25 characters in length. The two sorts to compare are the Bubble Sort and th

Find two integers in a set that sum to given value.

Suppose you are given a set P of integers and another integer x. We wish to use a O(n*lg n) algorithm to decide whether there are 2 integers in P whose sum equals to x. Show your algorithm. You can use pseudo code or verbose description to explain your algorithm. If you need to use any well known standard algorithm in your so

A Series of Software Questions

1. What is a race condition in software? Why are race conditions difficult to debug? 2. What are the advantages of allowing software users to identify and report bugs? What are the disadvantages? 3. Why do some people argue that shrinkwrap software should be exempt from the Magnuson-Moss Warranty Act and Article 2 of the Unifo

MATLAB Code Functions

1. Construct your own MATLAB function realizing the insertion sort algorithm. Your function should have an unsorted array as its input and the sorted array as the output. In particular, you will need: (i) Draw a flowchart of the function realizing the insertion sort (ii) Write the corresponding MATLAB code. You should check

Arithmetic Operators in Programming

Search for arithmetic operators used in programming, and provide two examples where you cannot use logical operators but you can use arithmetic operators. Also, think of two examples where both types of operators are used

C++ Information Retrieval Program using Binary Tree

As different authors tend to use different vocabularies and to use common words with differing frequencies. Given an essay or other text, it is interesting to find what distinct words are used and how many times each is used. I'm trying to produce a driver program and the information-retrieval package using ordinary binary s

Detailed Comparision of Linear and Binary Searches on a List

Suppose that you have a dictionary whose words are not sorted in alphabetical order. As a function of the number, n of words, what is the efficiency of searching for a particular word in this dictionary ? Do the same for dictionary whose words are sorted alphabetically. Compare results.

Creating Search Table Based on Combo Box for Access Database

When 1 is selected for choice, check to see if the combination of 1 for choice and zip code exists. If combination exists, message "A primary location already exists for this zip code: If not, save code already in place. When 2 is selected for choice, check to see if the combination of 12for choice and zip code exists. If com

Advantages and Disadvantages of Educational Technology

The term "educational technology"covers a wide range of tools and methods exploiting computers, networks and media for delivering knowledge. Compare virtual classes with at least two other delivery methods (TV-based courses, on-site company training, using manuals and textbooks individually, etc.) Discuss their advantages and

Depth First Numbering

Apply the depth-first search algorithm to the graph (in the attachment) to find the depth-first search numbering. Then color the tree edges (blue for example) and the back edges (black for example). Now assign directions to all the edges. You may start from any point on the graph. Is the resulting graph strongly connected?

Java List Arrays Example: Class SList

Use the following shell class SList, and complete its implementation as per the guidance in points 1 through 5. Read the documentation on the member function declarations carefully. public class SList { // Methods public void insert(int item); // Pre: The list is not full // item is not in the list // Post: it

Fix the given Javascript code that implements the Heron Method to locate the square root of any number. Also list a set of test cases that will thoroughly exercise the Heron Method code.

The Heron Method for approximating the square root of a number states that if x is a guess for the square root of n then a better guess x' is: x' = [x + (n/x)] / 2 Naturally this process can be repeated using x' in place of x the next time through the loop. The loop can stop when the difference between the previous and n

C++: Function SwapSubTrees for Class BinaryTreeType

Write a function, swapSubTrees, that swaps all of the left and right subtrees of a binary tree. Add this function to the class binaryTreeType and create a program to test this function. Attached is the class binaryTreeType to work on along with what I think is an algorithm to do the logic. I need the function to work and a pr

Freedom of speech in cyberspace

Please describe a recent event from the news that illustrates a positive or negative implication of the impact of the Internet on the actual protection of the freedom of speech. What is your opinion on the event

Writing Java application, taking user input from keyboard

Write a java application that takes user input from the keyboard, and search for this input from an array. Submit the source code along with a screen shot. Write a java application to accomplish the following task: Ask users for the past 5 years of federal taxes they have paid, save these data to an array, search for the

Access Points

Since many commercial APs have the SSID broadcast option enabled by default, so clients can easily detect the presence of an AP. APs are also configured as DHCPs and Firewalls. Explain why it is suggested that for security reasons, owners should consider disabling the SSID and the DHCP functions.

Simple Student Information Database Implementation

Simple Student Information Database Implementation Programming language: C++ Database Description. Each record in the database has following fields: 1) 8 digit student ID 2) Last name 3) First name 4) Telephone number 5) Major 6) GPA 7) Year of birth 8) Month of birth 9) Date of birth 10) Home address There is

Describe the two main classes of intrusion

Describe the differences between the two main classes of intrusions: misuse and anomaly. What are the characteristics of a good intrusion detection system? Visit the distributed intrusion detection system called DShield at Which types of attacks are more prevalent at the time of your visit to the sit

Analyzing Algorithm Complexity

Suppose you are given an array A of n sorted numbers that has been circularly shifted k positions to the right. For example, {35, 42, 5, 15, 27, 29} is a sorted array that has been circularly shifted k = 2 positions, while {27, 29, 35, 42, 5, 15} has been shifted k = 4 positions. (a) Suppose you know what k is. Give an algori

Database Fundamentals

I would like some help to Further my understanding of how SQL and the Oracle database work together with basic database design methods using Functional dependencies, Entity relationships and deriving relations to 3NF etc.

Planning, Brainstorming and Outlining

Please help with Kudler Fine Foods again. I need to identify the competition, challenges and recommended process to create an eCommerce solution for Kulder Fine Foods. Include recommendations for Search Engine Optimization (SEO). I also need to include a shopping cart for the web site.

Office Suites Available in the Market

Johanna is doing an online course in IT. She needs to submit her assignments to her instructor, who reviews them and provides feedback in the document. Johanna also needs to include charts, graphs, and diagrams in her assignments. Perform a search on the various office suites available in the market, suggest the suite suitable

Relational data model

I would like to see a T diagram for this one created in Word along with a written explaination. This will help me to understand these identifications. Assignment: Your contact at the University has given you a set of tables. (see attachment). What tables are you are going to use in this project, what are the appropriate f