Questions: 856

Answers by our Experts: 763

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Search & Filtering

write an algorithm to illustrate 10 to x if x<y otherwise 5 is assigned to x.


Write an algorithm and pseudocode to compute f(x)=1+x+x^2+x^3+....+x^n


An algorithm is written to take as input the number of miles travelled. The algorithm works out how much this will cost, with each mile costing £0.30 in petrol. If this is greater than £10.00 then it is reduced by 10%.

miles = input("Enter the number of miles)

cost = 0.3

if cost = 10 then

cost = cost * 0.1

endif

print(cost)


There are four errors in this algorithm. Identify each error and correct it.



A salesman wants to travel among 4 or n cities. He wishes to visit maximum or all cities in one day. The order of visiting different cities is not important, but his point of consideration is to minimize distance travelled. In a map this scenario can be described in this way; Cities are represented by nodes, and distance is represented as edges.

Suppose he starts travel from source city ‘A’, visit different cities in the following ways:

A->C->B->D

A->D->C->B

A->B->D->C

you have to choose a suitable algorithm from the following list of algorithms which you think is the best algorithm for the salesman to cover maximum cities by traveling minimum distance.

  • Prim''s Algorithm
  • Dijkstra''s Algorithm
  • Bellman-Ford Algorithm
  • Floyed-Warshall Algorithm
  • Johnson''s Algorithm

Suppose he starts travel from source city ‘A’, visit different cities in the following ways:

  • A à C à B à D
  • A à D à C à B
  • A à B à D à C

Considering the above scenario, you have to choose a suitable algorithm from the following list of algorithms which you think is the best algorithm for the salesman to cover maximum cities by traveling minimum distance.

  • Prim''s Algorithm
  • Dijkstra''s Algorithm
  • Bellman-Ford Algorithm
  • Floyed-Warshall Algorithm
  • Johnson''s Algorithm

we know that the tabular computation of a dynamic- programming algorithm helps us to avoid recomputation. prove it using the example of fibonacci numbers.


  1. There are huge secondary/ standard datasets published in the internet for such case studies:

·        Case 1: Text categorization: Spam Detection.

·        Case 2: Face detection.

·        Case 3: Signature recognition.

·        Case 4: Customer discover.

·        Case 5: Medicine: Classify if a patient has heart ischemia by a spectral analysis of his/her ECG.

 

Find one (1) of the secondary datasets from the internet. Name the secondary dataset that you have found.

 

  1. Based on your answer in 1, perform the following computation using RapidMiner application software to compute accuracy performances (you have to screenshot the processes in detail):

 

  1. Classification method: Artificial Neural Network (ANN) Algorithm.
  2. Feature construction: Independent component analysis (ICA) method.
  3. Feature selection: (Wrapper) method.
  4. Results presentation in testing, training and validation: m-fold cross-validation (CV) method.

 


When can we use greedy algorithm?


programmer in an IT firm. Your firm got a project to develop an 

application for an Ice Cream Parlor. The application must be developed considering the 

following scenario.

• The application will display a menu showing the flavors that have been offered by the Ice 

Cream Parlor. 

• The Parlor offers Tutti-Frutti, Chocolate, Pineapple, Kulfa, Strawberry, Mango, Orange, 

and Pistachio flavors. 

• The price of each flavor per scoop has been listed in the table below, for multiple scoops, 

the price will variate as per the scenario stated in the table. 

Flavor

Price Per Scoop

One Scoop Two 

Scoops

Three Scoops or 

above

Tutti-Frutti 150 120 100

Chocolate 150 120 100

Pine Apple 150 120 100

Kulfa 150 120 100

Strawberry 150 120 100

Mango 175 150 130

Orange 200 170 150

Pistachio 150 120 100

• The developed application will ask the customer to select the flavors and no. of scoops 

for each selected flavor. The program will perform calculations and display the bill.

You are required to write the pseudo-code for the above-given scenario

Consider the following two sample codes in different language for software complexity analysis using Halstead matrics. Calculate the length, vocabulary, volume, difficulty, Effort, time, and number of delivered Bugs of each code. Create a comparison chart of time, Effort, bugs, and difficulty using any language


LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS