Kernel: SageMath (stable)
In [3]:
In [4]:
In [5]:
In [6]:
In [7]:
In [11]:
In [14]:
### BEGIN EXPERIMENT ###
Generating and checking 100 cliques of size 9
There are 8400 possible RED TRI to check
0 / 100 cliques scanned
10 / 100 cliques scanned
20 / 100 cliques scanned
30 / 100 cliques scanned
40 / 100 cliques scanned
50 / 100 cliques scanned
60 / 100 cliques scanned
70 / 100 cliques scanned
80 / 100 cliques scanned
90 / 100 cliques scanned
*** RESULTS ***
L: 10.5000000000000
Mean: 10.55
Var: 40.4116161616
SD: 6.35701314782
***************
### END EXPERIMENT ###
In [15]:
In [11]:
### BEGIN EXPERIMENT ###
Generating and checking 10000 cliques of size 14
There are 20020000 possible BLUE PENT to check
0 / 10000 cliques scanned
1000 / 10000 cliques scanned
2000 / 10000 cliques scanned
3000 / 10000 cliques scanned
4000 / 10000 cliques scanned
5000 / 10000 cliques scanned
6000 / 10000 cliques scanned
7000 / 10000 cliques scanned
8000 / 10000 cliques scanned
9000 / 10000 cliques scanned
*** RESULTS ***
L: 1.95507812500000
Mean: 1.9438
Var: 13.7184134013
SD: 3.70383765861
***************
### END EXPERIMENT ###
In [14]:
### BEGIN EXPERIMENT ###
Generating and checking 10000 cliques of size 14
There are 20020000 possible BLUE PENT to check
0 / 10000 cliques scanned
---------------------------------------------------------------------------
KeyboardInterrupt Traceback (most recent call last)
<ipython-input-14-4ca99ac95f62> in <module>()
1 experiments = [[Integer(10000), Integer(14), PENT, BLUE]]
----> 2 [run_experiment(*args) for args in experiments]
<ipython-input-8-82ada7006739> in run_experiment(num_trials, num_vertices, shape_to_look_for, color_to_look_for)
10 if j%(num_trials/Integer(10)) == Integer(0):
11 print j,'/',num_trials, "cliques scanned"
---> 12 count = count_freq_of_shape_of_color(num_vertices, shape_to_look_for, color_to_look_for, gen_random_coloring(num_vertices))
13 if count in results_dist:
14 results_dist[count] += Integer(1)
<ipython-input-5-478b4677255c> in count_freq_of_shape_of_color(nsize, num_vertices, color, coloring)
5 for a_polygon in itertools.combinations(xrange(nsize), num_vertices):
6 coloring_index = sum([coloring[an_edge] for an_edge in itertools.combinations(a_polygon, Integer(2))])
----> 7 if coloring_index == binomial(num_vertices, Integer(2)) and color == RED:
8 shape_count = shape_count + Integer(1)
9 elif coloring_index == Integer(0) and color == BLUE:
/ext/sage/sage-8.1/src/sage/symbolic/function.pyx in sage.symbolic.function.BuiltinFunction.__call__ (build/cythonized/sage/symbolic/function.cpp:11602)()
992 res = self._evalf_try_(*args)
993 if res is None:
--> 994 res = super(BuiltinFunction, self).__call__(
995 *args, coerce=coerce, hold=hold)
996
/ext/sage/sage-8.1/src/sage/symbolic/function.pyx in sage.symbolic.function.Function.__call__ (build/cythonized/sage/symbolic/function.cpp:6696)()
489 (<Expression>args[0])._gobj, hold)
490 elif self._nargs == 2:
--> 491 res = g_function_eval2(self._serial, (<Expression>args[0])._gobj,
492 (<Expression>args[1])._gobj, hold)
493 elif self._nargs == 3:
/ext/sage/sage-8.1/src/sage/symbolic/function.pyx in sage.symbolic.function.BuiltinFunction._evalf_or_eval_ (build/cythonized/sage/symbolic/function.cpp:12951)()
1081 res = self._evalf_try_(*args)
1082 if res is None:
-> 1083 return self._eval0_(*args)
1084 else:
1085 return res
/ext/sage/sage-8.1/local/lib/python2.7/site-packages/sage/functions/other.pyc in _eval_(self, n, k)
1688 return prod(n - i for i in range(k)) / factorial(k)
1689
-> 1690 def _eval_(self, n, k):
1691 """
1692 EXAMPLES::
src/cysignals/signals.pyx in cysignals.signals.python_check_interrupt()
src/cysignals/signals.pyx in cysignals.signals.sig_raise_exception()
KeyboardInterrupt:
In [0]: