CS623: Introduction to Computing with Neural Nets (lecture-7) Pushpak Bhattacharyya Computer Science and Engineering Department IIT Bombay.

Slides:



Advertisements
Similar presentations
Complexity Classes: P and NP
Advertisements

JAYASRI JETTI CHINMAYA KRISHNA SURYADEVARA
 2004 SDU Lecture17-P,NP, NPC.  2004 SDU 2 1.Decision problem and language decision problem decision problem and language 2.P and NP Definitions of.
NP-Completeness Lecture for CS 302. Traveling Salesperson Problem You have to visit n cities You want to make the shortest trip How could you do this?
The Theory of NP-Completeness
© The McGraw-Hill Companies, Inc., Chapter 8 The Theory of NP-Completeness.
Computability and Complexity 23-1 Computability and Complexity Andrei Bulatov Search and Optimization.
Complexity 15-1 Complexity Andrei Bulatov Hierarchy Theorem.
Computability and Complexity 14-1 Computability and Complexity Andrei Bulatov Cook’s Theorem.
P, NP, PS, and NPS By Muhannad Harrim. Class P P is the complexity class containing decision problems which can be solved by a Deterministic Turing machine.
NP-Complete Problems Reading Material: Chapter 10 Sections 1, 2, 3, and 4 only.
1 Polynomial Time Reductions Polynomial Computable function : For any computes in polynomial time.
The Theory of NP-Completeness
NP-Complete Problems Problems in Computer Science are classified into
Analysis of Algorithms CS 477/677
NP-Completeness (2) NP-Completeness Graphs 4/17/2017 6:25 AM x x x x x
CS Master – Introduction to the Theory of Computation Jan Maluszynski - HT Lecture NP-Completeness Jan Maluszynski, IDA, 2007
Chapter 11: Limitations of Algorithmic Power
Chapter 11 Limitations of Algorithm Power Copyright © 2007 Pearson Addison-Wesley. All rights reserved.
Theory of Computing Lecture 19 MAS 714 Hartmut Klauck.
1.1 Chapter 1: Introduction What is the course all about? Problems, instances and algorithms Running time v.s. computational complexity General description.
The Theory of NP-Completeness 1. Nondeterministic algorithms A nondeterminstic algorithm consists of phase 1: guessing phase 2: checking If the checking.
The Theory of NP-Completeness 1. What is NP-completeness? Consider the circuit satisfiability problem Difficult to answer the decision problem in polynomial.
Chapter 11 Limitations of Algorithm Power. Lower Bounds Lower bound: an estimate on a minimum amount of work needed to solve a given problem Examples:
1 The Theory of NP-Completeness 2012/11/6 P: the class of problems which can be solved by a deterministic polynomial algorithm. NP : the class of decision.
Nattee Niparnan. Easy & Hard Problem What is “difficulty” of problem? Difficult for computer scientist to derive algorithm for the problem? Difficult.
Complexity theory and combinatorial optimization Class #2 – 17 th of March …. where we deal with decision problems, finite automata, Turing machines pink.
Tonga Institute of Higher Education Design and Analysis of Algorithms IT 254 Lecture 8: Complexity Theory.
February 18, 2015CS21 Lecture 181 CS21 Decidability and Tractability Lecture 18 February 18, 2015.
Theory of Computing Lecture 17 MAS 714 Hartmut Klauck.
Instructor: Prof. Pushpak Bhattacharyya 13/08/2004 CS-621/CS-449 Lecture Notes CS621/CS449 Artificial Intelligence Lecture Notes Set 6: 22/09/2004, 24/09/2004,
Week 10Complexity of Algorithms1 Hard Computational Problems Some computational problems are hard Despite a numerous attempts we do not know any efficient.
CSE 024: Design & Analysis of Algorithms Chapter 9: NP Completeness Sedgewick Chp:40 David Luebke’s Course Notes / University of Virginia, Computer Science.
1 Lower Bounds Lower bound: an estimate on a minimum amount of work needed to solve a given problem Examples: b number of comparisons needed to find the.
1 The Theory of NP-Completeness 2 Cook ’ s Theorem (1971) Prof. Cook Toronto U. Receiving Turing Award (1982) Discussing difficult problems: worst case.
NP-Complete Problems. Running Time v.s. Input Size Concern with problems whose complexity may be described by exponential functions. Tractable problems.
Lecture 12 P and NP Introduction to intractability Class P and NP Class NPC (NP-complete)
CS 3343: Analysis of Algorithms Lecture 25: P and NP Some slides courtesy of Carola Wenk.
CSE 589 Part V One of the symptoms of an approaching nervous breakdown is the belief that one’s work is terribly important. Bertrand Russell.
CS6045: Advanced Algorithms NP Completeness. NP-Completeness Some problems are intractable: as they grow large, we are unable to solve them in reasonable.
CS344: Introduction to Artificial Intelligence (associated lab: CS386) Pushpak Bhattacharyya CSE Dept., IIT Bombay Lecture 36, 37: Hardness of training.
CS 3813: Introduction to Formal Languages and Automata Chapter 14 An Introduction to Computational Complexity These class notes are based on material from.
NP-Completeness  For convenience, the theory of NP - Completeness is designed for decision problems (i.e. whose solution is either yes or no).  Abstractly,
Chapter 11 Introduction to Computational Complexity Copyright © 2011 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 1.
NPC.
NP Completeness Piyush Kumar. Today Reductions Proving Lower Bounds revisited Decision and Optimization Problems SAT and 3-SAT P Vs NP Dealing with NP-Complete.
Young CS 331 D&A of Algo. NP-Completeness1 NP-Completeness Reference: Computers and Intractability: A Guide to the Theory of NP-Completeness by Garey and.
COMPLEXITY. Satisfiability(SAT) problem Conjunctive normal form(CNF): Let S be a Boolean expression in CNF. That is, S is the product(and) of several.
NP-complete Languages
CSCI 2670 Introduction to Theory of Computing December 2, 2004.
CSCI 2670 Introduction to Theory of Computing December 7, 2005.
The Theory of NP-Completeness 1. Nondeterministic algorithms A nondeterminstic algorithm consists of phase 1: guessing phase 2: checking If the checking.
COSC 3101A - Design and Analysis of Algorithms 14 NP-Completeness.
COMPLEXITY. Satisfiability(SAT) problem Conjunctive normal form(CNF): Let S be a Boolean expression in CNF. That is, S is the product(and) of several.
1 The Theory of NP-Completeness 2 Review: Finding lower bound by problem transformation Problem X reduces to problem Y (X  Y ) iff X can be solved by.
CS 154 Formal Languages and Computability May 10 Class Meeting Department of Computer Science San Jose State University Spring 2016 Instructor: Ron Mak.
The NP class. NP-completeness Lecture2. The NP-class The NP class is a class that contains all the problems that can be decided by a Non-Deterministic.
CS623: Introduction to Computing with Neural Nets (lecture-9) Pushpak Bhattacharyya Computer Science and Engineering Department IIT Bombay.
ICS 353: Design and Analysis of Algorithms NP-Complete Problems King Fahd University of Petroleum & Minerals Information & Computer Science Department.
NP-Completeness A problem is NP-complete if: It is in NP
NP-Completeness (2) NP-Completeness Graphs 4/13/2018 5:22 AM x x x x x
P & NP.
Chapter 10 NP-Complete Problems.
NP-Completeness (2) NP-Completeness Graphs 7/23/ :02 PM x x x x
NP-Completeness (2) NP-Completeness Graphs 7/23/ :02 PM x x x x
ICS 353: Design and Analysis of Algorithms
NP-Completeness (2) NP-Completeness Graphs 11/23/2018 2:12 PM x x x x
Chapter 11 Limitations of Algorithm Power
NP-Completeness Lecture for CS 302.
NP-Completeness (2) NP-Completeness Graphs 7/9/2019 6:12 AM x x x x x
Presentation transcript:

