How to solve Approximation Problems (Challenge Problems)

  Рет қаралды 14,603

Gaurav Sen

Gaurav Sen

Күн бұрын

Пікірлер: 55
@pradipnitw
@pradipnitw 6 жыл бұрын
humm .. never thought of these ways.. my mind is running wild after seeing this video ... this is whole new dimension of solving the unsolvable..
@gkcs
@gkcs 6 жыл бұрын
Haha, truly 😁
@paulhatcher951
@paulhatcher951 Жыл бұрын
In the first cycle would you just swap the most significant digits to make sure you get a good spread. Then refine that by swapping more least significant digits ?
@gauravanand6937
@gauravanand6937 6 жыл бұрын
2^Great tutorial, thanks. A general question, it takes me np time to solve questions (like long challenges codechef problems), so i lack? Practise , iq , analytical skill.?
@gkcs
@gkcs 6 жыл бұрын
I can't comment on that without knowing how you code, although I am sure your IQ is good enough :) You could try solving more practice problems from other contest sites to improve on the practice and analytical skill.
@gauravanand6937
@gauravanand6937 6 жыл бұрын
Gaurav Sen , i agree on the iq part :), i think i need to work on my algorithmic design technique. Your videos are much helpful.
@pritampathak798
@pritampathak798 6 жыл бұрын
What are the tentative videos that you are going to make on December long challenge?
@pgpt
@pgpt 5 жыл бұрын
How does if checks if an answer is valid or not.For example,I can output 1 for every test case which would get me a good score without ever computing anything. How do they check if a given score belongs to a valid permutation?
@gkcs
@gkcs 5 жыл бұрын
Why would outputting 1 everywhere give you a good score?
@vaibhavambasta8053
@vaibhavambasta8053 4 жыл бұрын
Hi Gaurav, how would you go about utilising complete 100% of time when the problem gets completed in 70% of total time. 25:34?
@gkcs
@gkcs 4 жыл бұрын
The problem can't be 'solved', since it's a search algorithm with no clear optimal path. The longer you search, the better the results. If you can do the same number of computations in 70% of the time, you can now run 100/70 ~= 142% of the original number of computations in the same amount of time.
@sriharsha8650
@sriharsha8650 6 жыл бұрын
Are you going to explain problems from Codechef Long Challenge that's going on right now after it's finished?
@gkcs
@gkcs 6 жыл бұрын
Yes :-)
@MonikBhanushali
@MonikBhanushali 6 жыл бұрын
Great tutorial Gaurav :) I have one suggestion for tutorial. Topic : Palindromic Trees
@gkcs
@gkcs 6 жыл бұрын
Will keep that in mind :-) Thanks!
@suryaabhishek
@suryaabhishek 6 жыл бұрын
It is actually *nondeterministic polynomial time*
@gkcs
@gkcs 6 жыл бұрын
+Abhishek Surya Have a look at Bhisma Raj's comment. I didn't mention 'deterministic' anywhere, on purpose :-)
@suryaabhishek
@suryaabhishek 6 жыл бұрын
In that case, this is Issued in public interest. "Jan hith mei jaari"
@shivamsharma8874
@shivamsharma8874 6 жыл бұрын
Hello Sir, i saw problem setter's solution. it was so easy . he just print value of A. why....?
@gkcs
@gkcs 6 жыл бұрын
His score will be terrible, close to 0. Because he just wants to show a sample solution.
@jayeshmishra7095
@jayeshmishra7095 6 жыл бұрын
Sir did u had any kt in our engineering college life
@jayeshmishra7095
@jayeshmishra7095 6 жыл бұрын
Plss ans
@gkcs
@gkcs 6 жыл бұрын
Yes :P
@jayeshmishra7095
@jayeshmishra7095 6 жыл бұрын
Sir I want to be a good competitive coding what are the initial step as I'm I first year
@ASHUTOSHKUMAR-zu6kr
@ASHUTOSHKUMAR-zu6kr 4 жыл бұрын
The contrast of video is not high that way blue colour is not visible
@akhilsurapuram
@akhilsurapuram 5 жыл бұрын
Hie gourav, your explanations are so cool. & it's pretty hard to catch up your phase. You should let your views to think and make viewers understand/get to know how you think. In simple easy words GO SLOWWWW
@gkcs
@gkcs 5 жыл бұрын
Hahaha
@amur_
@amur_ 6 жыл бұрын
Hey, I'm in class 11. How do I get really like really good at competitive programming?
@ravishankarjoshi2952
@ravishankarjoshi2952 6 жыл бұрын
You should learn C++ or Java well, then C++ STL, then data structures and algorithms from this list: www.quora.com/What-algorithms-should-I-know-to-become-a-good-programmer/answer/Ashish-Kedia?srid=u3swV
@gauravanand6937
@gauravanand6937 6 жыл бұрын
get into IIT :)
@arunarkamukhopadhyay6443
@arunarkamukhopadhyay6443 5 жыл бұрын
JEE first.
@RudraSingh-pb5ls
@RudraSingh-pb5ls 4 жыл бұрын
@@gauravanand6937 honestly worst answer
@bhi5hmaraj
@bhi5hmaraj 6 жыл бұрын
I think you have mistaken the meaning of NP . Non Determinism is completely different from Not Polynomial (stackoverflow.com/questions/40207550/np-non-deterministic-polynomial-time)
@gkcs
@gkcs 6 жыл бұрын
I used the believe that NP problems are Non-Polynomial Time algorithms, thanks for pointing that out :) Luckily the video doesn't mention determinism anywhere, and I meant NP to be a short form of Non Polynomial. Now I know why HackerEarth used the word determinism in the blog! My mistake :-P
@bhi5hmaraj
@bhi5hmaraj 6 жыл бұрын
I guess it's a common misconception , even I used to think that NP stands for Non Polynomial before I took the Theory of computation course .
@dirghrajkushawaha3822
@dirghrajkushawaha3822 6 жыл бұрын
sir... how to attack on these problems means where to start ..
@gkcs
@gkcs 6 жыл бұрын
One base solution is enough. Most of the time, you can try to find an answer which is a close approximation. For example: Job: To divide an array into two parts such that the difference in sums is minimum. A very good approximation is sorting the array and putting alternate in each part. The final sum is quite small, and hence this solution can be used as a base solution.
@bhagwatibhalotia7636
@bhagwatibhalotia7636 6 жыл бұрын
Great tutorial !
@gkcs
@gkcs 6 жыл бұрын
+Bhagwati Bhalotia Thanks!
@DarshanSenTheComposer
@DarshanSenTheComposer 4 жыл бұрын
BOOM! Mind blown! :D
@phantomhieve2353
@phantomhieve2353 4 жыл бұрын
nondeterministic polynomial time* there is difference just watched mit ocw video on that.
@mohitkalra9329
@mohitkalra9329 4 жыл бұрын
non deterministic polynomial for NP!
@akashkandpal1832
@akashkandpal1832 6 жыл бұрын
Very Nice video ....
@cevalfonso
@cevalfonso 6 жыл бұрын
Wow, TSP has NOT been proven to be non-polynomial! That would imply that P =/= NP, which is one of the most famous open problems in computer science.
@gkcs
@gkcs 6 жыл бұрын
Yeah, non deterministic polynomial. Trying to find a polynomial solution to this is fun 😛
@sudheertripathi3882
@sudheertripathi3882 4 жыл бұрын
Thanks.
@ayushdeepdabas5383
@ayushdeepdabas5383 6 жыл бұрын
Good video
@gkcs
@gkcs 6 жыл бұрын
Thanks Ayush!
@algolife2126
@algolife2126 6 жыл бұрын
Bro im in btech cse second semester..I also want to be a great programmer like u please help me p.s im also not from good college so im focusing on my skills bro pls tell me where can i ask u my doubts ??
@lavkushtiwari2799
@lavkushtiwari2799 6 жыл бұрын
@Shashank, you are 2nd sem student and He already completed his graduation so please don't use "Bro" for him.
@algolife2126
@algolife2126 6 жыл бұрын
Lavkush Tiwari C'mon yr how does it even matter I want answer to my question
@lavkushtiwari2799
@lavkushtiwari2799 6 жыл бұрын
can you please tell me the name of your college?
@algolife2126
@algolife2126 6 жыл бұрын
Lavkush Tiwari Chitkara University
@sankalpkotewar
@sankalpkotewar 4 жыл бұрын
@@algolife2126 Lol your reply, Anyways buddy just keep learning and practicing, that's all! There's no secret here.
@sridharbajpai420
@sridharbajpai420 4 жыл бұрын
i tjink tjats is MAchine Learning?😂
Edit Distance of two strings - Real world application
18:25
Gaurav Sen
Рет қаралды 70 М.
17. Complexity: Approximation Algorithms
1:21:08
MIT OpenCourseWare
Рет қаралды 82 М.
Бенчик, пора купаться! 🛁 #бенчик #арти #симбочка
00:34
Симбочка Пимпочка
Рет қаралды 3,1 МЛН
Крутой фокус + секрет! #shorts
00:10
Роман Magic
Рет қаралды 41 МЛН
REAL 3D brush can draw grass Life Hack #shorts #lifehacks
00:42
MrMaximus
Рет қаралды 10 МЛН
AlgoWorkout: Tricky Dynamic Programming with Subarrays 🧠💪
12:45
12.0 - Approximation Algorithms
25:55
Daniel Sutantyo
Рет қаралды 35 М.
What is Centroid Decomposition?
32:39
Gaurav Sen
Рет қаралды 13 М.
Traveling Salesperson Problem Approximation
8:03
Computational Thinking
Рет қаралды 3,9 М.
Hamming Distance - Codechef - DEC17
8:51
Gaurav Sen
Рет қаралды 6 М.
Approximation Algorithms (Algorithms 25)
18:01
Professor Bryce
Рет қаралды 3,7 М.
Why does log(N) appear so frequently in Complexity Analysis?
12:39
New Approximation Algorithms for Traveling Salesman Problem
55:52
What is Time Complexity Analysis? - Basics of Algorithms ⌛
10:03