Uncategorized

You are given two sequences of integers arranged in ascending order. Your task is to combine the sequences into one ascending sequence. In order to get full marks, you have to make sure that the time complexity of combining two sequences is O(N). You can safely assume that no integer will be repeated. Input starts with a positive integer m which specifies the number of elements in the first sequence. Next m values are the elements in the first sequence. The next positive integer n specifies the number of elements in the second sequence. Next n values are the elements in the second sequence. The output is the combined sequence.

unsortedtype.h#ifndef UNSORTEDTYPE_H_INCLUDED#define UNSORTEDTYPE_H_INCLUDEDtemplate <class ItemType>class UnsortedType{struct NodeType{ItemType info;NodeType* next;};public:UnsortedType();~UnsortedType();bool IsFull();int LengthIs();void MakeEmpty();void RetrieveItem(ItemType&, bool&);void InsertItem(ItemType); void DeleteItem(ItemType); void ResetList();void GetNextItem(ItemType&); private:NodeType* listData;int length;NodeType* currentPos;};#endif // UNSORTEDTYPE_H_INCLUDEDunsortedtype.cpp#include “unsortedtype.h”#include <iostream>using namespace std;template <class ItemType>UnsortedType<ItemType>::UnsortedType() {length = 0;listData = NULL;currentPos = NULL;}template <class ItemType>int UnsortedType<ItemType>::LengthIs() {return length;}template<class ItemType>bool UnsortedType<ItemType>::IsFull() {NodeType* location;try{location = new NodeType;delete location;return false;}catch(bad_alloc& exception){return true;}} …

You are given two sequences of integers arranged in ascending order. Your task is to combine the sequences into one ascending sequence. In order to get full marks, you have to make sure that the time complexity of combining two sequences is O(N). You can safely assume that no integer will be repeated. Input starts with a positive integer m which specifies the number of elements in the first sequence. Next m values are the elements in the first sequence. The next positive integer n specifies the number of elements in the second sequence. Next n values are the elements in the second sequence. The output is the combined sequence. Read More »

Based on the view of what is happening in Fortunate Financial Services Limited (FFSL). Robin Singh, the branch manager of the Delhi office, concluded that one of the first things he had to attend involved developing job descriptions for his one-line trading assistants. The daily turnover of the FFSL’s Branch in the Connaught circus area has been going up steadily in recent times, thanks to the stock market boom in January 2000; it has reached an all-time high of 7 crores. To in cash the opportunities presented by the boom, FFSL had recruited 5 additional assistants – all young graduates with over two years of experience in stock market operations taking the total number of assistants to 12. Two supervisors have also been appointed about six months back to oversee trading arrangements and back-office operations. The branch allows trading in stock belonging to BSE, NSE, and DSE. Each assistant had to look after the requirement of more than clients on daily basis. In recent times, FFSL face a number of problems on settlement day.

Case: 01 A Trading Assistant’s Job Based on the view of what is happening in Fortunate Financial Services Limited (FFSL). Robin Singh, the branch manager of the Delhi office, concluded that one of the first things he had to attend involved developing job descriptions for his one-line trading assistants. The daily turnover of the FFSL’s …

Based on the view of what is happening in Fortunate Financial Services Limited (FFSL). Robin Singh, the branch manager of the Delhi office, concluded that one of the first things he had to attend involved developing job descriptions for his one-line trading assistants. The daily turnover of the FFSL’s Branch in the Connaught circus area has been going up steadily in recent times, thanks to the stock market boom in January 2000; it has reached an all-time high of 7 crores. To in cash the opportunities presented by the boom, FFSL had recruited 5 additional assistants – all young graduates with over two years of experience in stock market operations taking the total number of assistants to 12. Two supervisors have also been appointed about six months back to oversee trading arrangements and back-office operations. The branch allows trading in stock belonging to BSE, NSE, and DSE. Each assistant had to look after the requirement of more than clients on daily basis. In recent times, FFSL face a number of problems on settlement day. Read More »

Specifications: You should have a home, menu, and contact us pages. The three pages have the same header and footer. # The header should have a text or image logo, navigation bar and if you want to have a background image please choose it to look good. The footer should have a contact information and the copyright statement. The home page contains images of your restaurant and some description. The menu page should contain images of the meals and the price in a nice view. # The contact us page contains the restaurant contact information and a contact form (1 expect from you a nice and professional form). Don’t forget to do the reset CSS. Feel free add your creativity. Please do some search before you start and visit some restaurant websites. Proposed methodologies: Using HTML and CSS.

EXPERT ANSWER Home.html <html> <head> <title> Home </title> </head> <style type=”text/css”> * { margin: 0; padding: 0; } body { text-align: center; } .wrapper { width: 1170px; margin: 0 auto; } header { height: 100px; background: #262626; width: 100%; z-index: 10; position: fixed; } .logo { width: 30%; float: left; line-height: 100px; } .logo a …

Specifications: You should have a home, menu, and contact us pages. The three pages have the same header and footer. # The header should have a text or image logo, navigation bar and if you want to have a background image please choose it to look good. The footer should have a contact information and the copyright statement. The home page contains images of your restaurant and some description. The menu page should contain images of the meals and the price in a nice view. # The contact us page contains the restaurant contact information and a contact form (1 expect from you a nice and professional form). Don’t forget to do the reset CSS. Feel free add your creativity. Please do some search before you start and visit some restaurant websites. Proposed methodologies: Using HTML and CSS. Read More »

Question 2 A discrete source transmits messages X1, X2, X; with probabilities p( x ) = 0.3, p( x ) = 0.25, p (X) = 0.45. The source is connected to the channel and the conditional probability matrix is given as below: yı V2 X1 50.9 0.1 01 P(Y/X) = X20 0.8 0.2 X3 10 0.3 0.7 Calculate all the entropies and mutual information with this channel. Hint: Steps to be followed: • Obtain the joint probability matrix P (X,Y). • Obtain the probabilities ply). p (Y).p (y). • Obtain the conditional probability matrix P (X/Y) • Obtain the marginal densities H(X) and H (Y). • Calculate the conditional entropy H (X/Y). • Calculate the joint entropy H (X,Y). • Calculate the mutual information I (X,Y). I[X, Y] =H(X)-H (X/Y) [30 marks)

EXPERT ANSWER

8.) During the past five years, you owned two stocks that had the following annual rates of return:

8.) During the past five years, you owned two stocks that had the following annual rates of return: Year Stock T Stock B1 0.16 0.082 0.08 0.033 -0.12 -0.094 -0.03 0.025 0.15 0.04 a) compute the arithmetic mean annual rate of return for each stock, which stock is most desirable by this measure?b) Compute the …

8.) During the past five years, you owned two stocks that had the following annual rates of return: Read More »

You are planning to save for retirement over the next 35 years. To do this, you will invest $900 per month in a stock account and $500 per month in a bond account. The return of the stock account is expected to be 11 percent, and the bond account will pay 7 percent. When you retire, you will combine your money into an account with a 8 percent return.

You are planning to save for retirement over the next 35 years. To do this, you will invest $900 per month in a stock account and $500 per month in a bond account. The return of the stock account is expected to be 11 percent, and the bond account will pay 7 percent. When you …

You are planning to save for retirement over the next 35 years. To do this, you will invest $900 per month in a stock account and $500 per month in a bond account. The return of the stock account is expected to be 11 percent, and the bond account will pay 7 percent. When you retire, you will combine your money into an account with a 8 percent return. Read More »

The Lake Placid Town Council decided to build a new community center to be: used for conventions, concerts, and oilier public events, but considerable controversy is appropriate size. Many influential citizens want a large center that would be a showcase for the area. But the mayor feels that if demand does not support such a center, the community will lose a large amount of money. To provide structure for the decision process, the council narrowed the building alternatives to three sizes: small, medium and large. Everybody agreed that the critical factor in choosing the best size is the number of people who will want to use the new facility. A regional planning consultant provided demand estimates under three responds to a situation in which tourism drops substantially, the base-case scenario coroner spends to a situation in which Lake Placid continues to attract visitors consultant has the best-case scenario corresponds to a substantial increase in tourism. The consultant has provided probability assessments of 0.10, 0.60, and 0.30 for the worst case, base-case, and best-case scenarios, respectively. The town council suggested using net cash flow over a 5-year planning horizontal as the criterion for deciding on the best size. The following projections of net cash flow (in thousands of dollars) for a 5-year planning horizon have been developed. All costs, in the consultant’s fee, have been included. What decision should Lake Placid make using the expected value approach? Construct risk profiles for the medium and large alternatives. Given the mayor s concern over the possibility of losing money and the result of part (a), which alternative would you recommend? Compute the expected value of perfect information. Do you think it would be worth trying to obtain additional information concerning which scenario is likely to occur? Suppose the probability of the worst-case scenario increases to 0.2, the probability of the base-case scenario decreases to 0.5, and the probability of the best-case scenario remains al 0.3. What effect, if any, would these changes have on the decision recommendation? The consultant has suggested that an expenditure of $150,000 on a promotional campaign over the planning horizon will effectively reduce the probability of the worst-case scenario to zero. If the campaign can be expected to also increase the probability of the best-case scenario to 0.4, is if a good investment?

EXPERT ANSWER a) Expected value of each case is given by: EVsmall = Probability of worst case*CF of worst case + Probability of basecase*CF of base case + Probability of best case*CF of best case EVsmall = 0.1*400 + 0.6*500+0.3*660= 40+300+198 =538 Similarly EVmedium = 0.1*(-250) + 0.6*650 + 0.3*800 = 605 EV large = …

The Lake Placid Town Council decided to build a new community center to be: used for conventions, concerts, and oilier public events, but considerable controversy is appropriate size. Many influential citizens want a large center that would be a showcase for the area. But the mayor feels that if demand does not support such a center, the community will lose a large amount of money. To provide structure for the decision process, the council narrowed the building alternatives to three sizes: small, medium and large. Everybody agreed that the critical factor in choosing the best size is the number of people who will want to use the new facility. A regional planning consultant provided demand estimates under three responds to a situation in which tourism drops substantially, the base-case scenario coroner spends to a situation in which Lake Placid continues to attract visitors consultant has the best-case scenario corresponds to a substantial increase in tourism. The consultant has provided probability assessments of 0.10, 0.60, and 0.30 for the worst case, base-case, and best-case scenarios, respectively. The town council suggested using net cash flow over a 5-year planning horizontal as the criterion for deciding on the best size. The following projections of net cash flow (in thousands of dollars) for a 5-year planning horizon have been developed. All costs, in the consultant’s fee, have been included. What decision should Lake Placid make using the expected value approach? Construct risk profiles for the medium and large alternatives. Given the mayor s concern over the possibility of losing money and the result of part (a), which alternative would you recommend? Compute the expected value of perfect information. Do you think it would be worth trying to obtain additional information concerning which scenario is likely to occur? Suppose the probability of the worst-case scenario increases to 0.2, the probability of the base-case scenario decreases to 0.5, and the probability of the best-case scenario remains al 0.3. What effect, if any, would these changes have on the decision recommendation? The consultant has suggested that an expenditure of $150,000 on a promotional campaign over the planning horizon will effectively reduce the probability of the worst-case scenario to zero. If the campaign can be expected to also increase the probability of the best-case scenario to 0.4, is if a good investment? Read More »