Write a program to count the number of non-isomorphic

Assignment Help Computer Engineering
Reference no: EM13909990

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

Reference no: EM13909990

Questions Cloud

Calculate your break-even point in monthly sales : Calculate your break-even point in monthly sales and Determine your monthly sales needed to have a contribution margin of $10,000
Analysis of communication breakdowns : Write a one-page analysis of communication breakdowns by applying "The Communication Process Model". Try and diagnose precisely where in the model a few of the breakdowns occurred
Find a point estimate of percent confidence interval for p : Find a point estimate of and a 95 percent confidence interval for p, the proportion of all first-year defaults that are approved on the basis of falsified applications.
What is the ytm on these bonds : Company considering bonds for sale that have a $1000 par value and will mature in 16 years. The coupon rate on the bonds is 5% paid annually and are currently selling for $987 each. The bonds are called protected for the next 4 years and after thi..
Write a program to count the number of non-isomorphic : 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.
Find a confidence interval for the proportion of adults : Find a 95 percent confidence interval for the proportion of all U.S. adults who would say they take part in some form of daily activity to keep physically fit.
What is the npv of the investment : It will be sold for 25,000 at the end of 5 years. Add'l inventory of 11,000 will be required for parts and maintenance of new machine. The company evaluates all projects at this risk level using an 11.99% required rate return. Tax rate is expected..
Calculate a point estimate of percent confidence interval : Find a point estimate of and a 95 percent confidence interval for the proportion of all U.S. television ads that use humor.
Calculate a confidence interval for proportion of business : Assuming that the sample is randomly selected, calculate a 99 percent confidence interval for the proportion of all Scottish business customers who give their banks a high rating for overall satisfaction.

Reviews

Write a Review

Computer Engineering Questions & Answers

  Convert from hexadecimal form to binary form

Convert from hexadecimal form (base 16) to binary form (base 2): 7A base 16 - 1111010 base 2 I used the table to work out (7 x 16^1) + (10 x 16^0) =  7 base 16= 7 base 10 = 111 base 2 A base 16 = 1010 base 2

  You are a private computer consultant and a new client has

you are a private computer consultant and a new client has approached you about upgrading his small business network.

  Identify five deficiency in queensland health payroll system

Identify 5 deficiencies in the Queensland Health Payroll System project, and provide recommendations on how these deficiencies may be overcome in future projects.

  What circumstances will you use flash over an html editor

Flash is a popular tool to enhance site interactivity. I require recommendations for how to integrate Flash into a website effectively. Under what circumstances would you use Flash over an HTML editor?

  How to use hexadecimal or octal nowadays

What kinds of data formats are there? Why are there so many? Can you tell from looking at a string of bits exactly what the data represents?

  Write a program called a2p1 to run in the lc-3 simulator

Write a program called A2P1 to run in the LC-3 simulator. The program asks for the user to type in his or her UPI. Then the program asks for the age of the user and prints the UPI out that many times.

  How to design a class and a program

create a class and a program that creates an object of the class and prompts the user to enter the name, type, and age of his or her pet. This data should be stored in the object. Use the object's accessor method to retrieve the pet's name, type, ..

  Discuss the process of producing the web site

A definition of the sort of users that would be expected to access the site. This should incorporate a description of any special provision needing to be made to make the site usable for disabled users (if that is appropriate).

  Describing the ttl

Support that a security-aware caching resolver accepts a DNS RRset at time t0 with signatures on it which will expire at time t1 (where t0

  How to construct an idef1x entity-relationships diagram

The Metropolitan Housing Agency (MHA) is a non-profit organization that advocates development and improvement of low-income housing. The MHA operates in a metropolitan area of approximately 2.2 million people in a midwestern city.

  Analyze the four main browsers firefox ie safari chrome and

question 1. examine the four major browsers firefox ie safari chrome and discuss their dominance through an evaluation

  Breach of security

A company has the resource XYZ. If there exist a breach of security, company may face a fine of $100,000 and pay other $20,000 in order to clean up the breach.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd