CS154 Formal Languages and Computability Thaddeus Aid Department of Computer Science San Jose State University Spring 2016 Creative Commons Attribution-ShareAlike.

Slides:



Advertisements
Similar presentations
Complexity Classes: P and NP
Advertisements

CSE 105 Theory of Computation Alexander Tsiatas Spring 2012 Theory of Computation Lecture Slides by Alexander Tsiatas is licensed under a Creative Commons.
Sets Lecture 11: Oct 24 AB C. This Lecture We will first introduce some basic set theory before we do counting. Basic Definitions Operations on Sets Set.
Discrete Mathematics Lecture 5 Alexander Bukharovich New York University.
Basic Structures: Sets, Functions, Sequences, Sums, and Matrices
Week 7 - Wednesday.  What did we talk about last time?  Set proofs and disproofs  Russell’s paradox.
Basic Structures: Sets, Functions, Sequences, Sums, and Matrices
January 5, 2015CS21 Lecture 11 CS21 Decidability and Tractability Lecture 1 January 5, 2015.
Complexity 7-1 Complexity Andrei Bulatov Complexity of Problems.
1 Introduction to Computability Theory Lecture12: Decidable Languages Prof. Amos Israeli.
Complexity 5-1 Complexity Andrei Bulatov Complexity of Problems.
1 Combinatorial Search Spring 2008 (Fourth Quarter)
CS5371 Theory of Computation Lecture 1: Mathematics Review I (Basic Terminology)
CS 454 Theory of Computation Sonoma State University, Fall 2011 Instructor: B. (Ravi) Ravikumar Office: 116 I Darwin Hall Original slides by Vahid and.
Turing Machines CS 105: Introduction to Computer Science.
 2004 SDU Introduction to the Theory of Computation My name: 冯好娣 My office: 计算中心 430
CS355 - Theory of Computation Lecture 2: Mathematical Preliminaries.
Functions Definition & purpose Notation Functions on binary / returning binary values Finite automaton model We haven’t completely left the world of counting.
Introduction Chapter 0. Three Central Areas 1.Automata 2.Computability 3.Complexity.
 Let A and B be any sets A binary relation R from A to B is a subset of AxB Given an ordered pair (x, y), x is related to y by R iff (x, y) is in R. This.
חישוביות וסיבוכיות Computability and Complexity Lecture 7 TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: A AAAA.
Theory of Computing Lecture 15 MAS 714 Hartmut Klauck.
CSCI 4325 / 6339 Theory of Computation Chapter One Zhixiang Chen Department of Computer Science University of Texas-Pan American.
INTRODUCTION TO THE THEORY OF COMPUTATION INTRODUCTION MICHAEL SIPSER, SECOND EDITION 1.
L ECTURE 1 T HEORY OF C OMPUTATION Yasir Imtiaz Khan.
Introduction to CS Theory Lecture 15 –Turing Machines Piotr Faliszewski
1 Sequential Machine Theory Prof. K. J. Hintz Department of Electrical and Computer Engineering Lecture 1 Adaptation to this.
CSCI 2670 Introduction to Theory of Computing Instructor: Shelby Funk.
CS 103 Discrete Structures Lecture 10 Basic Structures: Sets (1)
MATH 224 – Discrete Mathematics
CompSci 102 Discrete Math for Computer Science
Theory of Computation, Feodor F. Dragan, Kent State University 1 TheoryofComputation Spring, 2015 (Feodor F. Dragan) Department of Computer Science Kent.
Mathematical Preliminaries
Introduction Episode 0 What is TOC (Theory of Computation) about? Giorgi Japaridze Theory of Computability Subject: The fundamental mathematical properties.
Automata & Formal Languages, Feodor F. Dragan, Kent State University 1 CHAPTER 7 Time complexity Contents Measuring Complexity Big-O and small-o notation.
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.
Computability Review homework. Video. Variations. Definitions. Enumerators. Hilbert's Problem. Algorithms. Summary Homework: Give formal definition of.
CSCI 2670 Introduction to Theory of Computing October 13, 2005.
Fundamentals of Informatics Lecture 12 The Halting Problem Bas Luttik.
Donghyun (David) Kim Department of Mathematics and Physics North Carolina Central University 1 Chapter 0 Introduction Some slides are in courtesy of Prof.
Introduction Why do we study Theory of Computation ?
C Sc 132 Computing Theory Professor Meiliu Lu Computer Science Department.
Week 7 - Wednesday.  What did we talk about last time?  Proving the subset relationship  Proving set equality  Set counterexamples  Laws of set algebra.
Chapter 2 1. Chapter Summary Sets (This Slide) The Language of Sets - Sec 2.1 – Lecture 8 Set Operations and Set Identities - Sec 2.2 – Lecture 9 Functions.
Chapters 11 and 12 Decision Problems and Undecidability.
Theory of Computation. Introduction We study this course in order to answer the following questions: What are the fundamental capabilities and limitations.
Introduction Chapter 0.
Formal Language & Automata Theory
Computable Functions.
BCS2143 – Theory of Computer Science
Introduction to the Theory of Computation
CS154 Formal Languages and Computability
Lecture 1 Theory of Automata
CIS Automata and Formal Languages – Pei Wang
MATH 224 – Discrete Mathematics
Taibah University College of Computer Science & Engineering Course Title: Discrete Mathematics Code: CS 103 Chapter 2 Sets Slides are adopted from “Discrete.
Computer Science Department
Jaya Krishna, M.Tech, Assistant Professor
Course 2 Introduction to Formal Languages and Automata Theory (part 2)
Theory of Computation Turing Machines.
Teori Bahasa dan Automata Lecture 1: Course Overview and Introduction
INTRODUCTION TO THE THEORY OF COMPUTATION
Advanced Algorithms Analysis and Design
Mathematical Background 1
Mathematical Background 1
Teori Bahasa dan Automata Lecture 1: Course Overview and Introduction
Discrete Mathematics Lecture 6: Set and Function
Introduction Chapter 0.
Chapter 1 Introduction to the Theory of Computation
Subject Name: FORMAL LANGUAGES AND AUTOMATA THEORY
Presentation transcript:

CS154 Formal Languages and Computability Thaddeus Aid Department of Computer Science San Jose State University Spring 2016 Creative Commons Attribution-ShareAlike 4.0 International License 1

Citation Lecture developed in conjunction with: Introduction to Theory of Computation Anil Maheshwari Michiel Smid Creative Commons Attribution-ShareAlike 4.0 International License 2

A Quick Political Aside I have already mentioned that the point of computer science is to fix problems and change the world. Technology and education are highly impacted by politics Science is highly impacted by politics Voter turnout in 2012 – 56% Voter turnout in 2014 – 36% This means that if you show up your voice is worth 2-3x what it should be Your tuition fees, etc depend on the outcome of the election Young voters out number old voters Get registered and vote!!!! Creative Commons Attribution-ShareAlike 4.0 International License 3

Adds – Good News Professor Khuri (Chair of CS) has approved increasing class size This may mean moving class rooms See me during break for add code Creative Commons Attribution-ShareAlike 4.0 International License 4

TotalBoox.com The MLK library offers San Jose City Library card to all students Take in proof of address to obtain card The San Jose City Library system offers card holders TotalBoox.com memberships TotalBoox.com gives free access to a LARGE number of technical ebooks (as well as normal library books) Please make time to sign up, I will be using these books for reading material. Creative Commons Attribution-ShareAlike 4.0 International License 5

Complexity Theory “What makes some problems computationally hard and other problems easy?” What do we mean by “hard” and “easy”? Easy: efficiently solvable Hard: not efficiently solvable Examples? Central Question in Complexity Theory: Classify problems according to their degree of “difficulty”. Give a rigorous proof that problems that seem to be “hard” are really “hard”. Creative Commons Attribution-ShareAlike 4.0 International License 6

Defining a Problem A problem is an abstract of a question A Problem Instance is a particular case of a problem A problem is “is X number prime?” the instance would be “is 15 prime?” A Problem Instance is represented by a “String” formed from an “Alphabet” The “String” is the question in symbolic form The “Alphabet” defines the symbols used in the Question Creative Commons Attribution-ShareAlike 4.0 International License 7

Decision Problems A subset of Problems where the answer is yes or no. May be represented as True/False or 1/0 Is distinct from where the answer is yes/not-yes/no This is a problem with ambiguous language and high lights the need for formal language A formal language does not allow for ambiguous responses This may require that the question be restructured Does == 15? Do you like candidate X? Creative Commons Attribution-ShareAlike 4.0 International License 8

Functions More complex than Decision Problems Map 1 input to 1 output always equals 15 Output may or may not be unique depending on the Problem Creative Commons Attribution-ShareAlike 4.0 International License 9

Complexity Theory - Corollary What do we do after defining difficulty? Make problems easier. Dynamic Programming Algorithms Divide and Conquer Branch and Bound Etc. Creative Commons Attribution-ShareAlike 4.0 International License 10

