4 Pages

Home3.06

Course: CS 4700, Fall 2008
School: Utah State
Rating:
 
 
 
 
 

Word Count: 828

Document Preview

3 Homework 10 points Note, these exercises may be done in groups of one, two, or three. Working with someone else is strongly recommended. If more than one person is involved, list all the names on ONE set of answers. Groups may change throughout the term. Working in groups is a BIG plus for you. Take advantage of it. If you work in groups, you must work in the group for the ENTIRE assignment. It is considered...

Register Now

Unformatted Document Excerpt

Coursehero >> Utah >> Utah State >> CS 4700

Course Hero has millions of student submitted documents similar to the one
below including study guides, practice problems, reference materials, practice exams, textbook help and tutor support.

Course Hero has millions of student submitted documents similar to the one below including study guides, practice problems, reference materials, practice exams, textbook help and tutor support.
3 Homework 10 points Note, these exercises may be done in groups of one, two, or three. Working with someone else is strongly recommended. If more than one person is involved, list all the names on ONE set of answers. Groups may change throughout the term. Working in groups is a BIG plus for you. Take advantage of it. If you work in groups, you must work in the group for the ENTIRE assignment. It is considered cheating if you work with someone else for some of the answers, but turn in an individual copy of the answers. It is an all or nothing situation. You can't work together on some questions and alone on some. Sometimes I see an individual whose name is listed in two groups. This is strictly forbidden and is considered cheating. You cannot work in two groups. Assignments are due at the beginning of class and should be typed. For this assignment, use the following notation for regular expressions o o o o o o a|b (or) ab (and - concatenation) (a) (grouping) a* (kleene closure - zero or more repetitions) a+ (one or more repetitions) a? (optional) Some extensions to make writing easier (PERL) [abc] one of a or b or c [a-z] anything from a to z inclusive [a-zA-Z] anything from a to z or A to Z inclusive [^abc] anything but a, b, or c . Any character except newline Other pattern matching capabilities are NOT part of regular expressions and should not be used. Chapter 4 Syntax 1. Write the following regular expressions Write the regular expression which defines a language in which the total number of b's is divisible by two, such as aabaabbaba Write the regular expression which defines a language in which three b's never occur together. Note that you must show that every string that fits the description can be generated and nothing that does not fit the description is generated. 1 2. Consider the grammar below where , , and are some unspecified binary operators. E TE | E T |T T F T |F F (E) |a What kind of associativity does have? What kind of associativity does have? What kind of associativity does have? What operation has higher precedence or are they equal? 3. In English, what language is generated by the following grammar? Be as precise as possible. indicates the empty string. T aTb|bTa| 4. Here is a simple grammar for conditionals in a language. I've turned some nonterminals into terminals for simplicity. Demonstrate the grammar is ambiguous. Notice that ::== is used in place of the . The meaning is the same Statement ::= Conditional | OTHER Conditional ::= IF TEST THEN Statement | IF TEST Statement THEN ELSE Statement 5. In C and Java, expressions have the form exp exp '-' sub_exp | sub_exp sub_exp '(' type_name ')' sub_exp | | | | '-' sub_exp id literal '(' exp ')' type_name id | more_complex_type_descriptions This allows expressions like: 1, a, a - 1, ( a ), ( a - 1 ), - a, ( int ) a . Demonstrate that the grammar is ambiguous. 6. In English, describe what language is generated by the following grammar? Be as precise as possible. indicates the empty string. B BB|(B) | 2 7. A nested comment is a comment within a comment. Many programming languages do not allow nested comments. Given what you know about grammars, why is this restriction made? 8. Consider the grammar G represented by the four tuple = ({E,T,F},={+,*,(,),a}, P,E) where P is the set of productions E E + T |T TT * F |F F (E) |NUM For this grammar, draw a parse tree and an abstract syntax tree (in which only the terminal symbols are shown) for 3 *(4 + 5)+(6+7) 9. Using the BNF grammar for expressions (as in the previous problem), add operators % for mod and ^ for exponentiation. Recall that mod is left-associative (like division) and that power is right associative. Test out your grammar to verify that it works. 10. Syntax diagrams show the rules in a railroad diagram. A variable declaration section in Pascal has the following form: var <identifier>, <identifier>,...,<identifier>:<type_name>; <identifier>, <identifier>,...,<identifier>:<type_name>; ... <identi...

Textbooks related to the document above:
Find millions of documents on Course Hero - Study Guides, Lecture Notes, Reference Materials, Practice Exams and more. Course Hero has millions of course specific materials providing students with the best way to expand their education.

Below is a small sample set of documents:

Utah State - CS - 6100
Program 2 30 pointsMars ExplorerWhile you can work with others to learn what Mars Explorer does, the actual coding must be your own work.BackgroundThe provided code is a starting point for solving the following problem. You do NOT need to use th
Utah State - CS - 6100
CS 6100 Multi Agent Systems Fall 2007 Course Information Instructor: Dr. Vicki Allan, Vicki.Allan@usu.edu, 429 Old Main, 797-2022 Office Hours: MWF: 9:00-11:00 a.m., 3:00-4:00 p.m. Other hours by appointment. (Send Email to set up.) Prerequisites: Pr
Utah State - CS - 4700
Programming Assignment 6 HaskellDon't show your code to anyone in the class. Don't read anyone else's code. Do not google to find complete solutions to the exercises (as that involves reading someone else's code). Don't discuss the details of your c
Utah State - CS - 2420
Chapter 9 GraphsYou know about trees. They have a rigid structure of each node have a single node that points to it (or none, in the case of the root). Sometimes life isn't so structured. For example: I need to fly to Tokyo. I want to find the cheap
Utah State - CS - 6100
Pitfalls to Avoid in Writing your Paper1. References: You need 5-10 references. Watch the quality and date. While you can have a few only papers (older than five years), most should be new. Every time you make a statement in a formal paper, ask your
Utah State - CS - 5050
CS5050 Homework 5 Chapter 10 and test review1. Consider a Monte Carlo algorithm A for a problem P whose expected running time is at most T (n) onany instance of size n and that produces a correct solution with probability fl(n). Suppose further th
Utah State - CS - 6890
Global alignment algorithmCS 6890 Zheng Lu IntroductionGlobal alignments find the best match over the total length of both sequences. We do global alignment to determine if the two sequences are homologous. Homologous sequences are som
N. Georgia - MATH - 2460
MATH 24606.1 Areas Between CurvesDr. BriggsDefinition: The area A of the region bounded by the curves y = f (x), y = g(x), and the lines x = a and x = b, where f and g are continuous funcions and f (x) g(x) for all x in [a, b] is given bybA
N. Georgia - MATH - 2460
MATH 24606.2 VolumesDr. BriggsVolumes of right cylinders: A cylinder is called a right cylinder if it is &quot;straight&quot; in the sense that its cross-sections lie directly on top of each other. In each of the figures below, the volume of the right cy
N. Georgia - HIST - 1112
HIST 1112 World Civilizations II MWF 9:05-10:00 AM Young Hall Rm 214 Department Name: History &amp; Philosophy Instructor: Dr. Timothy May Office Phone #: 706.864.1913 E-mail Address: tmmay@ngcsu.edu Office Location: Young Hall 116 Office Hours: MW 10:00
N. Georgia - HIST - 1111
HIST 1111North Georgia College and State UniversityDr. Timothy MayNew Civilizations in the East and WestI. China4000-1500 BCE a. Early period b. Civilization forms along Huanghe River i. Rich loess soil and abundant water resources c. Settlers
N. Georgia - MATH - 2460
Math 24607.6 Inverse Trigonometric FunctionsDr. BriggsRecall: None of the trigonometric functions are one-to-one since they fail the horizontal line test. However, we can restrict the domain of each to ensure that the inverse relation is a func
N. Georgia - HIST - 1111
HIST 1111Dr. Timothy MayRiver Valley &amp; Other CivilizationsHIST 1111 World Civilization I Dr. Timothy May I) Rise of Civilization A) Civilizations Developed through gradual agricultural and technical advances B) Resulting complex economy created
N. Georgia - RGTR - 0198
Test- Specific TerminologyLearn as many of the following terms in both lists as possible to help better understand various questions on the Regents Reading Test. Terms Used to Describe Passage Form and Patternsalliteration allusion analogy analysis
N. Georgia - HIST - 1112
HIST 1112H-Honors World Civilizations II MWF 8:008:55 DUNLAP HALL 107A Department Name: History Instructor: Dr. Timothy May Office Phone #: 706.864.1913 E-mail Address: tmmay@ngcsu.edu Office Location: Young Hall 116 Office Hours: MWF 2-3:30pm, T 10-
N. Georgia - HIST - 1111
Pre-HistoryI) Transition from Paleolithic Period 12000-8000 BCE A) Beginning of World History i) What is World History? ii) What do Paleolithic and Neolithic mean? iii) B. C. E.? and C. E. ? B) Paleolithic Life i) Homo Sapien Sapien all alone ii) Fi
N. Georgia - MATH - 2460
MATH 25026.5 Average Value of a FunctionDr. BriggsRecall: The average value of finitely many values y1 , y2 , . . . , yn is given by yave = y1 + y2 + + yn . nDerivation of the average value formula: Now suppose that we wanted to compute th
N. Georgia - PAGE - 3
Chapter 8 EARLY DEVELOPMENTS IN PHYSIOLOGY AND THE RISE OF EXPERIMENTAL PSYCHOLOGY I. EMERGENT EXPERIMENTAL PSYCHOLOGY th th A. 17 and 18 century Scientific Achievements 1. Use of scientific method on things external a. success in physical sciences o
N. Georgia - PAGE - 2
SENIOR PSYCHOLOGY SEMINARDepartment of Psychology and Sociology PSYC 4900 Syllabus CSN/NGCSU Fall 2008General Information Instructor: Steve Noble, PhD [Biopsychology] Office: 206D Dunlap Hall Office Hours: 10 AM 2 PM MW Phone: (706) 864-1444, or 1
N. Georgia - PAGE - 0
ADVANCED GENERAL PSYCHOLOGYDepartment of Psychology and Sociology PSYC 1102 Instructor: Steve Noble, Ph.D. [Biopsychology] Office: Dunlap Hall 201A Office Hours: 9:45-11 AM &amp; 1-3 PM @ TR Office Phone: 706-864-1444 Office Fax: 706-864-1674 e-mail add
N. Georgia - PAGE - 0
ADVANCED GENERAL PSYCHOLOGYDepartment of Psychology and Sociology PSYC 1102 Syllabus CSN/NGCSU 2008-2009Textbook: Myers, D.G. (2007) Psychology, 8e, Worth Publishers. Prerequistes: Introduction to Psychology [PSYC 1101] Exam Dates and Reading Assi
N. Georgia - PAGE - 2
SENIOR PSYCHOLOGY SEMINARDepartment of Psychology and Sociology PSYC 4900 CSN/NGCSUKent, D. &amp; Hayward, R. [2007] When Averages Hide Individual Differences in Clinical Trials. American Scientist, 95, 60-68. 1. Define evidence-based medicine. What m
N. Georgia - PAGE - 3
6. James Mill [18th-19th century] a. literary contribution: Analysis of the Phenomena of the Human Mind 1.) noted for its thorough going treatment of Associationism b. Utilitarianism and associationism 1.) fast friend w/ Bentham who denied metaphysic
N. Georgia - PAGE - 3
Chapter Five EMPIRICISM, SENSATIONALISM, AND POSITIVISM I. Clarification: An Overview A. Reaction to Descartes' position 1. British &amp; French reject doctrine of innate ideas a. mind = passive receptacle for sensory input 2. Germans viewed mind as an a
N. Georgia - PAGE - 3
Chapter Six RATIONALISM I. Rationalism Revisited: An Overview A. Nature of the mind 1. Assumptions: a. mind possesses innate mental structures, principles, operations, and abilities for analysis of contents of consciousness b. truths not known via an
N. Georgia - PAGE - 3
Chapter Four THE BEGINNINGS OF MODERN SCIENCE AND PHILOSOPHY I. Renaissance [15th -17th Centuries] A. Developments 1. Invention of gunpowder and its use in warfare a. ended the feudal system; rise of democracies 2. Invention of the printing press a.
N. Georgia - PAGE - 3
HISTORY AND SYSTEMS OF PSYCHOLOGY Department of Psychology and Sociology PSYC 3090 Syllabus CSN/NGCSU Fall 2008TEXTBOOK: Hergenhahn, B.R. [2009] An Introduction to the History of Psychology, 6e, Belmont, CA: Wadsworth Publishers. EXAM I [September
N. Georgia - PAGE - 3
HISTORY AND SYSTEMS OF PSYCHOLOGY Department of Psychology and Sociology PSYC 3090 EVALUATION I. CSN/NGCSU 2008-2009II.III.Student Information. A. Instructor: Steve Noble, PhD, Biopsychology. B. Office: Dunlap Hall, Room 206D C. Office Hours: 9
N. Georgia - PAGE - 3
Chapter Three AFTER ARISTOTLE: A SEARCH FOR THE GOOD LIFE I. Preamble A. Pelopennesian War 1. Greek city-state system collapse w/ accompanying civil demoralizaton: Sparta defeated Athens 2. Philosophy flourishes until Aristotle's death and Roman conq
N. Georgia - PAGE - 3
Chapter Twelve BEHAVIORISM I. THE BACKGROUND OF BEHAVIORISM A. Objective Psychology: Forerunner to Behaviorism 1. Russia: physiology B. Functionalism 1. USA: accepted both introspection of consciousness and direct study of observable behavior a. use
N. Georgia - PAGE - 3
Chapter Two THE EARLY GREEK PHILOSOPHERS I. The World of Precivilized Humans A. Animism/Anthropomorphism 1. all things in nature possess life, spirit; interpret all events in nature as possessing human qualities or characteristics B. Magic 1. man-der
N. Georgia - PAGE - 3
Chapter Thirteen NEOBEHAVIORISMI.Positivism [emphasis on the directly observable] A. Comte's Radical Empiricism 1. Products of the mind=behavior a. subject to empirical, objective inquiry 1.) introspection=absurd, too subjective 2.) shared publicl
N. Georgia - PAGE - 3
Chapter Seven ROMANTICISM AND EXISTENTIALISM I. AN OVERVIEW A. The Enlightenment [Age of Reason] 1. Authority of the church challenged a. rise and development of physical sciences 1.) Copernicus, Kepler, Galileo, Newton, etc. 2. Humanism, deism, and
N. Georgia - PAGE - 3
Chapter Fourteen GESTALT PSYCHOLOGY I. A FORETASTE A. The German Rebellion 1. Wundtian elementalism protested a. holism vs reductionism b. molar vs molecular 2. Introspection of conscious experience a. meaningful, intact configurations vs contents 3.
N. Georgia - PAGE - 3
Chapter Ten THE DARWINIAN INFLUENCE I. A Discipline Waiting to Happen A. Root `n Toot `n America 1. Pioneering spirit in America a. new, dynamic b. practical, utilitarian c. not given to abstract analysis of the mind 2. Evolution answers the call a.
N. Georgia - PAGE - 3
Chapter One INTRODUCTION I. Why Study the History of Psychology? A. Perspective 1. past influences contribute to current issues. B. Deeper understanding 1. current issues couched in context of the past C. Recognition of fads and fashions 1. Zeitgeist
N. Georgia - PAGE - 3
Chapter Nine VOLUNTARISM, STRUCTURALISM, AND OTHER EARLY APPROACHES TO PSYCHOLOGY I. II. FOUNDING OF EXPERIMENTAL PSYCHOLOGY A. Psychophysics of Weber, Fechner &amp; Helmholtz 1. experimental analysis of behavior in the offing Voluntarism [first school,
N. Georgia - PAGE - 3
Chapter Eleven FUNCTIONALISM I. EARLY U.S. PSYCHOLOGY A. Insofar as psychologists are concerned, America was then [prior to 1880] like heaven, for there was not a damned soul there (Cattell, 1929) 1. We agree [Cattell and Titchener]: real psychology
N. Georgia - RGTR - 0198
COMMON ROOT WORDS AND WORD ORIGINSROOTS alter ami, amicamphi ann, enni anthrop aqua, aque arch arthro aud bell biblio biobrev cap carn ced chromchroncogn cord/chord corp crac, crat cred cruc crusta crypt culp dei demodent dermdic dox duc, duct duo d
N. Georgia - A - 1010
Page 360Column left right361leftright362left right363left right364leftright 365 leftAstronomy 1010 Chapter 12(4th Ed.) Key Words and/or Phrases Comets, asteroids, and meteorites carry history of solar system &quot;scraps&quot; left ove
N. Georgia - A - 1020
Study Guide Chapter 21(4th Ed.)Page 641 Column left right 642 left right 643 left Hints, Keywords and Phrases galaxy evolution Hubble Deep Field Hubble Ultra Deep Field most distant galaxies we observe have lookback time of 13 billion years most su
N. Georgia - CAGALL - 1915
et sG et L al si c hy PBy: Caroline GallaherStatistics on Americans and Physical FitnessChildren living in the United States are more obese than ever before More than 60 percent of U.S. adults are now overweight or obese (defined as at least 30
N. Georgia - AJBROO - 0294
Produced by Ashley Brooks &amp; Presented to you by Snoopy!Hello, ladies and gentlemen! Snoopy here with an your aerial view of Colombia, South America. If you plan to tour this country, there are a few things you should knowEcosystem Information Th
N. Georgia - MEHOLC - 5469
NGC U S rs S ingeBy: Me Holcom gan b Dr. Broman created a choral group 1992 At that time there were only 15 members Now has over 55 membersHow to Join Sign up for the class Be able to sing and sight read Do not have to be recommended by a
N. Georgia - LLWALK - 5967
PHILOSOPHYBy: Logan Walker Why is Philosophy Important?Because it describes how the relations between man and government ought to work Much contemporary political thought is derived from the classics of ancient Greece Philosophy also a
N. Georgia - DKGRIF - 6831
What is Down Syndrome?A person is born with distinct physical features, such as a flat face and short neck, and some degree of cognitive disability (mental retardation) DS is caused by abnormal cell division very early in fetal development
N. Georgia - CS - 0636
Remeshing of the 3D WorldMatthew Ridley North Georgia College and State University mrridl0636@ngcsu.edu AbstractIn the field of computer graphics it has become increasingly desired to have the objects being created to look as realistic as possible.
N. Georgia - CCEARN - 0887
Web-Based Lesson PlanLesson Plan Title: Developed by: Subject Area: Grade Level: Purpose of the Activity: Learning Objectives (include at least one Georgia Performance Standard or Georgia QCC): Lesson URL(s): The Comet Connection Dr. Clark Earnest A
N. Georgia - JLCOOK - 6212
Group Members: Allison Carpenter, Heather Biddy, Jessica Cook, Allison HolladayGroup Project Lesson PlanLesson Plan Title: Developed by: Subject Area: Grade Level: Purpose of the Activity: Exploring the Continents Allison Carpenter, Heather Biddy,
Utah State - EECS - 211
12University of KansasEECS 211 Circuits 1University of KansasEECS 211 Circuits 1TIME-VARYING SOURCES FOR PSPICE-BASED TRANSIENT ANALYSISProfessor H. Scott HintonDepartment of Electrical Engineering and Computer Science University of K
Utah State - EECS - 211
Utah State - EECS - 211
12University of KansasEECS 211 Circuits 1University of KansasEECS 211 Circuits 1CIRCUIT VARIABLESIntroduction Professor H. Scott Hinton Circuit Variables IntroductionBASIC UNITSProfessor H. Scott HintonCircuit Variables34Un
Utah State - EECS - 211
University of Kansas-1Professor H. Scott Hinton Department of Electrical Engineering and Computer ScienceUniversity of Kansas-2Professor H. Scott Hinton Department of Electrical Engineering and Computer ScienceEECS 211 - Spring 2000CIRCUITS
Utah State - EECS - 211
12University of KansasEECS 211 Circuits 1University of KansasEECS 211 Circuits 1SPICE OVERVIEW INTRODUCTION TO SPICESimulation Program with Integrated Circuit Emphasis Developed at the University of California, Berkley in the early 19
Utah State - EECS - 211
12University of KansasEECS 211 Circuits 1University of KansasEECS 211 Circuits 1INDEPENDENT SOURCESVoltage Sources Current SourcesCIRCUIT SOURCESIntroduction Professor H. Scott Hinton Circuit Variables IntroductionVv(t) + -A t
Utah State - EECS - 211
Utah State - EECS - 211
Utah State - EECS - 211
Integration Quiz #2Name _Note: This quiz is both open book and open notes. You must do all the work yourself and you should not discuss these problems with anyone until you have turned in the quiz.1. Using nodal analysis find all the voltage an
Utah State - EECS - 211
University of Kansas-1Professor H. Scott Hinton Department of Electrical Engineering and Computer ScienceUniversity of Kansas-2Professor H. Scott Hinton Department of Electrical Engineering and Computer ScienceOP-AMP CONFIGURATIONSIdeal Op-a
Utah State - EECS - 211
Utah State - EECS - 470
Semiconductor Devices1 H. Scott HintonSemiconductor Devices2 H. Scott HintonLESSON OBJECTIVESREVERSE-BIASED p-n JUNCTIONS Understand the changes in the depletion region under reversebias conditions. Understand the concept of extracted