Hard Problems Some problems are hard to solve.

Slides:



Advertisements
Similar presentations
Hard Problems Some problems are hard to solve. No polynomial time algorithm is known Most combinatorial optimization problems are hard Popular NP-hard.
Advertisements

Reducibility Class of problems A can be reduced to the class of problems B Take any instance of problem A Show how you can construct an instance of problem.
Asymmetric-Key Cryptography
Computability and Complexity 23-1 Computability and Complexity Andrei Bulatov Search and Optimization.
RSA ( Rivest, Shamir, Adleman) Public Key Cryptosystem
The Theory of NP-Completeness
Dr. Lo’ai Tawalbeh Fall 2005 Chapter 10 – Key Management; Other Public Key Cryptosystems Dr. Lo’ai Tawalbeh Computer Engineering Department Jordan University.
Cryptography1 CPSC 3730 Cryptography Chapter 9 Public Key Cryptography and RSA.
Ref: Pfleeger96, Ch.31 NP-Complete Problems Reference: Pfleeger, Charles P., Security in Computing, 2nd Edition, Prentice Hall, 1996.
Lecture 5 Overview Does DES Work? Differential Cryptanalysis Idea – Use two plaintext that barely differ – Study the difference in the corresponding.
Chapter 12 Cryptography (slides edited by Erin Chambers)
The Theory of NP-Completeness 1. Nondeterministic algorithms A nondeterminstic algorithm consists of phase 1: guessing phase 2: checking If the checking.
The Theory of NP-Completeness 1. What is NP-completeness? Consider the circuit satisfiability problem Difficult to answer the decision problem in polynomial.
IT 60101: Lecture #201 Foundation of Computing Systems Lecture 20 Classic Optimization Problems.
Prelude to Public-Key Cryptography Rocky K. C. Chang, February
Public Key Cryptography. symmetric key crypto requires sender, receiver know shared secret key Q: how to agree on key in first place (particularly if.
1 Public-Key Cryptography and Message Authentication.
DP TSP Have some numbering of the vertices We will think of all our tours as beginning and ending at 1 C(S, j) = length of shortest path visiting each.
PUBLIC-KEY CRYPTOGRAPH IT 352 : Lecture 2- part3 Najwa AlGhamdi, MSc – 2012 /1433.
Chapter 3 – Public Key Cryptography and RSA (A). Private-Key Cryptography traditional private/secret/single-key cryptography uses one key shared by both.
Scott CH Huang COM 5336 Cryptography Lecture 6 Public Key Cryptography & RSA Scott CH Huang COM 5336 Cryptography Lecture 6.
Hard Problems Some problems are hard to solve.  No polynomial time algorithm is known.  E.g., NP-hard problems such as machine scheduling, bin packing,
Hard Problems Sanghyun Park Fall 2002 CSE, POSTECH.
Chapter 13 Backtracking Introduction The 3-coloring problem
The Theory of NP-Completeness 1. Nondeterministic algorithms A nondeterminstic algorithm consists of phase 1: guessing phase 2: checking If the checking.
Chapter 9 – Public Key Cryptography and RSA Every Egyptian received two names, which were known respectively as the true name and the good name, or the.
CSEN 1001 Computer and Network Security Amr El Mougy Mouaz ElAbsawi.
Exhaustive search Exhaustive search is simply a brute- force approach to combinatorial problems. It suggests generating each and every element of the problem.
Hard Problems Some problems are hard to solve.  No polynomial time algorithm is known.  E.g., NP-hard problems such as machine scheduling, bin packing,
Public Key Cryptography. Asymmetric encryption is a form of cryptosystem in which Encryption and decryption are performed using the different keys—one.
Lecture 5 Asymmetric Cryptography. Private-Key Cryptography Traditional private/secret/single key cryptography uses one key Shared by both sender and.
ICS 353: Design and Analysis of Algorithms NP-Complete Problems King Fahd University of Petroleum & Minerals Information & Computer Science Department.
The Theory of NP-Completeness
More NP-Complete and NP-hard Problems
Asymmetric-Key Cryptography
Public Key Encryption.
Visit for more Learning Resources
Public Key Cryptosystem
Asymmetric-Key Cryptography
Hard Problems Some problems are hard to solve.
EMIS 8373: Integer Programming
Prelude to Public-Key Cryptography
PUBLIC-KEY ENCRYPTION Focusing on RSA
Public Key Encryption and Digital Signatures
RSA and El Gamal Cryptosystems
Hard Problems Introduction to NP
Design and Analysis of Algorithm
Knapsack Cryptosystems
The RSA Algorithm JooSeok Song Tue.
Knapsack Cryptosystems
Private-Key Cryptography
Computability and Complexity
ICS 353: Design and Analysis of Algorithms
ICS 353: Design and Analysis of Algorithms
Integer Programming (정수계획법)
Rivest, Shamir and Adleman
Elliptic Curve Cryptography (ECC)
Approximation Algorithms
Applied Combinatorics, 4th Ed. Alan Tucker
Chapter 11 Limitations of Algorithm Power
Integer Programming (정수계획법)
Where Complexity Finally Comes In Handy…
Chapter -5 PUBLIC-KEY CRYPTOGRAPHY AND RSA
CSCE 715: Network Systems Security
The Theory of NP-Completeness
Symmetric-Key Cryptography
Where Complexity Finally Comes In Handy…
Approximation Algorithms
刘振 上海交通大学 计算机科学与工程系 电信群楼3-509
Where Complexity Finally Comes In Handy…
Presentation transcript:

Hard Problems Some problems are hard to solve. No polynomial time algorithm is known. E.g., NP-hard problems such as machine scheduling, bin packing, 0/1 knapsack. Is this necessarily bad? Data encryption relies on difficult to solve problems. Optimal scheduling of machines could save a lot of energy. Same for optimal truck loading.

Cryptography Transmission Channel decryption algorithm encryption algorithm message Transmission Channel encryption key decryption key Mobile environments need low cost (battery usage) encryption/decryption.

Public Key Cryptosystem (RSA) A public encryption method that relies on a public encryption algorithm, a public decryption algorithm, and a public encryption key. Using the public key and encryption algorithm, everyone can encrypt a message. The decryption key is known only to authorized parties. Asymmetric method. Encryption and decryption keys are different; one is not easily computed from the other. Rivest-Shamir-Adelman

Public Key Cryptosystem (RSA) p and q are two prime numbers. n = pq m = (p-1)(q-1) a is such that 1 < a < m and gcd(m,a) = 1. b is such that (ab) mod m = 1. a is computed by generating random positive integers and testing gcd(m,a) = 1 using the extended Euclid’s gcd algorithm. The extended Euclid’s gcd algorithm also computes b when gcd(m,a) = 1.

RSA Encryption And Decryption Message M < n. Encryption key = (a,n). Decryption key = (b,n). Encrypt => E = Ma mod n. Decrypt => M = Eb mod n.

Breaking RSA Factor n and determine p and q, n = pq. Now determine m = (p-1)(q-1). Now use Euclid’s extended gcd algorithm to compute gcd(m,a). b is obtained as a byproduct. The decryption key (b,n) has been determined!

Security Of RSA Relies on the fact that prime factorization is computationally very hard. Let q be the number of bits in the binary representation of n. No algorithm, polynomial in q, is known to find the prime factors of n. Try to find the factors of a 100 bit number.

Elliptic Curve Cryptography (ECC) Asymmetric Encryption Method Encryption and decryption keys are different; one is not easily computed from the other. Relies on difficulty of computing the discrete logarithm problem for the group of an elliptic curve over some finite field. Galois field of size a power of 2. Integers modulo a prime. 1024-bit RSA ~ 200-bit ECC (cracking difficulty). Faster to compute than RSA?

Data Encryption Standard Used for password encryption. Encryption and decryption keys are the same, and are secret. Relies on the computational difficulty of the satisfiability problem. The satisfiability problem is NP-hard. Since RSA is computationally expensive, it is used only to encrypt small messages such as credit card numbers, etc. Also used to encrypt the DES encryption key. At the receiving end the DES encryption key may be decrypted by using RSA and then the rest of the message, which is encrypted using DES, may be decrypted.

Satisfiability Problem F = (x1+ x2 + x3)( x4+ x7 + x8)(x2+ x5) F is true when x1, x2, and x4 (for e.g.) are true. Can set up a satisfiability instance in about 50,000 variables to crack DES.

Other Problems Partition NP-hard. Partition n positive integers s1, s2, s3, …, sn into two groups A and B such that the sum of the numbers in each group is the same. [9, 4, 6, 3, 5, 1,8] A = [9, 4, 5] and B = [6, 3, 1, 8] NP-hard.

Subset Sum Problem Does any subset of n positive integers s1, s2, s3, …, sn have a sum exactly equal to c? [9, 4, 6, 3, 5, 1,8] and c = 18 A = [9, 4, 5] NP-hard.

Traveling Salesperson Problem (TSP) Let G be a weighted directed graph. A tour in G is a cycle that includes every vertex of the graph. TSP => Find a tour of shortest length. Problem is NP-hard.

Applications Of TSP Home city Visit city Once a month the salesperson starts from home and visits each city in his/her territory once. When done, the salesperson returns home. The salesperson wishes to minimize time spent in this activity. Assuming that the time spent at each city is fixed, total time is minimized by minimizing travel time. So, a tour of minimum length is desired. Home city Visit city

Applications Of TSP Robot Station During tennis practice, 2 persons play using a large number of balls. When done, The balls are to be collected by a robot (probably one of the players or an unfortunate relative). The ball locations are vertices of a graph. Inter-vertex distance is the distance the robot has to travel to get from one ball to the next (accounts for going around the net if necessary). The robot must visit each vertex, pick up the ball, and return to the base station in minimum time.

Applications Of TSP Manufacturing. A robot arm is used to drill n holes in a metal sheet. Robot Station Time to drill the holes is fixed. The only variable is the time the robot spends moving from one hole location to the next and finally returning to its base. n+1 vertex TSP.

n-Queens Problem A queen that is placed on an n x n chessboard, may attack any piece placed in the same column, row, or diagonal. 8x8 Chessboard

n-Queens Problem Can n queens be placed on an n x n chessboard so that no queen may attack another queen? 4x4 Problem may be solved in O(n) time by considering the cases: n is odd, n mod 6 = 2, else (n is even and n mod 6 != 2). However, solution eluded researchers for years. Although problem is no longer hard, it was hard for quite a while. See  Explicit solutions to the N-queens problem for all N, Bo Bernhardsson, ACM SIGART Bulletin, 2(2), page 7. No placement is possible for n < 4. For n >= 4, the placement is always possible.

n-Queens Problem 8x8

Difficult Problems Many require you to find either a subset or permutation that satisfies some constraints and (possibly also) optimizes some objective function. May be solved by organizing the solution space into a tree and systematically searching this tree for the answer.

Subset Problems Solution requires you to find a subset of n elements. The subset must satisfy some constraints and possibly optimize some objective function. Examples. Partition. Subset sum. 0/1 Knapsack. Satisfiability (find subset of variables to be set to true so that formula evaluates to true). Scheduling 2 machines. Packing 2 bins.

Permutation Problems Solution requires you to find a permutation of n elements. The permutation must satisfy some constraints and possibly optimize some objective function. Examples. TSP. n-queens. Each queen must be placed in a different row and different column. Let queen i be the queen that is going to be placed in row i. Let ci be the column in which queen i is placed. c1, c2, c3, …, cn is a permutation of [1,2,3, …, n] such that no two queens attack.

Solution Space Set that includes at least one solution to the problem. Subset problem. n = 2, {00, 01, 10, 11} n = 3, {000, 001, 010, 100, 011, 101, 110, 111} Solution space for subset problem has 2n members. Nonsystematic search of the space for the answer takes O(p2n) time, where p is the time needed to evaluate each member of the solution space.

Solution Space Permutation problem. Solution space for a permutation problem has n! members. Nonsystematic search of the space for the answer takes O(pn!) time, where p is the time needed to evaluate a member of the solution space.