Find Jobs
Hire Freelancers

digraph

$30-5000 USD

Completed
Posted over 22 years ago

$30-5000 USD

Paid on delivery
Define a class for finite digraphs. The class should be called Digraph. It should represent a directed graph with n vertices, and various edges between them. One possible representation is an nxn matrix A where A(i,j) is 1 if there is an edge from i to j, and zero otherwise. For strategic reasons, the domain of A(i,j) could be a byte rather than a boolean. Array values should be non-negative. The vertices can be 'labeled' 0,1,2,...,n-1. Initialization can be via a set of ordered pairs where each pair represents an edge. These pairs can reside in a file, and the first element of the file might be n. Constructors: Digraph(filename fn, size n) Digraph(size n) Mutator method to set a digraph: void setGraph(filename fn) application methods: 1. inDegree(vertex_index v) 2. outDegree(vertex_index v) 3. boolean edgeFrom(v1,v2) returns true if there is an edge from v1 to v2 4. paths(length n) returns a Digraph B such that B(v1,v2) is > 0 iff there is a path from v1 to v2 of length precisely n. 5. pathFrom(v1, v2) returns true if there is SOME path from v1 to v2; alternatively a shortest path could be returned, or the length of a shortest path could be returned 6. a reasonable public void toString() 7. a reasonable public boolean equals(Digraph d) ## Deliverables Complete and fully-functional working program(s) in executable form as well as complete source code of all work done. ## Deadline information deadline is tuesday or wednesday
Project ID: 2829256

About the project

4 proposals
Remote project
Active 22 yrs ago

Looking to make some money?

Benefits of bidding on Freelancer

Set your budget and timeframe
Get paid for your work
Outline your proposal
It's free to sign up and bid on jobs
Awarded to:
User Avatar
See private message.
$42.50 USD in 14 days
5.0 (7 reviews)
3.4
3.4
4 freelancers are bidding on average $45 USD for this job
User Avatar
See private message.
$34 USD in 14 days
5.0 (38 reviews)
4.1
4.1
User Avatar
See private message.
$42.50 USD in 14 days
0.0 (0 reviews)
0.0
0.0
User Avatar
See private message.
$59.50 USD in 14 days
0.0 (0 reviews)
0.0
0.0

About the client

Flag of UNITED STATES
United States
5.0
5
Member since Jan 1, 2003

Client Verification

Thanks! We’ve emailed you a link to claim your free credit.
Something went wrong while sending your email. Please try again.
Registered Users Total Jobs Posted
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Loading preview
Permission granted for Geolocation.
Your login session has expired and you have been logged out. Please log in again.