Develop an implementation of fibonacci

Assignment Help JAVA Programming
Reference no: EM132260873

Concurrent Programming and Actors

Solve the following three problems using Java with Akka Actors. Read the submission instructions carefully.

Problem 1: Fibonacci Numbers 1. Develop an actor program for computing Fibonacci numbers concurrently. Particularly, create an actor which receives a request for a particular Fibonacci number from a client actor. If it is one of the base cases, the actor replies with a message containing the answer; otherwise, it creates the two sub-problems you would normally create in a recursive implementation. It then creates two new (Fibonacci) actors, and sends one subproblem to each. Once it has received replies from these actors, it adds them to produce its result, and sends it back to the computation's client.

Problem 2: Fibonacci Numbers 2. Develop an implementation of Fibonacci which uses fewer actors. Particularly, create an actor which receives a request for a particular Fibonacci number from a client actor. If it is one of the base cases, the actor replies with a message containing the answer; otherwise, it breaks down the problem into two sub-problems, sends the smaller of the two to a new Fibonacci actor and and the larger one to itself. When it receives the two replies, it adds them to produce its result, and sends it back to the computation's client.

Problem 3: Sorting. It is possible to sort a number of values using a pipeline of filter actors, each responsible for one value: the first actor picks the smallest values, the second, the second smallest and so on. Particularly, the first actor receives all the values, one by one. If there are more than one values received by an actor, it creates another actor; it keeps the smallest value received so far for itself, and sends all other values forward to the other actor. Each filter actor does the same thing.

Assume that each filter actor has local storage for only two of the values to be sorted: the next incoming value and the minimum value seen thus far.

A sentinel is used to indicate the end of the values to be sorted. The sentinel is then sent down the pipeline to inform all actors of the end of the input. On receiving the sentinel, each filter actor replies to the sender of the sentinel with its smallest value. All actors simply forward back the values they receive from actors down the pipeline from them, so that the first actor receives all the values in a sorted order, and sends them forward to the original requester, one value at a time.

Develop actor code to implement this for sorting positive integers. Use 0 to indicate the end of the values to be sorted.

Submission:

Create a directory with your nsid as its name. Inside this directory, create separate sub-directories with names like problem2, problem3, etc. for each programming problem. Under each programming problem's folder, place the entire Eclipse project for that problem. You may use other IDEs for your development; however, the submission must be a valid Eclipse project for the versions of Java and Akka introduced in tutorials.

Note: Only Need problem 2 and 3.

Verified Expert

The solution file is implemented in net beans which has two programs are Fibonacci number for given number of terms using akka actor to send request to perform sum of Fibonacci terms and response to main class. The second program is to sort the given number using selection sort to store the first small number in pipe line and next small number in pipe line keep on N number of elements in array using akka actor. The solution file has two programs, documentation of each program with output and various test case input given for both programs and outputs are recorded.

Reference no: EM132260873

Questions Cloud

How marketing performance will be measured : BSBMKG609 Develop a marketing plan Identify and report on how marketing performance will be measured against marketing objectives, including a description.
Implementing and evaluating effective staffing system : Understand the overall process of designing, implementing, and evaluating an effective staffing system
Discuss the organizational behavior and management theory : Write a paper in which you apply the concepts of organizational behavior and management in designing an organizational security plan.
Bringing about a peaceful resolution : How can your leadership skill assist you in bringing about a peaceful resolution in the conflict and negotiation process in a way that benefits all departments?
Develop an implementation of fibonacci : Develop an implementation of Fibonacci which uses fewer actors. Particularly, create an actor which receives a request for a particular Fibonacci number
Explore the use of transformational leadership : Explore the use of Transformational leadership, including the idea that the best leaders are both transactional and transformational
How the known generational difference might influence hiring : Discuss how you believe the different generations will affect the criminal justice organization in which you are employed.
Positive change within an organization : Brie?y describe how adherence to servant leadership can in?uence positive change within an organization
Which of the work roles do you primarily take on a team : Which of the work roles do you primarily take on a team? Are there any circumstances in which you tend take on a different role?

Reviews

inf2260873

9/4/2019 2:41:24 AM

Documentation file should include with proper code and with their output. The testing file is for problem 1 and 3. I want more focus on problem 2 and problem 2 testings. Tell your expert to give problem 2 and problem 2 testing carefully. Also, focus on problem 1 and problem 1 testing. Problem 2 is also important. code should be different that I sent you for Fibonacci.java. Summary 1- I need problem 2 and testing for that 2- Documentation

len2260873

3/19/2019 12:39:31 AM

Concurrent Programming and Actors Solve the following three problems using Java with Akka Actors. Read the submission instructions carefully. Create a directory with your nsid as its name. Inside this directory, create separate sub-directories with names like problem2, problem3, etc. for each programming problem. Under each programming problem's folder, place the entire Eclipse project for that problem. You may use other IDEs for your development; however, the submission must be a valid Eclipse project for the versions of Java and Akka introduced in tutorials. 5% of the total mark for each problem is for internal documentation, and another 5% is for testing. Include evidence of your testing in a separate file.

Write a Review

JAVA Programming Questions & Answers

  Write a mathematical recursive definition

Write a mathematical, recursive definition of p(n) - Prove that your answer to Part a is correct by using mathematical induction.

  Why does tomcats first servlet request take so long

Why does Tomcat's first servlet request take so long? How do I disable port 8080? I want Tomcat to run only through my Web server, not directly through Tomcat.

  Write a java program to simulate a calculator

Write a JAVA program to simulate a calculator. Your program should take two numbers and an operator (+,-,*,or/), from the user in the following format: number1 operator number2 (For example 5.6 + 7.2) and print the result.

  Description of the problems-uml diagrams

The main components that should be included in the report are brief description of the problems, the UML diagrams, and your approach to solving the problems. In the report, you should explain the data fields used, the classes, and the methods alo..

  Java application to permit user to enter ten numbers

Write down Java application which permits a user to enter 10 numbers (double precision) into the array and then sorts and displays numbers from lowest to highest.

  Creat a class that saves the grades

Creat a class that saves the grades of students in an array, and contains a few methods that do some statistics on these grades. Your task is to create this class, and create client testing class that does all the necessary tests of its methods.

  Discuss the good and the bad of javascript libraries

Discuss the good and the bad of JavaScript Libraries. In what circumstances would you use Libraries? Describe what design measures you will incorporate in your web sites to assure web site security? Provide some examples.

  An n n matrix is called a positive markov matrix

An n n matrix is called a positive Markov matrix if each element is positive and the sum of the elements in each column is 1. Write a program MarkovMatrix.java that prompts the user to enter a 33 matrix of double values. Use a method with the followi..

  Write a java class named algebra

Write a java class named Algebra that will eventually have static methods representing the relational algebra and one additional method which displays the contents of a tilde table.

  Splash page designed for an app called super foods

Splash page designed for an app called Super Foods. Attached is the skeleton app

  Write a simple application which implements the stockwatcher

Write a simple application which implements the StockWatcher interface (attached file)

  Execute complete and thorough unit test

Define, implement, and execute complete and thorough unit test on the given Java class (MyStringUtils.java).

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd