Share
Explore BrainMass

Trees

Formulating an Algorithm

In English like pseudo-code, or structured English -- just to make sure everyone can read it; write an algorithm to determine if a string is a palindrome. A palindrome is a word or phrase that is spelled the same whether you are reading it forwards or backwards (ex. race car, Madam I'm Adam). Your algorithm should ignore spaces

Three Algorithm True or False Questions

e) Let G = (V,E) be a weighted graph and let T be a minimum spanning tree of G. The path in T between any pair of vertices v_1 and v_2 must be a shortest path in G. True or False? f) If an edge e = (u,v) is in a minimum spanning tree of an undirected graph G = (V,e) with nonnegative weight function w, then there exist two

Binary Tree worst case scenario

We know that binary trees are O(n) for these dictionary operations... What is the worst case input scenario for each operation (i.e. a list of numbers in reverse order...) Binary Tree ------------- Mininum - ? Maximum - ? Search - the tree is unbalanced (resembles a linked list) Successor - the tree has one node on le

Point to point links AND reverse path flooding

Assume we have a network of nodes connected via point to point links, and a source S sends a message that will be broadcast to all nodes using Reverse-Path-Flooding. Assume that routers do not keep track of broadcast messages they have seen earlier. Assume also that routing tables change frequently, however, when a node chang

Backbone internet company

Discuss and assess two reasons a backbone internet company might not peer with another backbone provider.

Huffman tree

Hi Please find correct answer and explain. Question: Consider the Huffman tree where the character frequencies are: Freq(A)=16, Freq(B)=8; Freq(C)=4;Freq(D)=2;Freq(E)=1;Freq(F)=1. The total length of the encoding with the above frequencies and the derived Huffman tree is: Answers: a) 62 b) 63 c) 64 d)

Depth First Search

Hi I would appreciate if you could say if the statement below is TRUE or FALSE and explain why. Given a graph G, we might start a DFS from two different vertices, u and v. Any back edge in the DFS starting from u is also a back edge in the DFS starting from v.

Coding

) Assume the following alphabet with eight symbols, where each symbol has the listed probability of occurrence. Symbol Probability of Occurrence 000 .15 001 .1 010 .05 011 .4 100 .025 101 .02 110 .005 111 .25 (a) Assuming that symbols are compressed using Huffman Coding and that the most likely symbol is encoded as

Among other things, a binary search tree can be used for sorting data elements. This project is to randomly generate a sequence of integer numbers, insert the first 20 distinct numbers into a binary search tree, and finally produce an in-order listing of the tree.

Among other things, a binary search tree can be used for sorting data elements. This project is to randomly generate a sequence of integer numbers, insert the first 20 distinct numbers into a binary search tree, and finally produce an in-order listing of the tree. You are provided with the declarations and two functions for bina

A problem about ADT table in Java

Question: (a) Based on the following scenario, describe one advantage and one disadvantage of each implementation of the ADT Table (using a binary search tree, ordered vector, or unordered vector). (Note that there is certainly more than one acceptable answer for this question.) "Consider an implementation of the University o