text
stringlengths
1
6.06k
source
stringclasses
375 values
page
int64
0
1.49k
book
stringclasses
375 values
chunk_index
int64
0
0
Index 1201 RL circuit, 338–339 RLC analog, 1022, 1022f Rodrigues formula, 551–554, 720–721 for Hermite ODE, 554 Laguerre polynomials, 889–890 associated, 895 Rodrigues representation, Hermite polynomials, 874 root diagram, 857 root test, Cauchy, 4 rotations groups SO(2) and SO(3), 849–851 in R3, 139–142, 140f exercises, 142–143 in spherical coordinates, 194–196, 195f of circular disk, 818 of coordinate system, 215 of coordinate transformations, 133–135 Rouché’s theorem, 518–519 row vectors, 95, 123, 125 extraction of, 108 S saddle points, 63, 433 argument, 586 asymptotic forms factorial function, 588 of gamma function, 588–589 for avoiding oscillations, 589 method, 587–588 overview, 585–587 sample space, 1126 sample standard deviation, 1168 sawtooth wave, 937–939, 938f , scalar, 205 scalar field, 143 scalar potential, 171–172 scalar product, 51, 254–255, 271, 285, 295, 297 and adjoint operator, 278 in spin space, 259 triple, 128–130, 129f , scalar quantities, 46 scattering cross section, 465 Schlaefli integral, 554, 604, 653f , 676 Legendre polynomials, 557 scholastic aptitude tests, 1129–1130 Schrödinger equation, 708, 1048, 1116–1117 hydrogen atom, 896 momentum space representation, 994 of quantum mechanics, 330 Schwarz inequality, 51, 257 Schwarz reflection principle, 547 exercises, 549–550 second-order linear ODEs, 343–346 second-order partial differential equations (PDEs) boundary conditions, 411–413 classes of, 409–411 exercises, 414 nonlinear, 413–414 second-order Sturm-Liouville ordinary differential equations (ODEs),
/home/ricoiban/GEMMA/mnlp_chatsplaining/RAG/7th_Mathematical_Methods_for_Physicists.pdf
1,201
7th_Mathematical_Methods_for_Physicists
0
, 411–413 classes of, 409–411 exercises, 414 nonlinear, 413–414 second-order Sturm-Liouville ordinary differential equations (ODEs), 551 second-rank tensor, 207–208 secular determinant, 302 secular equation, 302, 306 self-adjoint matrices, 108 self-adjoint ODEs boundary conditions, 381 deuteron, 391–393 eigenvalues, 389 exercises, 393–395 Hermitian operators, 384 Legendre’s equation, 389–390 self-adjoint operators, 277, 284–286, 1070 example, 284–286 exercises, 286–287 overview, 283–284 self-adjoint poblems, Green’s function, 460 self-adjoint theory, 384 semi-convergent series, 579 separable kernel, 1057–1059 homogeneous Fredholm equation, 1059–1060 separable ODEs, 331–332 separation of variables, 403, 414, 430–432 Cartesian coordinates, 415–420 circular cylindrical coordinates, 421–424, 431 exercises, 432–433 spherical polar coordinates, 424–430 series approach Bessel’s equation, limitations of, 351–353 Chebyshev, 25 hypergeometric, 912 Legendre, 9–10 shifted polynomials, Chebyshev, 908 ultraspherical, 25 series expansion, 681 series solutions, Frobenius method, 346–350, 350f exercises, 355–358 expansion about, 350 Fuchs’ theorem, 355 limitations of series approach, Bessel’s equation, 351–353 regular and irregular singularities, 353–354 symmetry of solutions, 350–351 sets, 1127–1130 several dependent and independent variables, relation to physics, 1105 sign changes, series with alternating, 12–13 signal-processing applications, 997–1001 exercises, 1001–1002 similarity transformations, 208, 293
/home/ricoiban/GEMMA/mnlp_chatsplaining/RAG/7th_Mathematical_Methods_for_Physicists.pdf
1,201
7th_Mathematical_Methods_for_Physicists
0
1202 Index simple pendulum, 927–928, 1113–1114, 1113f simple pole, 498 simultaneous diagonalization, 314–315 sine infinite products, 575 integrals in asymptotic series, 580–582 single-electron wave function, 396 single-slit diffraction pattern, 972 singular points, 343–345, 345t essential (irregular), 344 irregular (essential), 344 isolated, 497 singularities analytic continuation, 503–507, 504f , 505f exercises, 507–508 fixed, 378–379 movable, 378–379 on contour of integration, 530–531 poles, 497–498 Slater-type orbitals (STOs), 990 Snell’s law, 1095, 1095f SO(2) rotation groups, 849–851 SO(3) rotation groups, 849–851 soap film, 1088–1090, 1089f soap film–minimum area, 1090–1093, 1092f solar products, 256–257 solenoidal, 149, 154–155 soliton, 413 source term, 447 space groups, 869 special relativity, 862 special unitary groups, SU(3), Gell-Mann matrices, 852–861 special values, 764 parity and, 746 spectral decomposition, 315–316 sphere in uniform field, 727–729, 728f sphere with boundary conditions, 428–430 spherical Bessel functions, 427, 428 asymptotic values, 703 definitions, 702 exercises, 709–712 Helmholtz equation, 698 limiting values, 703 modified, 709 orthogonality and zeros, 703 particle in a sphere, 704–706 recurrence relations, 702 spherical coordinates, Helmholtz equation, 698 spherical Green’s functions, 463, 800–801 spherical harmonics, 445, 473, 756 addition theorem for, 797–798 Cartesian representations, 758 Condon-Shortley phase, 758, 760t exercises,
/home/ricoiban/GEMMA/mnlp_chatsplaining/RAG/7th_Mathematical_Methods_for_Physicists.pdf
1,202
7th_Mathematical_Methods_for_Physicists
0
–801 spherical harmonics, 445, 473, 756 addition theorem for, 797–798 Cartesian representations, 758 Condon-Shortley phase, 758, 760t exercises, 765–766 integrals of three, 803–805 ladder, 779 Laplace expansion, 760–761, 799–801 Laplace series–gravity fields, 762 properties of, 764–765 symmetry of solutions, 762–763 vector, 809–813 spherical pendulum, 1105, 1105f spherical polar coordinates, 79, 183, 190–194, 194f , 424–430 spherical tensors, 796 addition theorem, 797–798 Laplace expansion, 799–801 spherical wave expansion, 798–799 exercises, 806–809 integrals of three spherical harmonics, 803–805 spherical volume, 704 spherical waves Bessel functions, 703 expansion, 798–799 spin operator, adjoint of, 282 spin space, 259–260 of electron, 253 spinor ladder, 780–781 spinors, 213, 779–780, 852 square integrable, 595 square integration contour, zn on, 479–481, 480f , square pulse, transform of, 1010, 1010f square wave, 949–950, 949f , 958–959 expansion of, 264f squares of random variables, 1164 squares of series, divergent, 15–16 standard deviation, 1138 of measurements, 1138–1140 sample, 1168 standing waves, 382–384, 435 star operator, see Hodge operator stationary, 63 stationary paths, 1085, 1085f stationary points, 433 statistical hypothesis, 1165 statistics, 1125 chi-square (χ2) distribution, 1170–1174 confidence interval, 1176–1178 error propagation, 1165–1168 exercises, 1178–1179 fitting curves to data, 1168–1170 student t distribution, 1174–1176 steepest descent method
/home/ricoiban/GEMMA/mnlp_chatsplaining/RAG/7th_Mathematical_Methods_for_Physicists.pdf
1,202
7th_Mathematical_Methods_for_Physicists
0
70–1174 confidence interval, 1176–1178 error propagation, 1165–1168 exercises, 1178–1179 fitting curves to data, 1168–1170 student t distribution, 1174–1176 steepest descent method of, 585 asymptotic form of gamma function, 588–589 exercises, 590–591 factorial function, 588 saddle points, 585–588
/home/ricoiban/GEMMA/mnlp_chatsplaining/RAG/7th_Mathematical_Methods_for_Physicists.pdf
1,202
7th_Mathematical_Methods_for_Physicists
0
Index 1203 step function, 1013–1014, 1014f Stirling’s expansion, 589 Stirling’s series derivation from Euler-Maclaurin integration formula, 623–624 exercises, 625–626 Stirling’s series, 624 Stirlings formula, 567 Stokes’ theorem, 167–168, 167f , 168f , 193–194 on differential forms, 245–248 STOs, see Slater-type orbitals stream lines, 149 strong interaction, 852 structure constants, 848 student t distribution, 1174–1176, 1177t student t probability density, 1176f Sturm-Liouville boundary conditions, 892 Sturm-Liouville equation, 1117 Sturm-Liouville system, 746, 892 Sturm-Liouville theory, 384, 661, 936–937, 1071, 1073 SU(2) and SO(3) homomorphism, 851–852 isospin and SU(3) symmetry, 852 SU(3) symmetry, 852–861 substitution, 1020 subtraction of sets, 1127 of tensors, 208 successive applications of ∇, 153–154 successive operations, of coordinate transformations, 137–138 successive transfer functions, 1002f successive unitary transformations, 290 sum evaluation of, 544–546, 546t exercises, 546–547 sum rules, 596 summation of series, 957–958 superposition principle, 402 for homogenous ODEs, PDEs, 330 surface integrals, 161–162, 161f , 162f symmetric group, 835, 840–844 exercises, 844–845 symmetric matrix, 105 symmetric stretching mode, 323 symmetric tensor, 208 symmetrization of kernels, 1069 symmetry, 815, 940–941, 942f and physics, 826–830 exercises, 830 of equilateral triangle, 817f , 817, 818f of solutions, 762–763 relations, 593–594 T Taylor expansion, 492–494, 493f Taylor series, 560 Taylor’
/home/ricoiban/GEMMA/mnlp_chatsplaining/RAG/7th_Mathematical_Methods_for_Physicists.pdf
1,203
7th_Mathematical_Methods_for_Physicists
0
equilateral triangle, 817f , 817, 818f of solutions, 762–763 relations, 593–594 T Taylor expansion, 492–494, 493f Taylor series, 560 Taylor’s expansion, 653 binomial theorem, relativistic energy, 35–36 Maclaurin theorem exponential function, 27–28 logarithm, 28–29 tensor analysis, 205–213 addition and subtraction of, 208 covariant and contravariant, 206–207 exercises, 213–215 isotropic, 209 symmetric and antisymmetric, 208 tensor derivative operators curl, 225 divergence, 224–225 gradient, 224 Laplacian, 225 tensors, see also direct product; quotient rule; spinors; pseudotensors direct product of, 210–211 in general coordinates covariant derivatives, 222–223 exercises, 226 metric tensor, 218–219 second-rank, 207–208 tensors of rank 0, 205 tensors of rank 1, 205 tensors of rank 2, 207–208 three-dimensional (3-D) differential forms, 407 threefold Hermite formula, 883–884 time-independent Schrödinger equation, 300 TM, see transverse magnetic trace matrix, 105, 210 transfer function, 998–999, 998f high-pass filter, 999–1000, 999f limitations on, 1000–1001 transform, derivative of, 965, 966, see also Hankel; Laplace; Mellin transformations Gram-Schmidt, 293 of differential equation into integral equation, 1049–1050 of operators, 291 nonunitary transformations, 293 of random variables, 1159–1165 unitary, 287–290 translation, 1022–1023 transpose matrix, 104 transverse magnetic (TM), 651 traveling waves, 435 triangle rule, 788 triangular pulse, Fourier transform of, 976, 977f
/home/ricoiban/GEMMA/mnlp_chatsplaining/RAG/7th_Mathematical_Methods_for_Physicists.pdf
1,203
7th_Mathematical_Methods_for_Physicists
0
1204 Index triangular symmetry, quantum mechanics of, 829–830 trigonometric form, 904–905 trigonometric functions exploiting periodicity of, 537–538 trigonometric integrals, 69, 522–524 triple scalar product, 128–130, 129f triple vector product, 130 triplet state, 259 Two and three dimension problems, Green’s function, 459–467 two-sided Laplace transforms, 1008 U ultraspherical polynomials, 388, 899 equation, 903 self-adjoint form, 906 undetermined multipliers, see Lagrangian multipliers uniform convergence, 21–22, 29, 262 uniformly convergent series, properties of, 24 unions, 1127–1130 unique expansion, 494 uniqueness theorem L’Hôpital’s rule, 31 of power series, 30–31 unit cell, 869 unit matrix, 99 unit vectors, 47 unitary matrices, 107 unitary operators example, 289–290 exercises, 290–291 successive transformations, 290 unitary transformations, 287–288 unitary representation, 821–823, 823f unitary transformation, 297 V variables dependent, 1096–1097 Hamilton’s Principle, 1097–1098 Laplace’s equation, 1101–1102 moving particle–Cartesian coordinates, 1098–1099 moving particle–circular cylindrical coordinates, 1099 independent, 407–408, 411 separation of, 403 variance, 1136–1140 variation, 1081 with constraints, 1111–1112 exercises, 1121–1124 Lagrangian equations, 1112–1113 Schrödinger wave equation, 1116–1117 simple pendulum, 1113–1114, 1113f sliding off a log, 1114–1115, 1114f of linear parameters, 1121 of constant, 338 of parameters, 338, 375–376 variation method, 395–397 exercises, 397 vector analysis reciprocal lattice, 130 rotation of coordinate transformations, 133–135 vector fields, 46, 143 vector integration exercises, 163–164 line integral
/home/ricoiban/GEMMA/mnlp_chatsplaining/RAG/7th_Mathematical_Methods_for_Physicists.pdf
1,204
7th_Mathematical_Methods_for_Physicists
0
method, 395–397 exercises, 397 vector analysis reciprocal lattice, 130 rotation of coordinate transformations, 133–135 vector fields, 46, 143 vector integration exercises, 163–164 line integrals, 159–160, 160f surface integrals, 161–162, 161f , 162f volume integrals, 162–163 vector Laplacian, 155–156 vector model, 786–788 vector potential, 172–175, 175 vector spaces, 253–254, 295 completeness, 255, 262 linear space, 252 vector spherical harmonics coupling, 810–813 exercises, 813 spherical tensor, 809–810 vector triple product, 130 vectors, 123, 205, see also rotations; gradient, ∇; tensors; Stokes’ theorem addition of, 47f angle between two, 798 basic properties of, 124–125 by Gram-Schmidt orthogonalization, 269–275 coefficient, 261 contravariant, 206, 219 contravariant basis, 220–221 covariant, 206 covariant basis, 218, 220–221 cross product, 126–128, 126f , 127f differential vector operators, 143 gradient, 143 direct product of, 210–211 dot products, 49–50 exercises, 52–53, 131–133 fields, 123 Gauss’ theorem, 164–165, 165f Green’s theorem, 165–166 Helmholtz’s theorem, 177–180 in function spaces Dirac notation, 265–266 example, 253–254, 256–263, 265 exercises, 266–269 expansions, 261 Hilbert space, 255–256 orthogonal expansions, 257–258
/home/ricoiban/GEMMA/mnlp_chatsplaining/RAG/7th_Mathematical_Methods_for_Physicists.pdf
1,204
7th_Mathematical_Methods_for_Physicists
0
Index 1205 overview, 251–253 scalar product, 254–255, 260–261 Schwarz inequality, 257 irrotational, 154–155 matrix representation of, 106–107 multiplication of, 252 orthogonality, 51 physical, 272–273 radius vector, 48 Stokes’ theorem, 167–168, 167f , 168f successive applications of ∇, 153–154 triple product, 130 triple scalar product, 128–130, 129f unit vectors, 47 vibrating string, 382–384 vibration, normal modes of, 322–324 vierergruppe, 820 Volterra equation, 1047, 1048, 1050, 1055, 1067 volume integrals, 162–163 vorticity, 151 W wave equation, 435, 981–982 d’Alembert’s solution of, 436 exercises, 437 wave guides, coaxial, Bessel functions, 671–672 wedge operator, 233 wedge products, 233 Weierstrass, 504 Weierstrass M test, 22–23 Weierstrass infinite-product form of, 602 weight diagram, 859f , 859, 860f Weyl representation, 121 Whittaker functions, 682, 919 Wigner matrices, 797 WKB expansion, 577 Wronskian determinant, 359–360 Wronskian formulas Bessel functions, 670–671, 694 confluent hypergeometric functions, 922 linear dependence/independence of functions, 360, 671 solutions of self-adjoint differential equation, 670 Z zero matrix, 96 zero-point energy, 705, 879 zeros, Bessel function, 648–653
/home/ricoiban/GEMMA/mnlp_chatsplaining/RAG/7th_Mathematical_Methods_for_Physicists.pdf
1,205
7th_Mathematical_Methods_for_Physicists
0
Midterm Exam, Advanced Algorithms 2017-2018 • You are only allowed to have a handwritten A4 page written on both sides. • Communication, calculators, cell phones, computers, etc... are not allowed. • Your explanations should be clear enough and in sufficient detail that a fellow student can understand them. In particular, do not only give pseudo-code without explanations. A good guideline is that a description of an algorithm should be such that a fellow student can easily implement the algorithm following the description. • You are allowed to refer to material covered in the lecture notes including theorems without reproving them. You may also refer to statements given in the exercise sheets and the homework sheet. You are however not allowed to refer to material from any specific solution to these exercises. • Do not touch until the start of the exam. Good luck! Name: N◦Sciper: Problem 1 Problem 2 Problem 3 Problem 4 Problem 5 / 20 points / 20 points / 20 points / 20 points / 20 points Total / 100 Page 1 (of 12) CS-450 Advanced Algorithms, Midterm Exam • Spring 2018 Ola Svensson
/home/ricoiban/GEMMA/mnlp_chatsplaining/RAG/MidTerm2018sol.pdf
0
MidTerm2018sol
0
1 (consisting of subproblems a-b, 20 pts) Basic questions. This problem consists of two subprob- lems each worth 10 points. 1a (10 pts) Suppose we use the Simplex method to solve the following linear program: maximize 4x1 −x2 −2x3 subject to x1 −x3 + s1 = 1 x1 + s2 = 4 −3x2 + 2x3 + s3 = 4 x1, x2, x3, s1, s2, s3 ≥0 At the current step, we have the following Simplex tableau: x1 = 1 + x3 −s1 s2 = 3 −x3 + s1 s3 = 4 + 3x2 −2x3 z = 4 −x2 + 2x3 −4s1 Write the tableau obtained by executing one iteration (pivot) of the Simplex method start- ing from the above tableau. Solution: Only x3 has a positive coefficient in z, we will pivot x3. We have ↗x3 −→x3 ≤∞(1), x3 ≤ 3 (2), x3 ≤2 (3), Thus we use third equality to pivot x3. Hence x3 = 1 2(4 + 3x2 −s3). And we get x1 = 1 + 1 2(4 + 3x2 −s3) −s1 s2 = 3 −1 2(4 + 3x2 −s3) + s1 x3 = 1 2(4 + 3x2 −s3) z = 4 −x2 + (4 + 3x2 −s3) −4s1 That is x1 = 3 + 3x2 2 −s3 2 −s1 s2 = 1 −3x2 2 + s3 2 + s1 x3 = 2 + 3x2 2 −s3 2 z = 8 + 2x2 + −s3 −4s1 x1 := 3 x2 := 0 x3 := 2 s1 := 0 s2 := 1 s3 := 0 Page 2 (of 12) CS-450 Advanced Algorithms, Midterm Exam • Spring 2018 Ola Svensson
/home/ricoiban/GEMMA/mnlp_chatsplaining/RAG/MidTerm2018sol.pdf
1
MidTerm2018sol
0
1b (10 pts) Chef Baker Buttersweet just took over his family business - baking tasty cakes! He notices that he has m different ingredients in various quantities. In particular, he has bi ≥0 kilograms of ingredient i for i = 1, . . . , m. His family cookbook has recipes for n types of mouthwatering cakes. A kilogram of cake of type j is worth cj CHF. For each recipe j, the cookbook says how many kilograms of each of the ingredients are needed to make one kilogram of cake of type j. One kilogram of cake of type j, for j = 1, . . . , m, needs precisely aij kilograms of ingredient i for all i = 1, . . . , m. Chef wants to make xj ≤1 kilograms of cake of type j. Having studied linear programming, he knows that the maximum revenue he can get is given by the following linear program, where A ∈Rm×n + , b ∈Rm + and c ∈Rn +. Maximize n X j=1 cjxj subject to Ax ≤b 1 ≥xj ≥0 ∀j. Chef realizes that he can use Hedge algorithm to solve this linear program (approximately) but he is struggling with how to set the costs m(t) i at each iteration. Explain how to set these costs properly. (In this problem you are asked to define the costs m(t) i . You do not need to explain how to solve the reduced linear program that has a single constraint. Recall that you are allowed to refer to material covered in the lecture notes.) Solution: Here we give a detailed explanation of how to set the costs. Your solution does not need to contain such a detailed explanation. The idea of using the Hedge method for linear programming is to associate an expert with each constraint of the LP. In other words, the Hedge method will maintain a weight distribution over the set of constraints of a linear problem to solve, and to iteratively update those weights in a multiplicative manner based on the cost function at each step. Initially, the Hedge method will give a weight w(1) i = 1 for every constraint/expert i =
/home/ricoiban/GEMMA/mnlp_chatsplaining/RAG/MidTerm2018sol.pdf
2
MidTerm2018sol
0
and to iteratively update those weights in a multiplicative manner based on the cost function at each step. Initially, the Hedge method will give a weight w(1) i = 1 for every constraint/expert i = 1, . . . , m (the number m of constraints now equals the number of experts). And at each step t, it will maintain a convex combination <unk>p(t) of the constraints (that is defined in terms of the weights). Using such a convex combination <unk>p, a natural easier LP with a single constraint is obtained by summing up all the constraints according to <unk>p. Any optimal solution of the original LP is also a solution of this reduced problem, so the new problem will have at least the same cost as the previous one. We define an oracle for solving this reduced problem: Definition 1 An oracle that, given <unk>p = (p1, . . . , pm) ≥0 such that Pm i=1 pi = 1, outputs an optimal solution x∗to the following reduced linear problem: Maximize n X j=1 cjxj subject to m X i=1 piAi ! · x ≤ m X i=1 pibi x ≥0 Page 3 (of 12) CS-450 Advanced Algorithms, Midterm Exam • Spring 2018 Ola Svensson
/home/ricoiban/GEMMA/mnlp_chatsplaining/RAG/MidTerm2018sol.pdf
2
MidTerm2018sol
0
As explained, we associate an expert to each constraint of the covering LP. In addition, we wish to increase the weight of unsatisfied constraints and decrease the weight of satisfied constraints (in a smooth manner depending on the size of the violation or the slack). The Hedge algorithm for covering LPs thus becomes: • Assign each constraint i a weight w(1) i initialized to 1. At each time t: • Pick the distribution p(t) i = w(t) i /Φ(t) where Φ(t) = P i∈[N] w(t) i . • Now we define the cost vector instead of the adversary as follows: – Let x(t) be the solution returned by the oracle on the LP obtained by using the convex combination <unk>p(t) of constraints. Notice that cost of x(t), i.e., c<unk>x(t), is at least the cost of an optimal solution to the original LP. – Define the cost of constraint i as m(t) i = bi − n X j=1 Aijxj = bi −Aix. Notice that we have a positive cost if the constraint is satisfied (so the weight will be decreased by Hedge) and a negative cost if it is violated (so the weight will be increased by Hedge). • After observing the cost vector, set w(t+1) i = w(t) i · e−ε·m(t) i . Output: the average ̄x = 1 T PT t=1 x(t) of the constructed solutions. Page 4 (of 12) CS-450 Advanced Algorithms, Midterm Exam • Spring 2018 Ola Svensson
/home/ricoiban/GEMMA/mnlp_chatsplaining/RAG/MidTerm2018sol.pdf
3
MidTerm2018sol
0
(Primal) LP Relaxation minimize X S∈T c(S)xS subject to X S∈T :e∈S xS ≥1 for e ∈U xS ≥0 for S ∈T (Dual) maximize X e∈U ye subject to X e∈S ye ≤c(S) for S ∈T ye ≥0 for e ∈U Figure 1. The standard LP relaxation of set cover and its dual. 2 (20 pts) Recall that a set cover instance is specified by a universe U = {e1, . . . , en}, a family of subsets T , and a cost function c : T →R+. The task is to find a collection C ⊆T of subsets of minimum total cost that covers all elements. The natural LP relaxation and its dual (as seen in class) are given in Figure 1. In the homework, we analyzed a primal-dual algorithm for vertex cover. In this problem you should design and analyze a primal-dual algorithm for set cover that has an approxi- mation guarantee of f, where f is the maximum number of sets any element belongs to: f = maxe∈U |{S ∈T : e ∈S}|. In other words, you should prove that your primal-dual al- gorithm returns a set cover of weight at most f times the weight of an optimal solution. (In this problem you are asked to (i) design the primal-dual algorithm and (ii) show that it has an approximation guarantee of f. We remark that an answer that solves and rounds the LP relaxation is rewarded 0 points. Recall that you are allowed to refer to material covered in the lecture notes.) Solution: We present the following primal-dual algorithm which maintains a feasible dual solu- tion, and eventually constructs a feasible primal solution. 1. Initialize the dual solution y to be ye = 0 for every e ∈U. 2. While C = {S ∈T : P e∈S ye = c(S)} is not a set cover (i.e., ∪S∈CS <unk>= U): • Select an element e ∈U that is
/home/ricoiban/GEMMA/mnlp_chatsplaining/RAG/MidTerm2018sol.pdf
4
MidTerm2018sol
0
C = {S ∈T : P e∈S ye = c(S)} is not a set cover (i.e., ∪S∈CS <unk>= U): • Select an element e ∈U that is not covered by any set in C (i.e., choose an element e ∈U \ (∪S∈CS). • Increase ye until one of the dual constraints becomes tight (i.e., P e∈S ye = c(S) for some S /∈C). 3. Return C = {S ∈T : P e∈S ye = c(S)}. This algorithm terminates because, in each iteration of the loop, a new element e ∈U becomes covered. Therefore there may be at most n iterations. Note that, by construction, the output C is a set cover and the computed dual solution is feasible. Let y be the dual solution when the primal-dual algorithm terminates. We have the Page 5 (of 12) CS-450 Advanced Algorithms, Midterm Exam • Spring 2018 Ola Svensson
/home/ricoiban/GEMMA/mnlp_chatsplaining/RAG/MidTerm2018sol.pdf
4
MidTerm2018sol
0
following: X S∈C c(S) = X S∈C X e∈S ye (by the definition of set C) ≤ X S∈T X e∈S ye (because ye’s are non-negative and C ⊆T ) = X e∈U X S<unk>e ye (by rearranging the summations) = X e∈U |{S ∈T : e ∈S}| · ye ≤f · X e∈U ye (f = max e∈U |{S ∈T : e ∈S}|) ≤f · LPOPT (by the weak-duality theorem) ≤f · OPT. (because the LP is a relaxation) Page 6 (of 12) CS-450 Advanced Algorithms, Midterm Exam • Spring 2018 Ola Svensson
/home/ricoiban/GEMMA/mnlp_chatsplaining/RAG/MidTerm2018sol.pdf
5
MidTerm2018sol
0
3 (20 pts) LP-based algorithm for packing knapsacks. Homer, Marge, and Lisa Simpson have decided to go for a hike in the beautiful Swiss Alps. Homer has greatly surpassed Marge’s expectations and carefully prepared to bring n items whose total size equals the capacity of his and his wife Marge’s two knapsacks. Lisa does not carry a knapsack due to her young age. More formally, Homer and Marge each have a knapsack of capacity C, there are n items where item i = 1, 2, . . . , n has size si > 0, and we have Pn i=1 si = 2 · C due to Homer’s meticulous preparation. However, being Homer after all, Homer has missed one thing: although the items fit perfectly in the two knapsacks fractionally, it might be impossible to pack them because items must be assigned integrally! Luckily Lisa has studied linear programming and she saves the family holiday by proposing the following solution: • Take any extreme point x∗of the linear program: xiH + xiM ≤1 for all items i = 1, 2, . . . , n n X i=1 sixiH = C n X i=1 sixiM = C 0 ≤xij ≤1 for all items i = 1, 2, . . . , n and j ∈{H, M}. • Divide the items as follows: – Homer and Marge will carry the items {i : x∗ iH = 1} and {i : x∗ iM = 1}, respectively. – Lisa will carry any remaining items. Prove that Lisa needs to carry at most one item. (In this problem you are asked to give a formal proof of the statement that Lisa needs to carry at most one item. You are not allowed to change Lisa’s solution for dividing the items among the family members. Recall that you are allowed to refer to material covered in the lecture notes.) Solution: Note that, if x is a feasible solution, xiH + xiM = 1 for all i = 1, . . . , n. Otherwise, if xjH + xjM < 1, we would have that (since si
/home/ricoiban/GEMMA/mnlp_chatsplaining/RAG/MidTerm2018sol.pdf
6
MidTerm2018sol
0
feasible solution, xiH + xiM = 1 for all i = 1, . . . , n. Otherwise, if xjH + xjM < 1, we would have that (since si > 0 for every item i) 2 · C = n X i=1 sixiH + n X i=1 sixiM = sj(xjH + xjM | {z } <1 ) + n X i=1,i<unk>=j si(xiH + xiM | {z } ≤1 ) < n X i=1 si = 2 · C, which is a contradiction. Now suppose that x∗is an extreme-point solution. We claim that 0 < x∗ iH < 1 for at most one index i. Suppose that 0 < x∗ iH < 1 is true for more than one index i. If so, we show that x∗ can be written as a convex combination of two other feasible solutions, and hence x∗is not an extreme point, contradicting our choice of x∗. Assume 0 < x∗ iH < 1 and 0 < x∗ jH < 1 for i <unk>= j. Since xiH + xiM = 1 and xjH + xjM = 1, this also implies that 0 < x∗ iM < 1 and 0 < x∗ jM < 1. Now consider the solutions x(1) = x∗ 1H, x∗ 1M, . . . , x∗ iH + ε, x∗ iM −ε, . . . , x∗ jH −ε si sj , x∗ jM + ε si sj , . . . , x∗ nH, x∗ nM and x(2) = x∗ 1H, x∗ 1M, . . . , x∗ iH −ε, x∗ iM + ε, . . . , x∗ jH + ε si sj , x∗ jM −ε si sj , . . . , x∗ nH, x∗ nM . Page 7 (of 12) CS-450 Advanced Algorithms, Midterm Exam • Spring 2018 Ola Svensson
/home/ricoiban/GEMMA/mnlp_chatsplaining/RAG/MidTerm2018sol.pdf
6
MidTerm2018sol
0
We select ε > 0 to be small enough so that all the values x∗ iH±ε, x∗ iM±ε, x∗ jH±ε si sj , x∗ jM±ε si sj stay in the range [0, 1] (note that, since si > 0 and sj > 0, 0 < si sj < ∞). As shown below, we can verify that the solutions x(1) and x(2) both satisfy the LP constraints, and hence are feasible solutions. For x(1), we have that n X i=1 six(1) iH = n X i=1 six∗ iH −siε + sjε si sj = n X i=1 six∗ iH = C and n X i=1 six(1) iM = n X i=1 six∗ iM + siε −sjε si sj = n X i=1 six∗ iM = C. Furthermore, for x(1) iH +x(1) iM = x∗ iH +x∗ iM +ε−ε = 1, x(1) jH +x(1) jM = x∗ jH +x∗ jM −ε si sj +ε si sj = 1, and for k <unk>= i and k <unk>= j, x(1) kH + x(1) kM = x∗ kH + x∗ kM = 1. By a similar argument, we can show that x(2) is also feasible. It is easy to see that x∗= 1 2x(1) + 1 2x(2) and x(1) <unk>= x∗, and hence, x∗is not an extreme point. □ Page 8 (of 12) CS-450 Advanced Algorithms, Midterm Exam • Spring 2018 Ola Svensson
/home/ricoiban/GEMMA/mnlp_chatsplaining/RAG/MidTerm2018sol.pdf
7
MidTerm2018sol
0
4 (20 pts) Balancing degrees. A beautiful result by the Swiss mathematician Leonhard Euler (1707 - 1783) can be stated as follows: Let G = (V, E) be an undirected graph. If every vertex has an even degree, then we can orient the edges in E to obtain a directed graph where the in-degree of each vertex equals its out-degree. In this problem, we address the problem of correcting an imperfect orientation A to a perfect one A′ by flipping the orientation of the fewest possible edges. The formal problem statement is as follows: Input: An undirected graph G = (V, E) where every vertex has an even degree and an orienta- tion A of E. That is, for every {u, v} ∈E, A either contains the directed edge (u, v) that is oriented towards v or the directed edge (v, u) that is oriented towards u. Output: An orientation A′ of E such that |A′ \ A| is minimized and |{u ∈V : (u, v) ∈A′}| | {z } in-degree = |{u ∈V : (v, u) ∈A′}| | {z } out-degree for every v ∈V . Design and analyze a polynomial-time algorithm for the above problem. (In this problem you are asked to (i) design the algorithm, (ii) analyze its running time, and (iii) show that it returns a correct solution. Recall that you are allowed to refer to material cov- ered in the lecture notes.) An example is as follows: G b c d a A = {(a, b), (c, b), (c, d), (d, a)} b c d a A′ = {(a, b), (b, c), (c, d), (d, a)} b c d a The solution A′ has value |A′ \ A| = 1 (the number of edges for which the orientation was flipped). Solution: Consider the directed graph G′ = (V, E′) obtain
/home/ricoiban/GEMMA/mnlp_chatsplaining/RAG/MidTerm2018sol.pdf
8
MidTerm2018sol
0
a The solution A′ has value |A′ \ A| = 1 (the number of edges for which the orientation was flipped). Solution: Consider the directed graph G′ = (V, E′) obtained from G by replacing every edge {u, v} ∈E by the two arcs e1 = (u, v) and e2 = (v, u). If e ∈A′, we assign weight we = n2 + 1 to it, otherwise we set we = n2. Let δ+(v) = {u ∈V : (v, u) ∈E′} denote the set of outgoing edges of v in G′ and δ−(v) = {u ∈V : (u, v) ∈E′} be the set of incoming edges of v in G′. With the arc set E′ as ground set we define two partition matroids M1 and M2: • To be independent in M1 one can take at most one of {(u, v), (v, u)} for every {u, v} ∈E, i.e., I1 = {F ⊆E′ : |F ∩{(u, v), (v, u)}| ≤1 for all {u, v} ∈E} . This matroid enforces the constraint that each edge should be oriented in one direction. Page 9 (of 12) CS-450 Advanced Algorithms, Midterm Exam • Spring 2018 Ola Svensson
/home/ricoiban/GEMMA/mnlp_chatsplaining/RAG/MidTerm2018sol.pdf
8
MidTerm2018sol
0
• To be independent in M2, one can take at most 1 2deg(v) arcs among the set δ+(v) of outgoing arcs for every v: I2 = {F ⊆E′ : |F ∩δ+(v)| ≤1 2deg(v), for all v ∈V } . Let solution S be the maximum weight independent set in the intersection of the two matroids M1, and M2. Now we prove that a solution S is feasible if and only if it is independent in both I1 and I2. First observe that any solution with maximum weight, also has the maximum cardinality. Every solution of size k has weight at most k · (n2 + 1), whereas any solution of size k + 1 has weight at least (k + 1)n2 which is larger than any solution of size at most k. Thus the maximum weighted solution has maximum size i.e. |A′|. Now we prove that any solution (with maximum cardinality) that is independent in I2, satisfies both indegree and outdegree constraints. Suppose F ⊆I2 and |F| = |A′|. Thus we have |A′| = X v∈V |F ∩δ+(v)| ≤ X v∈V 1 2deg(v) = |A′|. Thus for all v ∈V , we have |F ∩δ+(v)| = 1 2deg(v), so that |F ∩δ−(v)| = 1 2deg(v). Thus F is a feasible solution to the problem. Recall that solution S has the maximum weight among all feasible solutions. Thus S has maximum cardinality, and among all the feasible solutions with the same cardinality, S maximizes |E′ ∩A′|. By Edmonds, Lawler’s theorem, there is a polynomial-time algorithm for finding a maximum weight independent set in the intersection of two matroids M1, and M2. Page 10 (of 12) CS-450 Advanced Algorithms, Midterm Exam • Spring 2018 Ola Svensson
/home/ricoiban/GEMMA/mnlp_chatsplaining/RAG/MidTerm2018sol.pdf
9
MidTerm2018sol
0
5 (20 pts) Comparing algorithms with little communication. Two excellent students, Alice from EPFL and Bob from MIT, have both built their own spam filters. A spam filter is an algorithm that takes as input an email and outputs 1 if the email is spam and 0 otherwise. Alice and Bob now want to compare their two spam filters. To perform the comparison, they both download the same huge data set consisting of n emails out of which some are spam. Alice then runs her spam filter on the data set to obtain a1, a2, . . . , an where ai ∈{0, 1} is the output of her spam filter on the i:th email in the data set. Similarly, Bob runs his spam filter on the data set to obtain b1, b2, . . . , bn where bi ∈{0, 1} is the output of his spam filter on the i:th email in the data set. Their goal is then to determine whether their outputs are the same. An issue that they face is that a1, a2, . . . , an are stored on Alice’s computer and b1, b2, . . . , bn are stored on Bob’s computer. They thus need to transfer (or communicate) information to solve the problem. A trivial solution is for Alice to transfer all her outputs a1, a2, . . . , an to Bob who then performs the comparison. However, this requires Alice to send n bits of information to Bob; an operation that is very costly for a huge data set. In the following, we use randomization to achieve a huge improvement on the number of bits transfered between Alice and Bob. Specifically, motivated by something called pseudo-random generators, we assume that Alice and Bob have access to the same randomness (called shared randomness). That is, Alice and Bob have access to the same infinite stream of random bits r1, r2, . . .. Your task is now to use this shared randomness to devise a randomized protocol of the following type: • As a function of a1, a2, . . . , an and the random bits r1, r2, . .
/home/ricoiban/GEMMA/mnlp_chatsplaining/RAG/MidTerm2018sol.pdf
10
MidTerm2018sol
0
shared randomness to devise a randomized protocol of the following type: • As a function of a1, a2, . . . , an and the random bits r1, r2, . . ., Alice computes a message m that consists of only 2 bits. She then transmits this 2-bit message m to Bob. • Bob then, as a function of b1, b2, . . . , bn, the message m, and the random bits r1, r2, . . ., outputs Equal or Not Equal. Bob’s output is correct if he outputs Equal when ai = bi for all i ∈{1, . . . , n} and Not Equal otherwise. Your protocol should ensure that Bob outputs the correct answer with probability at least 2/3, where the probability is over the random bits r1, r2, . . .. (In this problem you are asked to (i) explain how Alice computes the message m of 2 bits (ii) explain how Bob calculates his output, and (iii) prove that Bob’s output is correct with probability at least 2/3. A correct solution where Alice sends a message m of O(log n) bits is rewarded 12 points. Recall that you are allowed to refer to material covered in the lecture notes.) An interesting fact (but unrelated to the exam) is that any correct deterministic strategy would require Alice and Bob to send n bits of information. Solution: Let a = (a1, . . . , an) and b = (b1, . . . , bn). Alice generates two independent random vectors r1, r2 ∼Uniform({0, 1}n) using the shared random bits. Note that this is equivalent to choosing each element of r1 and r2 independently and uniformly at random from {0, 1}. Alice then computes x1 = ⟨a, r1⟩mod 2 and x2 = ⟨a, r2⟩mod 2, and transmits (x1, x2) to Bob. Bob uses the shared random bits to generate the same vectors r1 and r2, and computes y1 =
/home/ricoiban/GEMMA/mnlp_chatsplaining/RAG/MidTerm2018sol.pdf
10
MidTerm2018sol
0
⟨a, r2⟩mod 2, and transmits (x1, x2) to Bob. Bob uses the shared random bits to generate the same vectors r1 and r2, and computes y1 = ⟨b, r1⟩mod 2 and y2 = ⟨b, r2⟩mod 2. If x1 = y1 and x2 = y2, Bob outputs Equal. Otherwise, Bob outputs Not Equal. We prove that the above protocol succeeds with probability at least 2/3. Clearly, it succeeds whenever a = b. Thus, we only have to show that it succeeds with probability at least 2/3 when Page 11 (of 12) CS-450 Advanced Algorithms, Midterm Exam • Spring 2018 Ola Svensson
/home/ricoiban/GEMMA/mnlp_chatsplaining/RAG/MidTerm2018sol.pdf
10
MidTerm2018sol
0
a <unk>= b. We first show that Pr[x1 = y1|a <unk>= b] = 1/2. Notice that Pr[x1 = y1|a <unk>= b] = Pr[⟨a, r1⟩mod 2 = ⟨b, r1⟩mod 2|a <unk>= b] = Pr[⟨a −b, r1⟩mod 2 = 0|a <unk>= b]. Let c = a −b. Since a <unk>= b, we have that c <unk>= 0. This means that for at least one index j, cj = ±1. Now fix such j, and suppose that we have chosen all elements r1 i for i <unk>= j independently and uniformly at random from {0, 1}. Then, there will be only one choice for r1 j that would make ⟨c, r1⟩= 0. Thus, using the principle of deferred decisions, we have that Pr[⟨c, r1⟩mod 2 = 0|a <unk>= b] = Pr[⟨a −b, r1⟩mod 2 = 0|a <unk>= b] = 1/2. As a result, Pr[x1 = y1|a <unk>= b] = 1/2, and similarly, Pr[x2 = y2|a <unk>= b] = 1/2. Since r1 and r2 are independent from each other, Pr[(x1, x2) = (y1, y2)|a <unk>= b] = (1/2) · (1/2) = 1/4, which implies that Pr[(x1, x2) <unk>= (y1, y2)|a <unk>= b] = 1 −1/4 ≥2/3 as required. □ Page 12 (of 12) CS-450 Advanced Algorithms, Midterm Exam • Spring 2018 Ola Svensson
/home/ricoiban/GEMMA/mnlp_chatsplaining/RAG/MidTerm2018sol.pdf
11
MidTerm2018sol
0