alonso 0.0.4__py3-none-any.whl → 0.0.6__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
alonso/algorithm.py CHANGED
@@ -12,7 +12,7 @@ from . import merge
12
12
 
13
13
  def find_vertex_cover(graph):
14
14
  """
15
- Compute an approximate minimum vertex cover set for an undirected graph by transforming it into a chordal graph.
15
+ Compute an approximate minimum vertex cover set for an undirected graph.
16
16
 
17
17
  Args:
18
18
  graph (nx.Graph): A NetworkX Graph object representing the input graph.
alonso/app.py CHANGED
@@ -82,7 +82,7 @@ def main():
82
82
  helper.add_argument('-c', '--count', action='store_true', help='calculate the size of the vertex cover')
83
83
  helper.add_argument('-v', '--verbose', action='store_true', help='anable verbose output')
84
84
  helper.add_argument('-l', '--log', action='store_true', help='enable file logging')
85
- helper.add_argument('--version', action='version', version='%(prog)s 0.0.4')
85
+ helper.add_argument('--version', action='version', version='%(prog)s 0.0.6')
86
86
 
87
87
  # Initialize the parameters
88
88
  args = helper.parse_args()
alonso/batch.py CHANGED
@@ -36,7 +36,7 @@ def main():
36
36
  helper.add_argument('-c', '--count', action='store_true', help='calculate the size of the vertex cover')
37
37
  helper.add_argument('-v', '--verbose', action='store_true', help='anable verbose output')
38
38
  helper.add_argument('-l', '--log', action='store_true', help='enable file logging')
39
- helper.add_argument('--version', action='version', version='%(prog)s 0.0.4')
39
+ helper.add_argument('--version', action='version', version='%(prog)s 0.0.6')
40
40
 
41
41
 
42
42
  # Initialize the parameters
alonso/test.py CHANGED
@@ -34,7 +34,7 @@ def main():
34
34
  helper.add_argument('-w', '--write', action='store_true', help='write the generated random matrix to a file in the current directory')
35
35
  helper.add_argument('-v', '--verbose', action='store_true', help='anable verbose output')
36
36
  helper.add_argument('-l', '--log', action='store_true', help='enable file logging')
37
- helper.add_argument('--version', action='version', version='%(prog)s 0.0.4')
37
+ helper.add_argument('--version', action='version', version='%(prog)s 0.0.6')
38
38
 
39
39
  # Initialize the parameters
40
40
  args = helper.parse_args()
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: alonso
3
- Version: 0.0.4
3
+ Version: 0.0.6
4
4
  Summary: Compute an Approximate Vertex Cover for undirected graph encoded in DIMACS format.
5
5
  Home-page: https://github.com/frankvegadelgado/alonso
6
6
  Author: Frank Vega
@@ -22,7 +22,7 @@ Classifier: Natural Language :: English
22
22
  Requires-Python: >=3.10
23
23
  Description-Content-Type: text/markdown
24
24
  License-File: LICENSE
25
- Requires-Dist: mendive>=0.0.4
25
+ Requires-Dist: mendive>=0.0.5
26
26
  Dynamic: author
27
27
  Dynamic: author-email
28
28
  Dynamic: classifier
@@ -69,7 +69,7 @@ Given an undirected graph $G = (V, E)$, a **vertex cover** is a subset $V' \subs
69
69
 
70
70
  # Overview of the Algorithm and Its Running Time
71
71
 
72
- The `find_vertex_cover` algorithm approximates a minimum vertex cover for an undirected graph $G = (V, E)$ by partitioning its edges into two claw-free subgraphs using the Burr-Erdős-Lovász (1976) method, computing exact vertex covers for these subgraphs with the Faenza, Oriolo, and Stauffer (2011) approach, and recursively refining the solution on residual edges. This process prevents the ratio from reaching 2, leveraging overlap between subgraphs and minimal additions in recursion. The algorithm begins by cleaning the graph (removing self-loops and isolates in $\mathcal{O}(n + m)$), partitions edges in $\mathcal{O}(m \cdot (m \cdot \Delta \cdot C + C^2))$ where $\Delta$ is the maximum degree and $C$ is the number of claws, computes vertex covers in $\mathcal{O}(n^3)$ per subgraph (total $\mathcal{O}(n^3)$), merges covers in $\mathcal{O}(n)$, and constructs the residual graph in $\mathcal{O}(m)$. The recursive nature, with a worst-case depth of $\mathcal{O}(m)$ if each step covers one edge, yields a total runtime of $\mathcal{O}(n^3 m)$, dominated by the cubic cost across levels. For sparse graphs ($m = \mathcal{O}(n)$), this simplifies to $\mathcal{O}(n^4)$.
72
+ The `find_vertex_cover` algorithm approximates a minimum vertex cover for an undirected graph $G = (V, E)$ by partitioning its edges into two claw-free subgraphs using the Burr-Erdős-Lovász (1976) method, computing exact vertex covers for these subgraphs with the Faenza, Oriolo, and Stauffer (2011) approach, and recursively refining the solution on residual edges. This process prevents the ratio from reaching 2, leveraging overlap between subgraphs and minimal additions in recursion. The algorithm begins by cleaning the graph (removing self-loops and isolates in $O(n + m)$), checking for claw-free in $O(m \cdot \Delta)$, partitions edges in $O(m \cdot (m \cdot \Delta \cdot C + C^2))$ where $\Delta$ is the maximum degree and $C$ is the number of claws, computes vertex covers in $O(n^3)$ per subgraph (total $O(n^3)$), merges covers in $O(n \cdot \log n)$, and constructs the residual graph in $O(m)$. The recursive nature, with a worst-case depth of $O(m)$ if each step covers one edge, yields a total runtime of $O(n^3 m)$, dominated by the cubic cost across levels. For sparse graphs ($m = O(n)$), this simplifies to $O(n^4)$.
73
73
 
74
74
  ---
75
75
 
@@ -0,0 +1,17 @@
1
+ alonso/__init__.py,sha256=xFbWJ7kskxYZCWD3QWtJ6d9uGnDlqhJyFJDCVuqG7hE,207
2
+ alonso/algorithm.py,sha256=slBEkeqt63ta813Oo1jU5LnMzO86CC6IIQJQWNenoao,5187
3
+ alonso/app.py,sha256=GMnGGLIDnSTWjUzY3oJW3GaHIh7WWy0tKRKPHr-wXZ8,4320
4
+ alonso/applogger.py,sha256=fQBo51-TboX1DBqfSxX2P2eKJ5CcyiCq_IVlJTHjxAE,2624
5
+ alonso/batch.py,sha256=jgIr1CMTIK05XycO9xFA_X_WWHoVx9LZjpSgpI1ce78,2305
6
+ alonso/merge.py,sha256=dWhF9t_2bFp4HT1NCzjhrSlhm8CkJQ4pwBHOhHSkezQ,4257
7
+ alonso/parser.py,sha256=Ib4TnWdkQb6A6FA3HHEjZDBb7uD0v9Gabwewqfu4XpQ,2549
8
+ alonso/partition.py,sha256=a4JHiFsZ9MgFWWFLCvmh-k6EbDrMfJbXR_3Tb_IaPrQ,8511
9
+ alonso/stable.py,sha256=IwINwjd3F7dfoISXlWsNWRkVJzItEojgMyNwzMM7nYc,6577
10
+ alonso/test.py,sha256=Saq4GfSoRtatOrfigbfxQDdoihNEqL5EGjYpsImgwzc,5472
11
+ alonso/utils.py,sha256=RmctLB8oDtjf0wKcKFaRvXiRgmtegqfbB1HFFzlpsvE,7674
12
+ alonso-0.0.6.dist-info/licenses/LICENSE,sha256=nUDh1nfa7rfEv1HocpoqPu0JaFnZKpIVh9eM0MgozpM,1067
13
+ alonso-0.0.6.dist-info/METADATA,sha256=UhbtW6VCAmn95QnLsvECiZNYJWWbapLeZ7mn_CNRF54,9356
14
+ alonso-0.0.6.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
15
+ alonso-0.0.6.dist-info/entry_points.txt,sha256=JSod2CWtklhiaOFW3masqrgqhXIpVRsbIiprSmS1P7g,98
16
+ alonso-0.0.6.dist-info/top_level.txt,sha256=rOo7SlpYGdic6g55rHDus2d5N2t74H9qamX4yi6z5vw,7
17
+ alonso-0.0.6.dist-info/RECORD,,
@@ -1,17 +0,0 @@
1
- alonso/__init__.py,sha256=xFbWJ7kskxYZCWD3QWtJ6d9uGnDlqhJyFJDCVuqG7hE,207
2
- alonso/algorithm.py,sha256=j7rKY6Mx5LU_RbVU7KbUsQOLrGvIvHJxZxFuHQyoC5U,5227
3
- alonso/app.py,sha256=pmJ7XtopxL3AuAmsA8mlhyhO-REl26Cc5ZEdQ3sfWUc,4320
4
- alonso/applogger.py,sha256=fQBo51-TboX1DBqfSxX2P2eKJ5CcyiCq_IVlJTHjxAE,2624
5
- alonso/batch.py,sha256=eUbrh9oEQppSH0fTNYYS1UvIcpC1rUXMmDRQUdcruCU,2305
6
- alonso/merge.py,sha256=dWhF9t_2bFp4HT1NCzjhrSlhm8CkJQ4pwBHOhHSkezQ,4257
7
- alonso/parser.py,sha256=Ib4TnWdkQb6A6FA3HHEjZDBb7uD0v9Gabwewqfu4XpQ,2549
8
- alonso/partition.py,sha256=a4JHiFsZ9MgFWWFLCvmh-k6EbDrMfJbXR_3Tb_IaPrQ,8511
9
- alonso/stable.py,sha256=IwINwjd3F7dfoISXlWsNWRkVJzItEojgMyNwzMM7nYc,6577
10
- alonso/test.py,sha256=mUbYiolRdjug7O6UtAD6L-4L2gf0jH79iS5ZlXTcxNw,5472
11
- alonso/utils.py,sha256=RmctLB8oDtjf0wKcKFaRvXiRgmtegqfbB1HFFzlpsvE,7674
12
- alonso-0.0.4.dist-info/licenses/LICENSE,sha256=nUDh1nfa7rfEv1HocpoqPu0JaFnZKpIVh9eM0MgozpM,1067
13
- alonso-0.0.4.dist-info/METADATA,sha256=yqocjYPk3Ai2mnQqi95FaPTaIrDYACedEYp57ZbP0iU,9396
14
- alonso-0.0.4.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
15
- alonso-0.0.4.dist-info/entry_points.txt,sha256=JSod2CWtklhiaOFW3masqrgqhXIpVRsbIiprSmS1P7g,98
16
- alonso-0.0.4.dist-info/top_level.txt,sha256=rOo7SlpYGdic6g55rHDus2d5N2t74H9qamX4yi6z5vw,7
17
- alonso-0.0.4.dist-info/RECORD,,
File without changes