Randomized algorithms lecture #1 - probability, repeating a process

  Рет қаралды 54,110

Errichto Algorithms

Errichto Algorithms

Күн бұрын

Пікірлер: 55
@Errichto
@Errichto 4 жыл бұрын
In the ACTG problem, I focused on the number of queries and forgot about the running time. Let's say the time limit is huge, like 50 seconds :D And the constraint for a[i] in GCD problem is actually 10^12, not 10^5.
@sajalagrawal1430
@sajalagrawal1430 4 жыл бұрын
Thanks
@shivamnegi7848
@shivamnegi7848 4 жыл бұрын
Informative video Looking forward for more of this kind of stuff.
@Rahulpal-xq2hu
@Rahulpal-xq2hu 4 жыл бұрын
When will you post next video on dynamic programming..eagerly waiting for that..
@masternobody1896
@masternobody1896 4 жыл бұрын
Can you show me how to make a game in python or anything
@yoda6994
@yoda6994 4 жыл бұрын
It will be great if you can cover problems related to probability/expected values in your future videos. Thanks for such great explanation.
@hidayatkhan412
@hidayatkhan412 4 жыл бұрын
I always wanted a tutorial on randomized algorithms. Thank You
@normantuan56
@normantuan56 4 жыл бұрын
i absolutely adore randomized algorithm! Thanks Errichto!
@shivangraina9698
@shivangraina9698 4 жыл бұрын
thanks very much Errichto.Hope you reach out to a larger audience.
@undisputed__9166
@undisputed__9166 4 жыл бұрын
Thank you so much for your videos. Please keep making videos. You are helping out a lot of people. Cheers !!
@hutofrock
@hutofrock 4 жыл бұрын
Thank you, Kamil! I liked the video a lot and I'm looking forward the next part of the lecture! :)
@getintodevices1215
@getintodevices1215 4 жыл бұрын
Thank you Errichto!
@AshishKumar-jj7yw
@AshishKumar-jj7yw 4 жыл бұрын
Quality stuff. Thank you very much.
@aditya_01
@aditya_01 Жыл бұрын
as always a great video please make more such edu videos. Thank you for your time and effort.
@thatoneguy908
@thatoneguy908 4 жыл бұрын
at 14:49 after the observation of skipping last character ,isn't it should be (1 + 2 + 3 )/3 instead of (1 + 2 + 3 + 3)/4 as we have skipped last char and maximum query we gonna ask is 3 ? please reply...
@so7am96
@so7am96 4 жыл бұрын
I have the same question
@Errichto
@Errichto 4 жыл бұрын
That's a good question. It isn't correct to say that there are three equally likely possibilities. There are four. It's just that two of them give the same result (number of queries). Imagine that you take a 6-sided die and change one number from 6 to 5. The expected value of pipes you get is now (1+2+3+4+5+5)/6. There are still six possibilities, you just change one of their outcomes. Let's say you go with order CATG. There are four possibilities which character is hidden: A, C, T, G. You need 2, 1, 3, 3 queries, respectively.
@hellooomelloo5406
@hellooomelloo5406 4 жыл бұрын
Very interesting lecture Keep it up!
@ece03abhisheksrivastava64
@ece03abhisheksrivastava64 3 жыл бұрын
Sir but every time coin is tossed probability is 1/2 , does not depends on previous toss , so repeating is not sure
@thallium54
@thallium54 4 жыл бұрын
Can you talk about the Simulated annealing next time?
@jay-rathod-01
@jay-rathod-01 4 жыл бұрын
Hey amazing video scholar!!
@fbru02
@fbru02 4 жыл бұрын
I took a whole grad course on randomized algorithms and all I learned was chebyshev, this is much better!
@liquidmetal718
@liquidmetal718 4 жыл бұрын
Hi, is there a catalog of good problems to learn & solve , any reference ?
@shashwat_hai9164
@shashwat_hai9164 4 жыл бұрын
Just wanted a suggestion from you: Would you change your entire approach towards a question if you don't get the correct solution (even when you know there is a slight change required) or try to find that small mistake when in a competition?
@shashwat_hai9164
@shashwat_hai9164 4 жыл бұрын
What would you prefer a new start or making minor changes in your current approach?
@Errichto
@Errichto 4 жыл бұрын
I will first try to find a mistake. If I can't do it for a long time and the code is short, then I would rewrite it.
@zenenhornstein2429
@zenenhornstein2429 4 жыл бұрын
6:33 Can you explain how you found the complexity so fast? i don't understand where n^2 pair come from
@admar3387
@admar3387 4 жыл бұрын
Zenen Hornstein the algorithm goes through every point and checks with every other point so n^2
@samatbryan
@samatbryan 4 жыл бұрын
For Line through N/4 problem, do we check for each ~200 pair of points the number of points on the same line? So O(200n) = O(n) and take the line with maximum number of points?
@Errichto
@Errichto 4 жыл бұрын
Yes, exactly that.
@Player-ub9tg
@Player-ub9tg 4 жыл бұрын
For problem ACTG , we can find answer in 2*N+2 queries without random.
@Errichto
@Errichto 4 жыл бұрын
I don't see how to do it deterministically. Can you elaborate? 3*N is easy (just ask about A, C, T) but how to improve it?
@Миша-б4ь9т
@Миша-б4ь9т Жыл бұрын
fantastic !
@kp2718
@kp2718 4 жыл бұрын
Hi, I'm so glad to see you do what you're doing and I want you do very well so excuse me for this unsolicited advice: Maybe it would help you to go to a voice coach, or an average logopeda ;) ? I know it helped me a lot and it would give you a boost not just on youtube, it gave my Charisma +3. It's unbelievable how ppl want to listen to you and hang around you more if you hv a great command of your voice.
@Errichto
@Errichto 4 жыл бұрын
Yes, I do plan that. The issue is lack of time :( similar thing with gym: I want to go there often but I'm lazy plus there are so many other things to do.
@vickyjha5535
@vickyjha5535 4 жыл бұрын
In the problem selection of 1st point probability is 4/16 = 1/4 while selection of other point will be 15/16. So (1/4)*(15/16) will be equal to ~1/21. And not 1/16
@asma-pe3rx
@asma-pe3rx 4 жыл бұрын
Recently bumped into a question which says to write a function which generates random numbers within a given range, provided I can't use any pre-defined function or any functions defined within any third party packages.Any suggestion on how to do it..?
@mohamedfouad6492
@mohamedfouad6492 4 жыл бұрын
19:45 seemed like you are talking about reverse engineering a trading algorithm
@partharora16
@partharora16 4 жыл бұрын
In problem 3 ( Given n points , find a line that passes through max possible of them ) , can we say if we select a pair of points , they have probability atleast 1/16 that these pair of points will be in line that passes through maximum points . Now if we select another different pair of points , it will also have probability 1/16 for the same event . So , if we repeat the process 16 times , then probability will be 16*(1/16) , that at least one of these 16 pairs will be included in the line that passes through maximum points . This don't really seem right to me , can somebody please explain where i am going wrong ?
@amarnathprasad9986
@amarnathprasad9986 3 жыл бұрын
Hey, it's been a year. I hope you've understood by now, but I'll leave an explanation should anyone else face the same doubt in the future. You have to multiply the probabilities (1/16) and (1/16) and not add them. That's why, if you repeat the selection 16 times, the probability will be (1/16)^16 and not 16*(1/16). That's because they are independent and separate events.
@ahmedelbarqy4849
@ahmedelbarqy4849 2 жыл бұрын
in some sense it's very similar to the pigeon hole principal
@tuanva6484
@tuanva6484 4 жыл бұрын
can you make a tutorial video from scratch
@Errichto
@Errichto 4 жыл бұрын
This was a tutorial video from scratch :|
@shrad6611
@shrad6611 4 жыл бұрын
can you please add donation button to your stream so we can help you to get more content like this. I hope many viewers want to help you
@gosunov
@gosunov 2 жыл бұрын
In YES/NO problems, you can use randomized algorithm! With 50% chance print YES in other cases print NO.
@aryelpanda
@aryelpanda 2 жыл бұрын
toss a coin to your witcher
@ΣυμεώνΜαστρακούλης
@ΣυμεώνΜαστρακούλης 3 жыл бұрын
I am engineer. I cant wait to show those methods to my pure mathematic friend! I hope not kill his self :D
Randomized algorithms lecture #2 - birthday paradox, random shuffle, hashing
21:02
A problem so hard even Google relies on Random Chance
12:06
Breaking Taps
Рет қаралды 1,1 МЛН
My daughter is creative when it comes to eating food #funny #comedy #cute #baby#smart girl
00:17
How To Get Married:   #short
00:22
Jin and Hattie
Рет қаралды 15 МЛН
How To Become Red Coder? (codeforces.com)
4:09
Errichto Algorithms
Рет қаралды 772 М.
Characters, Symbols and the Unicode Miracle - Computerphile
9:37
Computerphile
Рет қаралды 2 МЛН
Binary Exponentiation
15:13
Errichto Algorithms
Рет қаралды 99 М.
Google Coding Interview With A Competitive Programmer
54:17
Clément Mihailescu
Рет қаралды 2,5 МЛН
Monte Carlo Simulation
10:06
MarbleScience
Рет қаралды 1,4 МЛН
Solving Wordle using information theory
30:38
3Blue1Brown
Рет қаралды 10 МЛН
A* (A Star) Search Algorithm - Computerphile
14:04
Computerphile
Рет қаралды 1,1 МЛН
Linux setup for Competitive Programming (with Geany)
8:30
Errichto Algorithms
Рет қаралды 347 М.
2. Divide & Conquer: Convex Hull, Median Finding
1:20:35
MIT OpenCourseWare
Рет қаралды 199 М.
Probability and Expected values for CP | Basics | For beginners
30:21
A Code Daily!
Рет қаралды 1,7 М.
My daughter is creative when it comes to eating food #funny #comedy #cute #baby#smart girl
00:17