计算复杂性 (Fall 2018) and 高级算法 (Fall 2018)/Problem Set 1: Difference between pages

From TCS Wiki
(Difference between pages)
Jump to navigation Jump to search
imported>TCSseminar
 
imported>TCSseminar
(Created page with "== Problem 1== Recall that in class we show by the probabilistic method how to deduce a <math>\frac{n(n-1)}{2}</math> upper bound on the number of distinct min-cuts in any mul...")
 
Line 1: Line 1:
{{Infobox
== Problem 1==
|name        = Infobox
Recall that in class we show by the probabilistic method how to deduce a <math>\frac{n(n-1)}{2}</math> upper bound on the number of distinct min-cuts in any multigraph <math>G</math> with <math>n</math> vertices from the <math>\frac{2}{n(n-1)}</math> lower bound for success probability of Karger's min-cut algorithm.
|bodystyle    =  
|title        = <font size=3>计算复杂性
<br>Computational Complexity</font>
|titlestyle  =


|image        =
Also recall that the <math>FastCut</math> algorithm taught in class guarantees to return a min-cut with probability at least <math>\Omega(1/\log n)</math>. Does this imply a much tighter <math>O(\log n)</math> upper bound on the number of distinct min-cuts in any multigraph <math>G</math> with <math>n</math> vertices? Prove your improved upper bound if your answer is "yes", and give a satisfactory explanation if your answer is "no".
|imagestyle  =
|caption      =
|captionstyle =
|headerstyle  = background:#ccf;
|labelstyle  = background:#ddf;
|datastyle    =


|header1 =Instructor
== Problem 2 ==
|label1  =  
Two ''rooted'' trees <math>T_1</math> and <math>T_2</math> are said to be '''isomorphic''' if there exists a bijection <math>\phi</math> that maps vertices of <math>T_1</math> to those of <math>T_2</math> satisfying the following condition: for each ''internal'' vertex <math>v</math> of <math>T_1</math> with children <math>u_1,u_2,\ldots, u_k</math>, the set of children of vertex <math>\phi(v)</math> in <math>T_2</math> is precisely <math>\{\phi(u_1), \phi(u_2),\ldots,\phi(u_k)\}</math>, no ordering among children assumed.
|data1  =  
|header2 =  
|label2  =
|data2  = 姚鹏晖
|header3 =
|label3  = Email
|data3  = pyao@nju.edu.cn 
|header4 =
|label4= Office
|data4= 计算机系 502
|header5 = Class
|label5  =
|data5  =
|header6 =
|label6  = Class meetings
|data6  = Thursday, 10:10-12:00 <br> 仙I-204
|header7 =
|label7  = Place
|data7  =
|header8 =
|label8  = Office hours
|data8  = Thursday, 14:00-16:00 <br>计算机系 502
|header9 = Textbooks
|label9  =
|data9  =
|header10 =
|label10  =
|data10  = https://image.ibb.co/drYZEp/51_KWx_I1yyy_L.jpg
|header11 =
|label11  =
|data11  = Arora and Barak. <br>''Computational Complexity: A Modern Approach''.<br> Cambridge Univ Press, 2009.
|header12 = Teaching Assistant
|data13= 刘明谋
|label14=Email
|data14=liu.mingmou@smail.nju.edu.cn
|label15=Office
|data15=计算机系 412
|belowstyle = background:#ddf;
|below =
}}


Give an efficient randomized algorithm with bounded one-sided error (false positive), for testing isomorphism between rooted trees with <math>n</math> vertices. Analyze your algorithm.


== Problem 3 ==
Consider the following problem:
*Fixed a Universe <math>U</math> of size <math>m</math>, given a set <math>S \subseteq U</math> of size <math>n</math> and for each <math>x \in S</math> a <math>r</math>-bit variable <math>v_x</math>, we want to store <math>S</math> and <math>\{v_x\}_{x\in S}</math> into a table, so that the query "Is <math>x\in S</math>, and if so, what's <math>v_x</math>?" can be answer quickly.


= Announcement =
The above problem, which is often refered to as '''dictionary''',  is a generalization of the set membership problem that we have introduced in class, and there is another hash table called '''bloomier filter''' that solves this problem in linear (<math>O(nr)</math>) space and constant query time with tiny one-sided error probability.
* (2018/9/6) 新学期第一堂课。
* (2018/9/21) 第一次作业已发布,10月11日上课前交。
* (2018/9/27) 第二次作业已发布,10月11日上课前交。
* (2018/9/27) 根据国庆放假安排,10月4日的课挪到了9月29日,请各位同学注意。
* (2018/10/11) 第三次作业已发布,10月25日上课前交。
* (2018/10/15) 发布前两次作业的参考答案及评分标准。
* (2018/10/18) 第四次作业已发布,11月1日上课前交。
* (2018/11/1) 第五次作业已发布,11月8日上课前交。
* (2018/11/8) 发布第三次作业的参考答案及评分标准。
* (2018/11/15) 发布第四次作业的参考答案及评分标准。
* (2018/11/15) 感谢 [https://www.uts.edu.au/staff/youming.qiao 乔友明博士] 为我们讲解电路复杂性的前沿研究。
* (2018/11/22) 第六次作业已发布,11月29日上课前交。
* (2018/11/29) 发布第五次作业的参考答案及评分标准。
* (2018/12/6) 发布第六次作业的参考答案及评分标准。
* (2018/12/6) 第七次作业已发布,12月13日上课前交。
* (2018/12/6) 期末考试时间是12月27日的课堂上,闭卷,望周知。
* (2018/12/20) 发布第七次作业的参考答案及评分标准。


= Course info =
Now if we are allowed to answer arbitrarily when <math>x\notin S</math>, then without resorting to bloomier filter, show that we can store any instance(<math>S</math> and <math>\{v_x\}_{x\in S}</math>) into a table using at most <math>O(nr+\log\log m)</math> bits space, and then correctly answer this relaxed query based on table contents only.
* '''Instructor ''': 姚鹏晖 ([mailto:pyao@nju.edu.cn pyao@nju.edu.cn])
* '''Teaching assistant''': 刘明谋 ([mailto:liu.mingmou@smail.nju.edu.cn liu.mingmou@smail.nju.edu.cn])
* '''Class meeting''': Thursday, 10:10-12:00, 仙I-204.
* '''Office hour''': Thursday, 14:00-16:00, 计算机系 502.


= Course materials =
''Hint: You don't have to actually design an algorithm, just prove its existence is fine. You might want to use probabilistic method and [https://en.wikipedia.org/wiki/Perfect_hash_function perfect hashing].''
* [https://www.amazon.com/dp/0521424267 Arora and Barak. Computational Complexity: A Modern Approach. Cambridge Univ Press, 2009.]
* [https://www.amazon.cn/dp/B007VXH70K/ Arora and Barak. 计算复杂性的现代方法. (英语). 世界图书出版公司. 2012.]
* [https://www.amazon.cn/dp/B018LW74IY/ Arora and Barak. 计算复杂性:现代方法. (中文翻译). 机械工业出版社. 2016.]
如果在获取教材方面有困难可以联系助教。
 
= Assignments =
* [[计算复杂性 (Fall 2018)/Assignment 1|Assignment 1]], due on Oct 11. [[计算复杂性 (Fall 2018)/作业1已提交名单 | 截止2018.10.11 10:10,作业1已提交名单]].
* [[计算复杂性 (Fall 2018)/Assignment 2|Assignment 2]], due on Oct 11. [[计算复杂性 (Fall 2018)/作业2已提交名单 | 截止2018.10.11 10:10,作业2已提交名单]].
* [https://www.overleaf.com/read/pjwsfdmszdbd 作业1及作业2参考答案及评分标准]
* [[计算复杂性 (Fall 2018)/Assignment 3|Assignment 3]], due on Oct 25.[[计算复杂性 (Fall 2018)/作业3已提交名单 | 截止2018.10.29 02:10,作业3已提交名单]].
* [https://www.overleaf.com/read/vpfpxxsznnjv 作业3参考答案及评分标准]
* [[计算复杂性 (Fall 2018)/Assignment 4|Assignment 4]], due on Nov 1.[[计算复杂性 (Fall 2018)/作业4已提交名单 | 截止2018.11.1 14:30,作业4已提交名单]].
* [https://www.overleaf.com/read/mpvtcfqfqqss 作业4参考答案及评分标准]
* [[计算复杂性 (Fall 2018)/Assignment 5|Assignment 5]], due on Nov 8.[[计算复杂性 (Fall 2018)/作业5已提交名单 | 截止2018.11.8 21:00,作业5已提交名单]].
* [https://www.overleaf.com/read/kzzctgpwqghw 作业5参考答案及评分标准]
* [[计算复杂性 (Fall 2018)/Assignment 6|Assignment 6]], due on Nov 29.[[计算复杂性 (Fall 2018)/作业6已提交名单 | 截止2018.11.29 10:10,作业6已提交名单]].
* [https://www.overleaf.com/read/wzrfshbfhdtz 作业6参考答案及评分标准]
* [[计算复杂性 (Fall 2018)/Assignment 7|Assignment 7]], due on Dec 13.[[计算复杂性 (Fall 2018)/作业7已提交名单 | 截止2018.12.17 14:50,作业7已提交名单]].
* [https://www.overleaf.com/read/kvvznzsvvjbv 作业7参考答案及评分标准]
 
= Lecture Notes =
# 图灵机、计算复杂性类 P ([http://45.77.25.129:8000/lec1.pptx slides])
# NP 和 NP 完全问题 ([http://45.77.25.129:8000/lec2.pptx slides])
# 对角化方法 ([http://45.77.25.129:8000/lec3.pptx slides])
# 空间复杂度 ([http://45.77.25.129:8000/lec4.pptx slides1],[http://45.77.25.129:8000/NL%20Completeness.pdf notes2])
# 多项式谱系 ([http://45.77.25.129:8000/lec5.pptx slides])
# 布尔线路 ([http://45.77.25.129:8000/lec6.pptx slides1], [http://45.77.25.129:8000/lec7.pptx slides2])
# 随机计算 ([http://45.77.25.129:8000/lec%208.pptx slides1], [http://45.77.25.129:8000/lec9.pptx slides2])
# 交互证明 ([http://45.77.25.129:8000/lec%2010-1.pptx slides1-rev1], [http://45.77.25.129:8000/lec%2011.pptx slides2])
# 前沿课题介绍 ([http://45.77.25.129:8000/lec%2012.pptx 量子计算],通讯复杂性)

Revision as of 13:13, 18 September 2018

Problem 1

Recall that in class we show by the probabilistic method how to deduce a [math]\displaystyle{ \frac{n(n-1)}{2} }[/math] upper bound on the number of distinct min-cuts in any multigraph [math]\displaystyle{ G }[/math] with [math]\displaystyle{ n }[/math] vertices from the [math]\displaystyle{ \frac{2}{n(n-1)} }[/math] lower bound for success probability of Karger's min-cut algorithm.

Also recall that the [math]\displaystyle{ FastCut }[/math] algorithm taught in class guarantees to return a min-cut with probability at least [math]\displaystyle{ \Omega(1/\log n) }[/math]. Does this imply a much tighter [math]\displaystyle{ O(\log n) }[/math] upper bound on the number of distinct min-cuts in any multigraph [math]\displaystyle{ G }[/math] with [math]\displaystyle{ n }[/math] vertices? Prove your improved upper bound if your answer is "yes", and give a satisfactory explanation if your answer is "no".

Problem 2

Two rooted trees [math]\displaystyle{ T_1 }[/math] and [math]\displaystyle{ T_2 }[/math] are said to be isomorphic if there exists a bijection [math]\displaystyle{ \phi }[/math] that maps vertices of [math]\displaystyle{ T_1 }[/math] to those of [math]\displaystyle{ T_2 }[/math] satisfying the following condition: for each internal vertex [math]\displaystyle{ v }[/math] of [math]\displaystyle{ T_1 }[/math] with children [math]\displaystyle{ u_1,u_2,\ldots, u_k }[/math], the set of children of vertex [math]\displaystyle{ \phi(v) }[/math] in [math]\displaystyle{ T_2 }[/math] is precisely [math]\displaystyle{ \{\phi(u_1), \phi(u_2),\ldots,\phi(u_k)\} }[/math], no ordering among children assumed.

Give an efficient randomized algorithm with bounded one-sided error (false positive), for testing isomorphism between rooted trees with [math]\displaystyle{ n }[/math] vertices. Analyze your algorithm.

Problem 3

Consider the following problem:

  • Fixed a Universe [math]\displaystyle{ U }[/math] of size [math]\displaystyle{ m }[/math], given a set [math]\displaystyle{ S \subseteq U }[/math] of size [math]\displaystyle{ n }[/math] and for each [math]\displaystyle{ x \in S }[/math] a [math]\displaystyle{ r }[/math]-bit variable [math]\displaystyle{ v_x }[/math], we want to store [math]\displaystyle{ S }[/math] and [math]\displaystyle{ \{v_x\}_{x\in S} }[/math] into a table, so that the query "Is [math]\displaystyle{ x\in S }[/math], and if so, what's [math]\displaystyle{ v_x }[/math]?" can be answer quickly.

The above problem, which is often refered to as dictionary, is a generalization of the set membership problem that we have introduced in class, and there is another hash table called bloomier filter that solves this problem in linear ([math]\displaystyle{ O(nr) }[/math]) space and constant query time with tiny one-sided error probability.

Now if we are allowed to answer arbitrarily when [math]\displaystyle{ x\notin S }[/math], then without resorting to bloomier filter, show that we can store any instance([math]\displaystyle{ S }[/math] and [math]\displaystyle{ \{v_x\}_{x\in S} }[/math]) into a table using at most [math]\displaystyle{ O(nr+\log\log m) }[/math] bits space, and then correctly answer this relaxed query based on table contents only.

Hint: You don't have to actually design an algorithm, just prove its existence is fine. You might want to use probabilistic method and perfect hashing.