Lecture 3 Strings and Things (Section 1.1)

Slides:



Advertisements
Similar presentations
1 Lect. 12: Number Theory. Contents Prime and Relative Prime Numbers Modular Arithmetic Fermat’s and Euler’s Theorem Extended Euclid’s Algorithm.
Advertisements

Cryptography and Network Security, Finite Fields From Third Edition by William Stallings Lecture slides by Mustafa Sakalli so much modified..
Cryptography and Network Security
Chapter 4 Finite Fields. Introduction of increasing importance in cryptography –AES, Elliptic Curve, IDEA, Public Key concern operations on “numbers”
Cryptography and Network Security Chapter 4 Fourth Edition by William Stallings.
Chapter 4 – Finite Fields. Introduction will now introduce finite fields of increasing importance in cryptography –AES, Elliptic Curve, IDEA, Public Key.
Number Theory and Cryptography
Math 3121 Abstract Algebra I
6/20/2015 5:05 AMNumerical Algorithms1 x x1x
Introduction Polynomials
Congruence Classes Z n = {[0] n, [1] n, [2] n, …, [n - 1] n } = the set of congruence classes modulo n.
Chapter 4 – Finite Fields Introduction  will now introduce finite fields  of increasing importance in cryptography AES, Elliptic Curve, IDEA, Public.
Slide 10-1 Copyright © 2005 Pearson Education, Inc. SEVENTH EDITION and EXPANDED SEVENTH EDITION.
Great Theoretical Ideas in Computer Science.
WHOLE NUMBERS; INTEGERS Whole numbers: Z 0,+ = the natural numbers  {0}. Integers:
Week 8 - Wednesday.  What did we talk about last time?  Cardinality  Countability  Relations.
Great Theoretical Ideas in Computer Science.
Mathematics of Cryptography Part I: Modular Arithmetic
Module :MA3036NI Cryptography and Number Theory Lecture Week 7
CPSC 3730 Cryptography and Network Security
1 Cryptography and Network Security Third Edition by William Stallings Lecture slides by Lawrie Brown Chapter 4 – Finite Fields.
Prep Math Competition, Lec. 1Peter Burkhardt1 Number Theory Lecture 1 Divisibility and Modular Arithmetic (Congruences)
CompSci 102 Discrete Math for Computer Science February 16, 2012 Prof. Rodger.
Copyright © Curt Hill Divisibility and Modular Arithmetic A Topic in Number Theory.
Monoids, Groups, Rings, Fields
Basic Number Theory Divisibility Let a,b be integers with a≠0. if there exists an integer k such that b=ka, we say a divides b which is denoted by a|b.
Chapter 4 – Finite Fields
Data Security and Encryption (CSE348) 1. Lecture # 12 2.
Information Security Lab. Dept. of Computer Engineering 87/121 PART I Symmetric Ciphers CHAPTER 4 Finite Fields 4.1 Groups, Rings, and Fields 4.2 Modular.
Elements of Coding and Encryption 1. Encryption In the modern word, it is crucial that the information is transmitted safely. For example, Internet purchases,
Cryptography and Network Security Chapter 4. Introduction  will now introduce finite fields  of increasing importance in cryptography AES, Elliptic.
Great Theoretical Ideas in Computer Science for Some.
Modular Arithmetic and the RSA Cryptosystem Great Theoretical Ideas In Computer Science John LaffertyCS Fall 2005 Lecture 9Sept 27, 2005Carnegie.
Chapter 13 Mathematic Structures 13.1 Modular Arithmetic Definition 1 (modulo). Let a be an integer and m be a positive integer. We denoted by a mod m.
Great Theoretical Ideas In Computer Science COMPSCI 102 Fall 2010 Lecture 16October 27, 2010Duke University Modular Arithmetic and the RSA Cryptosystem.
Cryptography Lecture 14 Arpita Patra © Arpita Patra.
Divisibility and Modular Arithmetic
Chapter 4 With Question/Answer Animations 1. Chapter Motivation Number theory is the part of mathematics devoted to the study of the integers and their.
Great Theoretical Ideas in Computer Science.
Modular Arithmetic and the RSA Cryptosystem Great Theoretical Ideas In Computer Science Steven RudichCS Spring 2005 Lecture 8Feb 3, 2005Carnegie.
Relations Chapter 9 Copyright © McGraw-Hill Education. All rights reserved. No reproduction or distribution without the prior written consent of McGraw-Hill.
The Relation Induced by a Partition
Math 3121 Abstract Algebra I
Discrete Math II Howon Kim
Modular Arithmetic and the RSA Cryptosystem
Topic 12: Number Theory Basics (2)
Great Theoretical Ideas in Computer Science
Congruence class arithmetic
Advanced Algorithms Analysis and Design
MATH301- DISCRETE MATHEMATICS Copyright © Nahid Sultana Dr. Nahid Sultana Chapter 4: Number Theory and Cryptography.
Number Theory and Modular Arithmetic
Numerical Algorithms x x-1
Computer Security Modular Arithmetic November 12, 2018
Great Theoretical Ideas in Computer Science
Direct Proof and Counterexample III
CSE 311 Foundations of Computing I
CSE 311: Foundations of Computing
刘振 上海交通大学 计算机科学与工程系 电信群楼3-509
Modular Arithmetic and Change of Base
Modular Arithmetic and the RSA Cryptosystem
Great Theoretical Ideas in Computer Science
Great Theoretical Ideas in Computer Science
I. Finite Field Algebra.
Algebraic Structures: Group Theory
Section 10.3 Modular Arithmetic
Clements MAΘ October 30th, 2014
Lecture 17 Making New Codes from Old Codes (Section 4.6)
Lecture 19 The Vector Space Znp (Section 5.1)
Section 9.3 Modular Arithmetic.
Presentation transcript:

Lecture 3 Strings and Things (Section 1.1) Theory of Information Lecture 3 Theory of Information Lecture 3 Strings and Things (Section 1.1)

Theory of Information Lecture 3 Congruency Modulo n Theory of Information Lecture 3 Remember that Zn={0,1,…,n-1} If  and  are integers, the following three conditions are equivalent: 1.  and  have the same remainder when divided by n 2. - is divisible by n 3. there is an integer k for which =+kn When any (and hence all) of these conditions hold, we say that and  are congruent modulo n, and write (mod n)

Examples of Congruency Theory of Information Lecture 3 53(mod 2)? 14143(mod 2)? 14410(mod 5)? 1934124(mod 10)? -515(mod 5)? -78(mod 2)? -5  -2  147101316(mod 3)?

Theory of Information Lecture 3 Residue Theory of Information Lecture 3 Given an integer , there is exactly one element in Zn congruent to  (modulo n). Such an integer is called the residue of  modulo n. The residue of 25 modulo 7 is The residue of 32 modulo 7 is The residue of 9925 modulo 2 is The residue of 8764 modulo 2 is Give me a number whose residue modulo 7 is 7

Theory of Information Lecture 3 Modular Arithmetic Theory of Information Lecture 3 Let a,bZn. It, together with the following operations, is called integers modulo n: a+nb= the residue of a+b modulo n anb= the residue of ab modulo n Z5={0,1,2,3,4}. Let us just write + and  instead of +5 and 5 . 1+3= 1+4= 2+3= 4+4= 23= 44= 04= 14= 0+3=

Arithmetic Tables for Z2 Theory of Information Lecture 3 Multiplication modulo 2: 0 1 1 Addition modulo 2: 0 1 1

Theory of Information Lecture 3 Fields Theory of Information Lecture 3 DEFINITION A field is a nonempty set F, together with two binary operations on F, called addition (+) and multiplication (, often omitted), satisfying the following properties: Associativity: +(+)=(+)+; ()=(). Commutativity: +=+; =. Distributivity: (+)= +. Properties of 0 and 1: There are two distinct () elements: 0 (zero) and 1 (one) such that, for all F, we have 0+= and 1=. Inverse properties: a) For every F, there is another element of F denoted by - and called the negative of , such that +(-)=0; b) For every nonzero F, there is another element of F denoted by -1 and called the inverse of , such that (-1)=1. With ordinary addition and multiplication, are the following sets fields? {0,1,…} {…-2,-1,0,1,2,…} The set of rational numbers

Integers Modulo 2 Is a Field Theory of Information Lecture 3 For Z2={0,1} (as well as all other Zn), associativity, commutativity and distributivity hold because they hold for the ordinary + and . What is the negative of: 0? 1? What is the inverse of: 1? Subtraction - means +(-). In our case, 0-0= 0-1= 1-0= 1-1=

Integers Modulo 3 Is a Field Theory of Information Lecture 3 What is the negative of: 0? 1? 2? What is the inverse of: 1? 2?

Integers Modulo 4 Is not a Field Theory of Information Lecture 3 Z2={0,1,2,3} What would be the inverse of 2? 20= 21= 22= 23=

Theory of Information Lecture 3 When is Zn a field? Theory of Information Lecture 3 An integer n is said to be prime iff n has no divisors other than 1 and n. Prime numbers: 2,3,7,11,13,17,19,23,29,31,41,… THEOREM 1.1.2 The set Zn of integers modulo n is a field if and only if n is a prime number.

Theory of Information Lecture 3 Strings Theory of Information Lecture 3 An alphabet is a finite, nonempty set S={s1,…,sn} of symbols. A string, or word over S is a finite sequence of elements of S. E.g., when S={a,b,…,z}, then school, bbb, a, xyz are strings/words over S. So is the empty string  (theta). Stings over the alphabet {0,1} are called binary strings, and the symbols 0 and 1 are called bits. The complement of a binary string x is the result of replacing in x every 0 by 1 and every 1 by 0. Denoted by xc. Strings over {0,1,2} are called ternary strings.

Theory of Information Lecture 3 Strings Theory of Information Lecture 3 The juxtaposition (concatenation) of strings x and y is xy. len(x) denotes the length of string x. len(0010)=4, len(0)=1, len()=0. When S is an alphabet: S* stands for the set of all strings over S Sn stands for the set of all strings over S whose length is n Sn stands for the set of all strings over S whose length is n THEOREM 1.1.3 Let S be an alphabet of size k. |Sn|=kn |Sn|= 1+k+k2+…+kn

Theory of Information Lecture 3 Strings Theory of Information Lecture 3 THEOREM 1.1.4 In (Z2)n, the number of strings with exactly k 0s is ( ) In (Zr)n, the number of strings with exactly k 0s is ( )(r-1)n-k n k n k Proof. Part 1: There is one string with exactly k 0s for every way of choosing k of the n positions in which to place 0s. Part 2: For each choice of where to place 0s, there are (r-1)n-k ways to arrange the remaining (r-1) symbols in the remaining (n-k) positions.

Theory of Information Lecture 3 Homework Theory of Information Lecture 3 Example 1.1.4 of the textbook. Exercises 1,3,4,5,7,8 of Section 1.1 of the textbook.