CSCI FOUNDATIONS OF COMPUTER SCIENCE

Size: px
Start display at page:

Download "CSCI FOUNDATIONS OF COMPUTER SCIENCE"

Transcription

1 1 CSCI FOUNDATIONS OF COMPUTER SCIENCE Spring 2015 My 7, 2015

2 2 Announcements Homework 9 is due now. Some finl exm review problems will be posted on the web site tody. These re prcqce problems not complete review of everything tht might be on the finl.

3 3 Review: Lnguges A string is sequence of lewers defined over n lphbet, Exmple lphbet: = {, b} is the set of ll possible strings mde from the lphbet Exmple: = {,,b,,b,b,bb,,...} A lnguge is set of strings. It is subset of How mny lnguges re there over the lphbet = {, b}?

4 We mesure the computqonl power of computqonl model by its bility to recognize lnguges. 4 Turing-Recognizble Lnguges n b n c n ww Context-Free Lnguges n b n Regulr Lnguges R ww * *b*

5 5 Review: Universl Turing Mchine A universl Turing mchine is progrmmble Turing mchine. It cn simulte ny Turing mchine. Tkes descripqon of Turing s input. *A Turing mchine cn be encoded s bit string.

6 6 Review: The Lnguge of Turing Mchines A Turing Mchine cn be described by string of 0s nd 1s. Therefore, the set of Turing Mchines form lnguge. Ech string of the lnguge is the binry encoding of Turing Mchine. L = { , , , (Turing Mchine 1) (Turing Mchine 2) }

7 7 LimitQons of Turing Mchines? The lnguge consisqng of ll Turing Mchine encodings is n infinite set. If there re infinitely mny Turing Mchines, does tht men tht every lnguge is recognized by some Turing Mchine? Not necessrily. Infinite sets come in different sizes. Countble vs. uncountble sets

8 8 Are there ny lnguges out here? Turing-Recognizble Lnguges n b n c n ww Context-Free Lnguges n b n Regulr Lnguges R ww * *b*

9 9 Review: Countble Sets An infinite set S is countble iff there exists bijecqve funcqon f: S Z + All infinite countble sets re the sme size. They ll hve the sme size s Z + All finite sets re countble.

10 10 Countble Sets An infinite set S is countble iff there exists bijecqve funcqon f: S Z + f mps ech element of S to exctly one element of Z +. Every element of Z + is mpped to by some element of S, under f. All infinite countble sets re the sme size. They ll hve the sme size s Z + All finite sets re countble.

11 11 Enumertors We cn lso show set is countble by describing n enumer;on procedure for the correspondence to nturl numbers. An enumerqon procedure is n lgorithm. A Turing Mchine cn do it. An enumertor for lnguge S is Turing Mchine tht genertes (prints on tpe) ll the strings in S one by one. Ech string is generted in finite Qme.

12 12

13 13 Enumertion procedure: Proper Order (Cnonicl Order) 1. Produce ll strings of length 1 2. Produce ll strings of length 2 3. Produce ll strings of length 3 4. Produce ll strings of length 4...

14 14 CounQng Turing Mchines Recll, Turing Mchine cn be encoded s bit string. A string of 0s nd 1s. The lnguge of Turing mchines is the set contining ll of these bit strings. Theorem: The set of ll Turing Mchines is countble. We will prove this theorem by finding n enumerqon procedure for the set.

15 15 Enumertor: Repet 1. Generte the next binry string of 0 s nd 1 s in cnonicl order 2. Check if the string describes Turing Mchine if YES: print string on output tpe if NO: ignore string

16 Binry strings Turing Mchines! s ! s ! QED

17 17 Note tht: X = { L, L, L, } is multi-set (elements my repet) since lnguge my be ccepted by more thn one Turing mchine However, if we remove the repeted elements, the resulting set is gin countble since every element still corresponds to positive integer

18 18 Are there ny lnguges out here? Turing-Recognizble Lnguges n b n c n ww Context-Free Lnguges n b n Regulr Lnguges R ww * *b*

19 19 LimitQons of Turing Mchines? The lnguge consisqng of ll Turing Mchine encodings is n infinite set. If there re infinitely mny Turing Mchines, does tht men tht every lnguge is recognized by some Turing Mchine? The set of Turing Mchines is countble. Is the set ll of lnguges countble?

20 20 Definition: A set is uncountble if it is not countble Theorem: If S is n infinite countble set, then P(S) (the power set of S) is n uncountble set.

21 Proof: Since S is countble, we cn write 21 S = { s1, s2, s3, } Elements of the power set { 3 { 10 s 1, s } s5, s7, s9, s } P(S) hve the form:

22 We encode ech element of the power set with binry string of 0 s nd 1 s 22 Powerset element (in rbitrry order) Binry encoding s1 s2 s 3 s 4! { s 1 } ! { s 2, s 3} ! { s1, s3, s 4 } !

23 Observtion: Every infinite binry string corresponds to n element of the powerset: 23 Exmple: ! Corresponds to: {s 1, s 4, s 5, s 6, }

24 24 Let s ssume (for contrdiction) tht the power set of S is countble Then: we cn enumerte the elements of the powerset P ( S) = { t, t, t,...} 1 2 3

25 Powerset element suppose tht this is the respective Binry encoding 25 t ! t ! t ! t !!!

26 Tke the binry string whose bits re the complement of the digonl 26 t ! t 2 t 3 t !!! Binry string: t = 0011 (birry complement of digonl)

27 27 The binry string t =0011 corresponds to n element of the power set of S : t = { s, s,...} P( S) 3 4

28 Thus, t must be equl to some ti 28 t =t i However, the i-th bit in the encoding of the complement of the i-th bit of, thus: t is ti t t i Contrdiction!!!

29 29 Since we hve contrdiction: The power set of S is uncountble. QED Cntor s Digonl Argument

30 30 Consider Alphbet : A = {, b} The set of ll Strings: S = {, b} * = { λ,, b,, b, b, bb,, b, } infinite nd countble Any lnguge is subset of : S L = {, b, b}

31 31 Consider Alphbet : A = {, b} The set of ll Strings: S = A * = {, b} * = { λ,, b,, b, b, bb,, b, } infinite nd countble The power set of S contins ll lnguges: P( S) = {,{ λ},{ },{, b},{, b},...,{, b, b},...} uncountble

32 Lnguges: uncountble 32 L1 L2 L3!! Lk M1 M2 M3? Turing mchines: countble There re more lnguges thn Turing Mchines

33 33 Conclusion: There re some lnguges not ccepted by Turing Mchines (These lnguges cnnot be described by lgorithms)

34 Are there ny lnguges out here? YES Turing-Recognizble Lnguges n b n c n ww 34 Context-Free Lnguges n b n R ww Regulr Lnguges * *b*

35 Fll 2006 Costs Busch - RPI 35 TURING- RECOGNIZABLE AND TURING DECIDABLE LANGUAGES

36 36 Lnguges Accepted by Turing Mchine A lnguge is clled Turing- recognizble if some Turing Mchine recognizes it (k ccepts it). If w 2 L the TM hlts in n ccept stte If w/2 L the TM hlts in reject stte OR loops forever A lnguge is clled Turing- decidble if some Turing Mchine decides it. If w 2 L the TM hlts in n ccept stte If w/2 L the TM hlts in reject stte The TM lwys hlts. The set of Turing- decidble lnguges is subset of the set of Turing- recognizble lnguges

37 37 Turing-Recognizble Lnguges Turing-Decidble Lnguges Context-Free Lnguges Regulr Lnguges

38 38 Lnguges Accepted by Turing Mchine We showed tht there re lnguges tht re not recognized by ny Turing Mchine. We used nonconstrucqve existence proof. We will show: There is specific lnguge tht is not recognized by ny Turing mchine There is specific lnguge tht is recognized by Turing mchine but is not decided by ny Turning mchine.

39 39 Let the lphbet be {} We cn generte lnguges over this lphbet, e.g. L 1 = {,,,,.} L 2 = {,,, } Consider TMs tht recognize these lnguges, i.e., L(M 1 ) = L 1 L(M 2 ) = L 2 The set of these TMs is countble {M 1, M 2, M 3, }

40 40 Exmple lnguge ccepted by M i L( Mi ) = {,, } Alterntive representtion of lnguge = bit string ! L( Mi ) !

41 ! L( M1) L( M2 ) L( M3 ) ! ! ! L( M4 ) !

42 ! L( M1) L( M2 ) L( M3 ) ! ! ! L( M4 ) ! 3 4 L = {,, } L = { i : i 2 L(M i ), for i 1}

43 ! L( M1) L( M2 ) L( M3 ) ! ! ! L( M4 ) ! L = { 1, 2, } Is there TM tht recognizes this lnguge?

44 44 A Non- Turing- Recognizble Lnguge Theorem: The lnguge is not Turing Recognizble L i i = { : L( Mi )}

45 45 Proof: This is proof by contrdiction. Assume tht is Turing-recognizble. L Then, there must exist some TM tht recognizes L. Cll this TM M. L(M ) = L

46 ! L( M1) L( M2 ) L( M3 ) ! ! ! L( M4 ) ! Question: M = M 1?

47 ! L( M1) L( M2 ) L( M3 ) ! ! ! L( M4 ) ! Answer: M M 1 1 L(M ) 1 L(M 1 )

48 ! L( M1) L( M2 ) L( M3 ) ! ! ! L( M4 ) ! Question:? M = M 2

49 ! L( M1) L( M2 ) L( M3 ) ! ! ! L( M4 ) ! Answer: M = 2 L( M 2) M 2 2 L( M )

50 ! L( M1) L( M2 ) L( M3 ) ! ! ! L( M4 ) ! Question: M =M 3?

51 ! L( M1) L( M2 ) L( M3 ) ! ! ! L( M4 ) ! Answer: M 3 L( M ) 3 M L( M ) 3 3

52 52 Similrly: M M i for ny i Becuse either: i L(M ) i L(M i ) or i L(M ) i L(M i )

53 53 Therefore, the mchine M cnnot exist Therefore, the lnguge L is not Turing-recognizble QED

54 54 A Non- Turing- Recognizble Lnguge Theorem: The lnguge is not Turing Recognizble L i i = { : L( Mi )} We proved this with Cntor s digonl rgument.

55 The Chomsky Hierrchy L i i 55 = { : L( Mi )} Turing-Recognizble Lnguges Turing-Decidble Lnguges Context-Free Lnguges Regulr Lnguges

56 56 Lnguges Accepted by Turing Mchine We showed tht there is specific lnguge tht is not recognized by ny Turing mchine. We will show: There is specific lnguge tht is recognized by Turing mchine but is not decided by ny Turning mchine.

57 A lnguge tht is Turing- Recognizble but not Turing- Decidble Recll, for the lphbet {}, we cn generte lnguges over this lphbet, e.g. L 1 = {,,,,.} L 2 = {,,, } We enumerted the TMs tht recognize these lnguges: L(M 1 ) = L 1 57 L(M 2 ) = L 2 We defined the lnguge L = { i : i 2 L(M i ), for i 1} Clim: (1) L is Turing- recognizble nd (2) L is not Turing- decidble.

58 58 Proof tht L is Turing- Recognizble We will describe TM tht recognizes For ny input string w = i, compute i. Find Turing Mchine M i Using enumerqon procedure for Turing Mchines. Simulte M i on w If M i ccepts, then output ccept QED L = { i : i 2 L(M i ), for i 1}

59 59 Proof tht L is not Turing- Decidble This is proof by contrdicqon. L = { i : i 2 L(M i ), for i 1} Assume is Turing- decidble. Then, there exists mchine M tht decides L: If w 2 L, M hlts in n ccept stte. If w/2 L, M hlts in reject stte. i i This implies tht L = { : L( Mi )} is lso Turing- decidble. Why? But, L is not Turing- recognizble; therefore, it is not not Turing- decidble. Our ssumpqon hs led to contrdicqon. Therefore L is not Turing- decidble. QED

60 60 Hilbert s 10 th Problem In 1900, mthemqcin Dvid Hilbert posed 23 significnt mth problems s chllenge to the coming century. Hilbert s 10 th problem: Devise n lgorithm tht tests whether polynomil hs n integrl root. A polynomil is sum of terms, where ech term is product of vribles nd constnt ( coefficient). E.g. 6x 3 yz 2 + 3xy 2 x 3 10 A root of polynomil is n ssignment of vlues to its vribles tht mkes the polynomil equl 0. A root is n integrl root if the vribles vlues re ll integers. In 1970, Yuri MQjsevic proved tht no such lgorithm exists. Using noqons lid out in the Church- Turing thesis.

61 UNDECIDABILITY 61

62 62 Decision Problems Decision problems re problems with YES or NO nswer Does mchine M hve three sttes? Is w binry number? Does DFA M ccept ny input? A problem is decidble if some Turing mchine solves it. Outputs YES (ccept) when the nswer is yes nd outputs NO (reject) when the nswer is no. This is sme s sying the lnguge for the problem is decidble. A problem is undecidble if no Turing mchine decides it.

63 63 The Turing mchine tht decides (solves) problem nswers YES or NO for ech instnce of the problem. The Turing Mchine MUST HALT! Input problem instnce Turing Mchine YES NO We cll this TM Decider

64 64 Undecidble Problems Some decision problems re undecidble. There is no Turing mchine tht solves the problem for ll inputs. Exmple: The membership problem Input: Turing mchine M nd string w QuesQon: Does M ccept w? Theorem: The membership problem is undecidble There is no TM tht cn decide whether M ccepts w for ll M nd w.

65 65 Proof This is proof by contrdicqon. Assume the membership problem is decidble. This mens tht there is TM (cll it H) tht solves the membership problem every input (M,w). M YES M ccepts w H w NO M rejects w

66 66 Proof (cont.) Let L be ny Turing- recognizble lnguge, nd let M be the TM tht recognizes L. If the membership problem is decidble, then we cn construct TM tht decides L. This TM lwys hlts. M H YES ccept w M ccepts w? w NO reject w

67 67 Proof (cont.) We showed tht, if the membership problem is decidble, then: For ll L, if L is Turing- recognizble, then L is Turing- decidble. But not ll Turing- recognizble lnguges re Turing- decidble. This is contrdicqon. Therefore, the membership problem is undecidble. QED

68 68 The HlQng Problem Input: Turing Mchine M nd string w QuesQon: Does M hlt on input w? Theorem: The hlqng problem is undecidble. There is no TM tht cn determine whether M hlts on input w for ll M nd w. Proved in Turing s 1936 pper.

69 69 Proof This is proof by contrdicqon. Assume the hlqng problem is decidble. Then, there exists Turing mchine H tht solves the problem. M YES M hlts on w H w NO M doesn t hlt on w

70 70 Proof (cont.) Let L be Turing- recognizble lnguge Let M be the Turing mchine tht ccepts L. If the hlqng problem is decidble, then we cn construct Turing mchine tht decides L.

71 71 Turing Mchine tht decides L M H NO reject w w M hlts on w? YES Run M with input w ccept w Hlts on ccept stte reject w Hlts on reject stte

72 72 Proof (cont.) If the hlqng problem is decidble, this implies: For ll L, If L is Turing- recognizble, then L is lso Turing- decidble. But there re Turing- recognizble lnguges tht re not Turing- decidble. ContrdicQon! Therefore, the hlqng problem is undecidble. QED

Recursively Enumerable and Recursive. Languages

Recursively Enumerable and Recursive. Languages Recursively Enumerble nd Recursive nguges 1 Recll Definition (clss 19.pdf) Definition 10.4, inz, 6 th, pge 279 et S be set of strings. An enumertion procedure for Turing Mchine tht genertes ll strings

More information

CSC 473 Automata, Grammars & Languages 11/9/10

CSC 473 Automata, Grammars & Languages 11/9/10 CSC 473 utomt, Grmmrs & Lnguges 11/9/10 utomt, Grmmrs nd Lnguges Discourse 06 Decidbility nd Undecidbility Decidble Problems for Regulr Lnguges Theorem 4.1: (embership/cceptnce Prob. for DFs) = {, w is

More information

Non-Deterministic Finite Automata. Fall 2018 Costas Busch - RPI 1

Non-Deterministic Finite Automata. Fall 2018 Costas Busch - RPI 1 Non-Deterministic Finite Automt Fll 2018 Costs Busch - RPI 1 Nondeterministic Finite Automton (NFA) Alphbet ={} q q2 1 q 0 q 3 Fll 2018 Costs Busch - RPI 2 Nondeterministic Finite Automton (NFA) Alphbet

More information

Non Deterministic Automata. Linz: Nondeterministic Finite Accepters, page 51

Non Deterministic Automata. Linz: Nondeterministic Finite Accepters, page 51 Non Deterministic Automt Linz: Nondeterministic Finite Accepters, pge 51 1 Nondeterministic Finite Accepter (NFA) Alphbet ={} q 1 q2 q 0 q 3 2 Nondeterministic Finite Accepter (NFA) Alphbet ={} Two choices

More information

First Midterm Examination

First Midterm Examination Çnky University Deprtment of Computer Engineering 203-204 Fll Semester First Midterm Exmintion ) Design DFA for ll strings over the lphet Σ = {,, c} in which there is no, no nd no cc. 2) Wht lnguge does

More information

1.4 Nonregular Languages

1.4 Nonregular Languages 74 1.4 Nonregulr Lnguges The number of forml lnguges over ny lphbet (= decision/recognition problems) is uncountble On the other hnd, the number of regulr expressions (= strings) is countble Hence, ll

More information

Decidability. Models of Computation 1

Decidability. Models of Computation 1 Decidbility We investigte the power of lgorithms to solve problems. We demonstrte tht certin problems cn be solved lgorithmiclly nd others cnnot. Our objective is to explore the limits of lgorithmic solvbility.

More information

Anatomy of a Deterministic Finite Automaton. Deterministic Finite Automata. A machine so simple that you can understand it in less than one minute

Anatomy of a Deterministic Finite Automaton. Deterministic Finite Automata. A machine so simple that you can understand it in less than one minute Victor Admchik Dnny Sletor Gret Theoreticl Ides In Computer Science CS 5-25 Spring 2 Lecture 2 Mr 3, 2 Crnegie Mellon University Deterministic Finite Automt Finite Automt A mchine so simple tht you cn

More information

Part 5 out of 5. Automata & languages. A primer on the Theory of Computation. Last week was all about. a superset of Regular Languages

Part 5 out of 5. Automata & languages. A primer on the Theory of Computation. Last week was all about. a superset of Regular Languages Automt & lnguges A primer on the Theory of Computtion Lurent Vnbever www.vnbever.eu Prt 5 out of 5 ETH Zürich (D-ITET) October, 19 2017 Lst week ws ll bout Context-Free Lnguges Context-Free Lnguges superset

More information

11.1 Finite Automata. CS125 Lecture 11 Fall Motivation: TMs without a tape: maybe we can at least fully understand such a simple model?

11.1 Finite Automata. CS125 Lecture 11 Fall Motivation: TMs without a tape: maybe we can at least fully understand such a simple model? CS125 Lecture 11 Fll 2016 11.1 Finite Automt Motivtion: TMs without tpe: mybe we cn t lest fully understnd such simple model? Algorithms (e.g. string mtching) Computing with very limited memory Forml verifiction

More information

Automata and Languages

Automata and Languages Automt nd Lnguges Prof. Mohmed Hmd Softwre Engineering Lb. The University of Aizu Jpn Grmmr Regulr Grmmr Context-free Grmmr Context-sensitive Grmmr Regulr Lnguges Context Free Lnguges Context Sensitive

More information

Turing Machines Part One

Turing Machines Part One Turing Mchines Prt One Wht problems cn we solve with computer? Regulr Lnguges CFLs Lnguges recognizble by ny fesible computing mchine All Lnguges Tht sme drwing, to scle. All Lnguges The Problem Finite

More information

CS5371 Theory of Computation. Lecture 20: Complexity V (Polynomial-Time Reducibility)

CS5371 Theory of Computation. Lecture 20: Complexity V (Polynomial-Time Reducibility) CS5371 Theory of Computtion Lecture 20: Complexity V (Polynomil-Time Reducibility) Objectives Polynomil Time Reducibility Prove Cook-Levin Theorem Polynomil Time Reducibility Previously, we lernt tht if

More information

Deterministic Finite-State Automata

Deterministic Finite-State Automata Deterministic Finite-Stte Automt Deepk D Souz Deprtment of Computer Science nd Automtion Indin Institute of Science, Bnglore. 12 August 2013 Outline 1 Introduction 2 Exmple DFA 1 DFA for Odd number of

More information

Theory of Computation Regular Languages. (NTU EE) Regular Languages Fall / 38

Theory of Computation Regular Languages. (NTU EE) Regular Languages Fall / 38 Theory of Computtion Regulr Lnguges (NTU EE) Regulr Lnguges Fll 2017 1 / 38 Schemtic of Finite Automt control 0 0 1 0 1 1 1 0 Figure: Schemtic of Finite Automt A finite utomton hs finite set of control

More information

AUTOMATA AND LANGUAGES. Definition 1.5: Finite Automaton

AUTOMATA AND LANGUAGES. Definition 1.5: Finite Automaton 25. Finite Automt AUTOMATA AND LANGUAGES A system of computtion tht only hs finite numer of possile sttes cn e modeled using finite utomton A finite utomton is often illustrted s stte digrm d d d. d q

More information

First Midterm Examination

First Midterm Examination 24-25 Fll Semester First Midterm Exmintion ) Give the stte digrm of DFA tht recognizes the lnguge A over lphet Σ = {, } where A = {w w contins or } 2) The following DFA recognizes the lnguge B over lphet

More information

Nondeterminism and Nodeterministic Automata

Nondeterminism and Nodeterministic Automata Nondeterminism nd Nodeterministic Automt 61 Nondeterminism nd Nondeterministic Automt The computtionl mchine models tht we lerned in the clss re deterministic in the sense tht the next move is uniquely

More information

1. For each of the following theorems, give a two or three sentence sketch of how the proof goes or why it is not true.

1. For each of the following theorems, give a two or three sentence sketch of how the proof goes or why it is not true. York University CSE 2 Unit 3. DFA Clsses Converting etween DFA, NFA, Regulr Expressions, nd Extended Regulr Expressions Instructor: Jeff Edmonds Don t chet y looking t these nswers premturely.. For ech

More information

CS 373, Spring Solutions to Mock midterm 1 (Based on first midterm in CS 273, Fall 2008.)

CS 373, Spring Solutions to Mock midterm 1 (Based on first midterm in CS 273, Fall 2008.) CS 373, Spring 29. Solutions to Mock midterm (sed on first midterm in CS 273, Fll 28.) Prolem : Short nswer (8 points) The nswers to these prolems should e short nd not complicted. () If n NF M ccepts

More information

Finite Automata Theory and Formal Languages TMV027/DIT321 LP4 2018

Finite Automata Theory and Formal Languages TMV027/DIT321 LP4 2018 Finite Automt Theory nd Forml Lnguges TMV027/DIT321 LP4 2018 Lecture 10 An Bove April 23rd 2018 Recp: Regulr Lnguges We cn convert between FA nd RE; Hence both FA nd RE ccept/generte regulr lnguges; More

More information

Theory of Computation Regular Languages

Theory of Computation Regular Languages Theory of Computtion Regulr Lnguges Bow-Yw Wng Acdemi Sinic Spring 2012 Bow-Yw Wng (Acdemi Sinic) Regulr Lnguges Spring 2012 1 / 38 Schemtic of Finite Automt control 0 0 1 0 1 1 1 0 Figure: Schemtic of

More information

Regular Language. Nonregular Languages The Pumping Lemma. The pumping lemma. Regular Language. The pumping lemma. Infinitely long words 3/17/15

Regular Language. Nonregular Languages The Pumping Lemma. The pumping lemma. Regular Language. The pumping lemma. Infinitely long words 3/17/15 Regulr Lnguge Nonregulr Lnguges The Pumping Lemm Models of Comput=on Chpter 10 Recll, tht ny lnguge tht cn e descried y regulr expression is clled regulr lnguge In this lecture we will prove tht not ll

More information

For convenience, we rewrite m2 s m2 = m m m ; where m is repeted m times. Since xyz = m m m nd jxyj»m, we hve tht the string y is substring of the fir

For convenience, we rewrite m2 s m2 = m m m ; where m is repeted m times. Since xyz = m m m nd jxyj»m, we hve tht the string y is substring of the fir CSCI 2400 Models of Computtion, Section 3 Solutions to Homework 4 Problem 1. ll the solutions below refer to the Pumping Lemm of Theorem 4.8, pge 119. () L = f n b l k : k n + lg Let's ssume for contrdiction

More information

Turing Machines Part One

Turing Machines Part One Turing Mchines Prt One Hello Hello Condensed Condensed Slide Slide Reders! Reders! Tody s Tody s lecture lecture consists consists lmost lmost exclusively exclusively of of nimtions nimtions of of Turing

More information

Non Deterministic Automata. Formal Languages and Automata - Yonsei CS 1

Non Deterministic Automata. Formal Languages and Automata - Yonsei CS 1 Non Deterministic Automt Forml Lnguges nd Automt - Yonsei CS 1 Nondeterministic Finite Accepter (NFA) We llow set of possible moves insted of A unique move. Alphbet = {} Two choices q 1 q2 Forml Lnguges

More information

CMPSCI 250: Introduction to Computation. Lecture #31: What DFA s Can and Can t Do David Mix Barrington 9 April 2014

CMPSCI 250: Introduction to Computation. Lecture #31: What DFA s Can and Can t Do David Mix Barrington 9 April 2014 CMPSCI 250: Introduction to Computtion Lecture #31: Wht DFA s Cn nd Cn t Do Dvid Mix Brrington 9 April 2014 Wht DFA s Cn nd Cn t Do Deterministic Finite Automt Forml Definition of DFA s Exmples of DFA

More information

E 1 (n) = E 0 (n-1) E 0 (n) = E 0 (n-1)+e 0 (n-2) T(n -1)=2E 0 (n-2) + E 0 (n-3)

E 1 (n) = E 0 (n-1) E 0 (n) = E 0 (n-1)+e 0 (n-2) T(n -1)=2E 0 (n-2) + E 0 (n-3) cs3102: Theory of Computtion Clss 5: Non-Regulr PS1, Prolem 8 Menu Non-regulr lnguges Spring 2010 University of Virgini Dvid Evns PS1 Generl Comments Proofs re for mking convincing rguments, not for ofusction.

More information

1.3 Regular Expressions

1.3 Regular Expressions 56 1.3 Regulr xpressions These hve n importnt role in describing ptterns in serching for strings in mny pplictions (e.g. wk, grep, Perl,...) All regulr expressions of lphbet re 1.Ønd re regulr expressions,

More information

Finite Automata. Informatics 2A: Lecture 3. John Longley. 22 September School of Informatics University of Edinburgh

Finite Automata. Informatics 2A: Lecture 3. John Longley. 22 September School of Informatics University of Edinburgh Lnguges nd Automt Finite Automt Informtics 2A: Lecture 3 John Longley School of Informtics University of Edinburgh jrl@inf.ed.c.uk 22 September 2017 1 / 30 Lnguges nd Automt 1 Lnguges nd Automt Wht is

More information

CS375: Logic and Theory of Computing

CS375: Logic and Theory of Computing CS375: Logic nd Theory of Computing Fuhu (Frnk) Cheng Deprtment of Computer Science University of Kentucky 1 Tble of Contents: Week 1: Preliminries (set lgebr, reltions, functions) (red Chpters 1-4) Weeks

More information

a,b a 1 a 2 a 3 a,b 1 a,b a,b 2 3 a,b a,b a 2 a,b CS Determinisitic Finite Automata 1

a,b a 1 a 2 a 3 a,b 1 a,b a,b 2 3 a,b a,b a 2 a,b CS Determinisitic Finite Automata 1 CS4 45- Determinisitic Finite Automt -: Genertors vs. Checkers Regulr expressions re one wy to specify forml lnguge String Genertor Genertes strings in the lnguge Deterministic Finite Automt (DFA) re nother

More information

Math 4310 Solutions to homework 1 Due 9/1/16

Math 4310 Solutions to homework 1 Due 9/1/16 Mth 4310 Solutions to homework 1 Due 9/1/16 1. Use the Eucliden lgorithm to find the following gretest common divisors. () gcd(252, 180) = 36 (b) gcd(513, 187) = 1 (c) gcd(7684, 4148) = 68 252 = 180 1

More information

Finite-State Automata: Recap

Finite-State Automata: Recap Finite-Stte Automt: Recp Deepk D Souz Deprtment of Computer Science nd Automtion Indin Institute of Science, Bnglore. 09 August 2016 Outline 1 Introduction 2 Forml Definitions nd Nottion 3 Closure under

More information

This lecture covers Chapter 8 of HMU: Properties of CFLs

This lecture covers Chapter 8 of HMU: Properties of CFLs This lecture covers Chpter 8 of HMU: Properties of CFLs Turing Mchine Extensions of Turing Mchines Restrictions of Turing Mchines Additionl Reding: Chpter 8 of HMU. Turing Mchine: Informl Definition B

More information

Section: Other Models of Turing Machines. Definition: Two automata are equivalent if they accept the same language.

Section: Other Models of Turing Machines. Definition: Two automata are equivalent if they accept the same language. Section: Other Models of Turing Mchines Definition: Two utomt re equivlent if they ccept the sme lnguge. Turing Mchines with Sty Option Modify δ, Theorem Clss of stndrd TM s is equivlent to clss of TM

More information

Math 61CM - Solutions to homework 9

Math 61CM - Solutions to homework 9 Mth 61CM - Solutions to homework 9 Cédric De Groote November 30 th, 2018 Problem 1: Recll tht the left limit of function f t point c is defined s follows: lim f(x) = l x c if for ny > 0 there exists δ

More information

Intermediate Math Circles Wednesday, November 14, 2018 Finite Automata II. Nickolas Rollick a b b. a b 4

Intermediate Math Circles Wednesday, November 14, 2018 Finite Automata II. Nickolas Rollick a b b. a b 4 Intermedite Mth Circles Wednesdy, Novemer 14, 2018 Finite Automt II Nickols Rollick nrollick@uwterloo.c Regulr Lnguges Lst time, we were introduced to the ide of DFA (deterministic finite utomton), one

More information

Formal languages, automata, and theory of computation

Formal languages, automata, and theory of computation Mälrdlen University TEN1 DVA337 2015 School of Innovtion, Design nd Engineering Forml lnguges, utomt, nd theory of computtion Thursdy, Novemer 5, 14:10-18:30 Techer: Dniel Hedin, phone 021-107052 The exm

More information

Non-Deterministic Finite Automata

Non-Deterministic Finite Automata Non-Deterministic Finite Automt http://users.comlb.ox.c.uk/luke. ong/teching/moc/nf2up.pdf 1 Nondeterministic Finite Automton (NFA) Alphbet ={} q1 q2 2 Alphbet ={} Two choices q1 q2 3 Alphbet ={} Two choices

More information

Homework 3 Solutions

Homework 3 Solutions CS 341: Foundtions of Computer Science II Prof. Mrvin Nkym Homework 3 Solutions 1. Give NFAs with the specified numer of sttes recognizing ech of the following lnguges. In ll cses, the lphet is Σ = {,1}.

More information

Finite Automata-cont d

Finite Automata-cont d Automt Theory nd Forml Lnguges Professor Leslie Lnder Lecture # 6 Finite Automt-cont d The Pumping Lemm WEB SITE: http://ingwe.inghmton.edu/ ~lnder/cs573.html Septemer 18, 2000 Exmple 1 Consider L = {ww

More information

Finite Automata. Informatics 2A: Lecture 3. Mary Cryan. 21 September School of Informatics University of Edinburgh

Finite Automata. Informatics 2A: Lecture 3. Mary Cryan. 21 September School of Informatics University of Edinburgh Finite Automt Informtics 2A: Lecture 3 Mry Cryn School of Informtics University of Edinburgh mcryn@inf.ed.c.uk 21 September 2018 1 / 30 Lnguges nd Automt Wht is lnguge? Finite utomt: recp Some forml definitions

More information

State Minimization for DFAs

State Minimization for DFAs Stte Minimiztion for DFAs Red K & S 2.7 Do Homework 10. Consider: Stte Minimiztion 4 5 Is this miniml mchine? Step (1): Get rid of unrechle sttes. Stte Minimiztion 6, Stte is unrechle. Step (2): Get rid

More information

Grammar. Languages. Content 5/10/16. Automata and Languages. Regular Languages. Regular Languages

Grammar. Languages. Content 5/10/16. Automata and Languages. Regular Languages. Regular Languages 5//6 Grmmr Automt nd Lnguges Regulr Grmmr Context-free Grmmr Context-sensitive Grmmr Prof. Mohmed Hmd Softwre Engineering L. The University of Aizu Jpn Regulr Lnguges Context Free Lnguges Context Sensitive

More information

Homework Solution - Set 5 Due: Friday 10/03/08

Homework Solution - Set 5 Due: Friday 10/03/08 CE 96 Introduction to the Theory of Computtion ll 2008 Homework olution - et 5 Due: ridy 10/0/08 1. Textook, Pge 86, Exercise 1.21. () 1 2 Add new strt stte nd finl stte. Mke originl finl stte non-finl.

More information

More on automata. Michael George. March 24 April 7, 2014

More on automata. Michael George. March 24 April 7, 2014 More on utomt Michel George Mrch 24 April 7, 2014 1 Automt constructions Now tht we hve forml model of mchine, it is useful to mke some generl constructions. 1.1 DFA Union / Product construction Suppose

More information

1 Structural induction, finite automata, regular expressions

1 Structural induction, finite automata, regular expressions Discrete Structures Prelim 2 smple uestions s CS2800 Questions selected for spring 2017 1 Structurl induction, finite utomt, regulr expressions 1. We define set S of functions from Z to Z inductively s

More information

1 Nondeterministic Finite Automata

1 Nondeterministic Finite Automata 1 Nondeterministic Finite Automt Suppose in life, whenever you hd choice, you could try oth possiilities nd live your life. At the end, you would go ck nd choose the one tht worked out the est. Then you

More information

Chapter Five: Nondeterministic Finite Automata. Formal Language, chapter 5, slide 1

Chapter Five: Nondeterministic Finite Automata. Formal Language, chapter 5, slide 1 Chpter Five: Nondeterministic Finite Automt Forml Lnguge, chpter 5, slide 1 1 A DFA hs exctly one trnsition from every stte on every symol in the lphet. By relxing this requirement we get relted ut more

More information

5. (±±) Λ = fw j w is string of even lengthg [ 00 = f11,00g 7. (11 [ 00)± Λ = fw j w egins with either 11 or 00g 8. (0 [ ffl)1 Λ = 01 Λ [ 1 Λ 9.

5. (±±) Λ = fw j w is string of even lengthg [ 00 = f11,00g 7. (11 [ 00)± Λ = fw j w egins with either 11 or 00g 8. (0 [ ffl)1 Λ = 01 Λ [ 1 Λ 9. Regulr Expressions, Pumping Lemm, Right Liner Grmmrs Ling 106 Mrch 25, 2002 1 Regulr Expressions A regulr expression descries or genertes lnguge: it is kind of shorthnd for listing the memers of lnguge.

More information

FORMAL LANGUAGES, AUTOMATA AND COMPUTABILITY. FLAC (15-453) - Spring L. Blum

FORMAL LANGUAGES, AUTOMATA AND COMPUTABILITY. FLAC (15-453) - Spring L. Blum 15-453 FORMAL LANGUAGES, AUTOMATA AND COMPUTABILITY THE PUMPING LEMMA FOR REGULAR LANGUAGES nd REGULAR EXPRESSIONS TUESDAY Jn 21 WHICH OF THESE ARE REGULAR? B = {0 n 1 n n 0} C = { w w hs equl numer of

More information

MORE FUNCTION GRAPHING; OPTIMIZATION. (Last edited October 28, 2013 at 11:09pm.)

MORE FUNCTION GRAPHING; OPTIMIZATION. (Last edited October 28, 2013 at 11:09pm.) MORE FUNCTION GRAPHING; OPTIMIZATION FRI, OCT 25, 203 (Lst edited October 28, 203 t :09pm.) Exercise. Let n be n rbitrry positive integer. Give n exmple of function with exctly n verticl symptotes. Give

More information

Homework 4. 0 ε 0. (00) ε 0 ε 0 (00) (11) CS 341: Foundations of Computer Science II Prof. Marvin Nakayama

Homework 4. 0 ε 0. (00) ε 0 ε 0 (00) (11) CS 341: Foundations of Computer Science II Prof. Marvin Nakayama CS 341: Foundtions of Computer Science II Prof. Mrvin Nkym Homework 4 1. UsetheproceduredescriedinLemm1.55toconverttheregulrexpression(((00) (11)) 01) into n NFA. Answer: 0 0 1 1 00 0 0 11 1 1 01 0 1 (00)

More information

Assignment 1 Automata, Languages, and Computability. 1 Finite State Automata and Regular Languages

Assignment 1 Automata, Languages, and Computability. 1 Finite State Automata and Regular Languages Deprtment of Computer Science, Austrlin Ntionl University COMP2600 Forml Methods for Softwre Engineering Semester 2, 206 Assignment Automt, Lnguges, nd Computility Smple Solutions Finite Stte Automt nd

More information

CS 275 Automata and Formal Language Theory

CS 275 Automata and Formal Language Theory CS 275 Automt nd Forml Lnguge Theory Course Notes Prt II: The Recognition Problem (II) Chpter II.6.: Push Down Automt Remrk: This mteril is no longer tught nd not directly exm relevnt Anton Setzer (Bsed

More information

Strong Bisimulation. Overview. References. Actions Labeled transition system Transition semantics Simulation Bisimulation

Strong Bisimulation. Overview. References. Actions Labeled transition system Transition semantics Simulation Bisimulation Strong Bisimultion Overview Actions Lbeled trnsition system Trnsition semntics Simultion Bisimultion References Robin Milner, Communiction nd Concurrency Robin Milner, Communicting nd Mobil Systems 32

More information

Closure Properties of Regular Languages

Closure Properties of Regular Languages Closure Properties of Regulr Lnguges Regulr lnguges re closed under mny set opertions. Let L 1 nd L 2 e regulr lnguges. (1) L 1 L 2 (the union) is regulr. (2) L 1 L 2 (the conctention) is regulr. (3) L

More information

Minimal DFA. minimal DFA for L starting from any other

Minimal DFA. minimal DFA for L starting from any other Miniml DFA Among the mny DFAs ccepting the sme regulr lnguge L, there is exctly one (up to renming of sttes) which hs the smllest possile numer of sttes. Moreover, it is possile to otin tht miniml DFA

More information

W. We shall do so one by one, starting with I 1, and we shall do it greedily, trying

W. We shall do so one by one, starting with I 1, and we shall do it greedily, trying Vitli covers 1 Definition. A Vitli cover of set E R is set V of closed intervls with positive length so tht, for every δ > 0 nd every x E, there is some I V with λ(i ) < δ nd x I. 2 Lemm (Vitli covering)

More information

Improper Integrals. Type I Improper Integrals How do we evaluate an integral such as

Improper Integrals. Type I Improper Integrals How do we evaluate an integral such as Improper Integrls Two different types of integrls cn qulify s improper. The first type of improper integrl (which we will refer to s Type I) involves evluting n integrl over n infinite region. In the grph

More information

Nondeterminism. Nondeterministic Finite Automata. Example: Moves on a Chessboard. Nondeterminism (2) Example: Chessboard (2) Formal NFA

Nondeterminism. Nondeterministic Finite Automata. Example: Moves on a Chessboard. Nondeterminism (2) Example: Chessboard (2) Formal NFA Nondeterminism Nondeterministic Finite Automt Nondeterminism Subset Construction A nondeterministic finite utomton hs the bility to be in severl sttes t once. Trnsitions from stte on n input symbol cn

More information

Convert the NFA into DFA

Convert the NFA into DFA Convert the NF into F For ech NF we cn find F ccepting the sme lnguge. The numer of sttes of the F could e exponentil in the numer of sttes of the NF, ut in prctice this worst cse occurs rrely. lgorithm:

More information

f(x) dx, If one of these two conditions is not met, we call the integral improper. Our usual definition for the value for the definite integral

f(x) dx, If one of these two conditions is not met, we call the integral improper. Our usual definition for the value for the definite integral Improper Integrls Every time tht we hve evluted definite integrl such s f(x) dx, we hve mde two implicit ssumptions bout the integrl:. The intervl [, b] is finite, nd. f(x) is continuous on [, b]. If one

More information

CSE 105 THEORY OF COMPUTATION

CSE 105 THEORY OF COMPUTATION CSE 105 THEORY OF COMPUTATION Spring 2016 http://cseweb.ucsd.edu/classes/sp16/cse105-ab/ Today's learning goals Sipser Ch 4.1, 5.1 Define reductions from one problem to another. Use reductions to prove

More information

Revision Sheet. (a) Give a regular expression for each of the following languages:

Revision Sheet. (a) Give a regular expression for each of the following languages: Theoreticl Computer Science (Bridging Course) Dr. G. D. Tipldi F. Bonirdi Winter Semester 2014/2015 Revision Sheet University of Freiurg Deprtment of Computer Science Question 1 (Finite Automt, 8 + 6 points)

More information

Handout: Natural deduction for first order logic

Handout: Natural deduction for first order logic MATH 457 Introduction to Mthemticl Logic Spring 2016 Dr Json Rute Hndout: Nturl deduction for first order logic We will extend our nturl deduction rules for sententil logic to first order logic These notes

More information

CS 330 Formal Methods and Models

CS 330 Formal Methods and Models CS 330 Forml Methods nd Models Dn Richrds, George Mson University, Spring 2017 Quiz Solutions Quiz 1, Propositionl Logic Dte: Ferury 2 1. Prove ((( p q) q) p) is tutology () (3pts) y truth tle. p q p q

More information

1 Structural induction

1 Structural induction Discrete Structures Prelim 2 smple questions Solutions CS2800 Questions selected for Spring 2018 1 Structurl induction 1. We define set S of functions from Z to Z inductively s follows: Rule 1. For ny

More information

DISCRETE MATHEMATICS HOMEWORK 3 SOLUTIONS

DISCRETE MATHEMATICS HOMEWORK 3 SOLUTIONS DISCRETE MATHEMATICS 21228 HOMEWORK 3 SOLUTIONS JC Due in clss Wednesdy September 17. You my collborte but must write up your solutions by yourself. Lte homework will not be ccepted. Homework must either

More information

Harvard University Computer Science 121 Midterm October 23, 2012

Harvard University Computer Science 121 Midterm October 23, 2012 Hrvrd University Computer Science 121 Midterm Octoer 23, 2012 This is closed-ook exmintion. You my use ny result from lecture, Sipser, prolem sets, or section, s long s you quote it clerly. The lphet is

More information

Decision Problems with TM s. Lecture 31: Halting Problem. Universe of discourse. Semi-decidable. Look at following sets: CSCI 81 Spring, 2012

Decision Problems with TM s. Lecture 31: Halting Problem. Universe of discourse. Semi-decidable. Look at following sets: CSCI 81 Spring, 2012 Decision Problems with TM s Look at following sets: Lecture 31: Halting Problem CSCI 81 Spring, 2012 Kim Bruce A TM = { M,w M is a TM and w L(M)} H TM = { M,w M is a TM which halts on input w} TOTAL TM

More information

The University of Nottingham SCHOOL OF COMPUTER SCIENCE A LEVEL 2 MODULE, SPRING SEMESTER LANGUAGES AND COMPUTATION ANSWERS

The University of Nottingham SCHOOL OF COMPUTER SCIENCE A LEVEL 2 MODULE, SPRING SEMESTER LANGUAGES AND COMPUTATION ANSWERS The University of Nottinghm SCHOOL OF COMPUTER SCIENCE LEVEL 2 MODULE, SPRING SEMESTER 2016 2017 LNGUGES ND COMPUTTION NSWERS Time llowed TWO hours Cndidtes my complete the front cover of their nswer ook

More information

Read section 3.3, 3.4 Announcements:

Read section 3.3, 3.4 Announcements: Dte: 3/1/13 Objective: SWBAT pply properties of exponentil functions nd will pply properties of rithms. Bell Ringer: 1. f x = 3x 6, find the inverse, f 1 x., Using your grphing clcultor, Grph 1. f x,f

More information

CSCI 340: Computational Models. Kleene s Theorem. Department of Computer Science

CSCI 340: Computational Models. Kleene s Theorem. Department of Computer Science CSCI 340: Computtionl Models Kleene s Theorem Chpter 7 Deprtment of Computer Science Unifiction In 1954, Kleene presented (nd proved) theorem which (in our version) sttes tht if lnguge cn e defined y ny

More information

Lecture 6 Regular Grammars

Lecture 6 Regular Grammars Lecture 6 Regulr Grmmrs COT 4420 Theory of Computtion Section 3.3 Grmmr A grmmr G is defined s qudruple G = (V, T, S, P) V is finite set of vribles T is finite set of terminl symbols S V is specil vrible

More information

4 7x =250; 5 3x =500; Read section 3.3, 3.4 Announcements: Bell Ringer: Use your calculator to solve

4 7x =250; 5 3x =500; Read section 3.3, 3.4 Announcements: Bell Ringer: Use your calculator to solve Dte: 3/14/13 Objective: SWBAT pply properties of exponentil functions nd will pply properties of rithms. Bell Ringer: Use your clcultor to solve 4 7x =250; 5 3x =500; HW Requests: Properties of Log Equtions

More information

Riemann is the Mann! (But Lebesgue may besgue to differ.)

Riemann is the Mann! (But Lebesgue may besgue to differ.) Riemnn is the Mnn! (But Lebesgue my besgue to differ.) Leo Livshits My 2, 2008 1 For finite intervls in R We hve seen in clss tht every continuous function f : [, b] R hs the property tht for every ɛ >

More information

1 Showing Recognizability

1 Showing Recognizability CSCC63 Worksheet Recognizability and Decidability 1 1 Showing Recognizability 1.1 An Example - take 1 Let Σ be an alphabet. L = { M M is a T M and L(M) }, i.e., that M accepts some string from Σ. Prove

More information

Review of Riemann Integral

Review of Riemann Integral 1 Review of Riemnn Integrl In this chpter we review the definition of Riemnn integrl of bounded function f : [, b] R, nd point out its limittions so s to be convinced of the necessity of more generl integrl.

More information

CSE : Exam 3-ANSWERS, Spring 2011 Time: 50 minutes

CSE : Exam 3-ANSWERS, Spring 2011 Time: 50 minutes CSE 260-002: Exm 3-ANSWERS, Spring 20 ime: 50 minutes Nme: his exm hs 4 pges nd 0 prolems totling 00 points. his exm is closed ook nd closed notes.. Wrshll s lgorithm for trnsitive closure computtion is

More information

SOLUTIONS FOR ADMISSIONS TEST IN MATHEMATICS, COMPUTER SCIENCE AND JOINT SCHOOLS WEDNESDAY 5 NOVEMBER 2014

SOLUTIONS FOR ADMISSIONS TEST IN MATHEMATICS, COMPUTER SCIENCE AND JOINT SCHOOLS WEDNESDAY 5 NOVEMBER 2014 SOLUTIONS FOR ADMISSIONS TEST IN MATHEMATICS, COMPUTER SCIENCE AND JOINT SCHOOLS WEDNESDAY 5 NOVEMBER 014 Mrk Scheme: Ech prt of Question 1 is worth four mrks which re wrded solely for the correct nswer.

More information

CS:4330 Theory of Computation Spring Regular Languages. Equivalences between Finite automata and REs. Haniel Barbosa

CS:4330 Theory of Computation Spring Regular Languages. Equivalences between Finite automata and REs. Haniel Barbosa CS:4330 Theory of Computtion Spring 208 Regulr Lnguges Equivlences between Finite utomt nd REs Hniel Brbos Redings for this lecture Chpter of [Sipser 996], 3rd edition. Section.3. Finite utomt nd regulr

More information

NFA DFA Example 3 CMSC 330: Organization of Programming Languages. Equivalence of DFAs and NFAs. Equivalence of DFAs and NFAs (cont.

NFA DFA Example 3 CMSC 330: Organization of Programming Languages. Equivalence of DFAs and NFAs. Equivalence of DFAs and NFAs (cont. NFA DFA Exmple 3 CMSC 330: Orgniztion of Progrmming Lnguges NFA {B,D,E {A,E {C,D {E Finite Automt, con't. R = { {A,E, {B,D,E, {C,D, {E 2 Equivlence of DFAs nd NFAs Any string from {A to either {D or {CD

More information

NFAs and Regular Expressions. NFA-ε, continued. Recall. Last class: Today: Fun:

NFAs and Regular Expressions. NFA-ε, continued. Recall. Last class: Today: Fun: CMPU 240 Lnguge Theory nd Computtion Spring 2019 NFAs nd Regulr Expressions Lst clss: Introduced nondeterministic finite utomt with -trnsitions Tody: Prove n NFA- is no more powerful thn n NFA Introduce

More information

Deterministic Finite Automata

Deterministic Finite Automata Finite Automt Deterministic Finite Automt H. Geuvers nd J. Rot Institute for Computing nd Informtion Sciences Version: fll 2016 J. Rot Version: fll 2016 Tlen en Automten 1 / 21 Outline Finite Automt Finite

More information

CS 310 (sec 20) - Winter Final Exam (solutions) SOLUTIONS

CS 310 (sec 20) - Winter Final Exam (solutions) SOLUTIONS CS 310 (sec 20) - Winter 2003 - Finl Exm (solutions) SOLUTIONS 1. (Logic) Use truth tles to prove the following logicl equivlences: () p q (p p) (q q) () p q (p q) (p q) () p q p q p p q q (q q) (p p)

More information

UniversitaireWiskundeCompetitie. Problem 2005/4-A We have k=1. Show that for every q Q satisfying 0 < q < 1, there exists a finite subset K N so that

UniversitaireWiskundeCompetitie. Problem 2005/4-A We have k=1. Show that for every q Q satisfying 0 < q < 1, there exists a finite subset K N so that Problemen/UWC NAW 5/7 nr juni 006 47 Problemen/UWC UniversitireWiskundeCompetitie Edition 005/4 For Session 005/4 we received submissions from Peter Vndendriessche, Vldislv Frnk, Arne Smeets, Jn vn de

More information

CS375: Logic and Theory of Computing

CS375: Logic and Theory of Computing CS375: Logic nd Theory of Computing Fuhu (Frnk) Cheng Deprtment of Computer Science University of Kentucky 1 Tle of Contents: Week 1: Preliminries (set lger, reltions, functions) (red Chpters 1-4) Weeks

More information

Before we can begin Ch. 3 on Radicals, we need to be familiar with perfect squares, cubes, etc. Try and do as many as you can without a calculator!!!

Before we can begin Ch. 3 on Radicals, we need to be familiar with perfect squares, cubes, etc. Try and do as many as you can without a calculator!!! Nme: Algebr II Honors Pre-Chpter Homework Before we cn begin Ch on Rdicls, we need to be fmilir with perfect squres, cubes, etc Try nd do s mny s you cn without clcultor!!! n The nth root of n n Be ble

More information

Myhill-Nerode Theorem

Myhill-Nerode Theorem Overview Myhill-Nerode Theorem Correspondence etween DA s nd MN reltions Cnonicl DA for L Computing cnonicl DFA Myhill-Nerode Theorem Deepk D Souz Deprtment of Computer Science nd Automtion Indin Institute

More information

CS 301. Lecture 04 Regular Expressions. Stephen Checkoway. January 29, 2018

CS 301. Lecture 04 Regular Expressions. Stephen Checkoway. January 29, 2018 CS 301 Lecture 04 Regulr Expressions Stephen Checkowy Jnury 29, 2018 1 / 35 Review from lst time NFA N = (Q, Σ, δ, q 0, F ) where δ Q Σ P (Q) mps stte nd n lphet symol (or ) to set of sttes We run n NFA

More information

ARITHMETIC OPERATIONS. The real numbers have the following properties: a b c ab ac

ARITHMETIC OPERATIONS. The real numbers have the following properties: a b c ab ac REVIEW OF ALGEBRA Here we review the bsic rules nd procedures of lgebr tht you need to know in order to be successful in clculus. ARITHMETIC OPERATIONS The rel numbers hve the following properties: b b

More information

5.1 Definitions and Examples 5.2 Deterministic Pushdown Automata

5.1 Definitions and Examples 5.2 Deterministic Pushdown Automata CSC4510 AUTOMATA 5.1 Definitions nd Exmples 5.2 Deterministic Pushdown Automt Definitions nd Exmples A lnguge cn be generted by CFG if nd only if it cn be ccepted by pushdown utomton. A pushdown utomton

More information

Prefix-Free Subsets of Regular Languages and Descriptional Complexity

Prefix-Free Subsets of Regular Languages and Descriptional Complexity Prefix-Free Susets of Regulr Lnguges nd Descriptionl Complexity Jozef Jirásek Jurj Šeej DCFS 2015 Prefix-Free Susets of Regulr Lnguges nd Descriptionl Complexity Jozef Jirásek, Jurj Šeej 1/22 Outline Mximl

More information

CS 330 Formal Methods and Models

CS 330 Formal Methods and Models CS 330 Forml Methods nd Models Dn Richrds, section 003, George Mson University, Fll 2017 Quiz Solutions Quiz 1, Propositionl Logic Dte: Septemer 7 1. Prove (p q) (p q), () (5pts) using truth tles. p q

More information

a n = 1 58 a n+1 1 = 57a n + 1 a n = 56(a n 1) 57 so 0 a n+1 1, and the required result is true, by induction.

a n = 1 58 a n+1 1 = 57a n + 1 a n = 56(a n 1) 57 so 0 a n+1 1, and the required result is true, by induction. MAS221(216-17) Exm Solutions 1. (i) A is () bounded bove if there exists K R so tht K for ll A ; (b) it is bounded below if there exists L R so tht L for ll A. e.g. the set { n; n N} is bounded bove (by

More information

1 Probability Density Functions

1 Probability Density Functions Lis Yn CS 9 Continuous Distributions Lecture Notes #9 July 6, 28 Bsed on chpter by Chris Piech So fr, ll rndom vribles we hve seen hve been discrete. In ll the cses we hve seen in CS 9, this ment tht our

More information

CSE396 Prelim I Answer Key Spring 2017

CSE396 Prelim I Answer Key Spring 2017 Nme nd St.ID#: CSE96 Prelim I Answer Key Spring 2017 (1) (24 pts.) Define A to e the lnguge of strings x {, } such tht x either egins with or ends with, ut not oth. Design DFA M such tht L(M) = A. A node-rc

More information

CSE 105 THEORY OF COMPUTATION

CSE 105 THEORY OF COMPUTATION CSE 105 THEORY OF COMPUTATION Spring 2018 http://cseweb.ucsd.edu/classes/sp18/cse105-ab/ Today's learning goals Sipser Ch 5.1, 5.3 Define and explain core examples of computational problems, including

More information