This document summarizes a lecture on satisfiability and NP-completeness. It introduces the satisfiability problem and shows that 3-SAT, the problem of determining if a Boolean formula consisting of clauses with 3 literals can be satisfied, is NP-complete by reducing SAT to it. It then shows other problems like vertex cover and maximum clique are NP-complete by reducing 3-SAT to them. Reductions preserve the computational difficulty of problems.
I am Leonard K. I am a Stochastic Processes Assignment Expert at statisticsassignmenthelp.com. I hold a Masters in Statistics from, University of Arkansas, USA.
I have been helping students with their homework for the past 6 years. I solve assignments related to Stochastic Processes.
Visit statisticsassignmenthelp.com or email info@statisticsassignmenthelp.com.
You can also call on +1 678 648 4277 for any assistance with Stochastic Processes Assignments.
I am Keziah D. I am a Mechanical Engineering Assignment Expert at matlabassignmentexperts.com. I hold a Ph.D. Matlab, University of North Carolina, USA. I have been helping students with their homework for the past 8 years. I solve assignments related to Mechanical Engineering.
Visit matlabassignmentexperts.com or email info@matlabassignmentexperts.com.
You can also call on +1 678 648 4277 for any assistance with Mechanical Engineering Assignments.
I am Leonard K. I am a Stochastic Processes Assignment Expert at statisticsassignmenthelp.com. I hold a Masters in Statistics from, University of Arkansas, USA.
I have been helping students with their homework for the past 6 years. I solve assignments related to Stochastic Processes.
Visit statisticsassignmenthelp.com or email info@statisticsassignmenthelp.com.
You can also call on +1 678 648 4277 for any assistance with Stochastic Processes Assignments.
I am Keziah D. I am a Mechanical Engineering Assignment Expert at matlabassignmentexperts.com. I hold a Ph.D. Matlab, University of North Carolina, USA. I have been helping students with their homework for the past 8 years. I solve assignments related to Mechanical Engineering.
Visit matlabassignmentexperts.com or email info@matlabassignmentexperts.com.
You can also call on +1 678 648 4277 for any assistance with Mechanical Engineering Assignments.
I am Samantha K. I am a Physics Assignment Expert at eduassignmenthelp.com. I hold a Ph.D. in Physics, from McGill University, Canada. I have been helping students with their homework for the past 8 years. I solve assignments related to Physics.
Visit eduassignmenthelp.com or email info@eduassignmenthelp.com.
You can also call on +1 678 648 4277 for any assistance with Physics Assignments.
As we have realized in the class of Graph Algorithms, many problems can be represented as a graph. For example, we could be a electrical machine company with different possible sources of parts to the production of a particular engine.
Therefore, we want to minimize the transit between node in the graph.... we can use the Minimum Spanning Tree to obtain a really efficient distribution tree.
I am Anthony F. I am a Digital Signal Processing Assignment Expert at matlabassignmentexperts.com. I hold a Ph.D. in Matlab, University of Cambridge, UK. I have been helping students with their homework for the past 8 years. I solve assignments related to Digital Signal Processing.
Visit matlabassignmentexperts.com or email info@matlabassignmentexperts.com.
You can also call on +1 678 648 4277 for any assistance with Digital Signal Processing Assignments.
IJERA (International journal of Engineering Research and Applications) is International online, ... peer reviewed journal. For more detail or submit your article, please visit www.ijera.com
A complete and enhanced presentation on mathematical induction and divisibility rules with out any calculation.
Here are some defined formulas and techniques to find the divisibility of numbers.
I am Samantha K. I am a Physics Assignment Expert at eduassignmenthelp.com. I hold a Ph.D. in Physics, from McGill University, Canada. I have been helping students with their homework for the past 8 years. I solve assignments related to Physics.
Visit eduassignmenthelp.com or email info@eduassignmenthelp.com.
You can also call on +1 678 648 4277 for any assistance with Physics Assignments.
As we have realized in the class of Graph Algorithms, many problems can be represented as a graph. For example, we could be a electrical machine company with different possible sources of parts to the production of a particular engine.
Therefore, we want to minimize the transit between node in the graph.... we can use the Minimum Spanning Tree to obtain a really efficient distribution tree.
I am Anthony F. I am a Digital Signal Processing Assignment Expert at matlabassignmentexperts.com. I hold a Ph.D. in Matlab, University of Cambridge, UK. I have been helping students with their homework for the past 8 years. I solve assignments related to Digital Signal Processing.
Visit matlabassignmentexperts.com or email info@matlabassignmentexperts.com.
You can also call on +1 678 648 4277 for any assistance with Digital Signal Processing Assignments.
IJERA (International journal of Engineering Research and Applications) is International online, ... peer reviewed journal. For more detail or submit your article, please visit www.ijera.com
A complete and enhanced presentation on mathematical induction and divisibility rules with out any calculation.
Here are some defined formulas and techniques to find the divisibility of numbers.
I am Luther H. I am a Stochastic Process Exam Helper at statisticsexamhelp.com. I hold a Masters' Degree in Statistics, from the University of Illinois, USA. I have been helping students with their exams for the past 8 years. You can hire me to take your exam in Stochastic Process.
Visit statisticsexamhelp.com or email support@statisticsexamhelp.com. You can also call on +1 678 648 4277 for any assistance with the Stochastic Process Exam.
I am Craig D. I am a Stochastic Processes Assignment Expert at statisticsassignmenthelp.com. I hold a Master's in Statistics, from The University of Queensland. I have been helping students with their homework for the past 9 years. I solve assignments related to Stochastic Processes.
Visit statisticsassignmenthelp.com or email info@statisticsassignmenthelp.com.
You can also call on +1 678 648 4277 for any assistance with Stochastic Processes Assignments.
I am Falid B. I am a Mathematical Statistics Assignment Expert at excelhomeworkhelp.com. I hold a Master's in Statistics, from George Town, Malaysia. I have been helping students with their assignments for the past 6 years. I solved an assignment related to Mathematical Statistics.
Visit excelhomeworkhelp.com or email info@excelhomeworkhelp.com. You can also call on +1 678 648 4277 for any assistance with Mathematical Statistics Assignment.
I am Falid B. I am a Mathematical Statistics Assignment Help Expert at statisticshomeworkhelper.com. I hold a Master's in Statistics, from George Town, Malaysia.I have been helping students with their assignment for the past 6 years. I solve assignments related to Mathematical Statistics.
Visit statisticshomeworkhelper.com or email info@statisticshomeworkhelper.com.You can also call on +1 678 648 4277 for any assistance with Mathematical Statistics Assignment.
I am Tahira H. I am a Complex Variables Assignment Expert at mathsassignmenthelp.com. I hold a Master's in Mathematics from La Trobe University. I have been helping students with their assignments for the past 15 years. I solve assignments related to Complex Variables.
Visit mathsassignmenthelp.com or email info@mathsassignmenthelp.com.
You can also call on +1 678 648 4277 for any assistance with Complex Variables\
I am Arnold H. I am a Complex Variables Assignment Solver at mathhomeworksolver.com. I hold a Master's in Mathematics, from Tampines, Singapore. I have been helping students with their assignments for the past 10 years. I solved assignments related to Complex Variables.
Visit mathhomeworksolver.com or email support@mathhomeworksolver.com. You can also call on +1 678 648 4277 for any assistance with Complex Variables Assignment.
Similar to Skiena algorithm 2007 lecture20 satisfiability (20)
Maruthi Prithivirajan, Head of ASEAN & IN Solution Architecture, Neo4j
Get an inside look at the latest Neo4j innovations that enable relationship-driven intelligence at scale. Learn more about the newest cloud integrations and product enhancements that make Neo4j an essential choice for developers building apps with interconnected data and generative AI.
Building RAG with self-deployed Milvus vector database and Snowpark Container...Zilliz
This talk will give hands-on advice on building RAG applications with an open-source Milvus database deployed as a docker container. We will also introduce the integration of Milvus with Snowpark Container Services.
Removing Uninteresting Bytes in Software FuzzingAftab Hussain
Imagine a world where software fuzzing, the process of mutating bytes in test seeds to uncover hidden and erroneous program behaviors, becomes faster and more effective. A lot depends on the initial seeds, which can significantly dictate the trajectory of a fuzzing campaign, particularly in terms of how long it takes to uncover interesting behaviour in your code. We introduce DIAR, a technique designed to speedup fuzzing campaigns by pinpointing and eliminating those uninteresting bytes in the seeds. Picture this: instead of wasting valuable resources on meaningless mutations in large, bloated seeds, DIAR removes the unnecessary bytes, streamlining the entire process.
In this work, we equipped AFL, a popular fuzzer, with DIAR and examined two critical Linux libraries -- Libxml's xmllint, a tool for parsing xml documents, and Binutil's readelf, an essential debugging and security analysis command-line tool used to display detailed information about ELF (Executable and Linkable Format). Our preliminary results show that AFL+DIAR does not only discover new paths more quickly but also achieves higher coverage overall. This work thus showcases how starting with lean and optimized seeds can lead to faster, more comprehensive fuzzing campaigns -- and DIAR helps you find such seeds.
- These are slides of the talk given at IEEE International Conference on Software Testing Verification and Validation Workshop, ICSTW 2022.
Threats to mobile devices are more prevalent and increasing in scope and complexity. Users of mobile devices desire to take full advantage of the features
available on those devices, but many of the features provide convenience and capability but sacrifice security. This best practices guide outlines steps the users can take to better protect personal devices and information.
Dr. Sean Tan, Head of Data Science, Changi Airport Group
Discover how Changi Airport Group (CAG) leverages graph technologies and generative AI to revolutionize their search capabilities. This session delves into the unique search needs of CAG’s diverse passengers and customers, showcasing how graph data structures enhance the accuracy and relevance of AI-generated search results, mitigating the risk of “hallucinations” and improving the overall customer journey.
GridMate - End to end testing is a critical piece to ensure quality and avoid...ThomasParaiso2
End to end testing is a critical piece to ensure quality and avoid regressions. In this session, we share our journey building an E2E testing pipeline for GridMate components (LWC and Aura) using Cypress, JSForce, FakerJS…
In the rapidly evolving landscape of technologies, XML continues to play a vital role in structuring, storing, and transporting data across diverse systems. The recent advancements in artificial intelligence (AI) present new methodologies for enhancing XML development workflows, introducing efficiency, automation, and intelligent capabilities. This presentation will outline the scope and perspective of utilizing AI in XML development. The potential benefits and the possible pitfalls will be highlighted, providing a balanced view of the subject.
We will explore the capabilities of AI in understanding XML markup languages and autonomously creating structured XML content. Additionally, we will examine the capacity of AI to enrich plain text with appropriate XML markup. Practical examples and methodological guidelines will be provided to elucidate how AI can be effectively prompted to interpret and generate accurate XML markup.
Further emphasis will be placed on the role of AI in developing XSLT, or schemas such as XSD and Schematron. We will address the techniques and strategies adopted to create prompts for generating code, explaining code, or refactoring the code, and the results achieved.
The discussion will extend to how AI can be used to transform XML content. In particular, the focus will be on the use of AI XPath extension functions in XSLT, Schematron, Schematron Quick Fixes, or for XML content refactoring.
The presentation aims to deliver a comprehensive overview of AI usage in XML development, providing attendees with the necessary knowledge to make informed decisions. Whether you’re at the early stages of adopting AI or considering integrating it in advanced XML development, this presentation will cover all levels of expertise.
By highlighting the potential advantages and challenges of integrating AI with XML development tools and languages, the presentation seeks to inspire thoughtful conversation around the future of XML development. We’ll not only delve into the technical aspects of AI-powered XML development but also discuss practical implications and possible future directions.
Unlocking Productivity: Leveraging the Potential of Copilot in Microsoft 365, a presentation by Christoforos Vlachos, Senior Solutions Manager – Modern Workplace, Uni Systems
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...Neo4j
Leonard Jayamohan, Partner & Generative AI Lead, Deloitte
This keynote will reveal how Deloitte leverages Neo4j’s graph power for groundbreaking digital twin solutions, achieving a staggering 100x performance boost. Discover the essential role knowledge graphs play in successful generative AI implementations. Plus, get an exclusive look at an innovative Neo4j + Generative AI solution Deloitte is developing in-house.
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...James Anderson
Effective Application Security in Software Delivery lifecycle using Deployment Firewall and DBOM
The modern software delivery process (or the CI/CD process) includes many tools, distributed teams, open-source code, and cloud platforms. Constant focus on speed to release software to market, along with the traditional slow and manual security checks has caused gaps in continuous security as an important piece in the software supply chain. Today organizations feel more susceptible to external and internal cyber threats due to the vast attack surface in their applications supply chain and the lack of end-to-end governance and risk management.
The software team must secure its software delivery process to avoid vulnerability and security breaches. This needs to be achieved with existing tool chains and without extensive rework of the delivery processes. This talk will present strategies and techniques for providing visibility into the true risk of the existing vulnerabilities, preventing the introduction of security issues in the software, resolving vulnerabilities in production environments quickly, and capturing the deployment bill of materials (DBOM).
Speakers:
Bob Boule
Robert Boule is a technology enthusiast with PASSION for technology and making things work along with a knack for helping others understand how things work. He comes with around 20 years of solution engineering experience in application security, software continuous delivery, and SaaS platforms. He is known for his dynamic presentations in CI/CD and application security integrated in software delivery lifecycle.
Gopinath Rebala
Gopinath Rebala is the CTO of OpsMx, where he has overall responsibility for the machine learning and data processing architectures for Secure Software Delivery. Gopi also has a strong connection with our customers, leading design and architecture for strategic implementations. Gopi is a frequent speaker and well-known leader in continuous delivery and integrating security into software delivery.
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...SOFTTECHHUB
The choice of an operating system plays a pivotal role in shaping our computing experience. For decades, Microsoft's Windows has dominated the market, offering a familiar and widely adopted platform for personal and professional use. However, as technological advancements continue to push the boundaries of innovation, alternative operating systems have emerged, challenging the status quo and offering users a fresh perspective on computing.
One such alternative that has garnered significant attention and acclaim is Nitrux Linux 3.5.0, a sleek, powerful, and user-friendly Linux distribution that promises to redefine the way we interact with our devices. With its focus on performance, security, and customization, Nitrux Linux presents a compelling case for those seeking to break free from the constraints of proprietary software and embrace the freedom and flexibility of open-source computing.
zkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex ProofsAlex Pruden
This paper presents Reef, a system for generating publicly verifiable succinct non-interactive zero-knowledge proofs that a committed document matches or does not match a regular expression. We describe applications such as proving the strength of passwords, the provenance of email despite redactions, the validity of oblivious DNS queries, and the existence of mutations in DNA. Reef supports the Perl Compatible Regular Expression syntax, including wildcards, alternation, ranges, capture groups, Kleene star, negations, and lookarounds. Reef introduces a new type of automata, Skipping Alternating Finite Automata (SAFA), that skips irrelevant parts of a document when producing proofs without undermining soundness, and instantiates SAFA with a lookup argument. Our experimental evaluation confirms that Reef can generate proofs for documents with 32M characters; the proofs are small and cheap to verify (under a second).
Paper: https://eprint.iacr.org/2023/1886
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...James Anderson
Effective Application Security in Software Delivery lifecycle using Deployment Firewall and DBOM
The modern software delivery process (or the CI/CD process) includes many tools, distributed teams, open-source code, and cloud platforms. Constant focus on speed to release software to market, along with the traditional slow and manual security checks has caused gaps in continuous security as an important piece in the software supply chain. Today organizations feel more susceptible to external and internal cyber threats due to the vast attack surface in their applications supply chain and the lack of end-to-end governance and risk management.
The software team must secure its software delivery process to avoid vulnerability and security breaches. This needs to be achieved with existing tool chains and without extensive rework of the delivery processes. This talk will present strategies and techniques for providing visibility into the true risk of the existing vulnerabilities, preventing the introduction of security issues in the software, resolving vulnerabilities in production environments quickly, and capturing the deployment bill of materials (DBOM).
Speakers:
Bob Boule
Robert Boule is a technology enthusiast with PASSION for technology and making things work along with a knack for helping others understand how things work. He comes with around 20 years of solution engineering experience in application security, software continuous delivery, and SaaS platforms. He is known for his dynamic presentations in CI/CD and application security integrated in software delivery lifecycle.
Gopinath Rebala
Gopinath Rebala is the CTO of OpsMx, where he has overall responsibility for the machine learning and data processing architectures for Secure Software Delivery. Gopi also has a strong connection with our customers, leading design and architecture for strategic implementations. Gopi is a frequent speaker and well-known leader in continuous delivery and integrating security into software delivery.
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdfPaige Cruz
Monitoring and observability aren’t traditionally found in software curriculums and many of us cobble this knowledge together from whatever vendor or ecosystem we were first introduced to and whatever is a part of your current company’s observability stack.
While the dev and ops silo continues to crumble….many organizations still relegate monitoring & observability as the purview of ops, infra and SRE teams. This is a mistake - achieving a highly observable system requires collaboration up and down the stack.
I, a former op, would like to extend an invitation to all application developers to join the observability party will share these foundational concepts to build on:
Essentials of Automations: The Art of Triggers and Actions in FMESafe Software
In this second installment of our Essentials of Automations webinar series, we’ll explore the landscape of triggers and actions, guiding you through the nuances of authoring and adapting workspaces for seamless automations. Gain an understanding of the full spectrum of triggers and actions available in FME, empowering you to enhance your workspaces for efficient automation.
We’ll kick things off by showcasing the most commonly used event-based triggers, introducing you to various automation workflows like manual triggers, schedules, directory watchers, and more. Plus, see how these elements play out in real scenarios.
Whether you’re tweaking your current setup or building from the ground up, this session will arm you with the tools and insights needed to transform your FME usage into a powerhouse of productivity. Join us to discover effective strategies that simplify complex processes, enhancing your productivity and transforming your data management practices with FME. Let’s turn complexity into clarity and make your workspaces work wonders!
A tale of scale & speed: How the US Navy is enabling software delivery from l...sonjaschweigert1
Rapid and secure feature delivery is a goal across every application team and every branch of the DoD. The Navy’s DevSecOps platform, Party Barge, has achieved:
- Reduction in onboarding time from 5 weeks to 1 day
- Improved developer experience and productivity through actionable findings and reduction of false positives
- Maintenance of superior security standards and inherent policy enforcement with Authorization to Operate (ATO)
Development teams can ship efficiently and ensure applications are cyber ready for Navy Authorizing Officials (AOs). In this webinar, Sigma Defense and Anchore will give attendees a look behind the scenes and demo secure pipeline automation and security artifacts that speed up application ATO and time to production.
We will cover:
- How to remove silos in DevSecOps
- How to build efficient development pipeline roles and component templates
- How to deliver security artifacts that matter for ATO’s (SBOMs, vulnerability reports, and policy evidence)
- How to streamline operations with automated policy checks on container images
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024Neo4j
Neha Bajwa, Vice President of Product Marketing, Neo4j
Join us as we explore breakthrough innovations enabled by interconnected data and AI. Discover firsthand how organizations use relationships in data to uncover contextual insights and solve our most pressing challenges – from optimizing supply chains, detecting fraud, and improving customer experiences to accelerating drug discoveries.
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
Skiena algorithm 2007 lecture20 satisfiability
1. Lecture 20:
Satisfiability
Steven Skiena
Department of Computer Science
State University of New York
Stony Brook, NY 11794–4400
http://www.cs.sunysb.edu/∼skiena
2. Problem of the Day
Suppose we are given a subroutine which can solve the
traveling salesman decision problem in, say, linear time. Give
an efficient algorithm to find the actual TSP tour by making a
polynomial number of calls to this subroutine.
3. The Main Idea
Suppose I gave you the following algorithm to solve the
bandersnatch problem:
Bandersnatch(G)
Convert G to an instance of the Bo-billy problem Y .
Call the subroutine Bo-billy on Y to solve this instance.
Return the answer of Bo-billy(Y ) as the answer to G.
Such a translation from instances of one type of problem to
instances of another type such that answers are preserved is
called a reduction.
4. What Does this Imply?
Now suppose my reduction translates G to Y in O(P (n)):
1. If my Bo-billy subroutine ran in O(P (n)) I can solve the
Bandersnatch problem in O(P (n) + P (n ))
2. If I know that Ω(P (n)) is a lower-bound to compute
Bandersnatch, then Ω(P (n) − P (n )) must be a lower-
bound to compute Bo-billy.
The second argument is the idea we use to prove problems
hard!
5. Satisfiability
Consider the following logic problem:
Instance: A set V of variables and a set of clauses C over V .
Question: Does there exist a satisfying truth assignment for
C?
Example 1: V = v1, v2 and C = {{v1, v2 }, {v1 , v2}}
A clause is satisfied when at least one literal in it is TRUE. C
is satisfied when v1 = v2 =TRUE.
6. Not Satisfiable
Example 2: V = v1, v2,
C = {{v1, v2}, {v1, v 2}, {v 1}}
Although you try, and you try, and you try and you try, you
can get no satisfaction.
There is no satisfying assigment since v1 must be FALSE
(third clause), so v2 must be FALSE (second clause), but then
the first clause is unsatisfiable!
7. Satisfiability is Hard
Satisfiability is known/assumed to be a hard problem.
Every top-notch algorithm expert in the world has tried and
failed to come up with a fast algorithm to test whether a given
set of clauses is satisfiable.
Further, many strange and impossible-to-believe things have
been shown to be true if someone in fact did find a fast
satisfiability algorithm.
8. 3-Satisfiability
Instance: A collection of clause C where each clause contains
exactly 3 literals, boolean variable v.
Question: Is there a truth assignment to v so that each clause
is satisfied?
Note that this is a more restricted problem than SAT. If 3-SAT
is NP-complete, it implies SAT is NP-complete but not visa-
versa, perhaps long clauses are what makes SAT difficult?!
After all, 1-Sat is trivial!
9. 3-SAT is NP-Complete
To prove it is complete, we give a reduction from
Sat ∝ 3 − Sat. We will transform each clause independantly
based on its length.
Suppose the clause Ci contains k literals.
• If k = 1, meaning Ci = {z1 }, create two new variables
v1, v2 and four new 3-literal clauses:
{v1, v2, z1}, {v1, v 2, z1 }, {v 1, v2, z1}, {v 1, v 2, z1 }.
Note that the only way all four of these can be satisfied is
if z is TRUE.
10. • If k = 2, meaning {z1, z2}, create one new variable v1 and
two new clauses: {v1, z1, z2}, {v1 , z1, z2}
• If k = 3, meaning {z1 , z2, z3}, copy into the 3-SAT
instance as it is.
• If k > 3, meaning {z1, z2, ..., zn}, create n − 3 new
variables and n − 2 new clauses in a chain: {vi, zi, vi},
...
11. Why does the Chain Work?
If none of the original variables in a clause are TRUE, there
is no way to satisfy all of them using the additional variable:
(F, F, T ), (F, F, T ), . . . , (F, F, F )
But if any literal is TRUE, we have n − 3 free variables and
n − 3 remaining 3-clauses, so we can satisfy each of them.
(F, F, T ), (F, F, T ), . . . , (F, T, F), . . . , (T, F, F ), (T, F, F )
Any SAT solution will also satisfy the 3-SAT instance and
any 3-SAT solution sets variables giving a SAT solution, so
the problems are equivallent.
12. 4-Sat and 2-Sat
A slight modification to this construction would prove 4-SAT,
or 5-SAT,... also NP-complete.
However, it breaks down when we try to use it for 2-SAT,
since there is no way to stuff anything into the chain of
clauses.
Now that we have shown 3-SAT is NP-complete, we may use
it for further reductions. Since the set of 3-SAT instances
is smaller and more regular than the SAT instances, it will
be easier to use 3-SAT for future reductions. Remember the
direction to reduction!
Sat ∝ 3 − Sat ∝ X
13. A Perpetual Point of Confusion
Note carefully the direction of the reduction.
We must transform every instance of a known NP-complete
problem to an instance of the problem we are interested in. If
we do the reduction the other way, all we get is a slow way
to solve x, by using a subroutine which probably will take
exponential time.
This always is confusing at first - it seems bass-ackwards.
Make sure you understand the direction of reduction now -
and think back to this when you get confused.
14. Vertex Cover
Instance: A graph G = (V, E), and integer k ≤ V
Question: Is there a subset of at most k vertices such that
every e ∈ E has at least one vertex in the subset?
Here, four of the eight vertices suffice to cover.
It is trivial to find a vertex cover of a graph – just take all
the vertices. The tricky part is to cover with as small a set as
possible.
15. Vertex cover is NP-complete
To prove completeness, we show reduce 3-SAT to VC. From
a 3-SAT instance with n variables and C clauses, we construct
a graph with 2N + 3C vertices.
For each variable, we create two vertices connected by an
edge:
......
v1 v1 v2 v2 v3 v3 vn vn
To cover each of these edges, at least n vertices must be in
the cover, one for each pair.
16. Clause Gadgets
For each clause, we create three new vertices, one for each
literal in each clause. Connect these in a triangle.
At least two vertices per triangle must be in the cover to take
care of edges in the triangle, for a total of at least 2C vertices.
Finally, we will connect each literal in the flat structure to the
corresponding vertices in the triangles which share the same
literal.
v1 v1 v2 v2 v3 v3 v4 v4
v3 v2
v1 v4 v1 v4
17. Claim: G has a vertex cover of size N + 2C iff S
is Satisfiable
Any cover of G must have at least N + 2C vertices. To show
that our reduction is correct, we must show that:
1. Every satisfying truth assignment gives a cover.
Select the N vertices cooresponding to the TRUE literals
to be in the cover. Since it is a satisfying truth assignment,
at least one of the three cross edges associated with each
clause must already be covered - pick the other two
vertices to complete the cover.
18. 2. Every vertex cover gives a satisfying truth assignment.
Every vertex cover must contain n first stage vertices and
2C second stage vertices. Let the first stage vertices define
the truth assignment.
To give the cover, at least one cross-edge must be covered,
so the truth assignment satisfies.
19. Example Reduction
Every SAT defines a cover and Every Cover Truth values for
the SAT!
Example: V1 = V2 = T rue, V3 = V4 = F alse.
v1 v1 v2 v2 v3 v3 v4 v4
v3 v2
v1 v4 v1 v4
20. Starting from the Right Problem
As you can see, the reductions can be very clever and very
complicated. While theoretically any N P -complete problem
can be reduced to any other one, choosing the correct one
makes finding a reduction much easier.
3 − Sat ∝ V C
As you can see, the reductions can be very clever and
complicated. While theoretically any NP-complete problem
will do, choosing the correct one can make it much easier.
21. Maximum Clique
Instance: A graph G = (V, E) and integer j ≤ v.
Question: Does the graph contain a clique of j vertices, ie. is
there a subset of v of size j such that every pair of vertices in
the subset defines an edge of G?
Example: this graph contains a clique of size 5.
22. Clique is NP-complete
When talking about graph problems, it is most natural to work
from a graph problem - the only NP-complete one we have is
vertex cover!
If you take a graph and find its vertex cover, the remaining
vertices form an independent set, meaning there are no edges
between any two vertices in the independent set, for if there
were such an edge the rest of the vertices could not be a vertex
cover.
23. vertex in cover
vertex in independant
set
Clearly the smallest vertex cover gives the biggest indepen-
dent set, and so the problems are equivallent – Delete the
subset of vertices in one from the total set of vertices to get
the order!
Thus finding the maximum independent set must be NP-
complete!
24. From Independent Set
In an independent set, there are no edges between two
vertices. In a clique, there are always between two vertices.
Thus if we complement a graph (have an edge iff there was no
edge in the original graph), a clique becomes an independent
set and an independent set becomes a Clique!
Max Clique = 5 Max Clique = 2
Max IS = 2 Max IS = 5
25. Punch Line
Thus finding the largest clique is NP-complete:
If V C is a vertex cover in G, then V − V C is a clique in G .
If C is a clique in G, V − C is a vertex cover in G .