Skip to content

farbodfld/Genetic-and-Simiulated

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Genetic-and-Simiulated

This project is done by CNF algorithms

In this project, the goal is to solve a logical expression in CNF form. In fact, 429 statements are given, all of which must be correct. These logical expressions must be defined in the form of 100 variables that take the value of zero and one. Each entry contains 100 zeros and ones. At first, we read the logical expression and save it as a presentation. The array is two dimensional and has 429 members and each member is three.

The program works by receiving an input: 1 -> genetics 2 -> simulated Enter your choice: We enter the number 1 or 2 and then the corresponding algorithms are executed. If a wrong input is given to the program, the following statement will be displayed: Please enter 1 or 2

The two functions that are used in both common algorithms are: init_state() and count_incorrect_caluses()

The first function is used to create a random input. For example, it creates an array of 100. The second function checks how many of the 429 statements with one input are not correct. The solution is calculated as the difference between 429 and the number reported by this function.

Full description is available at the Report file.

About

This project is done by CNF algorithms

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages