This document discusses algorithms for NP-complete problems. It introduces the maximum independent set problem and shows that while it is NP-complete for general graphs, it can be solved efficiently for trees using a recursive formulation. It also discusses the traveling salesperson problem and presents a dynamic programming algorithm that provides a better running time than brute force. Finally, it discusses approximation algorithms for the TSP and shows a 2-approximation algorithm that finds a tour with cost at most twice the optimal using minimum spanning trees.
Dynamic Programming design technique is one of the fundamental algorithm design techniques, and possibly one of the ones that are hardest to master for those who did not study it formally. In these slides (which are continuation of part 1 slides), we cover two problems: maximum value contiguous subarray, and maximum increasing subsequence.
Dynamic Programming is one of the most interesting design techniques. The concise idea is to avoid recomputations. Matrix Chain Multiplication and All Pairs Shortest Paths are two interesting applications of this design technique
Introduction to Algorithms and Asymptotic NotationAmrinder Arora
Asymptotic Notation is a notation used to represent and compare the efficiency of algorithms. It is a concise notation that deliberately omits details, such as constant time improvements, etc. Asymptotic notation consists of 5 commonly used symbols: big oh, small oh, big omega, small omega, and theta.
NP completeness. Classes P and NP are two frequently studied classes of problems in computer science. Class P is the set of all problems that can be solved by a deterministic Turing machine in polynomial time.
Dynamic Programming design technique is one of the fundamental algorithm design techniques, and possibly one of the ones that are hardest to master for those who did not study it formally. In these slides (which are continuation of part 1 slides), we cover two problems: maximum value contiguous subarray, and maximum increasing subsequence.
Dynamic Programming is one of the most interesting design techniques. The concise idea is to avoid recomputations. Matrix Chain Multiplication and All Pairs Shortest Paths are two interesting applications of this design technique
Introduction to Algorithms and Asymptotic NotationAmrinder Arora
Asymptotic Notation is a notation used to represent and compare the efficiency of algorithms. It is a concise notation that deliberately omits details, such as constant time improvements, etc. Asymptotic notation consists of 5 commonly used symbols: big oh, small oh, big omega, small omega, and theta.
NP completeness. Classes P and NP are two frequently studied classes of problems in computer science. Class P is the set of all problems that can be solved by a deterministic Turing machine in polynomial time.
It presents various approximation schemes including absolute approximation, epsilon approximation and also presents some polynomial time approximation schemes. It also presents some probabilistically good algorithms.
QUESTION BANK FOR ANNA UNNIVERISTY SYLLABUSJAMBIKA
first of all i am very happy that the only university that keeps its blog updated. the habit of using algorithm analysis to justify design decisions when you write implement new algorithms and to compare the experimental performance .
Basic Computer Engineering Unit II as per RGPV SyllabusNANDINI SHARMA
Algorithm, Flowchart, Categories of Programming Languages, OOPs vs POP, concepts of OOPs, Inheritance, C++ Programming, How to write C++ program as a beginner, Array, Structure, etc
This is the second lecture in the CS 6212 class. Covers asymptotic notation and data structures. Also outlines the coming lectures wherein we will study the various algorithm design techniques.
It presents various approximation schemes including absolute approximation, epsilon approximation and also presents some polynomial time approximation schemes. It also presents some probabilistically good algorithms.
QUESTION BANK FOR ANNA UNNIVERISTY SYLLABUSJAMBIKA
first of all i am very happy that the only university that keeps its blog updated. the habit of using algorithm analysis to justify design decisions when you write implement new algorithms and to compare the experimental performance .
Basic Computer Engineering Unit II as per RGPV SyllabusNANDINI SHARMA
Algorithm, Flowchart, Categories of Programming Languages, OOPs vs POP, concepts of OOPs, Inheritance, C++ Programming, How to write C++ program as a beginner, Array, Structure, etc
This is the second lecture in the CS 6212 class. Covers asymptotic notation and data structures. Also outlines the coming lectures wherein we will study the various algorithm design techniques.
Convex Hull - Chan's Algorithm O(n log h) - Presentation by Yitian Huang and ...Amrinder Arora
Chan's Algorithm for Convex Hull Problem. Output Sensitive Algorithm. Takes O(n log h) time. Presentation for the final project in CS 6212/Spring/Arora.
Divide and Conquer Algorithms - D&C forms a distinct algorithm design technique in computer science, wherein a problem is solved by repeatedly invoking the algorithm on smaller occurrences of the same problem. Binary search, merge sort, Euclid's algorithm can all be formulated as examples of divide and conquer algorithms. Strassen's algorithm and Nearest Neighbor algorithm are two other examples.
Euclid's Algorithm for Greatest Common Divisor - Time Complexity AnalysisAmrinder Arora
Euclid's algorithm for finding greatest common divisor is an elegant algorithm that can be written iteratively as well as recursively. The time complexity of this algorithm is O(log^2 n) where n is the larger of the two inputs.
Stopping Rule for Secretory Problem - Presentation by Haoyang Tian, Wesam Als...Amrinder Arora
Stopping Rule for Secretory Problem - Presentation by Haoyang Tian, Wesam Alshami and Dong Wang. Final Presentation for P4, in CS 6212, Fall 2015 taught by Prof. Arora.
The slide covers a few state of the art models of word embedding and deep explanation on algorithms for approximation of softmax function in language models.
P, NP, NP-Complete, and NP-Hard
Reductionism in Algorithms
NP-Completeness and Cooks Theorem
NP-Complete and NP-Hard Problems
Travelling Salesman Problem (TSP)
Travelling Salesman Problem (TSP) - Approximation Algorithms
PRIMES is in P - (A hope for NP problems in P)
Millennium Problems
Conclusions
This file contains the contents about dynamic programming, greedy approach, graph algorithm, spanning tree concepts, backtracking and branch and bound approach.
Arima Forecasting - Presentation by Sera Cresta, Nora Alosaimi and Puneet MahanaAmrinder Arora
Arima Forecasting - Presentation by Sera Cresta, Nora Alosaimi and Puneet Mahana. Presentation for CS 6212 final project in GWU during Fall 2015 (Prof. Arora's class)
How multiple experts can be leveraged in a machine learning application without knowing apriori who are "good" experts and who are "bad" experts. See how we can quantify the bounds on the overall results.
Set Operations - Union Find and Bloom FiltersAmrinder Arora
Set Operations - make set, union, find and contains are standard operations that appear in many scenarios. Union Find is a marvelous data structure to solve problems involving union and find operations.
Different use arises when we merely want to answer queries on whether a set contains an element x without keeping the entire set in the memory. Bloom Filters play an interesting role there.
Heaps and Priority Queues allow data to be accessed in an order. Binary heaps are great, but don't support merging (unions). Binomial heaps solve that problem. Dijkstra and Prim's algorithm can benefit greatly from using a decrease key operation that runs in O(1) time. Fibonacci heaps provide that, while keeping the extract min operation to O(log n) time. Amortized analysis can be used for both.
R-Trees are an excellent data structure for managing geo-spatial data. Commonly used by mapping applications and any other applications that use the location to customize content. Minimum Bounding Rectangle (MBR) is a commonly used concept in R-trees, which are a modified form of B-trees.
Trie (aka radix tree or prefix tree), is an ordered tree data structure where the keys are usually strings. Tries have tremendous applications from all sorts of things like dictionary to
Splay Trees and Self Organizing Data StructuresAmrinder Arora
Self Organizing Data Structures, such as Splay Trees, continue to adjust themselves based on the operation sequence. They are much easier to implement compared to AVL or RB Trees. Amortized time is O(log n), although worst case time may be O(n).
BTrees - Great alternative to Red Black, AVL and other BSTsAmrinder Arora
BTrees - designed by Rudolf Bayer and Ed McCreight - fundamental data structure in computer science. Great alternative to BSTs. Very appropriate for disk based access.
This presentation defines online algorithms, and discusses how we can analyze them using competitive analysis. Using ski rental and ice cream machine as example problems, it covers the applications of online algorithms in load balancing and other verticals.
I teach Computer Science, usually algorithms at George Washington University. But once during the semester, I cover something about the learning process itself.
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdfTechSoup
In this webinar you will learn how your organization can access TechSoup's wide variety of product discount and donation programs. From hardware to software, we'll give you a tour of the tools available to help your nonprofit with productivity, collaboration, financial management, donor tracking, security, and more.
Francesca Gottschalk - How can education support child empowerment.pptxEduSkills OECD
Francesca Gottschalk from the OECD’s Centre for Educational Research and Innovation presents at the Ask an Expert Webinar: How can education support child empowerment?
2024.06.01 Introducing a competency framework for languag learning materials ...Sandy Millin
http://sandymillin.wordpress.com/iateflwebinar2024
Published classroom materials form the basis of syllabuses, drive teacher professional development, and have a potentially huge influence on learners, teachers and education systems. All teachers also create their own materials, whether a few sentences on a blackboard, a highly-structured fully-realised online course, or anything in between. Despite this, the knowledge and skills needed to create effective language learning materials are rarely part of teacher training, and are mostly learnt by trial and error.
Knowledge and skills frameworks, generally called competency frameworks, for ELT teachers, trainers and managers have existed for a few years now. However, until I created one for my MA dissertation, there wasn’t one drawing together what we need to know and do to be able to effectively produce language learning materials.
This webinar will introduce you to my framework, highlighting the key competencies I identified from my research. It will also show how anybody involved in language teaching (any language, not just English!), teacher training, managing schools or developing language learning materials can benefit from using the framework.
Unit 8 - Information and Communication Technology (Paper I).pdfThiyagu K
This slides describes the basic concepts of ICT, basics of Email, Emerging Technology and Digital Initiatives in Education. This presentations aligns with the UGC Paper I syllabus.
Honest Reviews of Tim Han LMA Course Program.pptxtimhan337
Personal development courses are widely available today, with each one promising life-changing outcomes. Tim Han’s Life Mastery Achievers (LMA) Course has drawn a lot of interest. In addition to offering my frank assessment of Success Insider’s LMA Course, this piece examines the course’s effects via a variety of Tim Han LMA course reviews and Success Insider comments.
Operation “Blue Star” is the only event in the history of Independent India where the state went into war with its own people. Even after about 40 years it is not clear if it was culmination of states anger over people of the region, a political game of power or start of dictatorial chapter in the democratic setup.
The people of Punjab felt alienated from main stream due to denial of their just demands during a long democratic struggle since independence. As it happen all over the word, it led to militant struggle with great loss of lives of military, police and civilian personnel. Killing of Indira Gandhi and massacre of innocent Sikhs in Delhi and other India cities was also associated with this movement.
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...Levi Shapiro
Letter from the Congress of the United States regarding Anti-Semitism sent June 3rd to MIT President Sally Kornbluth, MIT Corp Chair, Mark Gorenberg
Dear Dr. Kornbluth and Mr. Gorenberg,
The US House of Representatives is deeply concerned by ongoing and pervasive acts of antisemitic
harassment and intimidation at the Massachusetts Institute of Technology (MIT). Failing to act decisively to ensure a safe learning environment for all students would be a grave dereliction of your responsibilities as President of MIT and Chair of the MIT Corporation.
This Congress will not stand idly by and allow an environment hostile to Jewish students to persist. The House believes that your institution is in violation of Title VI of the Civil Rights Act, and the inability or
unwillingness to rectify this violation through action requires accountability.
Postsecondary education is a unique opportunity for students to learn and have their ideas and beliefs challenged. However, universities receiving hundreds of millions of federal funds annually have denied
students that opportunity and have been hijacked to become venues for the promotion of terrorism, antisemitic harassment and intimidation, unlawful encampments, and in some cases, assaults and riots.
The House of Representatives will not countenance the use of federal funds to indoctrinate students into hateful, antisemitic, anti-American supporters of terrorism. Investigations into campus antisemitism by the Committee on Education and the Workforce and the Committee on Ways and Means have been expanded into a Congress-wide probe across all relevant jurisdictions to address this national crisis. The undersigned Committees will conduct oversight into the use of federal funds at MIT and its learning environment under authorities granted to each Committee.
• The Committee on Education and the Workforce has been investigating your institution since December 7, 2023. The Committee has broad jurisdiction over postsecondary education, including its compliance with Title VI of the Civil Rights Act, campus safety concerns over disruptions to the learning environment, and the awarding of federal student aid under the Higher Education Act.
• The Committee on Oversight and Accountability is investigating the sources of funding and other support flowing to groups espousing pro-Hamas propaganda and engaged in antisemitic harassment and intimidation of students. The Committee on Oversight and Accountability is the principal oversight committee of the US House of Representatives and has broad authority to investigate “any matter” at “any time” under House Rule X.
• The Committee on Ways and Means has been investigating several universities since November 15, 2023, when the Committee held a hearing entitled From Ivory Towers to Dark Corners: Investigating the Nexus Between Antisemitism, Tax-Exempt Universities, and Terror Financing. The Committee followed the hearing with letters to those institutions on January 10, 202
Model Attribute Check Company Auto PropertyCeline George
In Odoo, the multi-company feature allows you to manage multiple companies within a single Odoo database instance. Each company can have its own configurations while still sharing common resources such as products, customers, and suppliers.
Macroeconomics- Movie Location
This will be used as part of your Personal Professional Portfolio once graded.
Objective:
Prepare a presentation or a paper using research, basic comparative analysis, data organization and application of economic information. You will make an informed assessment of an economic climate outside of the United States to accomplish an entertainment industry objective.
Acetabularia Information For Class 9 .docxvaibhavrinwa19
Acetabularia acetabulum is a single-celled green alga that in its vegetative state is morphologically differentiated into a basal rhizoid and an axially elongated stalk, which bears whorls of branching hairs. The single diploid nucleus resides in the rhizoid.
Introduction to AI for Nonprofits with Tapp NetworkTechSoup
Dive into the world of AI! Experts Jon Hill and Tareq Monaur will guide you through AI's role in enhancing nonprofit websites and basic marketing strategies, making it easy to understand and apply.
2. Instructor
Prof. Amrinder Arora
amrinder@gwu.edu
Please copy TA on emails
Please feel free to call as well
Available for study sessions
Science and Engineering Hall
GWU
Algorithms NP-completeness 2
LOGISTICS
3. Input for
SAT
Output for
SAT
Algorithm for Known NPC Problem – Say SAT
Reduction
from
SAT to X
Algorithm
for X
x R(x)
Yes/No
Algorithms NP-completeness 3
GOOD NEWS: REDUCIBILITY
Problem X is at least as hard as SAT.
Problem X is NP-Hard.
4. Business problems are not NP-complete
Algorithms NP-completeness 4
BAD NEWS: PROVING THAT SOMETHING IS
NPC IS NOT THE END OF THE GAME
5. MECHANISMS TO SOLVE REAL LIFE
PROBLEMS – NPC OR OTHERWISE
Strategy 1: Look for simplifications that render the
problem solvable in polynomial time
Strategy 2: Look for improvements in running time
which make the exponential “bearable”
Strategy 3: Understand performance bounds that are
acceptable practically, and use approximation
algorithms
Strategy 4: Use parallel processing, cloud computing
and server farms (Google, Facebook and government
agencies do it)
Algorithms NP-completeness 5
6. For general graphs, this problem is NPC
What if your graph is a tree (or a forest)?
MIS in Trees is very easily solvable
Recursive Formulation coming up next..
Algorithms NP-completeness 6
MAXIMUM INDEPENDENT SET (MIS)
7. Consider a tree (or subtree) rooted at node v
NMIS(v): maximum independent set for the tree rooted at
node v, such that v cannot be in the set.
MIS(v): maximum independent set for the tree rooted at
node v.
If v is a leaf node, |NMIS(v)| = 0, |MIS(v)| = 1
Otherwise, MIS(v) = max {
{v} union NMIS(u) for all child nodes u of v,
MIS(u) for all child nodes u of v
}
NMIS(v) = union of MIS(u) for all child nodes u of v
How long does this take?
Algorithms NP-completeness 7
MIS IN TREES
8. Given S ⊆ V, Let C(S, j) be the shortest path that
starting at 1, visits all nodes in S and ends at j. (1
and j must be in S.)
If |S| = 2, then C(S, k) = d(1,k) for k = 2… n
If |S| > 2, then C(S, k) = the optimal tour from
C(1,m) + d(m,k)
Algorithms NP-completeness 8
TRAVELING SALESPERSON PROBLEM – A
BETTER ALGORITHM USING DP
Note to Self: O(n2 2n) is much better than O(n!)
9. An r-approximation algorithm is a polynomial time
algorithm that
returns a feasible solution in polynomial time
with value at most “r” times worse than optimal
Question: How can we compare our solution to the
optimal that we cannot compute?
Answer: lower bound optimal value
Algorithms NP-completeness 9
TSP – APPROXIMATION ALGORITHMS
10. Given n cities with distances between them
Find the shortest tour that visits each city at least once
Algorithms NP-completeness 10
EXAMPLE: TSP (1/4)
1 2
3 4
5
d(1,2)
1 2
3 4
5
1 2
3 4
5
11. Removing one edge gives a spanning tree
Kruskal’s algorithm runs in time O(n2log n)
Algorithms NP-completeness 11
LOWER BOUND (2/4)
1 2
3 4
5
1 2
3 4
5
12. Run DFS on MST
Each vertex is visited at least once
Each edge traversed at most twice
Value of tour at most twice the MST, if triangle
inequalities hold.
Algorithms NP-completeness 12
CONSTRUCTING TOUR FROM MST (3/4)
1
23
45
13. 1. Find MST as lower bound
2. Construct tour by running DFS on MST
Algorithms NP-completeness 13
2-APPROXIMATION ALGORITHM (4/4)
OPTMST 2*MST
14. Is the problem discrete or continuous?
If you have a Yes/No solver for the decision version of IS problem,
we can find Maximum Independent Set in O(log n) invocations of
Yes/No solver.
So, if problem is discrete, optimization problem is no harder than
decision problem (assuming search space if finite)
If the problem is continuous, then read on…
NP-Complete vs. NP-Hard
Given a TSP tour and x: We can verify that the given TSP tour is a
valid tour (covers each city exactly once) and its cost is less than x,
in polynomial time. The decision version of the problem is in NP.
Given a TSP tour: We do not know of a way to verify that a given
solution to TSP is indeed the optimal one. The optimization
version is not known to be in NP. It is NP-Hard, but not known to
be NP-Complete
Algorithms NP-completeness 14
DECISION VERSUS OPTIMIZATION PROBLEM
15. Even NP-complete problems deserve solutions
You can use 3 tricks to solve NPC problems
Look for better exponential solutions
Look for approximation scheme
Look for idiosyncrasies in data
Algorithms NP-completeness 15
SUMMARY