1. Complete the arguments in Example 5.2, showing that the language given is generated by the grammar. (S abB , A aaBb, B bbAa, A ) We are forced to start with abB and then we must repeatedly generate an A using the second rule and a B using the third rul
Fatih University
Department of Computer Engineering
CENG 304
Automata Theory and Formal Languages
Assignment 3
Ahmet Faruk Bikinler, 07010441
15 May 2007
ttp:/www.biskinler.com h http:/ahmet.piskinler.com/
3.3.1. Construct a dfa that accepts the language
CS373 Quiz 2, * solution * 9/23/03 1) (20 points) For the given NFA give the equivalent DFA produced by the "subset" construction. Label the states of the DFA with the subsets or clusters of states from the NFA that they represent. Show your work. (10 poi
COT 4210
Fall 2009
Sample Problems Key
1. Draw a DFA to recognize the set of strings over cfw_a,b*that contain the same number of occurrences of the substring ab as of the substring ba. a a b b b 2. Present the transition diagram or table for a DFA that a
Inductive arguments
Heres question 9 on midterm 2: Let G be a context-free grammar in Chomsky normal form and S w be a derivation of w with a derivation tree T . Suppose the height of T is n. Prove that |w| 2n1 .
Some of you pointed out that derivation tr
CS 301 - Homework 10
Due Tuesday, November 10 (start of lecture) Chapter 9 1. Consider the following Turing machine M :
q0 q3 , ,L a, a, R b, b, R q4 , ,R q5
q1
b, b, R
q2
a, a, L b, b, L
a, a, R
(a) Give the computation path trace for initial conguration
CS373 Fall 2003 NMG *Solutions *+ October 27, 2003 Homework Assignment 7 for chapter 7 Due 10/31/03 (Friday) at end of class Problems related to chapter 7. Unless otherwise noted you are to assume the conventions and definitions used in our text by Linz f
Solution to Homework 7 CS 321 1. Construct a Turing Machine (TM) that will accept the following languages. (a) [9.1.7(f)] L = an bm an+m : n 0, m 1 Solution: To accept an bm an+m , the machine puts a special character at start and goes to last part of the
10/24/03 Solution * CS373 Quiz 5 1) For the following grammar: S aS | A A bAc | d a) Give a leftmost derivation of aabdc. SaSaaSaaAaabAcaabdc b) Give a derivation tree for abbdcc. => c) What language does this grammar accept? cfw_ambndcn | m,n 0 a
S S A b
COMP110/L lect_week9
1D & 2D Arrays as Data Abstraction
COMP110/L
Professor Melara
Overview
1. Generalization of Arrays
2. 2D Arrays
Summary Model of processing arrays
Create an array of a given size n of a given type X (int, or double, or
boolean, or ch
COMP110
Methods Part I
Professor Melara
Signature of a Method
public static void main(String arg)
public int myCountChar(String name)
public String myname(int number)
public static boolean[] guessWhat( )
public static int rollDie(int faces)
public static
COMP110/L lab20
Review
COMP110/L
Professor Melara
What is the output?
Easy to copy and paste
Methods are easier
than copy and paste
Lab task
file LastnameFirstnameInitialRef16
Contains:
Task1: 2 Screen Shots
Task2: 2 Screen Shots
Task3: Reflection answeri
Task 1
Task 2
Task 3
Task 4
Task 5
The output that is printed out is two integers separated by a comma and a space, and it loops nine
times in rows. The numbers that are generated are no greater than 3 as stated in the for loop.
There are also conditions
Charles Darwin
On the Origin of Species
Charles Robert Darwin
Born: February 12, 1809
Died: 1882
Voyage of the Beagle
1831 - 1836
Alfred Russell Wallace
1859
1839
1871
1887
Book to accompany
the Darwin exhibit
that started touring
the country in 2009.
The
m: Edit Sonic: Relaclul Navigal: 55am. Plojecl Run Window Help
r'lliht'o'm'i'be @[jlall v-cfw_Elvbclvdov
t: Package Explurv 23 El %| 59 V =' El 13 Seasumjava E DiceGamejau-a m LoupsPIacc. [Q *REOJava 23 u =' El 5 Console 23
mm
COMP110/L First Java programs in
ECLIPSE
COMP110/L
Professor Melara
Overview
Installed
Java
Eclipse
Create the First Java Project and Hello World Class
Import the input/output module from [email protected]
Assignment specicaLon 1
Audio output
1.
In a recent survey in a Statistics class, it was determined that only 60% of the students attend
class on Fridays. From past data it was noted that 98% of those who went to class on Fridays
pass the course, while only 20% of those who did not go to cla
Complete-sentence outline format
Introduction
I.
II.
III.
IV.
V.
Attention getter
Credibility statement
General & Specific Purpose
Thesis statement
Preview main points
Body
I.
Main idea
A. Supporting point
1. Sub-supporting point
a.
b.
2. Sub- supporting
CS 373 Fall 2003 - NMG * SOLUTION*post* September 27, 2003 Homework Assignment 4 for chapter 4, PROB 9 DROPPED Due Friday, 10/3/03 After class Problems related to chapter 4: General directions: 1. Clearly justify all statements in your proofs 2. If using
CSCI3255: Math Foundations of CS Chapter 2, Section 1. Problems 1-15
Homework 2, (2.1), page 1
September 2006
1. Which of the following strings 0001, 01001, 0000110 are accepted by the dfa in Figure 2.1? 0 1 0 0 q0 1 q1 1 q2
Just "follow the bouncing ball
Formal Language Assignment Answer Chapter 8.1 2.
7.
(d) We use pumping lemma to prove L is not context-free. There exist a string W belong to L. Let W |vxy| m, |vy| 1 Case1: If vy a or vy Case2: If vy c and 1 Case3: If vy a b and 1 Case4: If vy b c , 1 No
7.1
6
4
7.2
12. For string ab: (q0 z q2) > a(q0 A q1)(q1 z q2) > ab For string aa+b: (q0 z q2) > a(q0 A q3)(q3 z q2) > aa(q3 z q2) > aaa*b > aa+b p.s. (q3 z q2) > (q0 z q1) (q1 z q2)| (q0 z q3) (q3 z q2) can generate a*b