1 / 80

Fingerprint

Fingerprint. Verifying set equality. String Matching – Rabin-Karp Algorithm. Verifying set equality. Verifying set equality. Verifying set equality. Verifying set equality. Fingerprinting. Fingerprinting. Fingerprinting Computation.

Télécharger la présentation

Fingerprint

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Fingerprint

  2. Verifying set equality • String Matching – Rabin-Karp Algorithm

  3. Verifying set equality

  4. Verifying set equality

  5. Verifying set equality

  6. Verifying set equality

  7. Fingerprinting

  8. Fingerprinting

  9. Fingerprinting Computation

  10. Fingerprinting Computation Horner’s Rule

  11. Protocol

  12. Prime Number q

  13. False Positive

  14. Prime Divisors

  15. Density of Primes

  16. Density of Primes • (x) = número de primos menores ou iguais a x • (13) = 6 • Primos < = do que 13 = 2, 3, 5 , 7, 11 e 13 • O valor de  não muda até chegarmos ao próximo primo. • (13) = (14) = (15) = (16) • Ou seja,  aumenta em salto de 1, mas o intervalo entre esses saltos é irregular

  17. Density of Primes Esses intervalos tornam-se cada vez maiores, isto é, a chance de um inteiro escolhido ao acaso ser primo diminui quando avançamos para os números maiores. PERGUNTA: O valor de  não poderia ser aproximado por alguma função conhecida?

  18. Density of Primes Para um valor elevado de x, p(x) ~ x/ ln x . Ou seja, lim (x) = 1 x   x/ln x

  19. Sample Space

  20. Probability of a bad prime

  21. Final Protocol Properties

  22. String Matching

  23. String Matching • Many applications • While using editor/word processor/browser • Login name & password checking • Virus detection • Header analysis in data communications • DNA sequence analysis

  24. Naïve O(nm) algorithm

  25. Rabin-Karp Algorithm

  26. Fingerprinting

  27. Fingerprinting function

  28. Fingerprinting computation The only expensive operation

  29. False Positives?

  30. Sample Space

  31. False Positives

  32. Fingerprinting

  33. Primality testing • A natural number n is prime iff the only natural numbers dividing n are 1 and n

  34. Primality testing • A natural number n is prime iff the only natural numbers dividing n are 1 and n • The following are prime: 2, 3, 5, 7, 11, 13,

  35. Primality testing • A natural number n is prime iff the only natural numbers dividing n are 1 and n • The following are prime: 2, 3, 5, 7, 11, 13, …and so are 1299709,15485863, 22801763489, …

  36. Primality testing • A natural number n is prime iff the only natural numbers dividing n are 1 and n • The following are prime: 2, 3, 5, 7, 11, 13, …and so are 1299709,15485863, 22801763489, … There is an infinite number of prime numbers

  37. Primality testing There is an infinite number of prime numbers Proof:Let us suppose the number of primes is Finite.

  38. Primality testing There is an infinite number of prime numbers Proof:Let us suppose the number of primes is Finite. Let p1, p2, … pk beall primes. Let n = p1p2 … pk+1,

  39. Primality testing There is an infinite number of prime numbers Proof:Let us suppose the number of primes is Finite. Let p1, p2, … pk beall primes. Let n = p1p2 … pk+1, n must becomposite.

  40. Primality testing There is an infinite number of prime numbers Proof:Let us suppose the number of primes is Finite. Let p1, p2, … pk beall primes. Let n = p1p2 … pk+1, n must becomposite. there exists a prime p s.t. p | n (fundtheo. arithmetic), and p cannot be any of the p1,p2, … pk

  41. Primality testing There is an infinite number of prime numbers Proof:Let us suppose the number of primes is Finite. Let p1, p2, … pk beall primes. Let n = p1p2 … pk+1, n must becomposite. there exists a prime p s.t. p | n (fundtheo. arithmetic), and p cannot be any of the p1,p2, … pk Therefore, p1, … pk were not all the prime numbers.

  42. Some questions? • Is 2101-1=2535301200456458802993406410751 prime? • How do we check whether a number is prime? • How do we generate huge prime numbers? • Why do we care?

  43. Some questions? • Is 2101-1=2535301200456458802993406410751 prime? • How do we check whether a number is prime? • How do we generate huge prime numbers? • Why do we care?

  44. Some questions? • Is 2101-1=2535301200456458802993406410751 prime? • How do we check whether a number is prime? • How do we generate huge primenumbers? • Why do we care?

  45. Some questions? • Is 2101-1=2535301200456458802993406410751 prime? • How do we check whether a number is prime? • How do we generate huge primenumbers? • Why do we care?

  46. Naïve solution: Finding the smallest divisor of n • For i=2,..., n do • Divide n by i until n mod i = 0 Check if i is a divisor of n for some i = 2, ..., n

  47. An improvement • Check if i is a divisor of n for some i = 2, ..., n

  48. An improvement • Check if i is a divisor of n for some i = 2, ..., n Why can we do that?

  49. Theorem: Composit numbers have a divisor bellow their square root

  50. Theorem: Composit numbers have a divisor bellow their square root Proof Idea: n composite  n = ab, 0 < a  b < n

More Related