55
Hamiltonian Cycle Zero Knowledge Proof

Hamiltonian Cycle - Centrum Wiskunde & Informatica › ~schaffne › courses › ZK › 2015 › ... · Hamiltonian cycle - A path that visits each vertex exactly once, and ends at

  • Upload
    others

  • View
    17

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Hamiltonian Cycle - Centrum Wiskunde & Informatica › ~schaffne › courses › ZK › 2015 › ... · Hamiltonian cycle - A path that visits each vertex exactly once, and ends at

Hamiltonian CycleZero Knowledge Proof

Page 2: Hamiltonian Cycle - Centrum Wiskunde & Informatica › ~schaffne › courses › ZK › 2015 › ... · Hamiltonian cycle - A path that visits each vertex exactly once, and ends at

Hamiltonian cycle

Page 3: Hamiltonian Cycle - Centrum Wiskunde & Informatica › ~schaffne › courses › ZK › 2015 › ... · Hamiltonian cycle - A path that visits each vertex exactly once, and ends at

Hamiltonian cycle- A path that visits each vertex exactly once,

and ends at the same point it started

Page 4: Hamiltonian Cycle - Centrum Wiskunde & Informatica › ~schaffne › courses › ZK › 2015 › ... · Hamiltonian cycle - A path that visits each vertex exactly once, and ends at

Example

Page 5: Hamiltonian Cycle - Centrum Wiskunde & Informatica › ~schaffne › courses › ZK › 2015 › ... · Hamiltonian cycle - A path that visits each vertex exactly once, and ends at

Hamiltonian cycle- A path that visits each vertex exactly once,

and ends at the same point it started- William Rowan Hamilton

(1805-1865)

Page 6: Hamiltonian Cycle - Centrum Wiskunde & Informatica › ~schaffne › courses › ZK › 2015 › ... · Hamiltonian cycle - A path that visits each vertex exactly once, and ends at

Hamiltonian cycle- A path that visits each vertex exactly once,

and ends at the same point it started- William Rowan Hamilton

(1805-1865)

Page 7: Hamiltonian Cycle - Centrum Wiskunde & Informatica › ~schaffne › courses › ZK › 2015 › ... · Hamiltonian cycle - A path that visits each vertex exactly once, and ends at

Hamiltonian cycle- A path that visits each vertex exactly once,

and ends at the same point it started- William Rowan Hamilton

(1805-1865)

Page 8: Hamiltonian Cycle - Centrum Wiskunde & Informatica › ~schaffne › courses › ZK › 2015 › ... · Hamiltonian cycle - A path that visits each vertex exactly once, and ends at

Eulerian path/cycle

Page 9: Hamiltonian Cycle - Centrum Wiskunde & Informatica › ~schaffne › courses › ZK › 2015 › ... · Hamiltonian cycle - A path that visits each vertex exactly once, and ends at

Eulerian path/cycle- Seven Bridges of Köningsberg

Page 10: Hamiltonian Cycle - Centrum Wiskunde & Informatica › ~schaffne › courses › ZK › 2015 › ... · Hamiltonian cycle - A path that visits each vertex exactly once, and ends at

Seven Bridges

Page 11: Hamiltonian Cycle - Centrum Wiskunde & Informatica › ~schaffne › courses › ZK › 2015 › ... · Hamiltonian cycle - A path that visits each vertex exactly once, and ends at

Seven Bridges

Page 12: Hamiltonian Cycle - Centrum Wiskunde & Informatica › ~schaffne › courses › ZK › 2015 › ... · Hamiltonian cycle - A path that visits each vertex exactly once, and ends at

Eulerian path/cycle- Seven Bridges of Köningsberg- Eulerian path: visits each edge exactly once

Page 13: Hamiltonian Cycle - Centrum Wiskunde & Informatica › ~schaffne › courses › ZK › 2015 › ... · Hamiltonian cycle - A path that visits each vertex exactly once, and ends at

Eulerian path/cycle- Seven Bridges of Köningsberg- Eulerian path: visits each edge exactly once- Eulerian cycle: starts and ends at the same

point

Page 14: Hamiltonian Cycle - Centrum Wiskunde & Informatica › ~schaffne › courses › ZK › 2015 › ... · Hamiltonian cycle - A path that visits each vertex exactly once, and ends at

Eulerian path/cycle- Seven Bridges of Köningsberg- Eulerian path: visits each edge exactly once- Eulerian cycle: starts and ends at the same

point- Graph has Eulerian circuit iff (1) connected

and (2) all vertices have even degree.

Page 15: Hamiltonian Cycle - Centrum Wiskunde & Informatica › ~schaffne › courses › ZK › 2015 › ... · Hamiltonian cycle - A path that visits each vertex exactly once, and ends at

Complexity

Page 16: Hamiltonian Cycle - Centrum Wiskunde & Informatica › ~schaffne › courses › ZK › 2015 › ... · Hamiltonian cycle - A path that visits each vertex exactly once, and ends at

Complexity- Euler vs. Hamilton

Page 17: Hamiltonian Cycle - Centrum Wiskunde & Informatica › ~schaffne › courses › ZK › 2015 › ... · Hamiltonian cycle - A path that visits each vertex exactly once, and ends at

Complexity- Euler vs. Hamilton- Edges vs. Vertices

Page 18: Hamiltonian Cycle - Centrum Wiskunde & Informatica › ~schaffne › courses › ZK › 2015 › ... · Hamiltonian cycle - A path that visits each vertex exactly once, and ends at

Complexity- Euler vs. Hamilton- Edges vs. Vertices- P vs. NP

Page 19: Hamiltonian Cycle - Centrum Wiskunde & Informatica › ~schaffne › courses › ZK › 2015 › ... · Hamiltonian cycle - A path that visits each vertex exactly once, and ends at

Complexity- Euler vs. Hamilton- Edges vs. Vertices- P vs. NP- No necessary and sufficient conditions for a

Hamiltonian cycle

Page 20: Hamiltonian Cycle - Centrum Wiskunde & Informatica › ~schaffne › courses › ZK › 2015 › ... · Hamiltonian cycle - A path that visits each vertex exactly once, and ends at

Complexity- Euler vs. Hamilton- Edges vs. Vertices- P vs. NP- No necessary and sufficient conditions for a

Hamiltonian cycle- No good algorithm for finding one (there are

known algorithms with running time O(n22n) and O(1.657n), so exponential

Page 21: Hamiltonian Cycle - Centrum Wiskunde & Informatica › ~schaffne › courses › ZK › 2015 › ... · Hamiltonian cycle - A path that visits each vertex exactly once, and ends at

Zero Knowledge (1)

Page 22: Hamiltonian Cycle - Centrum Wiskunde & Informatica › ~schaffne › courses › ZK › 2015 › ... · Hamiltonian cycle - A path that visits each vertex exactly once, and ends at

Zero Knowledge (1)- The problem: Suppose that P knows a

Hamiltonian Cycle for a graph G. How can she prove this to V in zero-knowledge?

Page 23: Hamiltonian Cycle - Centrum Wiskunde & Informatica › ~schaffne › courses › ZK › 2015 › ... · Hamiltonian cycle - A path that visits each vertex exactly once, and ends at

Zero Knowledge (1)- The problem: Suppose that P knows a

Hamiltonian Cycle for a graph G. How can she prove this to V in zero-knowledge?

- Difference cycle and Hamiltonian cycle

Page 24: Hamiltonian Cycle - Centrum Wiskunde & Informatica › ~schaffne › courses › ZK › 2015 › ... · Hamiltonian cycle - A path that visits each vertex exactly once, and ends at

Zero Knowledge (1)- The problem: Suppose that P knows a

Hamiltonian Cycle for a graph G. How can she prove this to V in zero-knowledge?

- Difference cycle and Hamiltonian cycle- Permuting: Create a graph F that is

isomorphic to G

Page 25: Hamiltonian Cycle - Centrum Wiskunde & Informatica › ~schaffne › courses › ZK › 2015 › ... · Hamiltonian cycle - A path that visits each vertex exactly once, and ends at

Zero Knowledge (2)- Step 1: P randomly creates F isomorphic to G

Page 26: Hamiltonian Cycle - Centrum Wiskunde & Informatica › ~schaffne › courses › ZK › 2015 › ... · Hamiltonian cycle - A path that visits each vertex exactly once, and ends at

Zero Knowledge (2)- Step 1: P randomly creates F isomorphic to G- Step 2: P commits to F (how?)

Page 27: Hamiltonian Cycle - Centrum Wiskunde & Informatica › ~schaffne › courses › ZK › 2015 › ... · Hamiltonian cycle - A path that visits each vertex exactly once, and ends at

Zero Knowledge (2)- Step 1: P randomly creates F isomorphic to G- Step 2: P commits to F (how?)- Step 3: V chooses between revealing (1) the

isomorphism or (2) the Hamiltonian cycle

Page 28: Hamiltonian Cycle - Centrum Wiskunde & Informatica › ~schaffne › courses › ZK › 2015 › ... · Hamiltonian cycle - A path that visits each vertex exactly once, and ends at

Zero Knowledge (2)- Step 1: P randomly creates F isomorphic to G- Step 2: P commits to F (how?)- Step 3: V chooses between revealing (1) the

isomorphism or (2) the Hamiltonian cycle- Step 4: P reveals (1) F completely plus the

isomorphism or (2) the Hamiltonian cycle

Page 29: Hamiltonian Cycle - Centrum Wiskunde & Informatica › ~schaffne › courses › ZK › 2015 › ... · Hamiltonian cycle - A path that visits each vertex exactly once, and ends at

Commitment and example

Page 30: Hamiltonian Cycle - Centrum Wiskunde & Informatica › ~schaffne › courses › ZK › 2015 › ... · Hamiltonian cycle - A path that visits each vertex exactly once, and ends at

Commitment and example

G

Page 31: Hamiltonian Cycle - Centrum Wiskunde & Informatica › ~schaffne › courses › ZK › 2015 › ... · Hamiltonian cycle - A path that visits each vertex exactly once, and ends at

Commitment and example

G F

Page 32: Hamiltonian Cycle - Centrum Wiskunde & Informatica › ~schaffne › courses › ZK › 2015 › ... · Hamiltonian cycle - A path that visits each vertex exactly once, and ends at

Commitment and example

G F

Page 33: Hamiltonian Cycle - Centrum Wiskunde & Informatica › ~schaffne › courses › ZK › 2015 › ... · Hamiltonian cycle - A path that visits each vertex exactly once, and ends at

Commitment and example

G FCycle

Page 34: Hamiltonian Cycle - Centrum Wiskunde & Informatica › ~schaffne › courses › ZK › 2015 › ... · Hamiltonian cycle - A path that visits each vertex exactly once, and ends at

Commitment and example

G F

Page 35: Hamiltonian Cycle - Centrum Wiskunde & Informatica › ~schaffne › courses › ZK › 2015 › ... · Hamiltonian cycle - A path that visits each vertex exactly once, and ends at

Commitment and example

G FIsomorphism

Page 36: Hamiltonian Cycle - Centrum Wiskunde & Informatica › ~schaffne › courses › ZK › 2015 › ... · Hamiltonian cycle - A path that visits each vertex exactly once, and ends at

Completeness, Soundness

Page 37: Hamiltonian Cycle - Centrum Wiskunde & Informatica › ~schaffne › courses › ZK › 2015 › ... · Hamiltonian cycle - A path that visits each vertex exactly once, and ends at

- Completeness: if P knows a Hamiltonian cycle, V will accept in all cases

Completeness, Soundness

Page 38: Hamiltonian Cycle - Centrum Wiskunde & Informatica › ~schaffne › courses › ZK › 2015 › ... · Hamiltonian cycle - A path that visits each vertex exactly once, and ends at

- Completeness: if P knows a Hamiltonian cycle, V will accept in all cases

- Soundness: if P does not know, the best he can do is either create an isomorphic F, or create a Hamiltonian cycle. V will accept 50% of the times -> repeat to pass soundness

Completeness, Soundness

Page 39: Hamiltonian Cycle - Centrum Wiskunde & Informatica › ~schaffne › courses › ZK › 2015 › ... · Hamiltonian cycle - A path that visits each vertex exactly once, and ends at

Zero Knowledge

Page 40: Hamiltonian Cycle - Centrum Wiskunde & Informatica › ~schaffne › courses › ZK › 2015 › ... · Hamiltonian cycle - A path that visits each vertex exactly once, and ends at

Zero Knowledge- Suppose V choses ‘isomorphism’. Then all she sees is

a ‘scrambled’ version of G. A simulator does not need P to create a random permutation of G

Page 41: Hamiltonian Cycle - Centrum Wiskunde & Informatica › ~schaffne › courses › ZK › 2015 › ... · Hamiltonian cycle - A path that visits each vertex exactly once, and ends at

Zero Knowledge- Suppose V choses ‘isomorphism’. Then all she sees is

a ‘scrambled’ version of G. A simulator does not need P to create a random permutation of G

- Suppose V choses ‘cycle’. Then all she sees is a cycle between some n vertices. Since the permutation was random, a simulator that generates random cycles for n vertices would have the same output distribution

Page 42: Hamiltonian Cycle - Centrum Wiskunde & Informatica › ~schaffne › courses › ZK › 2015 › ... · Hamiltonian cycle - A path that visits each vertex exactly once, and ends at

Distribution example

Page 43: Hamiltonian Cycle - Centrum Wiskunde & Informatica › ~schaffne › courses › ZK › 2015 › ... · Hamiltonian cycle - A path that visits each vertex exactly once, and ends at

Zero Knowledge- Suppose V choses ‘isomorphism’. Then all she sees is

a ‘scrambled’ version of G. A simulator does not need P to create a random permutation of G

- Suppose V choses ‘cycle’. Then all she sees is a cycle between some n vertices. Since the permutation was random, a simulator that generates random cycles for n vertices would have the same output distribution

- V does not learn anything!

Page 44: Hamiltonian Cycle - Centrum Wiskunde & Informatica › ~schaffne › courses › ZK › 2015 › ... · Hamiltonian cycle - A path that visits each vertex exactly once, and ends at

Turing Machines (1)

Page 45: Hamiltonian Cycle - Centrum Wiskunde & Informatica › ~schaffne › courses › ZK › 2015 › ... · Hamiltonian cycle - A path that visits each vertex exactly once, and ends at

- Input for both P and V is the graph G (for example represented as a matrix)

Turing Machines (1)

Page 46: Hamiltonian Cycle - Centrum Wiskunde & Informatica › ~schaffne › courses › ZK › 2015 › ... · Hamiltonian cycle - A path that visits each vertex exactly once, and ends at

- Input for both P and V is the graph G (for example represented as a matrix)

- P knows a Hamiltonian cycle for G. Uses random tape to create F, isomorphic to G

Turing Machines (1)

Page 47: Hamiltonian Cycle - Centrum Wiskunde & Informatica › ~schaffne › courses › ZK › 2015 › ... · Hamiltonian cycle - A path that visits each vertex exactly once, and ends at

- Input for both P and V is the graph G (for example represented as a matrix)

- P knows a Hamiltonian cycle for G. Uses random tape to create F, isomorphic to G

- P commits F using some fancy encryption stuff

Turing Machines (1)

Page 48: Hamiltonian Cycle - Centrum Wiskunde & Informatica › ~schaffne › courses › ZK › 2015 › ... · Hamiltonian cycle - A path that visits each vertex exactly once, and ends at

- Input for both P and V is the graph G (for example represented as a matrix)

- P knows a Hamiltonian cycle for G. Uses random tape to create F, isomorphic to G

- P commits F using some fancy encryption stuff

- V randomly selects 1 or 0

Turing Machines (1)

Page 49: Hamiltonian Cycle - Centrum Wiskunde & Informatica › ~schaffne › courses › ZK › 2015 › ... · Hamiltonian cycle - A path that visits each vertex exactly once, and ends at

Turing Machines (2)- If 0, P shows the entire committed

graph/matrix and how it is isomorphic to G

Page 50: Hamiltonian Cycle - Centrum Wiskunde & Informatica › ~schaffne › courses › ZK › 2015 › ... · Hamiltonian cycle - A path that visits each vertex exactly once, and ends at

Turing Machines (2)- If 0, P shows the entire committed

graph/matrix and how it is isomorphic to G- If 1, P shows the cycle (in the case of a

matrix, this means that every row and every column contains two 1s)

Page 51: Hamiltonian Cycle - Centrum Wiskunde & Informatica › ~schaffne › courses › ZK › 2015 › ... · Hamiltonian cycle - A path that visits each vertex exactly once, and ends at

Turing Machines (2)- If 0, P shows the entire committed

graph/matrix and how it is isomorphic to G- If 1, P shows the cycle (in the case of a

matrix, this means that every row and every column contains two 1s)

- Verifier checks whether prover is correct

Page 52: Hamiltonian Cycle - Centrum Wiskunde & Informatica › ~schaffne › courses › ZK › 2015 › ... · Hamiltonian cycle - A path that visits each vertex exactly once, and ends at

Travelling Salesman

Page 53: Hamiltonian Cycle - Centrum Wiskunde & Informatica › ~schaffne › courses › ZK › 2015 › ... · Hamiltonian cycle - A path that visits each vertex exactly once, and ends at

Travelling Salesman- Famous variant of Hamilton cycle: given a

weighted graph (i.e. edges have a certain value), find the shortest Hamiltonian cycle

Page 54: Hamiltonian Cycle - Centrum Wiskunde & Informatica › ~schaffne › courses › ZK › 2015 › ... · Hamiltonian cycle - A path that visits each vertex exactly once, and ends at

Travelling Salesman- Famous variant of Hamilton cycle: given a

weighted graph (i.e. edges have a certain value), find the shortest Hamiltonian cycle

- NP Hard -> Not only check whether the path is a Hamiltonian cycle, but also whether it is the shortest

Page 55: Hamiltonian Cycle - Centrum Wiskunde & Informatica › ~schaffne › courses › ZK › 2015 › ... · Hamiltonian cycle - A path that visits each vertex exactly once, and ends at

HolidayShortest path through all US towns/cities with more than 500 citizens