CS623: Introduction to Computing with Neural Nets (lecture-7) Pushpak Bhattacharyya Computer Science and Engineering Department IIT Bombay

Hardness of Training Feedforward NN NP-completeness result: –Avrim Blum, Ronald L. Rivest: Training a 3- node neural network is NP-complete. Neural Networks 5(1): (1992)Showed that the loading problem is hard As the number of training example increases, so does the training time EXPONENTIALLY

A primer on NP-completeness theory

Turing Machine Infinite Tape Finite state head w1w1 w2w2 w3w3 …wnwn

Formal Definition (vide: Hopcroft and Ullmann, 1978) A Turing machine is a 7-tuple, where Q is a finite set of states Γ is a finite set of the tape alphabet/symbols b is the blank symbol (the only symbol allowed to occur on the tape infinitely often at any step during the computation) Σ, a subset of Γ not including b is the set of input symbols δ : Q X Γ  Q X Γ X {L, R} is a partial function called the transition function, where L is left shift, R is right shift. q 0 Є Q is the initial state F is the set of final or accepting states

Non-deterministic and Deterministic Turing Machines If δ is to a number of possibilities δ : Q X Γ  {Q X Γ X {L, R}} Then the TM is an NDTM; else it is a DTM

Decision problems Problems whose answer is yes/no For example, –Hamilton Circuit: Does an undirected graph have a path that visits every node and comes back to the starting node? –Subset sum: Given a finite set of integers, is there a subset of them that sums to 0?

The sets NP and P Suppose for a decision problem, an NDTM is found that takes time polynomial in the length of the input, then we say that the said problem is in NP If, however, a DTM is found that takes time polynomial in the length of the input, then we say that the said problem is in P

Relation between P and NP Clearly, –P is a subset of NP Is P a proper subset of NP? That is the P = NP question

The concept of NP-completeness (informal definition) A problem is said to be NP-complete, if –It is in NP, and –A known NP-complete problem is reducible TO it. The ‘first’ NP-complete problem is –satisfiability: Given a Boolean Formula in Conjunctive Normal Form (CNF), does is have a satisfying assignment, i.e., a set of 0-1 values for the constituting literals that makes the formula evaluate to 1? (even the restricted version of this problem- 3-sat- is NP-complete)

Example of 3-sat (x 1 + x 2 + x’ 3 )(x’ 1 + x 3 ) is satisfiable: x 2 = 1 and x 3 = 1 x 1 (x 2 + x 3 )x’ 1 is not satisfiable. {x’ I means complement of x i }

Numerous problems have been proven to be NP-complete The procedure is always the same: Take an instance of a known NP-complete problem; let this be p. Show a polynomial time Reduction of p TO an instance q of the problem whose status is being investigated. Show that the answer to q is yes, if and only if the answer to p is yes.

Clarifying the notion of Reduction Convex Hull problem: –Given a set of points on the two dimensional plane, find the convex hull of the points xx x x x x x x p1p1 p4p4 p5p5 p6p6 p8p8 p2p2 p3p3 p7p7 P 1, p 4, p 5, p 6 and p 8 are on the convex hull

Complexity of convex hull finding problem We will show that this is O(nlogn). Method used is Reduction. The most important first step: choose the right problem. We take sorting whose complexity is known to be O(nlogn)

Reduce Sorting to Convex hull (caution: NOT THE OTHER WAY) Take n numbers a 1, a 2, a 3, …, a n which are to be sorted. This is an instance of a sorting problem. From this obtain an instance of a convex hull problem. Find the convex hull of the set of points –,,,, …, This transformation takes linear time in the length of the input

Pictorially… x (a 5,0)(a 9,0)(a 3,0) xxx (a 8,0) (a n,0) xx (0,1) Convex hull: Effectively sorts the numbers

Convex hull finding is O(nlogn) If the complexity is lower, sorting too has lower complexity Because by the linear time procedure shown, ANY instance of the sorting problem can be converted to an instance of the CH problem and solved. This is not possible. Hence CH is O(nlogn)

Training of NN Training of Neural Network is NP-hard This can be proved by the NP- completeness theory Question –Can a set of examples be loaded onto a Feed Forward Neural Network efficiently?

Architecture We study a special architecture. Train the neural network called 3-node neural network of feed forward type. ALL the neurons are 0-1 threshold neurons

Architecture h 1 and h 2 are hidden neurons They set up hyperplanes in the (n+1) dimensions space.

Confinement Problem Can two hyperplanes be set which confine ALL and only the positive points? Positive Linear Confinement problem is NP-Complete. Training of positive and negative points needs solving the CONFINEMENT PROBLEM.

Solving with Set Splitting Problem Set Splitting Problem Statement: –Given a set S of n elements e 1, e 2,...., e n and a set of subsets of S called as concepts denoted by c 1, c 2,..., c m, does there exist a splitting of S –i.e. are there two sets S 1 (subset of S) and S 2 (subset of S) and none of c 1, c 2,..., c m is subset of S 1 or S 2

Set Splitting Problem: example Example S = {s 1, s 2, s 3 } c 1 = {s 1, s 2 }, c 2 = {s 2, s 3 } Splitting exists S 1 = {s 1, s 3 }, S 2 = {s 2 }

Transformation For n elements in S, set up an n- dimensional space. Corresponding to each element mark a negative point at unit distance in the axes. Mark the origin as positive For each concept mark a point as positive.

Transformation S = {s 1, s 2, s 3 } c 1 = {s 1, s 2 }, c 2 = {s 2, s 3 }