{
"cells": [
{
"cell_type": "code",
"execution_count": 1,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Populating the interactive namespace from numpy and matplotlib\n"
]
}
],
"source": [
"%pylab inline\n",
"import numpy as np\n",
"from conway99 import *\n",
"import pickle\n",
"import random"
]
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {},
"outputs": [],
"source": [
"num_samples = 50"
]
},
{
"cell_type": "code",
"execution_count": 4,
"metadata": {},
"outputs": [],
"source": [
"seed_set = pickle.load( open( \"fullsearch-31.p\", \"rb\" ) )"
]
},
{
"cell_type": "code",
"execution_count": 5,
"metadata": {},
"outputs": [],
"source": [
"reps = [seed_set[randint(0, len(seed_set))] for k in range(num_samples)]"
]
},
{
"cell_type": "code",
"execution_count": 6,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"\n",
"\n",
"****************************31****************************\n",
"2020-05-07 16:50:57.270325: Starting with 50 seeds\n",
"2020-05-07 16:51:06.898584: 1183 valid graphs from templates\n",
"2020-05-07 16:51:07.137942: Reduced to 664 representatives\n",
"\n",
"\n",
"****************************32****************************\n",
"2020-05-07 16:51:07.138946: Starting with 50 seeds\n",
"2020-05-07 16:51:18.438705: 1141 valid graphs from templates\n",
"2020-05-07 16:51:18.691070: Reduced to 1081 representatives\n",
"\n",
"\n",
"****************************33****************************\n",
"2020-05-07 16:51:18.691070: Starting with 50 seeds\n",
"2020-05-07 16:51:30.729450: 1098 valid graphs from templates\n",
"2020-05-07 16:51:30.971804: Reduced to 1064 representatives\n",
"\n",
"\n",
"****************************34****************************\n",
"2020-05-07 16:51:30.971804: Starting with 50 seeds\n",
"2020-05-07 16:51:42.236228: 797 valid graphs from templates\n",
"2020-05-07 16:51:42.442427: Reduced to 765 representatives\n",
"\n",
"\n",
"****************************35****************************\n",
"2020-05-07 16:51:42.443424: Starting with 50 seeds\n",
"2020-05-07 16:51:53.833076: 628 valid graphs from templates\n",
"2020-05-07 16:51:53.988330: Reduced to 588 representatives\n",
"\n",
"\n",
"****************************36****************************\n",
"2020-05-07 16:51:53.989322: Starting with 50 seeds\n",
"2020-05-07 16:52:04.379378: 480 valid graphs from templates\n",
"2020-05-07 16:52:04.505080: Reduced to 469 representatives\n",
"\n",
"\n",
"****************************37****************************\n",
"2020-05-07 16:52:04.506085: Starting with 50 seeds\n",
"2020-05-07 16:52:13.429119: 330 valid graphs from templates\n",
"2020-05-07 16:52:13.518075: Reduced to 316 representatives\n",
"\n",
"\n",
"****************************38****************************\n",
"2020-05-07 16:52:13.544035: Starting with 50 seeds\n",
"2020-05-07 16:52:21.370105: 16 valid graphs from templates\n",
"2020-05-07 16:52:21.377081: Reduced to 16 representatives\n",
"\n",
"\n",
"****************************39****************************\n",
"2020-05-07 16:52:21.377081: Starting with 16 seeds\n",
"2020-05-07 17:00:23.742516: 29288 valid graphs from templates\n",
"2020-05-07 17:00:32.133882: Reduced to 14841 representatives\n",
"\n",
"\n",
"****************************40****************************\n",
"2020-05-07 17:00:32.148846: Starting with 50 seeds\n",
"2020-05-07 18:30:19.660841: 211005 valid graphs from templates\n",
"2020-05-07 18:31:30.043717: Reduced to 211005 representatives\n",
"\n",
"\n",
"****************************41****************************\n",
"2020-05-07 18:31:30.190324: Starting with 50 seeds\n",
"2020-05-07 20:04:30.506772: 149193 valid graphs from templates\n",
"2020-05-07 20:05:18.520412: Reduced to 149193 representatives\n",
"\n",
"\n",
"****************************42****************************\n",
"2020-05-07 20:05:20.642838: Starting with 50 seeds\n",
"2020-05-07 21:26:42.777524: 95416 valid graphs from templates\n",
"2020-05-07 21:27:14.829513: Reduced to 95416 representatives\n",
"\n",
"\n",
"****************************43****************************\n",
"2020-05-07 21:27:15.096745: Starting with 50 seeds\n",
"2020-05-07 22:18:39.627335: 39455 valid graphs from templates\n",
"2020-05-07 22:18:54.472270: Reduced to 39453 representatives\n",
"\n",
"\n",
"****************************44****************************\n",
"2020-05-07 22:18:54.641310: Starting with 50 seeds\n",
"2020-05-07 22:55:56.989055: 16436 valid graphs from templates\n",
"2020-05-07 22:56:02.854010: Reduced to 16434 representatives\n",
"\n",
"\n",
"****************************45****************************\n",
"2020-05-07 22:56:02.919052: Starting with 50 seeds\n",
"2020-05-07 23:11:40.843164: 3959 valid graphs from templates\n",
"2020-05-07 23:11:42.305031: Reduced to 3958 representatives\n",
"\n",
"\n",
"****************************46****************************\n",
"2020-05-07 23:11:42.336507: Starting with 50 seeds\n",
"2020-05-07 23:17:05.624428: 440 valid graphs from templates\n",
"2020-05-07 23:17:05.785505: Reduced to 428 representatives\n",
"\n",
"\n",
"****************************47****************************\n",
"2020-05-07 23:17:05.794802: Starting with 50 seeds\n",
"2020-05-07 23:18:06.342869: 0 valid graphs from templates\n",
"2020-05-07 23:18:06.342869: Reduced to 0 representatives\n"
]
}
],
"source": [
"while len(reps[0]) < 99:\n",
" print('\\n\\n****************************{}****************************'.format(len(reps[0])))\n",
" sample = [reps[randint(0, len(reps) )] for k in range(min(num_samples,len(reps)))]\n",
" reps = find_valid_supergraphs_greedy(sample, verbose=False)\n",
" if len(reps) == 0:\n",
" break"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.7.3"
}
},
"nbformat": 4,
"nbformat_minor": 2
}