What is an Algorithm? An algorithm is a self contained, step-by-step process, to go from input to output. Named for Al-Khwārizmī (Persian: خوارزمي ‎‎, c ) was a Persian mathematician, astronomer, geographer, and scholar.Al-KhwārizmīPersian astronomergeographer Creative Commons Attribution-ShareAlike 4.0 International License 11

The Importance of Naming Creative Commons Attribution-ShareAlike 4.0 International License 12

An Algorithm is: Efficient – minimum number of steps and effort Finite – It must have a well defined beginning and end Well Defined – No Ambiguity!!! Correct!!! An Algorithm: Starts at a defined “position” Moves through a finite series of steps Produces an output Creative Commons Attribution-ShareAlike 4.0 International License 13

Computation Theory What is Computable? Gödel, Church, and Turing discovered that not all Problems are computable. Central Question in Computability Theory: Classify problems as being solvable or unsolvable. Creative Commons Attribution-ShareAlike 4.0 International License 14

Back to Decision Problems Beyond how hard are Decision Problems to solve Are they actually solvable? Some are not Same with functions Classify how unsolvable they are Creative Commons Attribution-ShareAlike 4.0 International License 15

Introducing the Church-Turing Thesis In a Nutshell If an algorithm exists to solve a problem That problem is computable A good starting point to learn about unsolvable problems: Remember Wikipedia is a good place to start research, but don’t cite it, go to the original source and make sure you understand the original source. Wikipedia is FANTASTIC for putting you on the right track. What Problems share algorithms? Creative Commons Attribution-ShareAlike 4.0 International License 16

Automata Theory Roughly “Automata” means “Self-Acting” The study of abstract “machines” Often thought experiments that lead to the creation of “real” machines Creative Commons Attribution-ShareAlike 4.0 International License 17

Finite State Machines An abstract model of a machine that changes “state” on input. Visualized as states drawn as circles and transitions drawn as arrows. Creative Commons Attribution-ShareAlike 4.0 International License 18

Context Free Grammars A finite set of symbols and rules The rules determine which order the symbols may be arranged The symbols determine the type of terminal they can be replaced by Combining rules produces sentences This can be applied in reverse to determine if a sentence is grammatically correct. Used to define languages and in AI programming Creative Commons Attribution-ShareAlike 4.0 International License 19

Turing Machines An abstract machine Manipulates symbols on a tape Subject to rules Can be implemented to solve any algorithm Turing Complete: The ability to create any Turing Machine Hence, the ability to solve any computable problem Creative Commons Attribution-ShareAlike 4.0 International License 20

Mathematics Review Pre-requisites: Math 19 – Pre-calculus Math 42 – Discrete Mathematics Creative Commons Attribution-ShareAlike 4.0 International License 21

Sets A well defined collection of objects. Each object is unique Sets are unordered A = {1, 2, 3} B = {a, c, e} Creative Commons Attribution-ShareAlike 4.0 International License 22

Common Sets Natural Numbers: Integers: Rational Numbers : Real Numbers: Note: for those that know LaTeX and want to use PowerPoint Google “IguanaTeX” Creative Commons Attribution-ShareAlike 4.0 International License 23

Interactions Union: Intersect: Difference: Cartesian Product: Complement: Binary Relation: Creative Commons Attribution-ShareAlike 4.0 International License 24

Functions Function notation: Creative Commons Attribution-ShareAlike 4.0 International License 25

Relationships A = {All Inputs} B = {All Outputs} Injective (one to one): Surjective (onto): Bijective: Function f is bijective if it is both injective and surjective Creative Commons Attribution-ShareAlike 4.0 International License 26

Relationships For some set A, for binary relationships R(a,a) Reflexive: Symmetric: Transitive: Equivalent if Reflexive + Symmetric + Transitive Creative Commons Attribution-ShareAlike 4.0 International License 27

Graphs Graph G = (V, E) V is a set of Vertices E is a distinct set of paired Vertices Degree of a vertix: deg(v) is the number of edges connected to it Creative Commons Attribution-ShareAlike 4.0 International License 28

Strings Alphabet: a finite set of symbols A string is a finite collection of symbols where the symbols are members of the alphabet. The length of the string |w| is the number of symbols in the string The empty string ε has a length 0 A language is a set of strings Creative Commons Attribution-ShareAlike 4.0 International License 29

Boolean Values Creative Commons Attribution-ShareAlike 4.0 International License 30

Break! 15 Minute Break Adds come talk to me! Creative Commons Attribution-ShareAlike 4.0 International License 31