Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
algorithms-lab-ss2023
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
alg
algorithms-lab-ss2023
Commits
238fe972
Commit
238fe972
authored
1 year ago
by
Gabriel Gehrke
Browse files
Options
Downloads
Patches
Plain Diff
fixed vocab mistake
parent
393aa561
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
sheets/01_setup_and_first_look/examples/cardinality_sat/feedback_vertex_cover/solver.py
+2
-2
2 additions, 2 deletions
.../examples/cardinality_sat/feedback_vertex_cover/solver.py
with
2 additions
and
2 deletions
sheets/01_setup_and_first_look/examples/cardinality_sat/feedback_vertex_cover/solver.py
+
2
−
2
View file @
238fe972
...
...
@@ -103,8 +103,8 @@ class FeedbackVertexSetSolverSAT():
k
=
len
(
best_solution
)
print
(
f
"
A greedy solution of size
{
k
}
was found!
"
)
ub
=
k
# the lowest number of vertices that are proven to
build
a FVS
lb
=
0
# the lowest number of vertices that might still
build
a FVS (not proven wrong)
ub
=
k
# the lowest number of vertices that are proven to
form
a FVS
lb
=
0
# the lowest number of vertices that might still
form
a FVS (not proven wrong)
while
lb
<
ub
:
k
=
(
lb
+
ub
)
//
2
# integer division (discards floating point decimals)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment