15-251 Great Theoretical Ideas in Computer Science.

Slides:



Advertisements
Similar presentations
Rotating a Square in Space
Advertisements

Chapter 4 – Finite Fields. Introduction will now introduce finite fields of increasing importance in cryptography –AES, Elliptic Curve, IDEA, Public Key.
Section 11 Direct Products and Finitely Generated Abelian Groups One purpose of this section is to show a way to use known groups as building blocks to.
Chapter 8 – Introduction to Number Theory. Prime Numbers prime numbers only have divisors of 1 and self –they cannot be written as a product of other.
Having Proofs for Incorrectness
Primality Testing Patrick Lee 12 July 2003 (updated on 13 July 2003)
Basic properties of the integers
1.  We have studied groups, which is an algebraic structure equipped with one binary operation. Now we shall study rings which is an algebraic structure.
Math 3121 Abstract Algebra I
Groups TS.Nguyễn Viết Đông.
Algebraic Structures: Group Theory II
1.  Detailed Study of groups is a fundamental concept in the study of abstract algebra. To define the notion of groups,we require the concept of binary.
Great Theoretical Ideas in Computer Science.
Foundations of Network and Computer Security J J ohn Black Lecture #10 Sep 18 th 2009 CSCI 6268/TLEN 5550, Fall 2009.
1 Chapter 7– Introduction to Number Theory Instructor: 孫宏民 Room: EECS 6402, Tel: , Fax :
Complexity1 Pratt’s Theorem Proved. Complexity2 Introduction So far, we’ve reduced proving PRIMES  NP to proving a number theory claim. This is our next.
CMSC 250 Discrete Structures Number Theory. 20 June 2007Number Theory2 Exactly one car in the plant has color H( a ) := “ a has color”  x  Cars –H(
Great Theoretical Ideas in Computer Science.
3.4/3.5 The Integers and Division/ Primes and Greatest Common Divisors Let each of a and b be integers. We say that a divides b, in symbols a | b, provided.
Math 3121 Abstract Algebra I Lecture 3 Sections 2-4: Binary Operations, Definition of Group.
1 Cryptography and Network Security Third Edition by William Stallings Lecture slides by Lawrie Brown Chapter 4 – Finite Fields.
Information Security and Management 4. Finite Fields 8
Finite Groups & Subgroups. Order of a group Definition: The number of elements of a group (finite or infinite) is called its order. Notation: We will.
By: Hector L Contreras SSGT / USMC
Lagrange's Theorem. The most important single theorem in group theory. It helps answer: –How large is the symmetry group of a volleyball? A soccer ball?
Groups Definition A group  G,  is a set G, closed under a binary operation , such that the following axioms are satisfied: 1)Associativity of  :
Cyclic Groups (9/25) Definition. A group G is called cyclic if there exists an element a in G such that G =  a . That is, every element of G can be written.
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.
Math 3121 Abstract Algebra I Lecture 9 Finish Section 10 Section 11.
Great Theoretical Ideas in Computer Science.
Great Theoretical Ideas in Computer Science for Some.
Fall 2002CS 395: Computer Security1 Chapters 4 and 8: The Mathematics Required for Public Key Cryptography In case you’re beginning to worry that this.
Math 344 Winter 07 Group Theory Part 2: Subgroups and Isomorphism
Math 344 Winter 07 Group Theory Part 1: Basic definitions and Theorems.
Tuesday’s lecture: Today’s lecture: One-way permutations (OWPs)
Ryan Henry I 538 /B 609 : Introduction to Cryptography.
UNIT - 2.  A binary operation on a set combines two elements of the set to produce another element of the set. a*b  G,  a, b  G e.g. +, -, ,  are.
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.
Great Theoretical Ideas in Computer Science.
Great Theoretical Ideas In Computer Science Anupam GuptaCS Fall 2006 Lecture 15Oct 17, 2006Carnegie Mellon University Algebraic Structures: Groups,
CS Lecture 14 Powerful Tools     !. Build your toolbox of abstract structures and concepts. Know the capacities and limits of each tool.
Great Theoretical Ideas in Computer Science.
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
MA/CSSE 473 Day 09 Modular Division Revisited Fermat's Little Theorem Primality Testing.
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.
A Prime Example CS Lecture 20 A positive integer p  2 is prime if the only positive integers that divide p are 1 and p itself. Positive integers.
The Relation Induced by a Partition
Discrete Math II Howon Kim
Modular Arithmetic and the RSA Cryptosystem
Unit-III Algebraic Structures
CS480 Cryptography and Information Security
Topic 12: Number Theory Basics (2)
Great Theoretical Ideas in Computer Science
Advanced Algorithms Analysis and Design
Great Theoretical Ideas In Computer Science
MATH301- DISCRETE MATHEMATICS Copyright © Nahid Sultana Dr. Nahid Sultana Chapter 4: Number Theory and Cryptography.
Math 344 Winter 07 Group Theory Part 1: Basic definitions and Theorems
Cryptography Lecture 21.
Modular Arithmetic and the RSA Cryptosystem
Great Theoretical Ideas in Computer Science
Great Theoretical Ideas in Computer Science
B.Sc. III Year Mr. Shrimangale G.W.
I. Finite Field Algebra.
Algebraic Structures: Group Theory
Cryptography Lecture 17.
Cryptography Lecture 19.
Presentation transcript:

Great Theoretical Ideas in Computer Science

Algebraic Structures: Group Theory Lecture 15 (October 12, 2010)

Number Theory Naturals closed under + a+b = b+a a+0 = 0+a Integers closed under + a+b = b+a a+0 = 0+a a+(-a) = 0 ZnZn closed under + n a+ n b = b+ n a a+ n 0 = 0+ n a a+ n (-a) = 0 (a+b)+c = a+(b+c) (a+ n b)+ n c = a+ n (b+ n c)

A+0 = 0+A a+0 = 0+a a+(-a) = 0 a+ n 0 = 0+ n a a+ n (-a) = 0 closed under * closed under * n closed under * (a+b)*c = a*c+b*c ditto A+(-A) = 0 1/a may not exist ditto Number Theory closed under + A+B = B+A closed under + a+b = b+a closed under + n a+ n b = b+ n a (a+b)+c = a+(b+c) (A+B)+C = A+(B+C) Matrices Integers ZnZn (a+ n b)+ n c = a+ n (b+ n c)

A+0 = 0+A a+0 = 0+a a+(-a) = 0 a+ n 0 = 0+ n a a+ n (-a) = 0 closed under * closed under * n closed under * (a+b)*c = a*c+b*c ditto A+(-A) = 0 1/a exists if a  0 ditto Number Theory closed under + A+B = B+A closed under + a+b = b+a closed under + n a+ n b = b+ n a (a+b)+c = a+(b+c) (a+ n b)+ n c = a+ n (b+ n c) (A+B)+C = A+(B+C) Invertible Matrices Rationals Z n (n prime)

Abstraction: Abstract away the inessential features of a problem =

Today we are going to study the abstract properties of binary operations

Rotating a Square in Space Imagine we can pick up the square, rotate it in any way we want, and then put it back on the white frame

In how many different ways can we put the square back on the frame? R 90 R 180 R 270 R0R0 F|F| F—F— FF We will now study these 8 motions, called symmetries of the square

Symmetries of the Square Y SQ = { R 0, R 90, R 180, R 270, F |, F —, F, F }

Composition Define the operation “  ” to mean “first do one symmetry, and then do the next” For example, R 90  R 180 Question: if a,b  Y SQ, does a  b  Y SQ ? Yes! means “first rotate 90˚ clockwise and then 180˚” = R 270 F |  R 90 means “first flip horizontally and then rotate 90˚” = F

R 90 R 180 R 270 R0R0 F|F| F—F— FF R0R0 R 90 R 180 R 270 F|F| F—F— F F R0R0 R 90 R 180 R 270 F|F| F—F— FF R 90 R 180 R 270 F|F| F—F— F F R 180 R 270 R0R0 R0R0 R 90 R0R0 R 180 FFF|F| F—F— F—F— F|F| FF FFF—F— F|F| FF—F— F FF|F| F F—F— FF|F| F|F| FF—F— R0R0 R0R0 R0R0 R0R0 R 90 R 270 R 180 R 270 R 90 R 270 R 90 R 180 R 90 R 270 R 180

How many symmetries for n-sided body?2n R 0, R 1, R 2, …, R n-1 F 0, F 1, F 2, …, F n-1 R i R j = R i+j R i F j = F j-i F j R i = F j+i F i F j = R j-i

Some Formalism If S is a set, S  S is: the set of all (ordered) pairs of elements of S S  S = { (a,b) | a  S and b  S } If S has n elements, how many elements does S  S have? n2n2 Formally,  is a function from Y SQ  Y SQ to Y SQ  : Y SQ  Y SQ → Y SQ As shorthand, we write  (a,b) as “a  b”

“  ” is called a binary operation on Y SQ Definition: A binary operation on a set S is a function  : S  S → S Example: The function f:    →  defined by is a binary operation on  f(x,y) = xy + y Binary Operations

Is the operation  on the set of symmetries of the square associative? A binary operation  on a set S is associative if: for all a,b,c  S, (a  b)  c = a  (b  c) Associativity Examples: Is f:    →  defined by f(x,y) = xy + y associative? (ab + b)c + c = a(bc + c) + (bc + c)?NO! YES!

A binary operation  on a set S is commutative if For all a,b  S, a  b = b  a Commutativity Is the operation  on the set of symmetries of the square commutative? NO! R 90  F | ≠ F |  R 90

