Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask Computer Engineering Expert

You will write a program to count the number of non-isomorphic simple un-weighted directed graphs with a given number of vertices. The number of vertices will be specified at run time. A simple unweighted directed graph is a directed graph, without edge weights, such that there is never an edge from a vertex to itself. The program must be in the C language.

Pseudocode Your code will perform the following steps:

1. Let N be the number of vertices for the graphs - this is read from the command line.

2. Implement a data structure Graph that can hold a simple unweighted directed graph

3. Initialize GraphList to an empty list of Graph objects. A singly linked list will work.

4. Initialize a counter to zero.

5. Compute all the permutations of N, once, and store them in an array

6. Use the Odometer algorithm to enumerate all vertex-labeled simple unweighted directed graphs.

7. For each of these graphs, G:

(a) Use the list of permutations of N to check whether G is isomorphic to any graph in GraphList

(b) If G is isomorphic to any graph inGraphList, move on to the next graph.

(c) Otherwise add G to GraphList and increment the counter.

8. Print the final value of the counter to stdout

Invoking your program I will invoke your program in the following fashion. Assume that the executable is named program4.out.

program4.out N

N is the number of vertices of the graph. Your program will count the number of simple unweighted directed graphs with this number of vertices.

Evaluation I will evaluate your code by compiling and running it, and by also reading it. To receive full credit, your program must meet these criteria:

1. The program compiles cleanly, with no warnings or errors.

2. The program implements appropriate data structures

3. The program implements the pseudocode above correctly

4. The program does not need to be extremely optimized, but it is implemented in a reasonably efficient manner, as discussed in class.

5. The output is sent to stdout. The output clear and readable, but it does not need to match my output exactly.

6. The code itself follows good coding practices and is well commented without being over-commented. You can use the command cloc --by-file *.c to count the number of lines of code and number of lines of comments in your files.

When you use an internet reference, include a comment in the appropriate part of your code that gives the source

Attachment:- Assignment.rar

Computer Engineering, Engineering

  • Category:- Computer Engineering
  • Reference No.:- M91582924
  • Price:- $160

Guranteed 48 Hours Delivery, In Price:- $160

Have any Question?


Related Questions in Computer Engineering

Aaninformationretrievalsystemhasacertainpairofaverageprecisi

(a) An information retrieval system has a certain pair of average precision and recall values when the system returns 10 documents in response queries. Would the precision and recall rate remain unchanged if the system w ...

1 write a critique review of the following paper2 your

1. Write a critique / review of the following paper. 2. Your critique should be as objective as possible: highlight what you consider to be its strongest and weakest aspects. Are themes discernible that would help one to ...

A compute the sumnbsps1nbsp 1 2 3 nbsp nbsp 9999 the sum

(a) Compute the sum S1 = 1 + 2 + 3 + . . . + 9999 (the sum of all integers from 1 to 9999). Do not use a program. (b) Compute the sum S2 = 1+3+5+...+9999 (the sum of all odd integers from 1 to 9999). Do not use a program ...

Question suppose you are in the process of drawing the dfds

Question : Suppose you are in the process of drawing the DFDs, and you have found that one of your Level 1 DFD describing a process in level 0, has more than 8 sub-processes. What does that indicate? And How do you fix i ...

How does understanding various microsoft office

How does understanding various Microsoft Office applications enhance productivity in education, the workplace, and at home?

Wat are three 3 major categories of cyber terrorism and

What are three (3) major categories of cyber terrorism and / or information warfare. Among the chosen categories, determine the one (1) that should be the top priority for the federal government to address.

Two contract offers are made to you the first contract

Two contract offers are made to you. The first contract offers $10,000 at the end of each year for the next five years and then $20,000 per year for the following 10 years. The second offer pays 10 payments, starting wit ...

When using todays digital cameras file sizes are often

When using today's digital cameras file sizes are often saved in a format that is well over 1 Megabyte. This may be great for high definition photo reproductions but is a disaster for uploading to the web. Images on your ...

Question two paragraphs eachseparate responds1 uml and omg

Question: TWO PARAGRAPHS EACH SEPARATE RESPONDS 1. "UML and OMG" Please respond to the following: Identify the benefits that UML brings to the software development industry. Speculate UML's development and its future inf ...

Compare remote authentication dial-in user service radius

Compare Remote Authentication Dial-In User Service (RADIUS) and Terminal Access Controller Access-Control System Plus (TACACS+).

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As