10/2/2015
CMPS 364 Spring 2015 HW #3 Sample Solutions
CMPS 364 Spring 2015
HW #3: Finite Automata and Regular Expressions
Sample Solutions
Any theorems, exercises, or problems referred to here are from the first edition of Sipser's Introduction to the The

CSE 322 - Introduction to Formal Methods in Computer Science
Converting DFAs to Regular Expressions
Dave Bacon
Department of Computer Science & Engineering, University of Washington
Last time we saw how, given a regular expression, we could take this expr

CSE 322 - Introduction to Formal Methods in Computer Science
Closure Properties of Context-Free Languages
Dave Bacon
Department of Computer Science & Engineering, University of Washington
Previously we showed how regular operations were closed under certa

1
1 Expresses Regulares e Linguagens
Linguagem de Programao
o Pesquisa em Textos
o Componentes de Compiladores
Intimamente Relacionadas com AFNDs
So capazes de definir todas e somente as linguagens regulares
Servem de linguagem de entrada para muitos sist

CSE 322 - Introduction to Formal Methods in Computer Science
String Matching
Dave Bacon
Department of Computer Science & Engineering, University of Washington
Suppose that you are given a short pattern and a long text and you wish to determine if that pat

CSE 322 - Introduction to Formal Methods in Computer Science
The Pumping Lemma for Regular Languages
Dave Bacon
Department of Computer Science & Engineering, University of Washington
So far we have talked about regular languages and showed that they are c

CSE 322 - Introduction to Formal Methods in Computer Science
Regular Operations on Languages
Dave Bacon
Department of Computer Science & Engineering, University of Washington
I.
A QUESTION
Now that we have defined deterministic finite automata, we can beg

CSE 322 - Introduction to Formal Methods in Computer Science
Formal Definition of a Deterministic Finite Automata
Dave Bacon
Department of Computer Science & Engineering, University of Washington
I.
EXAMPLE FROM MY YOUTH AND MY OLD AGE
Back in the old day

CSE 322 - Introduction to Formal Methods in Computer Science
Equivalence of DFAs and NFAs
Dave Bacon
Department of Computer Science & Engineering, University of Washington
Last time we defined nondeterministic finite automata. Our motivation for doing thi

Linguagens Formais
Captulo 4: Autmatos finitos e expresses regulares
com Luiz Carlos Castro Guedes
4.1 - Introduo
Neste captulo estudaremos uma mquina (um procedimento aceitador, ou
reconhecedor), chamada autmato finito (af). A palavra finito includa no

CSE 322 - Introduction to Formal Methods in Computer Science
The pumping lemma for CFLs
Dave Bacon
Department of Computer Science & Engineering, University of Washington
Way back a along time ago, we derive a little thing called the pumping lemma for regu

T
AF
4
Autmatos finitos
Neste captulo vamos introduzir outras estruturas que permitem caracterizar as linguagens
regulares. A principal vantagem, destas novas estruturas, sobre a representao com
expresses regulares a de terem, naturalmente, associado um a

HOMEWORK ONE SOLUTION CSE 355
DUE: 08 FEBRUARY 2011
Please note that there is more than one way to answer most of
these questions. The following only represents a sample solution.
(1) (a) Construct a state diagram for a DFA M1 to recognize the language ov

CSE2001, Fall 2006
1
Problem Session 8 (Reductions)
Problem 1
Prove that the language L = cfw_hMi | M is a TM, and M accepts string w whenever it accepts
string w R is undecidable.
Solution: reduction from AT M .
This, and all the other reductions in thi

CIS 511: Spring 2012
Problem Set 6 Solutions
(1) Problem 8.15
Answer: We first note that the game can have only 2n2 configuration, defined
by position of the cat, position of the mouse and if it is cats turn. So we can
construct a directed graph consistin

10/2/2015
CMPS 364 Spring 2015 HW #2 Sample Solutions
CMPS 364 Spring 2015
HW #2: Deterministic Finite Automata
Sample Solutions
Note that in every drawing of a DFA, the initial state is the one that appears leftmost.
1. Employ the construction described

CSE105
Homework 3 Solutions
Fall, 2001
3.9.a
Consider the language L=cfw_anbncn:n0. We already know that this is not a CFL by Example 2.20;
hence, the standard 1-PDA cannot accept L. However, a 2-PDA can accept L by storing as on one
stack, bs on the othe

CS5371 Theory of Computation
Homework 5 (Solution)
1. Let S be a set and let C be a collection of subsets of S. A set S 0 , with S 0 S, is a called
a hitting set for C if every subset in C contains at least an element in S 0 . Let HITSET be
the language
c

Solutions to Assignment 5
October 27, 2000
Exercise 1 (40 points) Give context-free grammars generating the following languages.
1. The set of strings over the alphabet = cfw_a, b with twice as many as as bs.
2. The complement of the language cfw_an bn |

Solutions to Assignment 3
October 23, 2000
Exercise 2 (20 points) For each of the following languages, give two words that are members and
two words that are not membersa total of four words for each part. Assume that alphabet =
cfw_a, b in all parts.
1.

10/2/2015
CMPS 364 Spring 2015 HW #1 Sample Solutions
CMPS 364 Theory of Computation
Spring 2015 HW #1: Relations, Graphs, and Mathematical
Induction
1. Let A = cfw_a,b,c and let P = cfw_ reflexivity, symmetry, transitivity . For each of the three propert

CSE 396
Introduction to the Theory of Computation
Fall 2008
Homework Solution - Set 8
Due: Friday 10/31/08
1. Exercise 7.1
(a) True, n 0, 2n 2.n
(b) False, c(constant) > 0, let N = dce + 1 and then n N, n > c; n2 > cn.
(c) False, c > 0, let N be a minimal

Regular Expressions
2IT70 Finite Automata and Process Theory
Technische Universiteit Eindhoven
Quartile 2, 2014-2015
Regular expressions
class RE of regular expressions over alphabet
1 and 0
a for all a >
r1 r2 and r1 r2 for all r1 , r2 > RE
r for all

CSE 322 - Introduction to Formal Methods in Computer Science
Regular Expressions
Dave Bacon
Department of Computer Science & Engineering, University of Washington
Having just put behind us our first major theoretical result, that the class of languages re

CSE 322 - Introduction to Formal Methods in Computer Science
Pushdown Automata
Dave Bacon
Department of Computer Science & Engineering, University of Washington
Okay now that weve talked a little about context free grammars, a natural question to ask is:

CSE 322 - Introduction to Formal Methods in Computer Science
Introductionary Remarks
Dave Bacon
Department of Computer Science & Engineering, University of Washington
I.
INTRODUCTION
Computing devices are unlike most everything else in the universe. They

CSE 322 - Introduction to Formal Methods in Computer Science
Nondeterministic Finite Automata
Dave Bacon
Department of Computer Science & Engineering, University of Washington
Today we are going to talk about nondeterministic finite automata. Our motivati

CSE 322 - Introduction to Formal Methods in Computer Science
Minimizing DFAs
Dave Bacon
Department of Computer Science & Engineering, University of Washington
Last time we discussed the Myhill-Nerode theorem:
Myhill-Nerode Theorem
A is regular if and only

CSE 322 - Introduction to Formal Methods in Computer Science
Pushdown Automata And Context-Free Languages
Dave Bacon
Department of Computer Science & Engineering, University of Washington
Having introduced pushdown automata, we will now show that pushdown

CSE 396
Introduction to the Theory of Computation
Fall 2008
Homework Solution - Set 7
Due: Friday 10/24/08
1. Exercise 4.1
(a) a Yes, because M on input 0100 ends in an accept state.
(b) No, because M on input 011 ends in a non-accept state.
(c) No, becau