algorithms for big data viii
play

Algorithms for Big Data (VIII) Chihao Zhang Shanghai Jiao Tong - PowerPoint PPT Presentation

Algorithms for Big Data (VIII) Chihao Zhang Shanghai Jiao Tong University Nov. 8, 2019 Algorithms for Big Data (VIII) 1/14 Recall that we have the following simple algorithm for counting triangles. Review Last week, we learnt a few graph


  1. Algorithms for Big Data (VIII) Chihao Zhang Shanghai Jiao Tong University Nov. 8, 2019 Algorithms for Big Data (VIII) 1/14

  2. Recall that we have the following simple algorithm for counting triangles. Review Last week, we learnt a few graph streaming algorithms. Let f be the vector where for , . The algorithm simply returns , where f . Algorithms for Big Data (VIII) 2/14

  3. Recall that we have the following simple algorithm for counting triangles. Review Last week, we learnt a few graph streaming algorithms. Let f be the vector where for , . The algorithm simply returns , where f . Algorithms for Big Data (VIII) 2/14

  4. Review Last week, we learnt a few graph streaming algorithms. Let f be the vector where for , . The algorithm simply returns , where f . Algorithms for Big Data (VIII) 2/14 Recall that we have the following simple algorithm for counting triangles.

  5. Review Last week, we learnt a few graph streaming algorithms. The algorithm simply returns , where f . Algorithms for Big Data (VIII) 2/14 Recall that we have the following simple algorithm for counting triangles. Let f = ( f T ) T ∈ ( [ n ] 3 ) be the vector where for T = { x, y, z } , f T = |{{ x, y } , { x, z } , { y, z }} ∩ E | .

  6. Review Last week, we learnt a few graph streaming algorithms. Algorithms for Big Data (VIII) 2/14 Recall that we have the following simple algorithm for counting triangles. Let f = ( f T ) T ∈ ( [ n ] 3 ) be the vector where for T = { x, y, z } , f T = |{{ x, y } , { x, z } , { y, z }} ∩ E | . The algorithm simply returns F 0 − 1.5F 1 + 0.5F 2 , where F i = ∥ f ∥ i i .

  7. The multiplicative error of the algorithm is unbounded! I leave the analysis of the algorithm as an exercise. The “polynomial” 1 satisfies ; . Algorithms for Big Data (VIII) 3/14 We can expand F 0 − 1.5F 1 + 0.5F 2 as ∑ 0.5f 2 T − 1.5f T + 1 [ f T ̸ = 0 ] . T ∈ ( [ n ] 3 )

  8. The multiplicative error of the algorithm is unbounded! I leave the analysis of the algorithm as an exercise. Algorithms for Big Data (VIII) 3/14 We can expand F 0 − 1.5F 1 + 0.5F 2 as ∑ 0.5f 2 T − 1.5f T + 1 [ f T ̸ = 0 ] . T ∈ ( [ n ] 3 ) The “polynomial” f ( x ) = 0.5x 2 − 1.5x + 1 [ x ̸ = 0 ] satisfies ▶ f ( 0 ) = f ( 1 ) = f ( 2 ) = 0 ; ▶ f ( 3 ) = 1 .

  9. I leave the analysis of the algorithm as an exercise. The multiplicative error of the algorithm is unbounded! Algorithms for Big Data (VIII) 3/14 We can expand F 0 − 1.5F 1 + 0.5F 2 as ∑ 0.5f 2 T − 1.5f T + 1 [ f T ̸ = 0 ] . T ∈ ( [ n ] 3 ) The “polynomial” f ( x ) = 0.5x 2 − 1.5x + 1 [ x ̸ = 0 ] satisfies ▶ f ( 0 ) = f ( 1 ) = f ( 2 ) = 0 ; ▶ f ( 3 ) = 1 .

  10. I leave the analysis of the algorithm as an exercise. The multiplicative error of the algorithm is unbounded! Algorithms for Big Data (VIII) 3/14 We can expand F 0 − 1.5F 1 + 0.5F 2 as ∑ 0.5f 2 T − 1.5f T + 1 [ f T ̸ = 0 ] . T ∈ ( [ n ] 3 ) The “polynomial” f ( x ) = 0.5x 2 − 1.5x + 1 [ x ̸ = 0 ] satisfies ▶ f ( 0 ) = f ( 1 ) = f ( 2 ) = 0 ; ▶ f ( 3 ) = 1 .

  11. The compleixty is measured by bits communicated between the two. We consider one-way communication model, with possible public random coins. Communication complexity Suppose we want to compute some function where and . Alice has and Bob has , they collaborate to compute . Algorithms for Big Data (VIII) 4/14

  12. The compleixty is measured by bits communicated between the two. We consider one-way communication model, with possible public random coins. Communication complexity Alice has and Bob has , they collaborate to compute . Algorithms for Big Data (VIII) 4/14 Suppose we want to compute some function f ( x, y ) where x ∈ { 0, 1 } a and y ∈ { 0, 1 } b .

  13. The compleixty is measured by bits communicated between the two. We consider one-way communication model, with possible public random coins. Communication complexity Algorithms for Big Data (VIII) 4/14 Suppose we want to compute some function f ( x, y ) where x ∈ { 0, 1 } a and y ∈ { 0, 1 } b . Alice has x and Bob has y , they collaborate to compute f .

  14. Communication complexity We consider one-way communication model, with possible public random coins. Algorithms for Big Data (VIII) 4/14 Suppose we want to compute some function f ( x, y ) where x ∈ { 0, 1 } a and y ∈ { 0, 1 } b . Alice has x and Bob has y , they collaborate to compute f . The compleixty is measured by bits communicated between the two.

  15. Communication complexity Algorithms for Big Data (VIII) 4/14 Suppose we want to compute some function f ( x, y ) where x ∈ { 0, 1 } a and y ∈ { 0, 1 } b . Alice has x and Bob has y , they collaborate to compute f . The compleixty is measured by bits communicated between the two. We consider one-way communication model, with possible public random coins.

  16. otherwise, where This can be shown by a simple counting argument: By the pigeonhole principle, two difgerent strings Example: Eqality distinct messages. Algorithms for Big Data (VIII) to fool the algorithm, a contradiction. Bob can then use share the same message. and If the number of bits sent by Alice is less than , then she can send at most Consider the function . The one-way complexity of EQ is . if EQ 5/14

  17. This can be shown by a simple counting argument: By the pigeonhole principle, two difgerent strings Example: Eqality distinct messages. Algorithms for Big Data (VIII) to fool the algorithm, a contradiction. Bob can then use share the same message. and If the number of bits sent by Alice is less than 5/14 , then she can send at most { 1 if x = y ; otherwise, where x, y ∈ { 0, 1 } n . Consider the function f ( x, y ) = EQ ( x, y ) = 0 The one-way complexity of EQ is n .

  18. By the pigeonhole principle, two difgerent strings Example: Eqality , then she can send at most Algorithms for Big Data (VIII) to fool the algorithm, a contradiction. Bob can then use share the same message. and distinct messages. If the number of bits sent by Alice is less than 5/14 { 1 if x = y ; otherwise, where x, y ∈ { 0, 1 } n . Consider the function f ( x, y ) = EQ ( x, y ) = 0 The one-way complexity of EQ is n . This can be shown by a simple counting argument:

  19. By the pigeonhole principle, two difgerent strings Example: Eqality Algorithms for Big Data (VIII) to fool the algorithm, a contradiction. Bob can then use share the same message. and 5/14 { 1 if x = y ; otherwise, where x, y ∈ { 0, 1 } n . Consider the function f ( x, y ) = EQ ( x, y ) = 0 The one-way complexity of EQ is n . This can be shown by a simple counting argument: If the number of bits sent by Alice is less than n , then she can send at most 2 1 + 2 2 + · · · + 2 n − 1 = 2 n − 2 distinct messages.

  20. Bob can then use Example: Eqality to fool the algorithm, a contradiction. Algorithms for Big Data (VIII) 5/14 { 1 if x = y ; otherwise, where x, y ∈ { 0, 1 } n . Consider the function f ( x, y ) = EQ ( x, y ) = 0 The one-way complexity of EQ is n . This can be shown by a simple counting argument: If the number of bits sent by Alice is less than n , then she can send at most 2 1 + 2 2 + · · · + 2 n − 1 = 2 n − 2 distinct messages. By the pigeonhole principle, two difgerent strings x and x ′ share the same message.

  21. Example: Eqality Algorithms for Big Data (VIII) 5/14 { 1 if x = y ; otherwise, where x, y ∈ { 0, 1 } n . Consider the function f ( x, y ) = EQ ( x, y ) = 0 The one-way complexity of EQ is n . This can be shown by a simple counting argument: If the number of bits sent by Alice is less than n , then she can send at most 2 1 + 2 2 + · · · + 2 n − 1 = 2 n − 2 distinct messages. By the pigeonhole principle, two difgerent strings x and x ′ share the same message. Bob can then use y = x to fool the algorithm, a contradiction.

  22. Randomness in communication (prime number theorem). mod . The number of primes between and is log At most If primes satisfy mod since . Algorithms for Big Data (VIII) , the algorithm is wrong only if , the algorithm is always correct. We can design a more efgicient protocol for EQ by tossing coins. She sends We treat and as two integers in . Alice picks a random prime . mod If to Bob. Bob outputs if mod mod , and outputs otherwise. 6/14

  23. Randomness in communication (prime number theorem). mod . The number of primes between and is log At most If primes satisfy mod since . Algorithms for Big Data (VIII) , the algorithm is wrong only if , the algorithm is always correct. We can design a more efgicient protocol for EQ by tossing coins. She sends We treat and as two integers in . Alice picks a random prime . mod If to Bob. Bob outputs if mod mod , and outputs otherwise. 6/14

  24. Randomness in communication , the algorithm is wrong only if Algorithms for Big Data (VIII) . since mod satisfy primes At most (prime number theorem). log is and The number of primes between . mod If We can design a more efgicient protocol for EQ by tossing coins. , the algorithm is always correct. If otherwise. , and outputs mod mod if Bob outputs to Bob. mod She sends . Alice picks a random prime 6/14 We treat x and y as two integers in { 0, 2 n − 1 } .

Recommend


More recommend