Skip to content
This repository has been archived by the owner on Aug 21, 2024. It is now read-only.

Commit

Permalink
[SolveSATWithGrover] Fix minor indexing error (#404)
Browse files Browse the repository at this point in the history
The clause index for 1 clause k-sat problem should simply be $y_{k}$ instead of $y_{ik}$. There is no iteration over i here - that occurs in Task 1.6 where there are more than one clause and $i$ is and index over those.
  • Loading branch information
jainvasu631 authored Jul 15, 2020
1 parent bec499b commit ea201d9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion SolveSATWithGrover/SolveSATWithGrover.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@
"> For SAT problems, $f(x)$ is represented as a conjunction (an AND operation) of several clauses on $N$ variables,\n",
"and each clause is a disjunction (an OR operation) of **one or several** variables or negated variables:\n",
">\n",
"> $$clause(x) = \\bigvee_k y_{ik},\\text{ where }y_{ik} =\\text{ either }x_j\\text{ or }\\neg x_j\\text{ for some }j \\in \\{0, \\dots, N-1\\}$$\n",
"> $$clause(x) = \\bigvee_k y_{k},\\text{ where }y_{k} =\\text{ either }x_j\\text{ or }\\neg x_j\\text{ for some }j \\in \\{0, \\dots, N-1\\}$$\n",
">\n",
"> For example, one of the possible clauses on two variables is:\n",
">\n",
Expand Down
2 changes: 1 addition & 1 deletion SolveSATWithGrover/Tasks.qs
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ namespace Quantum.Kata.GroversAlgorithm {
//
// For general SAT problems, f(x) is represented as a conjunction (an AND operation) of several clauses on N variables,
// and each clause is a disjunction (an OR operation) of one or several variables or negated variables:
// clause(x) = ∨ₖ yᵢₖ, where yᵢₖ = either xⱼ or ¬xⱼ for some j in {0, ..., N-1}
// clause(x) = ∨ₖ yₖ, where yₖ = either xⱼ or ¬xⱼ for some j in {0, ..., N-1}
//
// For example, one of the possible clauses on two variables is
// clause(x) = x₀ ∨ ¬x₁
Expand Down

0 comments on commit ea201d9

Please sign in to comment.