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

  Make a plan to deploy several visual basic.net

Your supervisor has asked you to develop a plan to deploy several Visual Basic.NET applications to users in your company. Discuss the important considerations in this effort and give a summary of the technical approach you would use to deploy thes..

  Discuss the impact the internet

How do you think the future changes of the Internet will impact the professional development of IT professionals?

  Questionconfiguring a databasethere are two parts to this

questionconfiguring a databasethere are two parts to this work. the first part is to generate a database and some

  Write down a program that includes a function picnic()

The passed floating-point number represents TOTAL amount of money to be spent on food. The function is to determine the quantity of HOTDOGS, HAMBURGERS,SALAD,PICKLES that can be purchaced, writing these values directly into the respective variable..

  Address your strategy for the given in a 2- to 3-page memo

the company offsite 2-day training session project is about ready to enter the execution phase. however management has

  Find out the winner based on observation

Write down an application that randomly "throws"two dice and displays their values. Save as TwoDice.java

  What is the best way to write down the value ''7564''

What is the best process to write the value '7564' and make it clear to the reader that the number should be interpreted as a hexadecimal value?

  Explain why is normalization essential in floating-point

use apa format to answer the following questionsq1. name five types of data that a computer can process.q2.

  Question1 decrypt the following encrypted quotation by

question1. decrypt the following encrypted quotation by shakespeare.fqjcb rwjwj vnjax bnkhj whxcq nawjvnfxdu mbvnu

  Group of data elements that describes a single entity

Which of the following data structures is a group of data elements that usually describes a single entity or event.

  Explain of how they may be used in an organization

Identification of features to be used as-is, possible modifications and additions.explain of how they may be used in an organization.

  You need to do the integer comparison

Prepare a segment of code which will read in an integer and then output the subsequent:

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