a simple near linear pseudopolynomial time randomized
play

A Simple Near-Linear Pseudopolynomial Time Randomized Algorithm for - PowerPoint PPT Presentation

A Simple Near-Linear Pseudopolynomial Time Randomized Algorithm for Subset Sum Ce Jin , Hongxun Wu Tsinghua University SOSA 2019 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .


  1. A Simple Near-Linear Pseudopolynomial Time Randomized Algorithm for Subset Sum Ce Jin , Hongxun Wu Tsinghua University SOSA 2019 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Ce Jin , Hongxun Wu (Tsinghua University) SOSA 2019 1 / 15

  2. Subset Sum Subset Sum Given a (multi)set S of n positive integers and a target integer t , does there exist a subset R ⊆ S that sums to exactly t ? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Ce Jin , Hongxun Wu (Tsinghua University) SOSA 2019 2 / 15

  3. Subset Sum Subset Sum Given a (multi)set S of n positive integers and a target integer t , does there exist a subset R ⊆ S that sums to exactly t ? Example: S = { 1 , 1 , 3 , 10 } , t = 12 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Ce Jin , Hongxun Wu (Tsinghua University) SOSA 2019 2 / 15

  4. Subset Sum Subset Sum Given a (multi)set S of n positive integers and a target integer t , does there exist a subset R ⊆ S that sums to exactly t ? Example: S = { 1 , 1 , 3 , 10 } , t = 12 YES! R = { 1 , 1 , 10 } , sum( R ) = 1 + 1 + 10 = 12 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Ce Jin , Hongxun Wu (Tsinghua University) SOSA 2019 2 / 15

  5. Subset Sum Subset Sum Given a (multi)set S of n positive integers and a target integer t , does there exist a subset R ⊆ S that sums to exactly t ? Example: S = { 1 , 1 , 3 , 10 } , t = 12 YES! R = { 1 , 1 , 10 } , sum( R ) = 1 + 1 + 10 = 12 A classic NP-hard problem. O (2 n / 2 ) algorithm [Horowitz and Sahni, JACM 1974] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Ce Jin , Hongxun Wu (Tsinghua University) SOSA 2019 2 / 15

  6. Pseudopolynomial time algorithm Pseudopolynomial time algorithm: in poly( n , t ) time. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Ce Jin , Hongxun Wu (Tsinghua University) SOSA 2019 3 / 15

  7. Pseudopolynomial time algorithm Pseudopolynomial time algorithm: in poly( n , t ) time. Dynamic programming algorithm [Bellman, 1957]: ( S = { s 1 , . . . , s n } ) f [ i , x ] := f [ i − 1 , x ] OR f [ i − 1 , x − s i ] f [0 , x ] := [ x == 0] Output f [ n , t ] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Ce Jin , Hongxun Wu (Tsinghua University) SOSA 2019 3 / 15

  8. Pseudopolynomial time algorithm Pseudopolynomial time algorithm: in poly( n , t ) time. Dynamic programming algorithm [Bellman, 1957]: ( S = { s 1 , . . . , s n } ) f [ i , x ] := f [ i − 1 , x ] OR f [ i − 1 , x − s i ] f [0 , x ] := [ x == 0] Output f [ n , t ] O ( nt ) time . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Ce Jin , Hongxun Wu (Tsinghua University) SOSA 2019 3 / 15

  9. Pseudopolynomial time algorithm O ( nt ) [Bellman, 1957] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Ce Jin , Hongxun Wu (Tsinghua University) SOSA 2019 4 / 15

  10. Pseudopolynomial time algorithm O ( nt ) [Bellman, 1957] O ( n + √ nt ) deterministic algorithm. [Koiliaris and Xu, SODA 2017] ˜ ( ˜ O ( T ) stands for O ( T poly log T )) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Ce Jin , Hongxun Wu (Tsinghua University) SOSA 2019 4 / 15

  11. Pseudopolynomial time algorithm O ( nt ) [Bellman, 1957] O ( n + √ nt ) deterministic algorithm. [Koiliaris and Xu, SODA 2017] ˜ ( ˜ O ( T ) stands for O ( T poly log T )) ˜ O ( n + t ) randomized algorithm. [Bringmann, SODA 2017] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Ce Jin , Hongxun Wu (Tsinghua University) SOSA 2019 4 / 15

  12. Pseudopolynomial time algorithm O ( nt ) [Bellman, 1957] O ( n + √ nt ) deterministic algorithm. [Koiliaris and Xu, SODA 2017] ˜ ( ˜ O ( T ) stands for O ( T poly log T )) ˜ O ( n + t ) randomized algorithm. [Bringmann, SODA 2017] ▶ more precisely, O ( n + t log t log 4 n ) time (failure probability 1 n ) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Ce Jin , Hongxun Wu (Tsinghua University) SOSA 2019 4 / 15

  13. Pseudopolynomial time algorithm O ( nt ) [Bellman, 1957] O ( n + √ nt ) deterministic algorithm. [Koiliaris and Xu, SODA 2017] ˜ ( ˜ O ( T ) stands for O ( T poly log T )) ˜ O ( n + t ) randomized algorithm. [Bringmann, SODA 2017] ▶ more precisely, O ( n + t log t log 4 n ) time (failure probability 1 n ) ▶ uses color coding, layer splitting, FFT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Ce Jin , Hongxun Wu (Tsinghua University) SOSA 2019 4 / 15

  14. Pseudopolynomial time algorithm O ( nt ) [Bellman, 1957] O ( n + √ nt ) deterministic algorithm. [Koiliaris and Xu, SODA 2017] ˜ ( ˜ O ( T ) stands for O ( T poly log T )) ˜ O ( n + t ) randomized algorithm. [Bringmann, SODA 2017] ▶ more precisely, O ( n + t log t log 4 n ) time (failure probability 1 n ) ▶ uses color coding, layer splitting, FFT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Ce Jin , Hongxun Wu (Tsinghua University) SOSA 2019 4 / 15

  15. Pseudopolynomial time algorithm O ( nt ) [Bellman, 1957] O ( n + √ nt ) deterministic algorithm. [Koiliaris and Xu, SODA 2017] ˜ ( ˜ O ( T ) stands for O ( T poly log T )) ˜ O ( n + t ) randomized algorithm. [Bringmann, SODA 2017] ▶ more precisely, O ( n + t log t log 4 n ) time (failure probability 1 n ) ▶ uses color coding, layer splitting, FFT Near-optimal! (No t 1 − ε 2 o ( n ) time algorithm for any ε > 0, unless SETH fails) [Abboud, Bringmann, Hermelin, Shabtay, SODA 2019] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Ce Jin , Hongxun Wu (Tsinghua University) SOSA 2019 4 / 15

  16. Our result We present a randomized algorithm for Subset Sum in ˜ O ( n + t ) time. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Ce Jin , Hongxun Wu (Tsinghua University) SOSA 2019 5 / 15

  17. Our result We present a randomized algorithm for Subset Sum in ˜ O ( n + t ) time. Our techniques are simple and quite different from Bringmann’s algorithm. generating functions FFT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Ce Jin , Hongxun Wu (Tsinghua University) SOSA 2019 5 / 15

  18. Our result We present a randomized algorithm for Subset Sum in ˜ O ( n + t ) time. Our techniques are simple and quite different from Bringmann’s algorithm. generating functions FFT n + t ) is O ( n + t log 2 t ). 1 Precise running time (with failure probability . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Ce Jin , Hongxun Wu (Tsinghua University) SOSA 2019 5 / 15

  19. Our result We present a randomized algorithm for Subset Sum in ˜ O ( n + t ) time. Our techniques are simple and quite different from Bringmann’s algorithm. generating functions FFT n + t ) is O ( n + t log 2 t ). 1 Precise running time (with failure probability Can be improved to O ( n + t log t ) time (slightly less simple). faster than Bringmann’s algorithm by a log 4 n factor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Ce Jin , Hongxun Wu (Tsinghua University) SOSA 2019 5 / 15

  20. Our result We present a randomized algorithm for Subset Sum in ˜ O ( n + t ) time. Our techniques are simple and quite different from Bringmann’s algorithm. generating functions FFT n + t ) is O ( n + t log 2 t ). 1 Precise running time (with failure probability Can be improved to O ( n + t log t ) time (slightly less simple). faster than Bringmann’s algorithm by a log 4 n factor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Ce Jin , Hongxun Wu (Tsinghua University) SOSA 2019 5 / 15

  21. Our approach: generating functions ( S = { s 1 , s 2 , . . . , s n } , target integer = t ) Consider the generating function of this instance ∏ (1 + x s i ) A ( x ) = 1 ≤ i ≤ n . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Ce Jin , Hongxun Wu (Tsinghua University) SOSA 2019 6 / 15

  22. Our approach: generating functions ( S = { s 1 , s 2 , . . . , s n } , target integer = t ) Consider the generating function of this instance ∏ (1 + x s i ) A ( x ) = 1 ≤ i ≤ n Expand it ∑ a i x i A ( x ) = 1 + i ≥ 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Ce Jin , Hongxun Wu (Tsinghua University) SOSA 2019 6 / 15

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend