Тёмный

L-4.4: Huffman Coding Question in Greedy Technique | Imp Question for all competitive exams 

Gate Smashers
Подписаться 2 млн
Просмотров 434 тыс.
50% 1

👉Subscribe to our new channel: / @varunainashots
👉Links for DAA Notes:
🔗File-1: rb.gy/2byrg
🧑‍🎓Contributed by: Junaid Gazi
🔗File-2:
🧑‍🎓Contributed by: Mannu Garg
The idea of providing these questions is to evaluate GATE aspirants randomly from any topic of full Syllabus. Our aim is to give the you quality questions from full syllabus. Its just for your Practicing.
Huffman Coding is a technique of compressing data to reduce its size without losing any of the details. It was first developed by David Huffman.
Huffman Coding is generally useful to compress the data in which there are frequently occurring characters.
#huffmancodingQuestion#greedyTechn
►Design and Analysis of algorithms (DAA) (Complete Playlist):
• Design and Analysis of...
Other subject-wise playlist Links:
--------------------------------------------------------------------------------------------------------------------------------------
► Operating System :
• Operating System (Comp...
►Database Management System:
• DBMS (Database Managem...
► Theory of Computation
• TOC(Theory of Computat...
►Artificial Intelligence:
• Artificial Intelligenc...
►Computer Networks (Complete Playlist):
• Computer Networks (Com...
►Computer Architecture (Complete Playlist):
• Computer Organization ...
►Structured Query Language (SQL):
• Structured Query Langu...
►Discrete Mathematics:
• Discrete Mathematics
►Compiler Design:
• Compiler Design (Compl...
►Number System:
• Number system
►Cloud Computing & BIG Data:
• Cloud Computing & BIG ...
►Software Engineering:
• Software Engineering
►Data Structure:
• Data Structure
►Graph Theory:
• Graph Theory
►Programming in C:
• C Programming
►Digital Logic:
• Digital Logic (Complet...
---------------------------------------------------------------------------------------------------------------------------------------
Our social media Links:
► Subscribe to us on RU-vid: / gatesmashers
► Like our page on Facebook: / gatesmashers
► Follow us on Instagram: / gate.smashers
► Follow us on Instagram: / varunainashots
► Follow us on Telegram: t.me/gatesmashersofficial
► Follow us on Threads: www.threads.net/@gate.smashers
--------------------------------------------------------------------------------------------------------------------------------------
►For Any Query, Suggestion or notes contribution:
Email us at: gatesmashers2018@gmail.com

Опубликовано:

 

2 янв 2019

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 218   
@baby_python
@baby_python Год назад
waah pura concept hi change kr diya , first video m to bs ek minimum element pick krna tha or sum k saath compare krna tha , ab 2 min element pick krne h or alag se node bhi bn rhe h nice one pure notes ki esi ki tesi ho gyi
@bhargavkumar
@bhargavkumar 4 месяца назад
same
@smartyshubham4774
@smartyshubham4774 4 месяца назад
wo right hi hai...watch it again
@user-qb5pj4my9r
@user-qb5pj4my9r 3 месяца назад
shii baat haii
@user-ir8mt2vx3b
@user-ir8mt2vx3b Месяц назад
@@smartyshubham4774 nhi same nhi h uska 5*3=15 aara aur hmara 5*4=20 araa
@Funnyrunni
@Funnyrunni 4 дня назад
Bhai 5 minute engineering par jakar dekho part 3 huffman ka sab samajh aa jaega bro Me ko bhi problem thi solve ho gai
@dibakarupadhyay
@dibakarupadhyay Год назад
Just pulled off a whole day by watching your videos and going to give my mid semesters examination tomorrow. Thank you, extremely grateful
@pablu_7
@pablu_7 3 года назад
Guys!! this is the correct procedure to draw Huffman Tree(rather than the previous video). Another simple approach. Write the frequency in ascending order (with respective Characters) Select the min 2. add it. compare the next 2 min with the remaining freq. along with the added one.
@harshitverma6026
@harshitverma6026 3 года назад
Pin this comment ! Thanks bud !
@hrushabhpatil9446
@hrushabhpatil9446 Год назад
Thank you so much for the clarification bro!
@wrld-mm4dt
@wrld-mm4dt Год назад
ganja phuk ke pdhata h kya ye
@davehari
@davehari 10 месяцев назад
Geeks for geeks ka example bhi refer kar sakte ho isme ye vali approach use ki hai ascending order me likhke 👍👍
@nashrahsultan123
@nashrahsultan123 10 месяцев назад
Do we have to use this approach only in the previous question uploaded?
@1511kanika
@1511kanika 5 лет назад
Things are much more clear sir thanking you a ton
@TECHNIZATION69
@TECHNIZATION69 Год назад
After add you should sort that numbers, like heapify method so for every 2 small elements you have to create a graph like that and sort it with that message frequency. Previous video sir missed that.
@abhaymishra7525
@abhaymishra7525 5 лет назад
Thanks you sir .. was eagarly waiting for your video ki aaj kuch new concepts sikhne ko milega.
@thej9898
@thej9898 3 года назад
You're sooo good, thanks for the videos.
@user-tn5dv3xx5q
@user-tn5dv3xx5q Год назад
thank you a ton sir for clear our doubt...
@arpangupta2162
@arpangupta2162 5 лет назад
i think stain lee was working on you to launch in his new movie because you are the real super hero
@shallybeniwal9502
@shallybeniwal9502 5 лет назад
Hahahaha.. true😇😇
@saccemi
@saccemi 3 года назад
Best teching i ever seen any video on that topic .....❤️
@saweranadeem2040
@saweranadeem2040 2 года назад
JAZAK ALLAH SIR
@MuhammadAfzal-pl2sp
@MuhammadAfzal-pl2sp 3 года назад
Thanks for Cleared my point regard this topic. Best video on RU-vid 💗💗💗💗💗love from Pakistan .thank you so much. Now I also understand Hindi as well as Data analysis and algorithm. 😜😇😇😇
@mehtabahmed4696
@mehtabahmed4696 2 года назад
Sir this is different from what we had learnt in the last video.
@user-qb5pj4my9r
@user-qb5pj4my9r 3 месяца назад
last video memin kyaa btayaa abb pura procedure hi change krdiyaa 👏👏👏
@sheikhuu9092
@sheikhuu9092 5 лет назад
Amazing sir g love the you are teaching..from Kashmir
@Hemlata-fh6vb
@Hemlata-fh6vb Год назад
Thank u so much sir😊
@naturaln5108
@naturaln5108 2 года назад
Thank sir I have completed this question 🤗
@kmishy
@kmishy 2 года назад
2:28 Sir, I think it is max heap because root is always greater than its child
@susmitamainde9017
@susmitamainde9017 Год назад
Correct
@VantasticMusic
@VantasticMusic 4 года назад
Sir, how do we decide when to create a separate graph (b and c)? In your huffman coding video, you used minimum number to extend the tree. But, here you created a separate branch of b and c. Thanks for the videos!
@humortman
@humortman 4 года назад
don't know if you figured it out yet, but we created a separate graph because of the fact that the two minimums were not the part of our already existing graph nodes.
@manjaykumar1313
@manjaykumar1313 3 года назад
@@humortman bro I still dint understand it ...can u explain me how it goes ??
@PoojaSingh-rz1cp
@PoojaSingh-rz1cp 2 года назад
@@manjaykumar1313 When node 8 was added to the table which consists of frequency of character, it becomes{ 7,6,9,8} then we have to choose minimum among these all it is not necessary to choose 8 and the other minimum .So, 6 and 7 becomes the next minimum and it has no relation with the 8 node therefore we have to make a separate node for that and so on..!!
@vaibhavpatidar7252
@vaibhavpatidar7252 2 года назад
​@@PoojaSingh-rz1cp now I get it , thanks !
@TECHNIZATION69
@TECHNIZATION69 Год назад
After add you should sort that numbers, like heapify method so for every 2 small elements you have to create a graph like that and sort it with that message frequency. Previous video sir missed that.
@mohindermehta1201
@mohindermehta1201 5 лет назад
Waah kya baat hai
@pushpamassi3142
@pushpamassi3142 5 лет назад
Sir dil se dua hai apke liye ki AAP khub tarkki karen
@tusharsatya
@tusharsatya 4 года назад
Watching 3 hours before my exam😂
@yashumate2343
@yashumate2343 Год назад
😅😅😅
@weirdooooooooooo
@weirdooooooooooo Год назад
1 hour before practical exams!
@wirtzgaming5980
@wirtzgaming5980 Год назад
I am watching this during exam
@learncseasily3385
@learncseasily3385 Год назад
​@@wirtzgaming5980 😂
@omkargade6791
@omkargade6791 Год назад
Same
@minahilfatima3781
@minahilfatima3781 2 года назад
Thank u sooo much my ideal teacher
@vaishalijoshi7642
@vaishalijoshi7642 5 лет назад
sir after watching this video...now i am huge fan of urs...hatsoff
@GateSmashers
@GateSmashers 5 лет назад
Thank you so much for your love and support. God bless you
@prmaddy
@prmaddy 6 месяцев назад
after watch this lecture , am little bit confuse which one approach is correct or not . in previous video u have studied with another method and now it's new method. let me know anyone if know.
@ayushiyadav1
@ayushiyadav1 2 месяца назад
REFER knowledgegate sanchit sir's video!
@ritikshrivastava9442
@ritikshrivastava9442 3 года назад
Sir in previous video you taught that we have to simply make a Huffman tree by putting the frequency on left or right side but here you introduce a new method Which one should we follow?
@rawatbrothers0yt968
@rawatbrothers0yt968 Год назад
Bro in that video the sum was the frequency was coming equal to another symbol from that list.
@GeerishaAcharya
@GeerishaAcharya 5 лет назад
शुक्रिया सर..🙏🙏
@mrmrkumargaurav
@mrmrkumargaurav 6 месяцев назад
in the last video you did something else now u r doing this method in this problem. Which one is correct. Because from the last approach we get different answers.
@r0yisdymbfr
@r0yisdymbfr Месяц назад
He doesn't answer the real questions 🗿
@nu...123
@nu...123 2 месяца назад
🤗 I really thank you form my care of the heart😊Sir...
@piyushtripathi5566
@piyushtripathi5566 2 года назад
Thank you sir ❣️
@rupatailichode6235
@rupatailichode6235 4 года назад
As queue is minimum priority consider elements ascending sorted sothat when you dequeue you get first two minimum then insert newly created on its priority
@faizakhan8907
@faizakhan8907 5 месяцев назад
Jazakallah sir ❤
@fairystar4869
@fairystar4869 2 года назад
Zbrdst sir
@fairystar4869
@fairystar4869 2 года назад
Sir ik choti c video for me..please...ik example jis ma 1,1,1,1,2,2,3,3,3,5,9,8 is type ka data ho usy keisy hufman sy krain gy plzzz
@vivekkandoliya9825
@vivekkandoliya9825 Год назад
Whenever stucked in assignment just open gate smashers and question is solved in 15 min. 👍❤️
@Thanusree234
@Thanusree234 Год назад
U are my role model ❤
@soumambanerjee1816
@soumambanerjee1816 5 лет назад
Public demand is 2 questions per day like technical guruji.. %P .. Sir believe me u r touching the important topics which we have studied nicely but memories have become fainted... This are too much helpful for remembering the previous concept... Thanks for this....
@nikhilasharma1587
@nikhilasharma1587 5 лет назад
Very nice Sir...
@amitapaunikar-sonar3721
@amitapaunikar-sonar3721 4 года назад
Thank you sir ..
@sratnamanjari244
@sratnamanjari244 4 года назад
Thank you Sir 😊
@yogeshsaini7195
@yogeshsaini7195 5 лет назад
Thanks sir 😊
@triptisingh7435
@triptisingh7435 3 года назад
Thank you so much sir
@yaminisahu8110
@yaminisahu8110 Год назад
Thanku so much sir mai is topic me kaise value put kre usme bhuttttt confusion hoti thi but thanks to u 😍 uska solution mil gya 🥰 thanxxxxx a lot sir❤️
@yamisharma4879
@yamisharma4879 5 лет назад
Thanks sir
@garimagahlawat4366
@garimagahlawat4366 3 года назад
Sir ...but approach in last Huffman video was different....when to make separate tree ?
@deepakyadav...7019
@deepakyadav...7019 Год назад
exactly
@ronaldabraham1088
@ronaldabraham1088 Год назад
It's same. Just the question is different.
@susmitamainde9017
@susmitamainde9017 Год назад
Yes, i got different values for A,B.......
@ashfaaqmir7869
@ashfaaqmir7869 Год назад
Burka pehenlo bhai.Nahi to log aise hi dekhte rahenge.
@bossmemes3308
@bossmemes3308 Год назад
@@ashfaaqmir7869 koi sense h iss baat koi 😅
@javedkhokhar5908
@javedkhokhar5908 3 года назад
Sir you are absolutely outstanding Ma Sha Allah. Huffman Encoding was never easy before. Lots of love from Pakistan 😍
@Er.Rajeevsinghrajput
@Er.Rajeevsinghrajput Год назад
Ye India hai meri jaan..yaha aise aise करोड़ों talent milenge..
@AshutoshKumar-jv1uq
@AshutoshKumar-jv1uq 3 года назад
make more videos on hoffman coding on different types of questions .
@rahultechtube05
@rahultechtube05 7 месяцев назад
Watching 30 minutes before exam 😅😅😂 Thanku sir for amazing explanation ❤❤
@khushbukushwah4991
@khushbukushwah4991 5 лет назад
Thank you
@fakhravu5711
@fakhravu5711 2 года назад
Great great sir
@entertainmentzone8797
@entertainmentzone8797 Год назад
Too Good🙌🙌
@anamika7085
@anamika7085 Год назад
tnk u sir .
@progressivepublicschoolgho9519
Sir if we use the word huffman and make a binary tree using huffman encoding then 4 alphabets of same size. And after first ilteration we will add and get 2 and soo on but at the last ilteration we have f with frequency = 2 and we also have other two nodes or somewhat written in circle having same value of 2 then what shall we do in order to join f with any of node how to chose ?
@ambalikasharma4197
@ambalikasharma4197 2 года назад
👍👍👍👍
@gahegde
@gahegde 3 года назад
Sir, final tree we get is max heap right?? Because root will be greatest value among all nodes..
@akkssspace1638
@akkssspace1638 3 года назад
कभी कभी हल्की नींद आती है, तो बस चला लेता हूं इतनी सही आवाज ही झट से नींद आजाती है, बाकी इसे तो पूरा दिन पढ़ते ही रहता हूं।
@samprime6546
@samprime6546 6 месяцев назад
If thats complex than what's easy😮
@Hemlata-fh6vb
@Hemlata-fh6vb Год назад
But maine aapse pehle solve karna ka socha aur mera required bit aya 73 bits and avg bits aya 2.43 bit aya, is it also correct?
@nawalazhar
@nawalazhar 7 месяцев назад
Sir please do string matching algorithms too! KMP, Rabin karp and brute force!
@anjaliverma905
@anjaliverma905 3 года назад
B would be 12 sir Anyways procedure is just awesome 🤗
@SilverNGoldRony
@SilverNGoldRony 4 месяца назад
Yes there was a problem in previous one. Just remember pair is formed of minimum 2 numbers at every step . When 8,7,6 were considered ,min pair was 7,6 so a pair was formed and then 13,8,9 the pair formed from min 2 numbers is 8,9 hence formed a pair then all left was 13,17 , they formed a pair .
@asthapatidar5507
@asthapatidar5507 3 года назад
in last video the method was different ,can we any of them or should we prefer this one
@Satvikshukla0007
@Satvikshukla0007 5 лет назад
देर आये पर दुरूस्त आये 😂😂😂👍👍🤘🤘🤘
@69miXxX
@69miXxX Год назад
Explain dynamic programming approach and apply it to construct optimal binary search tree using Huffman coding for weights given below (2,3,5,7,9,13) sir yeh kaise kare plz btaodo
@dreamboy913
@dreamboy913 6 месяцев назад
Thank you sir ❤️‍🩹
@neetpatel2413
@neetpatel2413 3 года назад
Thank u sir...... But we add que like that .... Each character in input msg takes 1 byte. If tbe compression technique used is huffman codind , how many bits will be saved in the msg ??????? Plz sir replay me...also make video on this question..plz sir GFG me ye qus he but solution me ku6 kbr nahi padti he sir apke isss video se half to solve ho jata he sir...but age ka que aesa he ab kay kru sir...i am wait for your replay plz sir...!
@akashbansal5501
@akashbansal5501 3 года назад
❤️❤️
@venkataramanakallepalli9355
@venkataramanakallepalli9355 5 лет назад
Sir plz explaine about Wi-Fi IEEE 802.11
@rimpihatibaruahgogoi4424
@rimpihatibaruahgogoi4424 5 лет назад
U made all topics easier
@nainalbhoi435
@nainalbhoi435 5 лет назад
Make 2 question per day sir.
@emonhasan-up6gm
@emonhasan-up6gm 3 года назад
sir At 2.30 to 2.34 you say that "we used min heap data structure" But it may be max heap data structure.....
@prakarshgupta
@prakarshgupta 2 года назад
sir, while calculating the size of huffman encoded message, table ka bhi size add krna hota hai, toh total value will be 120(68+52) and decoded message ka size toh 8*30 = 240 hona chahiye, since ASCII format use krenge (8bits). Average will be 120/30 = 4. Please Correct me if I'm wrong.
@poojakapri3945
@poojakapri3945 Год назад
i am also getting the same result 120
@malikawan2895
@malikawan2895 Год назад
sir financial accounting par bhe vedios bana dein
@KEVALMEHTA-qe1ic
@KEVALMEHTA-qe1ic 3 месяца назад
Perfect✅✅✅✅✅✅😊😊
@udayshankarsingha1533
@udayshankarsingha1533 Год назад
Sir.... for constructing the Huffman tree you have asked to use min heap...but you are building a max heap...I cant understand this point(2.33)
@souravbhagat1358
@souravbhagat1358 2 года назад
Make a vedio lectures on Digital electronic Counters part
@continnum_radhe-radhe
@continnum_radhe-radhe 10 месяцев назад
❤❤❤
@glorysingh
@glorysingh 3 года назад
sir what about the approach in the last video can't we just follow that?
@srishtipandey6782
@srishtipandey6782 Месяц назад
sir, if left should have smaller value then (C6 + B7) = 13 node should be on the right of 8 no?
@mitalithakur4829
@mitalithakur4829 Год назад
Bhot thanku sir 👍🙏.... Sir isme apne jo 6*2 kiya hai vo length of c nikali hai... Length of C I mean code lenth of C to 2 hue to 6*2 kya hai?
@cartoon_dekho863
@cartoon_dekho863 3 года назад
Sir but in previous video u made tree in different way please sir reply I am confused
@nitinchoudhary3549
@nitinchoudhary3549 7 месяцев назад
Sir, How to find entropy and efficiency in this method ?
@sahebram6948
@sahebram6948 12 дней назад
🎉
@ashadhami
@ashadhami Год назад
Min heap logic🎉
@gameplayy7329
@gameplayy7329 4 года назад
why u created a separate graph pls tell in prev. video you didnt do that !!!!!!!!!!!!
@shreyasgosavi9647
@shreyasgosavi9647 3 года назад
Hi.. In huffman encoding we are using a greedy approach .. so while selecting the two nodes we select two nodes of small value.. so in this case we take pair of 7 and 6 instead of 8 and 6.
@tejkiranboppana3957
@tejkiranboppana3957 5 лет назад
Average bits required to represent a character should be number of bits for each different character by number of different characters :(3+2+2+3+2)/5 = 2.4
@adityarai9039
@adityarai9039 Год назад
bhai mera 2.4 aa raha ha
@MuhammadAfzal-pl2sp
@MuhammadAfzal-pl2sp 3 года назад
Sir string m space include ni hogi???
@sureshkumargupta1704
@sureshkumargupta1704 5 лет назад
sir ek video rrb je computers science ke liye provide kare pure RU-vid pe search kiye aap se achha koi nhi padata plz sir I'm request you
@tarabasnet2684
@tarabasnet2684 3 года назад
Can u please do huffman for characters " punjabuniversity"
@jayeshjyj3302
@jayeshjyj3302 4 года назад
sir, i think this method is optimal merge pattern not huffman coding
@sushantmaji5613
@sushantmaji5613 3 года назад
sir in previous video you apply different rule but here different ??? WHY
@belalkhan2761
@belalkhan2761 2 года назад
Sir ASCII value kaise pta krenge question me diya rhega ya yaad krna pdega
@snobershahzadi9211
@snobershahzadi9211 Год назад
confused..prev video's method was different..which one to follow?
@rekha8875
@rekha8875 4 года назад
I tried to solve this question as per the method you said in the previous video, but my answer is different , why did you choose this method to solve this question? Can u plz help?
@farhanullahshariffi1607
@farhanullahshariffi1607 3 года назад
In this question, we see that on adding the least 2 elements to make the tree, there are more than 2 elements in the table that are smaller than the added value. ex: When we got 8 on adding freq. of a and d, we had b and d in the table that are smaller than 8. In such times we split the tree.
@navyaraj5316
@navyaraj5316 3 года назад
@@farhanullahshariffi1607 thanku
@adhargupta3441
@adhargupta3441 3 года назад
@@farhanullahshariffi1607 I am going to add this to my notes thanks😁
@sohamdeshpande1086
@sohamdeshpande1086 3 года назад
@@farhanullahshariffi1607 Thanks :)
@manisharana6280
@manisharana6280 3 года назад
Sir the total is 149 not 68 please do check ..... thanks @gatesmasher
@sundarrajneupane662
@sundarrajneupane662 2 года назад
sir, why are you not considering space from that massage. Is space are excluded or what.
@sunnygupta878
@sunnygupta878 4 месяца назад
Sb smjh aa gya But sir jo 9|e to 17 se less hai na to wo right mai kaise ja skta hai ??
@rashidalikhan3613
@rashidalikhan3613 4 года назад
what if occurrences are in point value like 0.12 or 1.12 something like
@shubhangihatkar1347
@shubhangihatkar1347 3 года назад
⭐⭐⭐⭐⭐
@GateSmashers
@GateSmashers 3 года назад
Thank you
@mukulkumarsah3954
@mukulkumarsah3954 8 месяцев назад
yaar apna 4:56 is time pe confusee kar dia and ap convey bhi nahi kar rahe its different from which you explained in previous video 😢. my question is why 9 is compared with 8 it is greater than 13 as well ? please answer 4:56
@aryantiwari3456
@aryantiwari3456 Год назад
Please answer,can i solve this question with previous video huffman tree concept