From 49a190d38d5abcda25d3259153ac44acbd663fc8 Mon Sep 17 00:00:00 2001 From: Gregory Campbell Date: Wed, 7 Jul 2021 21:55:35 -0400 Subject: [PATCH] Create README.md --- README.md | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..7cc9dcc --- /dev/null +++ b/README.md @@ -0,0 +1,32 @@ +# euler-checking-algorithm +C algorithm that checks if a given graph is Eulerian or not + +### Euler Checking Algorithm + +This C algorithm takes the text file `euler-graphs.txt` and runs through the input to determine if its contents contain a Euler graph. +The algorithm checks the initial line of a graph to determine the length of the graph and uses that information to know how many +lines it must go through to gather all the info of the graph. +It will repeat this process until it reaches EOF. + +Here's an example of graph output (taken from `euler-graphs.txt`): + +``` +7 +0 1 1 1 1 1 1 +1 0 1 1 1 1 1 +1 1 0 1 1 1 1 +1 1 1 0 1 1 1 +1 1 1 1 0 1 1 +1 1 1 1 1 0 1 +1 1 1 1 1 1 0 +``` + +### Setup + +Run `make` to generate an executable + +which can be executed by running `./EulerCycle` + +### Euler Checks + +The textfile `euler-graphs.txt` can be modified to check different graphs or the code itself can be modified to use a different text file.