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

  Mathematics in computing

Binary search tree, and postorder and preorder traversal Determine the shortest path in Graph

  Ict governance

ICT is defined as the term of Information and communication technologies, it is diverse set of technical tools and resources used by the government agencies to communicate and produce, circulate, store, and manage all information.

  Implementation of memory management

Assignment covers the following eight topics and explore the implementation of memory management, processes and threads.

  Realize business and organizational data storage

Realize business and organizational data storage and fast access times are much more important than they have ever been. Compare and contrast magnetic tapes, magnetic disks, optical discs

  What is the protocol overhead

What are the advantages of using a compiled language over an interpreted one? Under what circumstances would you select to use an interpreted language?

  Implementation of memory management

Paper describes about memory management. How memory is used in executing programs and its critical support for applications.

  Define open and closed loop control systems

Define open and closed loop cotrol systems.Explain difference between time varying and time invariant control system wth suitable example.

  Prepare a proposal to deploy windows server

Prepare a proposal to deploy Windows Server onto an existing network based on the provided scenario.

  Security policy document project

Analyze security requirements and develop a security policy

  Write a procedure that produces independent stack objects

Write a procedure (make-stack) that produces independent stack objects, using a message-passing style, e.g.

  Define a suitable functional unit

Define a suitable functional unit for a comparative study between two different types of paint.

  Calculate yield to maturity and bond prices

Calculate yield to maturity (YTM) and bond prices

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