notation
play

Notation Boring! Mihir Bellare, UCSD 1 CSE 200: Computability and - PowerPoint PPT Presentation

Notation Boring! Mihir Bellare, UCSD 1 CSE 200: Computability and Complexity Notation Boring! Mathematical Language And Communication what it is and why it matters Interesting? Maybe? Mihir Bellare, UCSD 2 CSE 200: Computability and


  1. Notation Boring! Mihir Bellare, UCSD 1 CSE 200: Computability and Complexity

  2. Notation Boring! Mathematical Language And Communication what it is and why it matters Interesting? Maybe? Mihir Bellare, UCSD 2 CSE 200: Computability and Complexity

  3. Mathematics is a LANGUAGE Like a programming language or a natural language Mathematics has its syntax, grammar and semantics. Learn to write grammatically-correct mathematics. Otherwise it is not meaningful. And you lose points. Writing and speaking grammatically-correct mathematics helps you get things right and sort out your thoughts. Mihir Bellare, UCSD 3 CSE 200: Computability and Complexity

  4. Mathematical objects have types String Makes as little {a,b} + 7 red ? have dog the Integer sense as Set Function Algorithm Type error found in code: no executable generated Code is type-checked by a compiler Mathematical writing is type-checked by a grader Type error found in writing: no points generated Good mathematical grammar wins credit! Mihir Bellare, UCSD 4 CSE 200: Computability and Complexity

  5. You are what you communicate You are graded based on what you write and say, not on what you think you meant. Unproductive attitude Mihir Bellare, UCSD 5 CSE 200: Computability and Complexity

  6. Notation is the lowest level building block of our mathematical language. It pays to get notation right. It makes thinking and writing easier. You can struggle to say in words what is easily and more precisely done in notation. Notations are like pawns in chess. It is said that the pawn is a piece neglected by the beginner but prized by the expert. Mihir Bellare, UCSD 6 CSE 200: Computability and Complexity

  7. Basic notation and terminology Examples { 1 , 2 , 3 , . . . } = N { . . . , − 2 , − 1 , 0 , 1 , 2 , . . . } = Z { 0 , 1 , . . . , n − 1 } for n ∈ N Z n = is the binary alphabet Σ = {0,1} is the English alphabet Σ = { A , B , …, Y , Z } An alphabet is a finite, non-empty set. Its elements are called symbols . ASCII is an alphabet of byte-codes Let be an alphabet. Σ TURING is a string over the English alphabet A string over is a finite sequence of symbols from Σ Σ It has length 6 Then is the set of all strings over Σ * Σ 010 is a string over the binary alphabet If is a string, then denotes its length, x ∈ Σ * | x | It has length 3 defined as the number of symbols in x is the set of all binary strings By we denote the empty string, which has length 0 {0,1}* ε {0,1}* = { ε ,0,1,00,01,10,11,000,…} It is always a member of Σ * If is an integer then n ≥ 0 [ n ] = {1,…, n } [3] = {1,2,3} If is a finite set then denotes is size (cardinality) | S | S | { a ,0,4} | = 3 denotes the empty set, which has size 0 ∅ Mihir Bellare, UCSD 7 CSE 200: Computability and Complexity

  8. Examples Let be an alphabet. Σ A language over is a subset of Σ Σ * L = { x ∈ {0,1}* : MSB ( x ) = 1 and LSB ( x ) = 0 } is the language That is: is a language over if Σ * L ⊆ Σ * L of binary representations of the even positive integers A language can be finite or infinite L = { ⟨ M , x ⟩ : M is a TM that halts on input x } is the language of the Halting Problem. Decision problem associated to language : L L = { ⟨ G ⟩ : G = ([ n ], E ) is a graph over vertex set [ n ] with a path from 1 to n } Input: x is the language of the Reachability Problem. Question: Is ? x ∈ L Above, ⟨ Stu ff ⟩ denotes an encoding of Stu ff as a string over an Languages are how we formalize decision problems. appropriate alphabet. The way the encoding is done can be context We will classify languages according to the dependent. solvability of the associated decision problem. The set of all valid C-programs is a language over the ASCII alphabet By we denote the L = Σ * ∖ L = Σ * − L complement of language L If is the language of the first example above, then L L = { x ∈ {0,1}* : MSB ( x ) = 0 or LSB ( x ) = 1 or x = ε } A complexity class is a set of languages Mihir Bellare, UCSD 8 CSE 200: Computability and Complexity

  9. type: function type: set Functions f : D 1 × · · · × D n → R represents an n -argument function. It can be specified by a formula, code, a table, ... Example: Let f : { 1 , 2 , 4 } → { 0 , 1 , 2 } be the 1-argument function defined by 1 1 y ← ( x + 1) mod 3 f ( x ) = ( x + 1) mod 3 2 0 Return y 4 2 Example: Let f : { 0 , 1 , 2 } × { 0 , 1 , 2 } → { 0 , 1 , 2 } be the 2-argument function defined by 0 1 2 y ← ( x 1 + x 2 ) mod 3 0 0 1 2 f ( x 1 , x 2 ) = ( x 1 + x 2 ) mod 3 Return y 1 1 2 0 2 2 0 1 If is a function and then f : X → Y A ⊆ X f ( A ) = { f ( a ) : a ∈ A } 9 Mihir Bellare, UCSD CSE200: Computability and Complexity

  10. Does the expression type check? Let be an alphabet. Σ Expression Equivalently, does it make sense? Let x ∈ Σ * Let A , B ⊆ Σ * NO x ⊆ A Let be a function f : Σ * → Σ * YES x ∉ A We are not asking whether the expression is true or false. We are asking if it makes grammatical sense. NO { x } ∈ A The answer has to be YES before we can even consider whether it is true or false. NO A ∈ B YES { x } ⊆ A YES A ⊆ B NO f ( x ) ⊆ A YES f ( A ) ⊆ A Mihir Bellare, UCSD 10 CSE 200: Computability and Complexity

  11. Whenever you meet a new mathematical object, ask … Hi, what type are you? This will lead to a good relationship … Mihir Bellare, UCSD 11 CSE 200: Computability and Complexity

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend