代做HW 1 Monte-Carlo Algorithms代做留学生SQL语言

HW 1

Due: Friday 10/03/2025 @ 11:59pm EST

Disclaimer

I encourage you to work together, I am a firm believer that we are at our best (and learn better) when we communicate with our peers. Perspective is incredibly important when it comes to solving problems, and sometimes it takes talking to other humans (or rubber ducks in the case of programmers) to gain a perspective we normally would not be able to achieve on our own. The only thing I ask is that you report who you work with: this is not to punish anyone, but instead will help me figure out what topics I need to spend extra time on/who to help. When you turn in your solution (please use some form. of typesetting: do NOT turn in handwritten solutions), please note who you worked with.

Question 1: Monte-Carlo Algorithms (better runtime at the cost of being always correct) (20 points)

Consider being a participant on family feud where Steve Harvey has you compete against a person from the rival family. In this setting, Steve Harvey brings you and your opponent to a table with two buzzers and reads out a question. The first person to ring the buzzer gets to answer: if they get the question right, then they earn the opportunity to win points in the game. If they get the question wrong, their opponent earns the opportunity to win points in the game. Suffice to say that having a quick reaction time is important.

We, being tired and overworked and whatnot, need help in this game. Our reaction time is not what it would be if we were rested and unstressed, so if Steve Harvey finishes the question we are sure to lose the race to hit the buzzer. Being rather clever mathematicians, we devise a rather devious plot: we’ll hit the buzzer before the question is fully read. Of course, we run the risk of getting the question wrong because we didn’t wait to hear the whole thing, but we are rather confident that if we wait for the entire question to be read, our chance of winning is near zero. Surely its better to take our chances here right?

In such a scheme, the normal running/processing time is too slow for us: we need something faster. While modeling the correct answer as a function of what words are spoken (and have yet to be spo-ken) is really complicated, we can instead try to solve a somewhat simpler problem that has similar behaviour.

Now, rather than playing family feud, let us pretend that you are given n numbers and want to pick one of those numbers. The condition here is that you want to pick a number larger than a median of all n numbers. We could solve this in a few ways, the most efficient being to find the median of all n numbers in linear time, and then perform. a linear scan until we find a number larger than the median, which we pick. However, like our family feud scenario, we don’t have time to perform. a linear scan to calculate the median. Instead, we want to examine only k of these numbers (where k is a constant). After examining all k numbers, we want to pick one of those k numbers as our choice. Let us choose the largest of the k numbers we have examined as our answer. What is the probability that the number we pick is correct (your answer should be a function of k)?

(hint: try to give an upper bound on the probability that our algorithm is wrong first).

Question 2: Bounding Probabilistic Events (20 points)

You are given a coin with bias p. Let us flip the coin n times and observe the outcomes X1, X2, · · · , Xn.

Let us count the average number of successes  Since we are constructing  as an empirical average, we know that 0 ≤ ≤ 1. What we are interested in is how likely the value of differs from the bias of the coin p. Compute an upper bound for the quantity  using the Chebyshev inequality. Your answer should be a function of n: the number of coin tosses.

Question 3: Combining Probability Distributions (20 points)

Consider two probability distributions f and g, both defined over the same continuous domain. A convex combination of two function f1 and f2 creates a third function f3 which is defined as follows:

f3 := λf1 + (1 − λ)f2

for some value of 0 ≤ λ ≤ 1. Please show that the convex combination of two probability distributions f and g (mentioned earlier) produces a function that is also a valid probability distribution.

Question 4: Expectation Maximization MLE (20 points)

Let us say you are clustering n 1-dimensional positive-valued points, and you claim that there are k = 2 clusters these points are drawn from. Cluster one behaves according to a Geomet-ric distribution P r[xi ; p] = (1 − p) xi−1p and cluster two behaves according to a Borel distribution  So, you choose to use soft-EM which has the machinery to deal with clusters that have pdfs inside them. The function we want to optimize for a our mixture is:

where  is the parameters for cluster j, γi,j=1, γi,j=2, · · · , γi,j=k forms a pmf for the segmentation of point xi into the k = 2 clusters, and πj=1, πj=2, · · · , πj=k form. a prior pmf over the clusters. Derive the MLE estimates for the parameters of each cluster (i.e. derive the MLE estimates for p* and µ*)

Question 5: MLE Estimates (20 points)

In lecture we found the MLE estimate for the Binomial distribution for the event when we know we have k heads. In this question, consider being presented with a dataset X = {x1, x2, · · · , xn} where each xi is a specific outcome of flipping a coin (with bias p) m times. So, each xi is a string containing m characters where each character either denotes a success or not a success. What is the MLE estimate for p given this dataset?

Extra Credit: Turning a Monte-Carlo Algorithm into a Las-Vegas Algorithm (20 points)

IN question 1, we talked about a monte-carlo algorithm for picking a number larger than the median. In this extra credit question we want to repeat this experiment until it succeeds. For instance, lets call our algorithm in question 1 pick only see k(pts, k) where pts is a sequence of n numbers, and k is the number of elements in pts we can examine before picking the largest of the ones we examined. An algorithm is called a monte-carlo algorithm if it can fail (i.e. produce the wrong answer). By being wrong sometimes, we can often design algorithms that are much more efficient than if we were to always produce a correct answer. An algorithm that always produces a correct answer is called a las-vegas algorithm. You might think las-vegas algorithms are always better, but consider that when running a las-vegas algorithm, rather than gambling with correctness (like a monte-carlo algorithm does), you are instead gambling with how long it will take (which is why we are interested in big-O notation as it is a worst case estimate).

In this question, we will design a las-vegas algorithm by using a monte-carlo algorithm as a building block (this is always possible). We will simply run our pick only see k(pts, k) algorithm until it succeeds (there is a little more work to do here but for now let us ignore it). How many times should I expect to have to repeat pick only see k(pts, k) until I get a correct answer? Your answer should be a functin of k.




热门主题

课程名

mktg2509 csci 2600 38170 lng302 csse3010 phas3226 77938 arch1162 engn4536/engn6536 acx5903 comp151101 phl245 cse12 comp9312 stat3016/6016 phas0038 comp2140 6qqmb312 xjco3011 rest0005 ematm0051 5qqmn219 lubs5062m eee8155 cege0100 eap033 artd1109 mat246 etc3430 ecmm462 mis102 inft6800 ddes9903 comp6521 comp9517 comp3331/9331 comp4337 comp6008 comp9414 bu.231.790.81 man00150m csb352h math1041 eengm4100 isys1002 08 6057cem mktg3504 mthm036 mtrx1701 mth3241 eeee3086 cmp-7038b cmp-7000a ints4010 econ2151 infs5710 fins5516 fin3309 fins5510 gsoe9340 math2007 math2036 soee5010 mark3088 infs3605 elec9714 comp2271 ma214 comp2211 infs3604 600426 sit254 acct3091 bbt405 msin0116 com107/com113 mark5826 sit120 comp9021 eco2101 eeen40700 cs253 ece3114 ecmm447 chns3000 math377 itd102 comp9444 comp(2041|9044) econ0060 econ7230 mgt001371 ecs-323 cs6250 mgdi60012 mdia2012 comm221001 comm5000 ma1008 engl642 econ241 com333 math367 mis201 nbs-7041x meek16104 econ2003 comm1190 mbas902 comp-1027 dpst1091 comp7315 eppd1033 m06 ee3025 msci231 bb113/bbs1063 fc709 comp3425 comp9417 econ42915 cb9101 math1102e chme0017 fc307 mkt60104 5522usst litr1-uc6201.200 ee1102 cosc2803 math39512 omp9727 int2067/int5051 bsb151 mgt253 fc021 babs2202 mis2002s phya21 18-213 cege0012 mdia1002 math38032 mech5125 07 cisc102 mgx3110 cs240 11175 fin3020s eco3420 ictten622 comp9727 cpt111 de114102d mgm320h5s bafi1019 math21112 efim20036 mn-3503 fins5568 110.807 bcpm000028 info6030 bma0092 bcpm0054 math20212 ce335 cs365 cenv6141 ftec5580 math2010 ec3450 comm1170 ecmt1010 csci-ua.0480-003 econ12-200 ib3960 ectb60h3f cs247—assignment tk3163 ics3u ib3j80 comp20008 comp9334 eppd1063 acct2343 cct109 isys1055/3412 math350-real math2014 eec180 stat141b econ2101 msinm014/msing014/msing014b fit2004 comp643 bu1002 cm2030
联系我们
EMail: 99515681@qq.com
QQ: 99515681
留学生作业帮-留学生的知心伴侣!
工作时间:08:00-21:00
python代写
微信客服:codinghelp
站长地图