R 0 is like a null motion Is this true:  a  Y SQ, a  R 0 = R 0  a = a? R 0 is called the identity of  on Y SQ In general, for any binary operation  on a set S, an element e  S such that for all a  S, e  a = a  e = a is called an identity of  on S Identities YES!

Inverses Definition: The inverse of an element a  Y SQ is an element b such that: a  b = b  a = R 0 Examples: R 90 inverse: R 270 R 180 inverse: R 180 F|F| inverse: F |

Every element in Y SQ has a unique inverse

R 90 R 180 R 270 R0R0 F|F| F—F— FF R0R0 R 90 R 180 R 270 F|F| F—F— F F R0R0 R 90 R 180 R 270 F|F| F—F— FF R 90 R 180 R 270 F|F| F—F— F F R 180 R 270 R0R0 R0R0 R 90 R0R0 R 180 FFF|F| F—F— F—F— F|F| FF FFF—F— F|F| FF—F— F FF|F| F F—F— FF|F| F|F| FF—F— R0R0 R0R0 R0R0 R0R0 R 90 R 270 R 180 R 270 R 90 R 270 R 90 R 180 R 90 R 270 R 180

3. (Inverses) For every a  S there is b  S such that: Groups A group G is a pair (S,  ), where S is a set and  is a binary operation on S such that: 1.  is associative 2. (Identity) There exists an element e  S such that: e  a = a  e = a, for all a  S a  b = b  a = e

Commutative or “Abelian” Groups remember, “commutative” means a  b = b  a for all a, b in S If G = (S,  ) and  is commutative, then G is called a commutative group

To check “group-ness” Given (S,  ) 1.Check “closure” for (S,  ) (i.e, for any a, b in S, check a  b also in S). 2.Check that associativity holds. 3.Check there is a identity 4.Check every element has an inverse

Some examples…

Examples Is ( ,+) a group? Is + associative on  ? YES! Is there an identity?YES: 0 Does every element have an inverse?NO! ( ,+) is NOT a group Is  closed under +? YES!

Examples Is (Z,+) a group? Is + associative on Z? YES! Is there an identity?YES: 0 Does every element have an inverse?YES! (Z,+) is a group Is Z closed under +? YES!

Examples Is (Odds,+) a group? (Odds,+) is NOT a group Is + associative on Odds? YES! Is there an identity?NO! Does every element have an inverse?YES! Is Odds closed under +? NO!

Examples Is (Y SQ,  ) a group? Is  associative on Y SQ ? YES! Is there an identity?YES: R 0 Does every element have an inverse?YES! (Y SQ,  ) is a group the “dihedral” group D 4 Is Y SQ closed under  ? YES!

Examples Is (Z n,+ n ) a group? Is + n associative on Z n ? YES! Is there an identity?YES: 0 Does every element have an inverse?YES! (Z n, + n ) is a group (Z n is the set of integers modulo n) Is Z n closed under + n ? YES!

Examples Is (Z n,* n ) a group? Is * n associative on Z n ? YES! Is there an identity?YES: 1 Does every element have an inverse?NO! (Z n, * n ) is NOT a group (Z n is the set of integers modulo n)

Examples Is (Z n *, * n ) a group? Is * n associative on Z n * ? YES! Is there an identity?YES: 1 Does every element have an inverse? YES! (Z n *, * n ) is a group (Z n * is the set of integers modulo n that are relatively prime to n)

(Z, *) (Q, *) the rationals (Q \ {0}, *) No inverses… Zero has no inverse… Yes

3. (Inverses) For every a  S there is b  S such that: Groups A group G is a pair (S,  ), where S is a set and  is a binary operation on S such that: 1.  is associative 2. (Identity) There exists an element e  S such that: e  a = a  e = a, for all a  S a  b = b  a = e

Some properties of groups…

Theorem: A group has at most one identity element Proof: Suppose e and f are both identities of G=(S,  ) Then f = e  f = e Identity Is Unique We denote this identity by “e”  exactly one identity

Theorem: Every element in a group has a unique inverse Proof: Inverses Are Unique Suppose b and c are both inverses of a Then b = b  e = b  (a  c) = (b  a)  c = c

Theorem: If a  b = a  c, then b = c Proof: Cancellation

Orders and generators

A group G=(S,  ) is finite if S is a finite set Define |G| = |S| to be the order of the group (i.e. the number of elements in the group) What is the group with the least number of elements? How many groups of order 2 are there? G = ({e},  ) where e  e = e e f ef e f f e Order of a group

e a b e a b

Generators A set T  S is said to generate the group G = (S,  ) if every element of S can be expressed as a finite “sum” of elements in T Question: Does {R 90 } generate Y SQ ? Question: Does {F |, R 90 } generate Y SQ ? An element g  S is called a generator of G=(S,  ) if the set {g} generates G Does Y SQ have a generator? NO! YES! NO!

Generators For (Z n,+) Any a  Z n such that GCD(a,n)=1 generates (Z n,+) Claim: If GCD(a,n) =1, then the numbers a, 2a, …, (n-1)a, na are all distinct modulo n Proof (by contradiction): Suppose xa = ya (mod n) for x,y  {1,…,n} and x ≠ y Then n | a(x-y) Since GCD(a,n) = 1, then n | (x-y), which cannot happen

If G = (S,  ), we use a t denote (a  a  …  a) t times If G = (Z n, +), this means “ a t ” denotes (a + a + … + a) Order of an element If G = (Z n *, *), “ a t ” now denotes a t mod n Please be careful when using notation “ a t ” ! Warning: Potential Confusion = t*a mod n t times

If G = (S,  ), we use a t denote (a  a  …  a) t times Definition: The order of an element a of G is the smallest positive integer n such that a n = e The order of an element can be infinite! Example: The order of 1 in the group (Z,+) is infinite What is the order of F | in Y SQ ?2 What is the order of R 90 in Y SQ ?4 Order of an element

Remember order of a group G = size of the group G order of an element g in group G = (smallest n>0 s.t. g n = e)

Theorem: If G is a finite group, then for all g in G, order(g) is finite. Orders Proof: Consider g, g  g, g  g  g = g 3, g 4, … Since G is finite, g j = g k for some j < k  g j = g j  g k-j  e = g k-j Multiplying both sides by (g j ) -1

Remember order of a group G = size of the group G order of an element g = (smallest n>0 s.t. g n = e) g is a generator of group G if order(g) = order(G)

What is order(Z n, + n )? Orders n For x in (Z n, + n ), what is order(x)? order(x) = n/GCD(x,n)

Orders order(Z n *, * n )? Á (n) For x in (Z n, * n ), what is order(x)? At most Á (n) (Euler’s theorem)

Theorem: Let x be an element of G. The order of x divides the order of G Orders Corollary: If p is prime, a p-1 = 1 (mod p) (remember, this is Fermat’s Little Theorem) What group did we use for the corollary? G = (Z p *, *), order(G) = p-1

Groups and Subgroups

Subgroups Suppose G = (S,  ) is a group. If T µ S, and if H = (T,  ) is also a group, then H is called a subgroup of G.

Examples (Z, +) is a group and (Evens, +) is a subgroup. In fact, (Multiples of k, +) is also a subgroup. Is (Odds, +) a subgroup of (Z,+) ? No! (Odds,+) is not even a group!

Examples (Z n, + n ) is a group and if k | n, Is ({0, k, 2k, 3k, …, (n/k-1)k}, + n ) subgroup of (Z n,+ n ) ? Is (Z k, + k ) a subgroup of (Z n, + n )? Is (Z k, + n ) a subgroup of (Z n, + n )? No! it doesn’t even have the same operation No! (Z k, + n ) is not a group! (not closed) Only if k is a divisor of n.

Subgroup facts (identity) If e is the identity in G = (S,  ), what is the identity in H = (T,  )? e Proof: Clearly, e satisfies But we saw there is a unique such element in any group. e  a = a  e = a for all a in T.

Subgroup facts (inverse) If b is a’s inverse in G = (S,  ), what is a’s inverse in H = (T,  )? b Proof: let c be a’s inverse in H. Then c  a = e  c  a  b = e  b  c  e = b  c = b

Lagrange’s Theorem Theorem: If G is a finite group, and H is a subgroup then the order of H divides the order of G. In symbols, |H| divides |G|. Corollary: If x in G, then order(x) divides |G|. Proof of Corollary: Consider the set T x = (x, x 2 = x  x, x 3, …) H = (T x,  ) is a group. (check!) Hence it is a subgroup of G = (S,  ). Order(H) = order(x). (check!)

Lagrange’s Theorem Theorem: If G is a finite group, and H is a subgroup then the order of H divides the order of G. Curious (and super-useful) corollary: If you can show that H is a subgroup of G and H  G then |H| is at most ½ |G|

“Right” way of looking at primality testing Fermat: if n prime, then a n-1 = 1 (mod n) for all 0 < a < n. Suppose the converse was also true: “if n composite, then exists g with 0 < g < n. g n-1 != 1 (mod n)” Then consider “bad elements” for this n: elements b such that b n-1 = 1 (mod n) Bad elements form a subgroup of Z n Picking random element, it is good with probability ½.  |Bad| < ½ n Sadly, converse not true. Fixing that gives Miller-Rabin.

Symmetries of the Square Compositions Groups Binary Operation Identity and Inverses Basic Facts: Inverses Are Unique Generators Order of element, group Subgroups Lagrange’s theorem Here’s What You Need to Know…