1 views

Uploaded by genie00x

- CSE 1243 - Labsheet 2 - Imperative Programming - Python
- SQUARE and Sqaure Root
- Intro to set theory
- Slides-Detecting Pattern Match Failures in Haskell-26 Nov 2007
- Schnorr - A Unified Approach to the Definition of Random Sequences
- Recursion
- divide and conquer algo
- The Subtle Art of Not Giving a F*ck: A Counterintuitive Approach to Living a Good Life
- Sapiens: A Brief History of Humankind
- The Unwinding: An Inner History of the New America
- The Library Book
- Hidden Figures: The American Dream and the Untold Story of the Black Women Mathematicians Who Helped Win the Space Race
- Elon Musk: Tesla, SpaceX, and the Quest for a Fantastic Future
- Never Split the Difference: Negotiating As If Your Life Depended On It
- Shoe Dog: A Memoir by the Creator of Nike
- John Adams
- Grit: The Power of Passion and Perseverance
- Devil in the Grove: Thurgood Marshall, the Groveland Boys, and the Dawn of a New America
- Team of Rivals: The Political Genius of Abraham Lincoln
- Yes Please

You are on page 1of 12

Peter Cappello Department of Computer Science University of California, Santa Barbara Santa Barbara, CA 93106 cappello@cs.ucsb.edu

The corresponding textbook chapter should be read before attending this lecture. These notes are not intended to be complete. They are supplemented with gures, and other material that arises during the lecture period in response to questions.

Based on Theory of Computing, 2nd Ed., D. Cohen, John Wiley & Sons, Inc.

A precise and useful way to dene sets is by recursive denition. A recursive denition of set S has 2 kinds of rules: An enumeration of Ss base elements; Rules for making new elements in S from Ss existing elements.

Example 1

Set S is dened by the following rules: 0, 1 S a, b S a + b S. Can you characterize S using English words?

Example 2

Set S is dened by the following rules: 0, 1 S a, b S a + b, a b S. Can you characterize S using English words?

Example 3

Set S is dened by the following rules: 0, 1 S a, b S a + b, a b S. a, b S a/b S, for b = 0. Can you characterize S using English words?

Example 4

Set S is dened by the following rules: 0, 1 S a, b S a + b, a b S. a, b S a/b S, for b = 0. a, b S a b S. Can you prove that 3 5 S?

Observation:

Denition of S 1. 0, 1 S 2. a, b S a + b, a b S.

Proof of observation 1. 1 S (Rule 1) 2. 2 = 1 + 1 S (Step1, Rule 2) 3. 3 = 2 + 1 S (Step 2, Rule 2) 4. 3 S (Step 3, Rule 2) 5. 5 = 3 + 2 S (Steps 2, 3, Rule 2) 6. 3 5 S (Steps 4, 5, Rule 2) Can you think of an alternate proof?

5S

Example 5

Function f is dened by the following rules: f (0) = 0, f (1) = 1 f (n) = f (n 1) + f (n 2). Have you seen this function before?

Let S be a language. Dene Ss Kleene closure, denoted S , as follows: S w S w S x, w S xw S .

Let = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, +, , , /, (, )}. Dene arithmetic expressions, denoted AE, as follows. 1. Any number (positive, negative, or zero) is in AE 2. x, y AE : (b) x AE (provided that x does not already start with ) (d) x y AE (if the rst symbol of y is not + or ) (e) x y AE (c) x + y AE (if the rst symbol of y is not + or ) (a) (x) AE

10

(g) x y AE (our notation for exponentiation) This denition says nothing about the value or meaning of such an expression. What do we want 3 3 3 to mean?

(f) x/y AE

11

Let Letter = {a, A, b, B, ..., z, Z}. Let Digit = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9}. Let = Letter Digit { , $ }. Dene Identif ier = Letter .

12

- CSE 1243 - Labsheet 2 - Imperative Programming - PythonUploaded byPriyam Ramsokul
- SQUARE and Sqaure RootUploaded bypoonam_goyal26
- Intro to set theoryUploaded bycesca217
- Slides-Detecting Pattern Match Failures in Haskell-26 Nov 2007Uploaded byMientras Los Árboles Crecen
- Schnorr - A Unified Approach to the Definition of Random SequencesUploaded byMauro Sellitto
- RecursionUploaded byAamir2686
- divide and conquer algoUploaded byankitdocs

- EL 180 Theoretical FrameworkUploaded byIrene Kate Banaag
- Yog Sandesh English MagazineUploaded byManmohan Gupta
- RFP Documentation of QRS - VASUploaded bymiindonesia
- Arithmetic in American Mathematics EducationUploaded byjustsukayrah
- Teaching discourse markers 'oh' and 'well'Uploaded bykent lee
- Academic Encounters Listening & Speaking 3-SBUploaded byAlex Alexi
- in-press-cm-HBCN-V.pdfUploaded bypadritita
- HYLI 2019 Information SlidesUploaded byGelasius Galvindy
- TCAAPIEXUploaded byanvesh reddy
- Drawing for PrintersUploaded byBarnali Dutta
- Judgment Deaf Class ActionUploaded byBitcoDavid
- Inglês - Ítens Gramaticais - ConcursosUploaded byAnderson Marques Neto
- Relational Frame TheoryUploaded byZachMarshall
- Worksheet 1 9th Grade II Term - Passive VoiceUploaded bywilliamces507
- Arab iqa'atUploaded byrenewed
- Unit 5 Relationships-readingUploaded byTrieuDong
- Authenticity Material Effectiveness-1Uploaded byNurul Fatin
- Verb + -ing or toUploaded byTijana Curcic
- swift autobiographical incident essay 1Uploaded byapi-318023993
- Infinitives and Gerunds HandoutUploaded byAlfiyani Wulandari
- Dependent Preposition PatternsUploaded bymihaiconstantinescu
- Tracing in ASPUploaded byJersson Dongo
- Chapter 6 - Memory - Incomplete(1)Uploaded byrhye999
- SPEECH_SOUND_DEVELOPMENT.pdfUploaded byLiezel Cauilan
- 1 Eso Unit 2 TestUploaded byCira Fernandez Sanchez
- C-Jumpstart Module 2.pdfUploaded bydante wolf
- Latex Algoritm2eUploaded byCanchari Gutiérrez Edmundo
- grub2-modules.pdfUploaded bymemoarfaa
- MortScript ManualUploaded byNgo Kiet
- why should we learn arabicUploaded byMohammed Eliyas