Trusted by Students Everywhere
Why Choose Us?
0% AI Guarantee

Human-written only.

24/7 Support

Anytime, anywhere.

Plagiarism Free

100% Original.

Expert Tutors

Masters & PhDs.

100% Confidential

Your privacy matters.

On-Time Delivery

Never miss a deadline.

directed weighted graph implementation  CME2201 ASSIGNMENT-2 In this assignment, you are expected to perform transactions related to the inter-branch package distribution of a cargo company

Computer Science Jan 16, 2021

directed weighted graph implementation 

CME2201 ASSIGNMENT-2

In this assignment, you are expected to perform transactions related to the inter-branch package distribution of a cargo company.

Scenario

Suppose that nodes, in the graph given in Figure 1, represent branches of a cargo company and weighted edges represent the maximum number of packages that can be sent through the direction at a particular time. What is the maximum number of packages that can be sent from the branch A to the branch C in a day? At beginning of the day, the branch A can deliver maximum 18 packages as the sum of outgoing edge weights (9+2+7). In the next step, branches B, D, and G should transmit the packages they have received. The branch B can send 4 packages to E, 2 packages to D, while the rest 3 packages will be omitted, since there is not enough capacity on the outgoing edges of B. This process will continue until the destination branch C receives all

 

               Figure 1: A sample package transmission graph for a cargo company.

               

What is expected from your code?

You are given a ‘graph.txt’ file which contains a directed graph in the edge-list format. This file contains three columns as ‘source node’, ‘destination node’ and ‘edge-weight in between’ as tab delimited. You are expected to create a directed graph whose directions are constructed from ‘source’ to ‘destination’ with the given ‘edge-weight’ value.

Then, your program must ask the user for a source and a destination name. You code will run to find maximum number of packages can be transferred from source to destination branches provided by the user.

Main Tasks:

  1. What is the maximum number of packages that can be transferred from source to destination in one day?
  2. Which edges’ capacity should be increased at first to increase the number of received packages at the destination branch?
  3. How much should we maximize these edges found in the task 2?

Rules:

You are not allowed to use built-in Java libraries in the creation of the graph and in implementation of main tasks. You can use only arraylist and hash-map data structure in Java libraries if needed. 

If you get a code from the internet and update it, please state the site you received in the comment line at the beginning of the received code. 

Due date

January 18, 2021, 23:55

Submission

You must upload your all ‘.java’ files as an archive file (.zip or .rar) to the Sakai platform. Your archived file should be named as ‘studentnumber_name_surname.rar.zip’, e.g., 2007510011_Ali_Y?lmaz.rar.

Incorrect naming will cause you get a lower score!

Prepare and upload a report only if your code is not completed. Explain the parts of your code that don't run (or missing parts) and why it doesn't run. Don’t forget to add your references.

Plagiarism Control

The submissions will be checked for code similarity. Highly similar assignments will be graded as zero, and they will be announced in the Sakai.

Grading Policy

Tasks

Points (out of 100)

1

35

2

35

3

30

 

Expert Solution

For detailed step-by-step solution, place custom order now.
Archived Solution
Unlocked Solution

You have full access to this solution. To save a copy with all formatting and attachments, use the button below.

Already a member? Sign In
Important Note: This solution is from our archive and has been purchased by others. Submitting it as-is may trigger plagiarism detection. Use it for reference only.

For ready-to-submit work, please order a fresh solution below.

Or get 100% fresh solution
Get Custom Quote
Secure Payment