+1-415-670-9189
info@expertsmind.com
Write a program to count the number of non-isomorphic
Course:- Computer Engineering
Reference No.:- EM13909990




Assignment Help
Expertsmind Rated 4.9 / 5 based on 47215 reviews.
Review Site
Assignment Help >> Computer Engineering

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




Put your comment
 
Minimize


Ask Question & Get Answers from Experts
Browse some more (Computer Engineering) Materials
make a data structure that holds a persons address. think about the different data elements of an an address and model them in a C data structure. One element that I am havi
Go to www.cs.vu.nl/ ast and click on covered writing link. Follow the instructions to extract the plays. Answer the following questions: (a) What are the sizes of the ori
You ran Wireshark during one of the logins to the site and got the following capture, webadmin.pcap.  Download the pcap file in Kali and open it in Wireshark. Use the infor
Should the data administrator really be on the similar level as the DBA (database administrator), usually somewhat low in the corporate hierarchy or should this person have
Write another Java application that accepts a user's password from the keyboard. When the entered password is less than six characters, more than 10 characters, or does not
Develop an algorithm in order to prepare a job applicant report. Input consists of a series of records that contain the Social Security number or equivalent, last name, firs
Write down a program that inserts 25 random integers from 0 to 100 in order into a linked-line object. The problem must calculate the sum of the elements and the floating-po
What is system hardening? Explain the relationship between system hardening and the removal or mitigation of vulnerabilities - What resources are available on the Internet to