Is a “local” version of 3-SAT NP-hard?Is a “stacked”, “local” version of 3-SAT NP-hard?Is retrospective inference on a spatial Bayesian network NP-hard?Supporting data structures for SAT local searchA tentative satisfiability algorithmReduce the following problem to SATEncoding 1-out-of-n constraint for SAT solversWhat is wrong with this seeming contradiction with a paper about AND-compression of SAT?Why is it NP-hard to learn a disjunction of k variables as a disjunction of fewer than k log n variables?Upper bound for #Monotone k-SATIs my logic correct and is this a new reduction and algorithm from 3 SAT to clique?General Understanding of SMT Solving Across Multiple TheoriesMaximum-minimum-satisfiability
How to test if argument is a single space?
Three knights or knaves, three different hair colors
Why "strap-on" boosters, and how do other people say it?
Shell builtin `printf` line limit?
If change in free energy (G) is positive, how do those reactions still occur?
Has the wall been repaired?
How would a physicist explain this starship engine?
One word for 'the thing that attracts me'?
Why is this python script running in background consuming 100 % CPU?
Coloring lines in a graph the same color if they are the same length
Salesforce bug enabled "Modify All"
How do you earn the reader's trust?
Make the `diff` command look only for differences from a specified range of lines
Is there any mention of ghosts who live outside the Hogwarts castle?
"Official wife" or "Formal wife"?
Is there an idiom that means that you are in a very strong negotiation position in a negotiation?
Does the fact that we can only measure the two-way speed of light undermine the axiom of invariance?
If a character has cast the Fly spell on themselves, can they "hand off" to the Levitate spell without interruption?
How many wires should be in a new thermostat cable?
Is it safe to redirect stdout and stderr to the same file without file descriptor copies?
Nunc est bibendum: gerund or gerundive?
Meaning of "half-crown enclosure"
Wifi light switch needs neutral wire. Why? AND Can that wire be a skinny one?
Is there a word for pant sleeves?
Is a “local” version of 3-SAT NP-hard?
Is a “stacked”, “local” version of 3-SAT NP-hard?Is retrospective inference on a spatial Bayesian network NP-hard?Supporting data structures for SAT local searchA tentative satisfiability algorithmReduce the following problem to SATEncoding 1-out-of-n constraint for SAT solversWhat is wrong with this seeming contradiction with a paper about AND-compression of SAT?Why is it NP-hard to learn a disjunction of k variables as a disjunction of fewer than k log n variables?Upper bound for #Monotone k-SATIs my logic correct and is this a new reduction and algorithm from 3 SAT to clique?General Understanding of SMT Solving Across Multiple TheoriesMaximum-minimum-satisfiability
$begingroup$
Below is my simplification of part of a larger research project on spatial Bayesian networks:
Say a variable is "$k$-local" in a string $C in 3text-CNF$ if there are fewer than $k$ clauses between the first and last clause in which it appears (where $k$ is a natural number).
Now consider the subset $(3,k)text-LSAT subseteq 3text-SAT$ defined by the criterion that for any $C in (3,k)text-LSAT$, every variable in $C$ is $k$-local. For what $k$ (if any) is $(3,k)text-LSAT$ NP-hard?
Here is what I have considered so far:
(1) Variations on the method of showing that $2text-SAT$ is in P by rewriting each disjunction as an implication and examining directed paths on the directed graph of these implications (noted here and presented in detail on pp. 184-185 of Papadimitriou's Computational Complexity). Unlike in $2text-SAT$, there is branching of the directed paths in $(3,k)text-LSAT$, but perhaps the number of directed paths is limited by the spatial constraints on the variables. No success with this so far though.
(2) A polynomial-time reduction of $3text-SAT$ (or other known NP-complete problem) to $(3,k)text-LSAT$. For example, I've tried various schemes of introducing new variables. However, bringing together the clauses that contain the original variable $x_k$ generally requires that I drag around "chains" of additional clauses containing the new variables and these interfere with the spatial constraints on the other variables.
Surely I'm not in new territory here. Is there a known NP-hard problem that can be reduced to $(3,k)text-LSAT$ or do the spatial constraints prevent the problem from being that difficult?
np-hard satisfiability polynomial-time 3-sat 2-sat
$endgroup$
add a comment |
$begingroup$
Below is my simplification of part of a larger research project on spatial Bayesian networks:
Say a variable is "$k$-local" in a string $C in 3text-CNF$ if there are fewer than $k$ clauses between the first and last clause in which it appears (where $k$ is a natural number).
Now consider the subset $(3,k)text-LSAT subseteq 3text-SAT$ defined by the criterion that for any $C in (3,k)text-LSAT$, every variable in $C$ is $k$-local. For what $k$ (if any) is $(3,k)text-LSAT$ NP-hard?
Here is what I have considered so far:
(1) Variations on the method of showing that $2text-SAT$ is in P by rewriting each disjunction as an implication and examining directed paths on the directed graph of these implications (noted here and presented in detail on pp. 184-185 of Papadimitriou's Computational Complexity). Unlike in $2text-SAT$, there is branching of the directed paths in $(3,k)text-LSAT$, but perhaps the number of directed paths is limited by the spatial constraints on the variables. No success with this so far though.
(2) A polynomial-time reduction of $3text-SAT$ (or other known NP-complete problem) to $(3,k)text-LSAT$. For example, I've tried various schemes of introducing new variables. However, bringing together the clauses that contain the original variable $x_k$ generally requires that I drag around "chains" of additional clauses containing the new variables and these interfere with the spatial constraints on the other variables.
Surely I'm not in new territory here. Is there a known NP-hard problem that can be reduced to $(3,k)text-LSAT$ or do the spatial constraints prevent the problem from being that difficult?
np-hard satisfiability polynomial-time 3-sat 2-sat
$endgroup$
add a comment |
$begingroup$
Below is my simplification of part of a larger research project on spatial Bayesian networks:
Say a variable is "$k$-local" in a string $C in 3text-CNF$ if there are fewer than $k$ clauses between the first and last clause in which it appears (where $k$ is a natural number).
Now consider the subset $(3,k)text-LSAT subseteq 3text-SAT$ defined by the criterion that for any $C in (3,k)text-LSAT$, every variable in $C$ is $k$-local. For what $k$ (if any) is $(3,k)text-LSAT$ NP-hard?
Here is what I have considered so far:
(1) Variations on the method of showing that $2text-SAT$ is in P by rewriting each disjunction as an implication and examining directed paths on the directed graph of these implications (noted here and presented in detail on pp. 184-185 of Papadimitriou's Computational Complexity). Unlike in $2text-SAT$, there is branching of the directed paths in $(3,k)text-LSAT$, but perhaps the number of directed paths is limited by the spatial constraints on the variables. No success with this so far though.
(2) A polynomial-time reduction of $3text-SAT$ (or other known NP-complete problem) to $(3,k)text-LSAT$. For example, I've tried various schemes of introducing new variables. However, bringing together the clauses that contain the original variable $x_k$ generally requires that I drag around "chains" of additional clauses containing the new variables and these interfere with the spatial constraints on the other variables.
Surely I'm not in new territory here. Is there a known NP-hard problem that can be reduced to $(3,k)text-LSAT$ or do the spatial constraints prevent the problem from being that difficult?
np-hard satisfiability polynomial-time 3-sat 2-sat
$endgroup$
Below is my simplification of part of a larger research project on spatial Bayesian networks:
Say a variable is "$k$-local" in a string $C in 3text-CNF$ if there are fewer than $k$ clauses between the first and last clause in which it appears (where $k$ is a natural number).
Now consider the subset $(3,k)text-LSAT subseteq 3text-SAT$ defined by the criterion that for any $C in (3,k)text-LSAT$, every variable in $C$ is $k$-local. For what $k$ (if any) is $(3,k)text-LSAT$ NP-hard?
Here is what I have considered so far:
(1) Variations on the method of showing that $2text-SAT$ is in P by rewriting each disjunction as an implication and examining directed paths on the directed graph of these implications (noted here and presented in detail on pp. 184-185 of Papadimitriou's Computational Complexity). Unlike in $2text-SAT$, there is branching of the directed paths in $(3,k)text-LSAT$, but perhaps the number of directed paths is limited by the spatial constraints on the variables. No success with this so far though.
(2) A polynomial-time reduction of $3text-SAT$ (or other known NP-complete problem) to $(3,k)text-LSAT$. For example, I've tried various schemes of introducing new variables. However, bringing together the clauses that contain the original variable $x_k$ generally requires that I drag around "chains" of additional clauses containing the new variables and these interfere with the spatial constraints on the other variables.
Surely I'm not in new territory here. Is there a known NP-hard problem that can be reduced to $(3,k)text-LSAT$ or do the spatial constraints prevent the problem from being that difficult?
np-hard satisfiability polynomial-time 3-sat 2-sat
np-hard satisfiability polynomial-time 3-sat 2-sat
edited May 15 at 10:19
SapereAude
asked May 15 at 0:02
SapereAudeSapereAude
1226
1226
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
$begingroup$
$(3,k)text-LSAT$ is in P for all $k$. As you have indicated, locality is a big obstruction to NP-completeness.
Here is a polynomial algorithm.
Input: $phiin (3,k)text-LSAT$, $phi=c_1wedge c_2cdots wedge c_m$, where $c_i$ is the $i$-th clause.
Output: true if $phi$ becomes 1 under some assignment of all variables.
Procedure:
- Construct set $B_i$, the variables that appear in at least one of $c_i, c_i+1, cdots, c_i+k$, $1le ile m-k$.
- Construct set $A_i=f: B_ito0,1 mid c_i, c_i+1, cdots, c_i+k text become 1 under f$.
- Construct set $E=cup_i(f, g)mid fin A_i, gin A_i+1, f(x)=g(x)text for all xin B_icap B_i+1 $
- Let $V=A_1cup A_2cdotscup A_m-k$. Consider directed graph $G(V,E)$. For each vertex in $A_1$, start a depth-first search on $G$ to see if we can reach a vertex in $A_m-k$. If found, return true.
- If we have reached here, return false.
The correctness of the algorithm above comes from the following claim.
Claim. $phi$ is satisfiable $Longleftrightarrow$ there is a path in $G$ from a vertex in $A_1$ to a vertex in $A_m-k$.
Proof.
"$Longrightarrow$": Suppose $phi$ becomes 1 under assignment $f$. Let $f_i$ be the restriction of $f$ to $B_i$. Then we have a path $f_1, cdots, f_m-k$.
"$Longleftarrow$": Suppose there is a path $f_1, cdots, f_m-k$, where $f_1in A_1$ and $f_m-kin A_m-k$. Define assignment $f$ such that $f$ agrees with all $f_i$, i.e., $f(x)=f_i(x)$ if $xin B_i$. We can verify that $f$ is well-defined. Since $c_ell$ becomes 1 for some $f_j$ for all $ell$, $phi$ becomes 1 under $f$.
The number of vertices $|V|le 2^3(k+1)(m-k)$. Hence the algorithm runs in polynomial time in term of $m$, the number of clauses and $n$, the number of total variables.
$endgroup$
$begingroup$
In step 4, "for each vertex in $A1$" should better be "from each vertex in $A1$".
$endgroup$
– Apass.Jack
yesterday
add a comment |
Your Answer
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "419"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fcs.stackexchange.com%2fquestions%2f109357%2fis-a-local-version-of-3-sat-np-hard%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
$begingroup$
$(3,k)text-LSAT$ is in P for all $k$. As you have indicated, locality is a big obstruction to NP-completeness.
Here is a polynomial algorithm.
Input: $phiin (3,k)text-LSAT$, $phi=c_1wedge c_2cdots wedge c_m$, where $c_i$ is the $i$-th clause.
Output: true if $phi$ becomes 1 under some assignment of all variables.
Procedure:
- Construct set $B_i$, the variables that appear in at least one of $c_i, c_i+1, cdots, c_i+k$, $1le ile m-k$.
- Construct set $A_i=f: B_ito0,1 mid c_i, c_i+1, cdots, c_i+k text become 1 under f$.
- Construct set $E=cup_i(f, g)mid fin A_i, gin A_i+1, f(x)=g(x)text for all xin B_icap B_i+1 $
- Let $V=A_1cup A_2cdotscup A_m-k$. Consider directed graph $G(V,E)$. For each vertex in $A_1$, start a depth-first search on $G$ to see if we can reach a vertex in $A_m-k$. If found, return true.
- If we have reached here, return false.
The correctness of the algorithm above comes from the following claim.
Claim. $phi$ is satisfiable $Longleftrightarrow$ there is a path in $G$ from a vertex in $A_1$ to a vertex in $A_m-k$.
Proof.
"$Longrightarrow$": Suppose $phi$ becomes 1 under assignment $f$. Let $f_i$ be the restriction of $f$ to $B_i$. Then we have a path $f_1, cdots, f_m-k$.
"$Longleftarrow$": Suppose there is a path $f_1, cdots, f_m-k$, where $f_1in A_1$ and $f_m-kin A_m-k$. Define assignment $f$ such that $f$ agrees with all $f_i$, i.e., $f(x)=f_i(x)$ if $xin B_i$. We can verify that $f$ is well-defined. Since $c_ell$ becomes 1 for some $f_j$ for all $ell$, $phi$ becomes 1 under $f$.
The number of vertices $|V|le 2^3(k+1)(m-k)$. Hence the algorithm runs in polynomial time in term of $m$, the number of clauses and $n$, the number of total variables.
$endgroup$
$begingroup$
In step 4, "for each vertex in $A1$" should better be "from each vertex in $A1$".
$endgroup$
– Apass.Jack
yesterday
add a comment |
$begingroup$
$(3,k)text-LSAT$ is in P for all $k$. As you have indicated, locality is a big obstruction to NP-completeness.
Here is a polynomial algorithm.
Input: $phiin (3,k)text-LSAT$, $phi=c_1wedge c_2cdots wedge c_m$, where $c_i$ is the $i$-th clause.
Output: true if $phi$ becomes 1 under some assignment of all variables.
Procedure:
- Construct set $B_i$, the variables that appear in at least one of $c_i, c_i+1, cdots, c_i+k$, $1le ile m-k$.
- Construct set $A_i=f: B_ito0,1 mid c_i, c_i+1, cdots, c_i+k text become 1 under f$.
- Construct set $E=cup_i(f, g)mid fin A_i, gin A_i+1, f(x)=g(x)text for all xin B_icap B_i+1 $
- Let $V=A_1cup A_2cdotscup A_m-k$. Consider directed graph $G(V,E)$. For each vertex in $A_1$, start a depth-first search on $G$ to see if we can reach a vertex in $A_m-k$. If found, return true.
- If we have reached here, return false.
The correctness of the algorithm above comes from the following claim.
Claim. $phi$ is satisfiable $Longleftrightarrow$ there is a path in $G$ from a vertex in $A_1$ to a vertex in $A_m-k$.
Proof.
"$Longrightarrow$": Suppose $phi$ becomes 1 under assignment $f$. Let $f_i$ be the restriction of $f$ to $B_i$. Then we have a path $f_1, cdots, f_m-k$.
"$Longleftarrow$": Suppose there is a path $f_1, cdots, f_m-k$, where $f_1in A_1$ and $f_m-kin A_m-k$. Define assignment $f$ such that $f$ agrees with all $f_i$, i.e., $f(x)=f_i(x)$ if $xin B_i$. We can verify that $f$ is well-defined. Since $c_ell$ becomes 1 for some $f_j$ for all $ell$, $phi$ becomes 1 under $f$.
The number of vertices $|V|le 2^3(k+1)(m-k)$. Hence the algorithm runs in polynomial time in term of $m$, the number of clauses and $n$, the number of total variables.
$endgroup$
$begingroup$
In step 4, "for each vertex in $A1$" should better be "from each vertex in $A1$".
$endgroup$
– Apass.Jack
yesterday
add a comment |
$begingroup$
$(3,k)text-LSAT$ is in P for all $k$. As you have indicated, locality is a big obstruction to NP-completeness.
Here is a polynomial algorithm.
Input: $phiin (3,k)text-LSAT$, $phi=c_1wedge c_2cdots wedge c_m$, where $c_i$ is the $i$-th clause.
Output: true if $phi$ becomes 1 under some assignment of all variables.
Procedure:
- Construct set $B_i$, the variables that appear in at least one of $c_i, c_i+1, cdots, c_i+k$, $1le ile m-k$.
- Construct set $A_i=f: B_ito0,1 mid c_i, c_i+1, cdots, c_i+k text become 1 under f$.
- Construct set $E=cup_i(f, g)mid fin A_i, gin A_i+1, f(x)=g(x)text for all xin B_icap B_i+1 $
- Let $V=A_1cup A_2cdotscup A_m-k$. Consider directed graph $G(V,E)$. For each vertex in $A_1$, start a depth-first search on $G$ to see if we can reach a vertex in $A_m-k$. If found, return true.
- If we have reached here, return false.
The correctness of the algorithm above comes from the following claim.
Claim. $phi$ is satisfiable $Longleftrightarrow$ there is a path in $G$ from a vertex in $A_1$ to a vertex in $A_m-k$.
Proof.
"$Longrightarrow$": Suppose $phi$ becomes 1 under assignment $f$. Let $f_i$ be the restriction of $f$ to $B_i$. Then we have a path $f_1, cdots, f_m-k$.
"$Longleftarrow$": Suppose there is a path $f_1, cdots, f_m-k$, where $f_1in A_1$ and $f_m-kin A_m-k$. Define assignment $f$ such that $f$ agrees with all $f_i$, i.e., $f(x)=f_i(x)$ if $xin B_i$. We can verify that $f$ is well-defined. Since $c_ell$ becomes 1 for some $f_j$ for all $ell$, $phi$ becomes 1 under $f$.
The number of vertices $|V|le 2^3(k+1)(m-k)$. Hence the algorithm runs in polynomial time in term of $m$, the number of clauses and $n$, the number of total variables.
$endgroup$
$(3,k)text-LSAT$ is in P for all $k$. As you have indicated, locality is a big obstruction to NP-completeness.
Here is a polynomial algorithm.
Input: $phiin (3,k)text-LSAT$, $phi=c_1wedge c_2cdots wedge c_m$, where $c_i$ is the $i$-th clause.
Output: true if $phi$ becomes 1 under some assignment of all variables.
Procedure:
- Construct set $B_i$, the variables that appear in at least one of $c_i, c_i+1, cdots, c_i+k$, $1le ile m-k$.
- Construct set $A_i=f: B_ito0,1 mid c_i, c_i+1, cdots, c_i+k text become 1 under f$.
- Construct set $E=cup_i(f, g)mid fin A_i, gin A_i+1, f(x)=g(x)text for all xin B_icap B_i+1 $
- Let $V=A_1cup A_2cdotscup A_m-k$. Consider directed graph $G(V,E)$. For each vertex in $A_1$, start a depth-first search on $G$ to see if we can reach a vertex in $A_m-k$. If found, return true.
- If we have reached here, return false.
The correctness of the algorithm above comes from the following claim.
Claim. $phi$ is satisfiable $Longleftrightarrow$ there is a path in $G$ from a vertex in $A_1$ to a vertex in $A_m-k$.
Proof.
"$Longrightarrow$": Suppose $phi$ becomes 1 under assignment $f$. Let $f_i$ be the restriction of $f$ to $B_i$. Then we have a path $f_1, cdots, f_m-k$.
"$Longleftarrow$": Suppose there is a path $f_1, cdots, f_m-k$, where $f_1in A_1$ and $f_m-kin A_m-k$. Define assignment $f$ such that $f$ agrees with all $f_i$, i.e., $f(x)=f_i(x)$ if $xin B_i$. We can verify that $f$ is well-defined. Since $c_ell$ becomes 1 for some $f_j$ for all $ell$, $phi$ becomes 1 under $f$.
The number of vertices $|V|le 2^3(k+1)(m-k)$. Hence the algorithm runs in polynomial time in term of $m$, the number of clauses and $n$, the number of total variables.
answered May 15 at 4:07
Apass.JackApass.Jack
16k11245
16k11245
$begingroup$
In step 4, "for each vertex in $A1$" should better be "from each vertex in $A1$".
$endgroup$
– Apass.Jack
yesterday
add a comment |
$begingroup$
In step 4, "for each vertex in $A1$" should better be "from each vertex in $A1$".
$endgroup$
– Apass.Jack
yesterday
$begingroup$
In step 4, "for each vertex in $A1$" should better be "from each vertex in $A1$".
$endgroup$
– Apass.Jack
yesterday
$begingroup$
In step 4, "for each vertex in $A1$" should better be "from each vertex in $A1$".
$endgroup$
– Apass.Jack
yesterday
add a comment |
Thanks for contributing an answer to Computer Science Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
Use MathJax to format equations. MathJax reference.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fcs.stackexchange.com%2fquestions%2f109357%2fis-a-local-version-of-3-sat-np-hard%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown