Solving Numerical NP-complete Problems with Spiking Neural P Systems Dipartimento di Informatica, Sistemistica e Comunicazione Università degli Studi di.

Slides:



Advertisements
Similar presentations
NP-Completeness.
Advertisements

Problems and Their Classes
NP-Hard Nattee Niparnan.
Time Complexity P vs NP.
 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.
The Big Picture Chapter 3. We want to examine a given computational problem and see how difficult it is. Then we need to compare problems Problems appear.
WMC8 – Thessaloniki, Greece Some Applications of Spiking Neural P Systems Mihai Ionescu 1 & Dragoş Sburlan 2 1 URV, Research Group on Mathematical Linguistics,
The Theory of NP-Completeness
Some Characteristics of Spiking Neural P Systems with Anti-Spikes Kamala Krithivasan Department of Computer Science and Engineering Indian Institute of.
Complexity 25-1 Complexity Andrei Bulatov #P-Completeness.
Complexity 12-1 Complexity Andrei Bulatov Non-Deterministic Space.
Complexity 15-1 Complexity Andrei Bulatov Hierarchy Theorem.
Complexity 11-1 Complexity Andrei Bulatov Space Complexity.
1 L is in NP means: There is a language L’ in P and a polynomial p so that L 1 · L 2 means: For some polynomial time computable map r : 8 x: x 2 L 1 iff.
Computability and Complexity 14-1 Computability and Complexity Andrei Bulatov Cook’s Theorem.
Computability and Complexity 13-1 Computability and Complexity Andrei Bulatov The Class NP.
1 Introduction to Computability Theory Lecture12: Decidable Languages Prof. Amos Israeli.
Computability and Complexity 19-1 Computability and Complexity Andrei Bulatov Non-Deterministic Space.
CS21 Decidability and Tractability
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.
FORMAL LANGUAGES, AUTOMATA AND COMPUTABILITY Read sections 7.1 – 7.3 of the book for next time.
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.
1 Other Models of Computation. 2 Models of computation: Turing Machines Recursive Functions Post Systems Rewriting Systems.
Chapter 11: Limitations of Algorithmic Power
Fall 2004COMP 3351 Time Complexity We use a multitape Turing machine We count the number of steps until a string is accepted We use the O(k) notation.
Theory of Computing Lecture 19 MAS 714 Hartmut Klauck.
1 L is in NP means: There is a language L’ in P and a polynomial p so that L 1 ≤ L 2 means: For some polynomial time computable map r : x: x L 1 iff r(x)
Quantum (UREM) P Systems: Background, Definition and Computational Power Dipartimento di Informatica, Sistemistica e Comunicazione Università degli Studi.
CMPS 3223 Theory of Computation Automata, Computability, & Complexity by Elaine Rich ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Slides provided.
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.
Difficult Problems. Polynomial-time algorithms A polynomial-time algorithm is an algorithm whose running time is O(f(n)), where f(n) is a polynomial A.
Nattee Niparnan. Easy & Hard Problem What is “difficulty” of problem? Difficult for computer scientist to derive algorithm for the problem? Difficult.
February 18, 2015CS21 Lecture 181 CS21 Decidability and Tractability Lecture 18 February 18, 2015.
The Complexity of Optimization Problems. Summary -Complexity of algorithms and problems -Complexity classes: P and NP -Reducibility -Karp reducibility.
Computational Complexity Theory Lecture 2: Reductions, NP-completeness, Cook-Levin theorem Indian Institute of Science.
Theory of Computing Lecture 17 MAS 714 Hartmut Klauck.
CSC 413/513: Intro to Algorithms NP Completeness.
Week 10Complexity of Algorithms1 Hard Computational Problems Some computational problems are hard Despite a numerous attempts we do not know any efficient.
EMIS 8373: Integer Programming NP-Complete Problems updated 21 April 2009.
MA/CSSE 474 Theory of Computation Enumerability Reduction.
CSCI 3160 Design and Analysis of Algorithms Tutorial 10 Chengyu Lin.
1 The Theory of NP-Completeness 2 Cook ’ s Theorem (1971) Prof. Cook Toronto U. Receiving Turing Award (1982) Discussing difficult problems: worst case.
The Class NP Lecture 39 Section 7.3 Mon, Nov 26, 2007.
1 P P := the class of decision problems (languages) decided by a Turing machine so that for some polynomial p and all x, the machine terminates after at.
Umans Complexity Theory Lectures Lecture 1a: Problems and Languages.
NP-COMPLETE PROBLEMS. Admin  Two more assignments…  No office hours on tomorrow.
A Membrane Algorithm for the Min Storage problem Dipartimento di Informatica, Sistemistica e Comunicazione Università degli Studi di Milano – Bicocca WMC.
1 How to establish NP-hardness Lemma: If L 1 is NP-hard and L 1 ≤ L 2 then L 2 is NP-hard.
NP-completeness Class of hard problems. Jaruloj ChongstitvatanaNP-complete Problems2 Outline  Introduction  Problems and Languages Turing machines and.
Strings Basic data type in computational biology A string is an ordered succession of characters or symbols from a finite set called an alphabet Sequence.
Costas Busch - LSU1 Time Complexity. Costas Busch - LSU2 Consider a deterministic Turing Machine which decides a language.
NPC.
1 Time Complexity We use a multitape Turing machine We count the number of steps until a string is accepted We use the O(k) notation.
Chapter 15 P, NP, and Cook’s Theorem. 2 Computability Theory n Establishes whether decision problems are (only) theoretically decidable, i.e., decides.
NP-complete Languages
CSCI 2670 Introduction to Theory of Computing December 2, 2004.
CSCI 2670 Introduction to Theory of Computing December 7, 2005.
CS623: Introduction to Computing with Neural Nets (lecture-7) Pushpak Bhattacharyya Computer Science and Engineering Department IIT Bombay.
TU/e Algorithms (2IL15) – Lecture 9 1 NP-Completeness NOT AND OR AND NOT AND.
Prof. Busch - LSU1 Time Complexity. Prof. Busch - LSU2 Consider a deterministic Turing Machine which decides a language.
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.
1 SAT SAT: Given a Boolean function in CNF representation, is there a way to assign truth values to the variables so that the function evaluates to true?
The NP class. NP-completeness
L is in NP means: There is a language L’ in P and a polynomial p so that L1 ≤ L2 means: For some polynomial time computable map r :  x: x  L1 iff.
Time Complexity Costas Busch - LSU.
Intro to Theory of Computation
Intractable Problems Time-Bounded Turing Machines Classes P and NP
CS21 Decidability and Tractability
Presentation transcript:

Solving Numerical NP-complete Problems with Spiking Neural P Systems Dipartimento di Informatica, Sistemistica e Comunicazione Università degli Studi di Milano – Bicocca WMC 8 Thessaloniki, June 25 – 28, 2007 Alberto Leporati  Claudio Zandron Claudio Ferretti  Giancarlo Mauri {leporati, zandron, ferretti,

WMC 8 - Thessaloniki - June 25-28, Talk outline Spiking Neural (SN) P systems standard version an extended version Computational power of SN P systems universality (Turing completeness) nondeterminism, determinism, maximal parallelism Solving NP-complete problems with nondeterministic SN P systems 3-SAT vs. numerical problems (Subset Sum et al.) conversion from binary to unary, and back Uniform family of SN P systems that solves Subset Sum with instances encoded in binary form Directions for further research

WMC 8 - Thessaloniki - June 25-28, Standard SN P systems An SN P system of degree m  1 is a construct:   (O,  1,  2, …,  m, syn, in) where: O  {a} is the singleton alphabet cells (neurons)  i  (n i, R i ) are placed in the nodes of the synapse graph syn, where: n i  0 : initial contents R i : finite set of rules syn  {1,2,…,m}  {1,2,…,m} : directed graph of synapses, without self-loops in  {1,2,…,m} : input neuron

WMC 8 - Thessaloniki - June 25-28, Standard SN P systems The rules can be: firing rules: E/a c  a; d with c  1, d  0 integers (if E  a c we simply write a c  a; d ) forgetting rules: a s  with s  1 and a s  L(E) for any firing rule E/a c  a; d in the neuron initial configuration: n 1, n 2, …, n m spikes in the neurons all neurons are open configuration (during computations): for each neuron: number of spikes in the neuron number of steps to wait until the neuron becomes open

WMC 8 - Thessaloniki - June 25-28, Standard SN P systems Computation of f:    the system starts in the initial configuration input n enters in in, encoded as the time elapsed between two spikes (unary notation) computation proceeds sequentially in every neuron, and in parallel between the neurons if  2 rules can be applied in a neuron, a nondeterministic choice is made the system is deterministic if L(E i )  L(E j ) =  for all i  j if the system halts, then the output f(n) is read as the time elapsed between the first two spikes emitted by the system

WMC 8 - Thessaloniki - June 25-28, Standard SN P systems (Already) many variants/possibilities: different halting conditions different ways to encode input and output values (ex: number of spikes) different ways to compute f:      directly (spike trains in input and output) through bijections (     and     ) generative case: we ignore the input accepting case: we ignore the output

WMC 8 - Thessaloniki - June 25-28, Description size Description size of  : number of bits required to represent it: no bits for the alphabet  m 2 bits for the synapse graph in (and out ): lg m bits for every neuron  i : n i  N  lg N bits at most R rules; for each rule E/a c  a; d o type  {firing, accepting}  1 bit o regular expression E  size  S bits o two numbers  2 lg N bits m lg m + m (lg N + R (1 + S + 2 lg N)) bits

WMC 8 - Thessaloniki - June 25-28, Description size Remark: we work with unary languages every string is bijectively associated with its length a compact representation of E works on the lengths regular expressions on natural numbers union and Kleene star are computed as usual L 1  L 2 : all numbers of L 1 are summed with those of L 2 in all possible ways Example: {2,3}  {2,5} = {4,5,7,8}

WMC 8 - Thessaloniki - June 25-28, Computational power SN P systems are universal (Turing complete) also if we remove forgetting rules or delays also if the outdegree of syn is 2 also with regular expressions of very simple forms nondeterministic systems are able to solve 3-SAT deterministic systems with regular expressions of very restricted forms can be simulated by DTM with a polynomial slowdown using general regular expressions, choosing the rule to apply is at least as difficult as solving Subset Sum

WMC 8 - Thessaloniki - June 25-28, The 3-SAT problem variables X = {x 1, x 2, …, x n } literal X i : directed ( x i ) or negated (  x i ) variable 3-clause: disjunction of exactly three literals assignment: function a : X  { false, true } The 3-SAT problem: instance: set C = {C 1,C 2,…,C m } of 3-clauses built on X (equiv.,  = C 1  C 2  …  C m ) question: is there an assignment which satisfies all the clauses? (equiv., which satisfies  ) Note: m  (2n) 3 = 8n 3

WMC 8 - Thessaloniki - June 25-28, Solving 3-SAT with SN P systems a “circuit” with four layers first two layers: one module for each variable This appears only once

WMC 8 - Thessaloniki - June 25-28, Solving 3-SAT with SN P systems next two layers: one module for each variable semi-uniform solution generative approach solution given in constant time

WMC 8 - Thessaloniki - June 25-28, Deterministic SN P systems explicit simulation by DTMs given in the Technical Report of the last Brainstorming t steps of any deterministic SN P system  can be simulated in poly(t, Description size) steps of a DTM crucial assumption: regular expressions are of very restricted form, for example : a i, with i  3 a(aa) + (the membership problem must be polynomial also the succint version)

WMC 8 - Thessaloniki - June 25-28, The Subset Sum problem instance: a (multi)set V = {v 1,v 2,…,v n } of positive integer values a positive integer value S question: is there a sub(multi)set A  V such that numerical, pseudo-polynomial NP-complete problem instance size: let K = max{v 1,v 2,…,v n, S} each number requires lg K bits to be represented total size:  (n lg K)

WMC 8 - Thessaloniki - June 25-28, Solving Subset Sum with SN P systems let ({v 1,v 2,…,v n }, S) be an instance of Subset Sum consider the languages (in succint form): L i = {0,v i }, for i  {1,2,…,n} let L = L 1  L 2  …  L n membership problem: is S  L ? the answer is yes if and only if the instance of Subset Sum is positive deciding whether the rule E/a c  a; d can be applied, when L = L(E) and the neuron contains S spikes, can be difficult (hidden power)

WMC 8 - Thessaloniki - June 25-28, Extending SN P systems Differences with traditional SN P systems: we allow rules of type E/a c  a p ; d with c  1, p  0, d  0 p = 1 : traditional rules p = 0 : forgetting rules no mutual exclusion between firing and forgetting rules output neuron ( out ); if out = 0, then the output is sent to the environment different interpretations of output: number of spikes in a given time interval number of spikes contained in out

WMC 8 - Thessaloniki - June 25-28, Solving Subset Sum with SN P systems

WMC 8 - Thessaloniki - June 25-28, Solving Subset Sum with SN P systems generative system semi-uniform approach (input encoded both in the initial configuration and in the structure of the system) solution given in constant time nondeterminism: at least one computation chooses the correct v i, if possible (again magic power) in particular, we don’t like: rules operate on large ( O(K) ) numbers of spikes the initial configuration contains O(nK) spikes

WMC 8 - Thessaloniki - June 25-28, Dynamic programming solution boolean matrix M[1..n, 0..S] M[i, j] = 1  there exists B  {v 1,…,v i } such that space and time complexity:  (nK) solution

WMC 8 - Thessaloniki - June 25-28, Dynamic programming solution pseudo-code:

WMC 8 - Thessaloniki - June 25-28, Encoding inputs in binary form : a k -bit non-negative integer number usual binary encoding using k consecutive time steps; at time k–1–j (with j  {0,1,…, k–1} ): presence of a spike if and only if N j = 1 conversion from binary to unary (next slide) N enters the system starting from msb one (undesired) spike is produced at the 2 nd step at the end of the k -th step, neuron j contains 2 j spikes if N j = 1, and 0 spikes otherwise at the ( k +1)-th step, neuron out becomes open and receives N spikes

WMC 8 - Thessaloniki - June 25-28, Encoding inputs in binary form maximal parallelism: one of the active rules is nondetermi- nistically chosen and is applied as many times as possible

WMC 8 - Thessaloniki - June 25-28, Solving Subset Sum (2 nd version) these rules remove spurious spikes instance (V, S) is positive if and only if one spike is emitted at the (2k+2) -nd step

WMC 8 - Thessaloniki - June 25-28, Solving Subset Sum (2 nd version) we can also use two neurons in the last layer nondeterministic and semi-uniform solution rules depend on the value of S idea: read also S in binary convert it compare it with spike if equal A better idea:  keep S in binary form  convert sum of B from unary to binary  perform a bit-by-bit comparison

WMC 8 - Thessaloniki - June 25-28, Conversion from unary to binary uses maximal parallelism at each step, an integer division by 2 is performed the result is propagated the remainder stays in the current neuron

WMC 8 - Thessaloniki - June 25-28, Conversion from unary to binary The conversion cannot be performed in polynomial time t(k) without using maximal parallelism regular expressions of restricted forms Q = max number of spikes produced by any rule the number of spikes is incremented at most by mQ units at each computation step M spikes in the initial configuration Hence, at most M + mQt(k) spikes after t(k) steps a polynomial quantity !

WMC 8 - Thessaloniki - June 25-28, Uniform solution of Subset Sum the output has to be observed exactly after 3k+6 steps length of delay subsystem: 3k+2 steps

WMC 8 - Thessaloniki - June 25-28, family {  (  n,k  )} n,k   such that for all n,k  ,  (  n,k  ) solves all possible instances ({v 1,…,v n }, S) where v 1,…,v n, S are all k -bit natural numbers the number of neurons and of rules is polynomial in n and k some spurious spikes may be emitted before the result the delay subsystem: Uniform solution of Subset Sum

WMC 8 - Thessaloniki - June 25-28, The Comparison subsystem emits one spike if and only if the two numbers given in input (expressed in binary form) are equal the subsystem computes the following boolean function:

WMC 8 - Thessaloniki - June 25-28, Conclusions and future research nondeterministic SN P systems solve NP-complete problems such as 3-SAT deterministic SN P systems with simple regexp can be simulated by Turing machines with a polynomial slowdown deterministic SN P systems with general regexp solve NP-complete problems such as Subset Sum Hence it should be interesting to investigate: influence of regular unary languages on the computational power of SN P systems the role of maximal parallelism (and different flavors of it)

WMC 8 - Thessaloniki - June 25-28, Last slide ! Thanks for your attention !