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

  Recursive factorial program

Write a class Array that encapsulates an array and provides bounds-checked access. Create a recursive factorial program that prompts the user for an integer N and writes out a series of equations representing the calculation of N!.

  Hunt the wumpus game

Reprot on Hunt the Wumpus Game has Source Code listing, screen captures and UML design here and also, may include Javadoc source here.

  Create a gui interface

Create GUI Interface in java programing with these function: Sort by last name and print all employees info, Sort by job title and print all employees info, Sort by weekly salary and print all employees info, search by job title and print that emp..

  Plot pois on a graph

Write a JAVA program that would get the locations of all the POIs from the file and plot them on a map.

  Write a university grading system in java

University grading system maintains number of tables to store, retrieve and manipulate student marks. Write a JAVA program that would simulate a number of cars.

  Wolves and sheep: design a game

This project is designed a game in java. you choose whether you'd like to write a wolf or a sheep agent. Then, you are assigned to either a "sheep" or a "wolf" team.

  Build a graphical user interface for displaying the image

Build a graphical user interface for displaying the image groups (= cluster) in JMJRST. Design and implement using a Swing interface.

  Determine the day of the week for new year''s day

This assignment contains a java project. Project evaluates the day of the week for New Year's Day.

  Write a java windowed application

Write a Java windowed application to do online quiz on general knowledge and the application also displays the quiz result.

  Input pairs of natural numbers

Java program to input pairs of natural numbers.

  Create classes implement java interface

Interface that contains a generic type. Create two classes that implement this interface.

  Java class, array, link list , generic class

These 14 questions covers java class, Array, link list , generic class.

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