Fill This Form To Receive Instant Help

Help in Homework
trustpilot ratings
google ratings


Homework answers / question archive / 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

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

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

 

Option 1

Low Cost Option
Download this past answer in few clicks

50 USD

PURCHASE SOLUTION

Already member?


Option 2

Custom new solution created by our subject matter experts

GET A QUOTE