Skip to content

Commit

Permalink
Documentation complete
Browse files Browse the repository at this point in the history
  • Loading branch information
frankvegadelgado committed Jan 27, 2025
1 parent 64fa442 commit 45dd201
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 13 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -151,8 +151,8 @@ This will output:
```
usage: cover [-h] -i INPUTFILE [-a] [-b] [-c] [-v] [-l] [--version]
Approximating the Minimum Vertex Cover within a factor of less than sqrt(2) for an undirected graph represented by a Boolean
adjacency matrix in a file.
Estimating the Minimum Vertex Cover with an approximation factor smaller than √2 for an undirected graph encoded as a
Boolean adjacency matrix stored in a file.
options:
-h, --help show this help message and exit
Expand Down Expand Up @@ -209,7 +209,7 @@ It generates random square matrices with configurable dimensions (`-d`), sparsit
# Complexity

```diff
+ We present a polynomial-time algorithm achieving an approximation ratio below sqrt(2) for the minimum vertex cover, providing strong evidence that P = NP by efficiently solving a computationally hard problem with near-optimal solutions.
+ We present a polynomial-time algorithm achieving an approximation ratio below √2 for the minimum vertex cover, providing strong evidence that P = NP by efficiently solving a computationally hard problem with near-optimal solutions.

+ This result contradicts the Unique Games Conjecture, which predicts such improvements are impossible, thereby undermining UGC and reshaping our understanding of hardness of approximation.

Expand Down
2 changes: 1 addition & 1 deletion capablanca/algorithm.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

def find_vertex_cover(adjacency_matrix):
"""
Calculates an approximate vertex cover in polynomial time with an approximation ratio of less than sqrt(2).
Calculates an approximate vertex cover in polynomial time with an approximation ratio of less than the square root of 2.
Args:
adjacency_matrix: A SciPy sparse adjacency matrix.
Expand Down
6 changes: 3 additions & 3 deletions capablanca/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
def main():

# Define the parameters
helper = argparse.ArgumentParser(prog="cover", description='Approximating the Minimum Vertex Cover within a factor of less than sqrt(2) for an undirected graph represented by a Boolean adjacency matrix in a file.')
helper = argparse.ArgumentParser(prog="cover", description='Estimating the Minimum Vertex Cover with an approximation factor smaller than √2 for an undirected graph encoded as a Boolean adjacency matrix stored in a file.')
helper.add_argument('-i', '--inputFile', type=str, help='input file path', required=True)
helper.add_argument('-a', '--approximation', action='store_true', help='enable comparison with a polynomial-time approximation approach within a factor of 2')
helper.add_argument('-b', '--bruteForce', action='store_true', help='enable comparison with the exponential-time brute-force approach')
Expand All @@ -38,12 +38,12 @@ def main():
filename = utils.get_file_name(filepath)
logger.info(f"Parsing the Input File done in: {(time.time() - started) * 1000.0} milliseconds")

logger.info("An Approximate Solution with an approximation ratio of less than sqrt(2) started")
logger.info("An Approximate Solution with an approximation ratio of less than √2 started")
started = time.time()

result = algorithm.find_vertex_cover(sparse_matrix)

logger.info(f"An Approximate Solution with an approximation ratio of less than sqrt(2) done in: {(time.time() - started) * 1000.0} milliseconds")
logger.info(f"An Approximate Solution with an approximation ratio of less than √2 done in: {(time.time() - started) * 1000.0} milliseconds")

answer = utils.string_result_format(result, count)
output = f"{filename}: {answer}"
Expand Down
4 changes: 2 additions & 2 deletions capablanca/test.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,12 +60,12 @@ def main():
logger.info(f"Number of non-zero elements: {sparse_matrix.nnz}")
logger.info(f"Sparsity: {1 - (sparse_matrix.nnz / (sparse_matrix.shape[0] * sparse_matrix.shape[1]))}")

logger.info("An Approximate Solution with an approximation ratio of less than sqrt(2) started")
logger.info("An Approximate Solution with an approximation ratio of less than √2 started")
started = time.time()

result = algorithm.find_vertex_cover(sparse_matrix)

logger.info(f"An Approximate Solution with an approximation ratio of less than sqrt(2) done in: {(time.time() - started) * 1000.0} milliseconds")
logger.info(f"An Approximate Solution with an approximation ratio of less than √2 done in: {(time.time() - started) * 1000.0} milliseconds")

answer = utils.string_result_format(result, count)
output = f"Algorithm Smart Test {i + 1}: {answer}"
Expand Down
6 changes: 3 additions & 3 deletions docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -280,8 +280,8 @@ <h1>Command Options</h1>
<p>This will output:</p>
<pre><code>usage: cover [-h] -i INPUTFILE [-a] [-b] [-c] [-v] [-l] [--version]

Approximating the Minimum Vertex Cover within a factor of less than sqrt(2) for an undirected graph represented by a Boolean
adjacency matrix in a file.
Estimating the Minimum Vertex Cover with an approximation factor smaller than √2 for an undirected graph encoded as a
Boolean adjacency matrix stored in a file.

options:
-h, --help show this help message and exit
Expand Down Expand Up @@ -344,7 +344,7 @@ <h1>Code</h1>
</ul>
<hr />
<h1>Complexity</h1>
<pre><code class="language-diff">+ We present a polynomial-time algorithm achieving an approximation ratio below sqrt(2) for the minimum vertex cover, providing strong evidence that P = NP by efficiently solving a computationally hard problem with near-optimal solutions.
<pre><code class="language-diff">+ We present a polynomial-time algorithm achieving an approximation ratio below √2 for the minimum vertex cover, providing strong evidence that P = NP by efficiently solving a computationally hard problem with near-optimal solutions.

+ This result contradicts the Unique Games Conjecture, which predicts such improvements are impossible, thereby undermining UGC and reshaping our understanding of hardness of approximation.

Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
setuptools.setup(
name=NAME,
version=VERSION,
description="Approximating the Minimum Vertex Cover within a factor of less than sqrt(2) for an undirected graph represented by a Boolean adjacency matrix in a file.",
description="Estimating the Minimum Vertex Cover with an approximation factor smaller than √2 for an undirected graph encoded as a Boolean adjacency matrix stored in a file.",
url="https://github.com/frankvegadelgado/capablanca",
project_urls={
"Source Code": "https://github.com/frankvegadelgado/capablanca",
Expand Down

0 comments on commit 45dd201

Please sign in to comment.