This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
''' | |
solving n-Queen puzzle using genetic algorithms | |
source : https://arxiv.org/ftp/arxiv/papers/1802/1802.02006.pdf | |
author: fatemeh karimi | |
''' | |
import numpy | |
from random import Random, random | |
def fitness_function(population): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <vector> | |
#include <climits> | |
#include <iomanip> | |
using namespace std; | |
int min(int a, int b); | |
int matrixChainMultiply(vector <int> dimension); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Strassen's algorithm for square matrix multiplication-page 79 of introduction | |
//to algorithms | |
//NOTE: ONLY WORKS FOR SQUARE MATRICES FOR WHICH THEIR SIZE IS A POWER OF 2. | |
#include <iostream> | |
using namespace std; | |
//function prototypes |