Last active
October 16, 2017 13:30
-
-
Save naterush/d867fe35ecb63c42e6c1f053e2ff33a8 to your computer and use it in GitHub Desktop.
Reasoning behind the safety oracle that uses Turan's Theorem. Can be found here: https://en.wikipedia.org/wiki/Tur%C3%A1n%27s_theorem
This file contains 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
Turán's Theorem: Let G be any graph with n vertices, such that G is K_{r+1}-free - that is, it has no clique of size r+1 or greater. Then the number of edges in G is at most: | |
(r-1) / r * n^2 / 2 | |
Let us say that we have e edges in our graph, and solve for r | |
e = (r-1) / r * n^2 / 2 | |
er = (r-1) * n^2 / 2 | |
er = rn^2 / 2- n^2 / 2 | |
er - rn^2 / 2= - n^2 / 2 | |
r (e - n^2/2) = - n^2 / 2 | |
r (n^2/2 - e) = n^2 / 2 | |
r = n^2 / (2(n^2/2 - e)) | |
r = n^2 / (n^2 - 2e) | |
Thus, we can say that in a graph w/ n nodes and e edges, there is at least a clique of size ceiling(n^2 / (n^2 - 2e)). |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Throw in an extra set of parenthesis for the eyes
e = [(r-1) / r] * [n^2 / 2]