Lecture 5/29: Lecture 23 Q&A


Lecture 23 Questions and Answers (Exported from Zoom Q&A log)

Q: try 11!

A1: Yep, that would force a rotation!


Q: Will assignment 7 be released on saturday or sunday?

A1: Saturday


Q: I thought the last assignment was due next Friday hard deadline? Not Sunday?

A1: We pushed out the deadline to Sunday (to what would have traditionally be the end of grace period), there is no further grace period beyond that


Q: Also great job guys!

A1: Thank you! :-)


Q: if you don't turn in assignment 7 but have maintained a check plus on assignments 1-6 can you still pass without taking the final?

A1: No, all assignments need to be completed to earn satisfactory


Q: In assignment 6 there is a sentence “Oh those halycon days of CS106A”, while the word is actually “halcyon”

A1: thank you, I wll fix it. Stand by at your web browser to see my magic

A2: Done!


Q: Wait, so the hard deadline for assignment 7 is actually Sunday?

A1: Yes.


Q: is the prefix code the same for every letter or unique?

A1: a prefix code requires that the code for a given letter will never be a prefix of the code for a different letter, i.e. each has unique prefix


Q: Is "prefix code" a thing that we add before every letter? Or is it a term that describs a coding system where no letter is a prefix for another letter?

A1: It is the latter — it is an adjective applied to an encoding that has the property that no letter is encoding with a sequence that is a prefix of another letter’s encoding


Q: hmmm is that what you guys have been doing this whole time in 106b?? haha :)

A1: I think it’s clear, as long as we don’t tell you it’s impossible, you’ll go ahead and solve it for us!


Q: Is Chris’ profile picture from the Met Museum (a new yorker)

A1: I know it is from a SIGSCE conference a few years back, I believe it was the Minneapolis convention center?


Q: Please include a great unsolved problem in computer science in our next assignment but don't tell us which one it is

A1: Sure thing! And be sure to mention us when receiving your Turing prize!


Q: How does the shannon-fano algorithm relate to the pre-order sort, in-order sort etc we learned last lecture?

A1: You can use tree traversals to visit the nodes in an encoding tree, same as for an ordinary binary tree, yes.


Q: Chris! select the draw function from the top menu bar :)

A1:


Q: mind blown

A1:


Q: ^^ on PowerPoint I mean

A1:


Q: What type of data structure is this? A tree within a queue?

A1: Crazy, isn’t it? The priority queue is storing Node pointers which either point to a single node or root Node of subtree


Q: Wait what are the numbers written above each letter?

A1: The frequency of that letter in the input to be compressed (or sum of frequencies of the subtree)


Q: How does the computer read the encoded letters? How does it know what tree you used to generate the code?

A1: That is a insightful question! You will have to transmit the encoding tree along with the bits in order to decode


Q: as they shift… if one node has a 4 when combined and there already exists 4s in the orginal list… i noticed the animation only places it at the end of all the 4s listed… is this the rule? Always place at the end of all the ones similar to it?

A1: The behavior of the priority queue is to break ties by FIFO — i.e the one enqueued later goes behind in any existing values with that same priority


Q: Why is it 427 bits to send to all scrabble tiles?

A1: live answered