COMP 526 – Efficient Algorithms (Spring 2022) · unit page · YouTube
2022-01-31, 43:23

Click any sentence to play from there.

The transcript was generated automatically by YouTube's speech recognition and is offered as is. It may contain errors, in particular in concerning technical terms, names and formulas.

0:00 Intro

0:03 so i think it's time to get started uh for today there will not be any any actual content about algorithms we'll talk mostly about how the module is organized uh and i have a little um sneak attack planned on you but we'll come to that

0:18 Welcome to COMP 526 - Applied Algorithms

0:21 so welcome again i'm sebastian i like name tags because then uh you don't have to remember names and i'm terrible with names i'll try my best but you're a big a big group i'll probably only keep a few but so that you can remember mine we have another person who's not here today ben smith one of my phd students who's doing the tutorials they will start next week as you can see in your timetable you will be split in three groups and the timetabling team has somehow assigned you have no control over this and ben will be in touch over a campus wire how things are organized next week we originally were were thinking whether we do some of the tutorials as online ones and others face-to-face but now the rules seem [Music] the planning seems to go fine that we can be on campus so maybe this is uh easier than we thought but yeah ben will be in touch nothing this week as it is on the timetable the tutorials start next week

1:28 all right uh there's a website for the module that i guess you will have seen i announced it five times in the canvas announcement and there is the syllabus page on canvas that links to it uh if you haven't stumbled across it until now here it is for most things that you want to know about the module you want to go to that website and it has links to all the other things we'll use a few other things i will talk about this later i just thought it's it's useful to have a complete list on the slide somewhere so campus wire is the one where you have to sign up which well most of you have done i think by now a few are are late to it but i'll check that out and you can use the back channel on slido if you want to reach me during class now i'm not sure if i will be able to manage this as well as doing the remote versions so this is what slido looks like it's a little cut off on the left but i think you can see that the class feed is where you can post questions or way why i post um or ben posts announcements and if you go to rooms there's a lecture

2:41 back channel i tried to add everyone that was here yeah and well you can you can use this and i'll try to react to it if i see it uh i'm juggling devices now it's gonna be a challenge but the idea is also if you feel you have something you want to discuss or want to ask i want to give you options to reach me without necessarily raising your hand it's totally fine if you have a question to wave or just start screaming if you're not comfortable doing that you can use slido and post a question there or you can use campus wire where you can post anonymously in the lecture back channel

3:30 i will say some more about how campus wire will be used and then we have slido asu as you have seen already just for quick pulse in class and of course you will be interested in the assessments we'll talk about that in detail i'm i copied the one the percentages from the pandemic mode where we tried as a department to have less weight on the final exams uh both because there was a time we weren't sure if these were happening now they were doing fine online last year but also it's it's tougher for many reasons so you're kind of the lucky cohort that still has the rules from last year where everything was completely mayhem while we're in almost normal circumstances on campus at least so the exam will be less heavy in terms of the weight for the mark and the other continuous assessments i think are are quite doable you put some effort in so they're more planable say than the exam well that's what it is i decided i'll keep it honestly i was planning that half of this would be online because uh infection numbers didn't look good a few weeks ago but here we are so that's positive

4:48 Clicker Question

4:51 all right uh let's do a little slide-out question to get you guys awake and so 500 clicks and i have to switch the question as well so here's the question um this is if you could decide and the circumstances don't really matter how would you prefer to be taught in a setup like this so a module of roughly this size a lecture hall like this which is fairly crowded and i list the different options it's basically out of curiosity i asked the same question last year when we were fully online and i asked it later again during the term but i'm very curious what you think

5:46 i'll give you a minute for this because i think it takes a moment to just read all the options one thing about slido that will come up later uh i want to give a little participation mark for this class just to make it a little more likely that you vote on slido uh and it's easier in marks it's just five percent but it's a bit um and so for checking that it's important that you give me an email address on slido when you sign up that i can identify with your account on canvas so if you use the university address that should be fine that plus your name should make it unique enough but if you want to make my life easy which is always a good idea then use the sign up name that you use on canvas the same user account that you use to log into the windows machines

7:40 i think there's a few more people still working on this i'll i'll let you continue voting but i want to briefly have a look at the results here already you should be able to see it on your device maybe is more readable than here

8:09 so we have a preference for standard lectures in roughly style that we're doing it here uh followed by smaller groups seminar style lectures with more interaction um yeah a little further off than the synchronous online versions

8:38 and anything asynchronous comes last i wonder if that is what you experienced last term uh i think this is very natural though uh even if you hadn't experienced it i tried to i'll come back to this um on the slides so maybe let me switch back to this

8:58 My approach to lectures

9:00 i want to briefly talk about my approach to lectures uh i also tried to to take moocs these massive open online courses in the past a lot just for learning about things i wanted to learn and it's really really hard to keep up motivation if you're just watching videos now our lectures here are a bit more you have the videos plus some tutorials and things going on and then some q a maybe which was life whether it's on campus or not uh but still it's really hard to follow to stay on track if it's just asynchronous events and so yeah i think um in in either way it's it's just much much easier to uh stay on top of things if things are synchronous and you have a a fixed rhythm that you're forced externally to adhere to um i think it's just human uh that this is easier for most of us all right um what else do i want to say about lectures i mean pretty much independent of how you deliver a lecture it's always easier if you explain things well give intuitions and structure things well i tried my best we'll try to have synchronous life events with some interaction which is just a psychological trick to keep you awake but also has

10:19 other benefits in terms of learning and it helps me to see if if i'm getting at anything but recordings are really useful for rehearsing that's another experience that i've made so i'll try to do this live stream because i well maybe frankly because it sounded fun to try it but also because i think it's it's realistic to assume that at some point some of you will be isolating because of some restrictions or you will be sick and home and it's it's a bummer if you can't participate at all from that

10:58 and also the recordings itself apart from the live stream are much easier to make without all the uh setup and they're just convenient to look back at what was actually set in class so that you know what's covered in the exam for example

11:18 i've been teaching for quite a few years now and it's great to have in class conversations unfortunately or just fact of life it's only something that a small group feels comfortable with and i think this is not not a bad thing that's just how life is and some students prefer to engage in lectures and others just don't want to and instead of lamenting over this i try to offer you different back channels like questions on slido uh that um i think the moderation can be turned off now so you can you can play with it if you want if you open slido there's a next to the polls there's also a questions tab where you can type in a question and well i'll have to keep an eye on my phone to see them but i'll try to and if they flash up i'll bring them up we can discuss it and you can post anonymously if that's uh if you prefer and lastly interaction is just important for many reasons staying awake is the least important but it is an effective one and just it's it makes concepts stick more easily if there's some interaction going and you're just not in netflix mode all right

12:37 Components of COMP 526

12:38 so as a consequence of that these are the things that comprise this module there's lectures obviously which is not very surprising and slider questions that i talked about a lot

12:51 they're complemented by the tutorials where you will have some some extra tasks that the intention is that you work on those before you go to the tutorials and then then we'll discuss solutions with you but the time in the tutorials is not that long so if you come to completely unprepared you won't take as much from it as possible there will be sample solutions posted so if you're just curious how the answer would be for that that's fine but you should give it a go first and try to write down a solution or at least sketch some solution that's how you get the most out of the tutorials but that said i know you have enough deadlines so i don't want to enforce this is it's voluntary in that sense we're not checking it but it's it's super encouraged courage just because it's effective it's been proven many times um but yeah no no deadlines from that just the recommendation spanning across everything is is campus wire as a the main communication platform unless we're here in class uh and i will try to use this uh to post questions which not only i am answering but you are answering for the others it's one of the yeah i'll come back to it why i think

14:06 this is the right way to do it then the rest below here is is parts of the assessments what i didn't put on the slide is the exam because every lecture has an exam so nothing nothing really new nothing really surprising you want a degree within with a mark on it or with a grade and so we need exams they're not the fun part of the course but well the other assessments can be a bit more fun the first one we'll do is a video presentation so i'll get you to read and present an article from communications of the acm we'll talk about that later a bit this is done in groups so the idea here is it's a little orthogonal to the main module which is more theoretically about algorithms and this is on the other end of the spectrum it's more understanding some algorithms or some concepts that are on the research side of computer science and communicating those in in an engaging way we'll have some class tests which are just small canvas quizzes you can think of them like the slido pulse just a little more challenging so you have to actually think and work and use a a piece of scrap paper to work out the answer these are usually testing the

15:23 understanding of some detail that we cover in class and i'll i'll give an example in class and then it sounds really clear and when you're forced to do it yourself you notice if it is actually clear so that's what the class tests are for but there will be a practice version before you have to take the real one so i think these are really easy to prepare so it's it's clear what we'll be asked for uh and then we'll have two programming puzzles which are uh they involve a little bit of programming but not very much they're mostly thinking about an algorithmic puzzle but the submission is in terms of code so if you if you're not really an expert software developer don't panic you will probably run write a dozen lines of simple python code or java if you prefer i think we have both uh the challenges before you start coding really but yeah these these have always been fun um

16:27 Overview of the module

16:30 a quick overview in terms of the content so what's the what's the goal of this module uh i want to equip you with some some basic toolbox for working with mostly text and strings that's what we'll focus on uh we'll focus on on methods that are fast in practice which means in terms of running time they're they're near linear in the input and in many applications anything that's slower is not really usable because the data is is too big um

17:09 secondary too i mean the the first bullet is essentially saying here's a list of things that the smartest people of the last so and so many decades have come up with it would be good if you would know these if before you go out and use them on your job but there's more to it i think the more important part is give you vocabulary to talk about computer science solutions and algorithmic solutions

17:36 programming libraries and other other solute other other programs or other products are usually described in the language that we talk about in this in this module so if you understand these basics well even if you're not re-implementing say a binary search tree or suffix trees on your job ever because there's good libraries hopefully for doing that knowing these concepts knowing them well knowing how they are used what are their limitations that makes you a professional in this field and that's almost as important as being able to write them and use them is being able to communicate confidently about those

18:25 a little bit of a picture of how you how you prove algorithms correct and how you analyze them we won't stress very much on it but you'll also learn the vocabulary there to communicate what what does that mean that an algorithm is provably correct or what is worst case complexity in these things and the last one is a bit more practical you will often not find an application where there is exactly one matching thing in your toolbox and that solves the problem you will have to combine and slightly play with existing solutions and you need the first two parts to be able to do that i structure the module into these these 10 units where the first is really a kind of a dummy unit that's why it's unit zero um most of you will have seen what i'm covering there and the current unit the current set deck of slides is is just about the admin part then we'll talk about abstract models of computation that separates proper algorithm theory from just implementing something and testing if it works and then we'll work our way up through several applications all revolving around string data sequence data and always focusing on the algorithms that are fast and effective in practice

19:51 we'll start with some fairly basic things uh because one of the one of the challenges of this module is you're a very diverse cohort maybe you don't know but uh you will you will find out or we'll discuss it uh next time uh there's people on the advanced computer science master who have done an undergrad in computer science either with us or somewhere else and then there's also people maybe what's the opposite end of the spectrum maybe the new data science master which is open to a very broad range of of undergrads who might never have programmed apart from term one or might never have seen mathematical proofs apart from term one this is a huge spectrum and there's a few things that some of the computer science undergrads will have seen already in this in these two units um and maybe this one but only parts of it and we'll extend it a good bit but yeah so i apologize if there's a few sections that might be boring to those but we'll go through them fairly quickly and give you if you haven't seen those some additional material where you can dig a bit deeper into those so i'm trying to bridge this uh by going from the beginning basically introducing everything we need in this class

21:08 but the pace in some of these units will be quite quick um so especially for the time where unit 2 is scheduled um i hope you don't have too much going on in that week if you haven't seen any of if you haven't seen binary search trees and priority queues ever before these are things that normally are introduced over the course of three weeks maybe and we'll have to cover it in one week it's a bit of a tough ride if you haven't seen it on the other hand there's nothing in this module that really builds on it not in a strict in a strict way so i just include it here because i think these are gems of computer science and you have to know about those if you want a cs degree but they're not really as vital to pass this module per se so that's my compromise uh it's not perfect for either of the groups i'm aware of that and we'll we're trying to restructure some of the modules for the future but it's taking its time and i think the compromise is still still viable

22:14 Assessments

22:20 here's the breakdown of what the final mark consists of i mentioned already half of it is the final exam then there's these 10 each for the video presentation and the two programming puzzles that i spoke about earlier 15 is the class tests and this will be throughout the term um i think i'll stick to this format so uh we have one practice question where you can see the exact type of question you will be asked in the actual class test but just for playing and then there will be a fresh one of the same type but of course with new parameters which is marked and that's just a canvas quiz so these are fairly quick to do maybe half an hour and we'll do a handful of those spread over spread out over the term if you want to think of it if you want think of it as taking some of the weight from the exam and spreading it out over the term i think it's a it's generally a good idea to do it uh and it was possible during the pandemic and uh we'll go back to normal next term next year but for this one we're in the sweet spot

23:34 there's a participation mark which is five percent just for regularly participating on slido not for getting questions correct if there is a correct answer but for uh casting your vote and thinking about it keeping engaged there um that's just a little goodie to make you appreciate that and then there will be some bonus points now this is a little more uh tricky because i tried to find a sophisticated set of rules that make this make this engaging but also not too unfair so the bonus points will be collective by asking questions on campus wire well good and reasonable questions on campus wire that's my catch here they have to be approved by ben or me or answers you will earn bonus points but these are earned for everyone for the entire class no matter who asks or answers the question and then we'll give a boost to the class test mark for everyone another encouragement just to use campus wire in this way i think it's it's really effective to do it but sometimes you need a little external nudge and so there's your notch some bonus points for this

24:47 What are clickers? Why use it?

24:51 uh this slides again about slider but i think i talked a lot about slido already they're also sometimes called clickers because they used to be hardware devices that made a little click if you press them i think no one's using them anymore because uh okay this the the american tradition was you just force the students to buy one otherwise they can't pass their courses and so it was a great deal for the manufacturers of these devices and apart from that i think the hardware clickers were not good for anything the phone apps are much more versatile so we'll use slido instead as you already practiced and the idea is to have you stay awake give quick feedback for you to see if you're on track and give feedback to me if the majority of you is is on track for other types of questions we'll come to that

25:49 okay shall we practice this one more time next question is just if you've used this i'm trying to sprinkle these in to keep you awake you know this and the goal is to answer them as quickly as possible you guys are fast wow okay having the laptops on the table in front of you helps i guess i didn't pay attention for the last question how many people are we should be i think registered is over 80. but usually there's some back and forth in the first few weeks where people switch switch modules and i think this room would be full to the last last spot if it was over 80.

27:02 okay we'll be curious to discuss this more where we have used those etc but i think we don't we don't have the time for that today yeah thanks for for participating on this

27:15 What is Campuswire?

27:16 i hope you found them effective in the past and if not there's still the bonus participation mark okay uh campus wire also i already showed you briefly uh the two main features we're using i mentioned this because campus wire has other features but i i tried to disable them you can also use it for for live video lectures and things if you look at their website they're pretty cool but for this setup we'll use the class feed where you can post questions and answer other people's questions and we use the chat rooms

27:53 instead of teams basically i think many modules use user teams team what campus wire offers on top of teams is that you can post anonymously and that's sometimes very useful for the chat maybe not so much but for asking questions if you feel this might be a dumb question maybe firing it anonymously is less of a hurdle and i want to tear down all the hurdles i can so here's the link you can join again and you can the same the same link with p is for participate for joining and if you replace it with a c for class or so then you get to the sign in uh there's also a nice mobile app um yeah most of you found this already so a few more details about this uh q a feature um just some examples to inspire you if during class or after at any point you have some question or from the tutorials some questions are triggered where you're not sure why this is the case but you feel uh well whatever whatever you'll do i'll probably redirect your questions to campus wire because almost always it's not just you who has this question five other people have the same question and there might be five other people who had the same question

29:14 but figured it out and for them it's really helpful if they can give you the answer it also saves me the time to type the answer but that's the minor point unless you you flood us with questions which usually doesn't happen but it's really effective to pick up other people's questions think about it and if you can answer it type it along what we'll do is [Music] we will uh flag answers uh there's i forgot how it's called on campus wire there's a feature where you can as an instructor ben and i can click on a question say this is a good question and we can say this is a good answer so you will see if the answer is kind of approved as the official stamp or will augment the answer and and correct it or extend it um so there's nothing really to stop you from answering other people's questions uh just go ahead and you can ask um [Music] you can also ask private questions if you if you start a post on campus wire you can select if this is visible to everyone or private i think the only reason why you would want to use a private question is if this is about an assessment and you feel you have figured out half of it and now

30:26 you have a question for the second part or so and if this would kind of reveal the answer or part of it to the others then maybe a private question is better and uh you can i think i can still make it public or you can make it public if we decide this is not a spoiler we can still publish it after the fact

30:51 yeah i i suppose campus wires is intuitive enough to use uh so we'll just give it a go um i'm not sure how well um we'll separate there's this canvas as well where you can post announcements where i can post announcements i'll use canvas for the very official ones the ones where i want to be 100 sure that everyone gets them who is enrolled whereas campus wire i can't really force you to join i'm i mean i'm encouraging you but i think for anything that's legal like information about the exam or things like that i will post it on canvas and for smaller things like oh i posted the new slides i will use campus wire which is a bit so keeps keeps the canvas notifications a bit more standing out because there are fewer of them so very important things on on canvas and the daily kind of uh blurry of updates on campus buyer

31:55 How to Campuswire

32:00 maybe goes without saying but a bit of netiquette um uh the goals for for campus wire from our site is uh apart from the obvious things i stated uh it's fairer because everyone sees the same answer it's kind of an obvious point but i like it very much it encourages you to learn by teaching and well it's inclusive in that it offers a different way of engaging

32:28 i will redirect your questions to campus to campus wire whenever it's feasible whenever it's something that might might also be interesting for others and second point is is important even if you post a very legit question that is really challenging i'll try to keep my hands off and not answer it right away and instead give other students a chance to answer it for me to support this this second point obviously and yeah i mentioned we'll mark the answers uh so that you know and here's the bonus point breakdown not very important maybe but the the thing is an answer that's marked as good is is more important than the questions uh just because this is very effective and for every 100 points you earn together you will get one plus one extra mark on the on the class test mark at the end yeah this is always terrible bookkeeping for me there's a dire day at the end of the term where i have to do the tallies

33:29 Video Presentation

33:36 okay uh we're almost done i know this is a little and another slide on another thing i'll try to keep this short because we might talk about this in in two weeks time again in more detail i already said the first continuous assessment is is this video presentation and the goal is to get you reading some actual research literature but we'll pick communications of the acm this this journal do you guys know the acm was it association for computing machinery or it's a bit of a old-fashioned term maybe but i mean it's it's the biggest computer scientists association the u.s american one

34:39 that's why they put the distance between the podium and the students it's to protect you i'll i'll put this down no i can't i have to have something in my hand so acm you know about the acm they have a journal basically a periodical magazine more than a scientific journal but they also have uh some some research articles in there and that you'll i asked you to pick something from there because it's at the right level it's it's written for a very broad audience so anyone with a cs degree should be able to understand it and you're just at the at the corner of getting there and at the same time it's quite prestigious so they have interesting and good articles well-written articles and on current topics you find the deadlines on canvas uh which is also where you will form you will form groups on canvas i'll i'll show this when uh we're there um i noticed in the past that the first two weeks it often happens that students still move modules around and so i will not try to assign any groups in the first two weeks because we've had in the past couple of times that then some groups got

35:57 people removed from because they stopped the module so we'll we'll hold this off for a moment but if you want you can already think about whom you want to pair up with and what article might be interesting if you download the slides from the module website this is a clickable link which gets you to the journal website but you can also google it alright enough of that uh the final deadline for this is 28th of march so some time to go but i wanted to put it put it on this slide already

36:32 if you have any questions about this these things as we discussed them use slider or scream or use any of the other back channels i'll try to keep an eye on them

36:46 Philosophy of the module

36:51 there's the last little thing i want to mention and then i want you to get active that's my my sneak attack but i want this to be to stand out a little bit because it over arcs some of the other things

37:08 come five to six is part of a scientific course so uh it's it's not only to train you to become good software developers or not only to make you good data scientists or insurance brokers or whatever you might go into after after finishing this so i prefer it would be less like uh like this guy who just types along and doesn't really learn anything and a bit more like this so maybe i should read out the the second comic where there's a bit more text uh sorry it's like the world's so complicated the more i learn the less clear anything gets there are too many ideas and arguments to pick and choose from how can i trust myself to know the truth about anything and if everything i know is so shaky what on earth am i doing teaching i guess you just do your best no one can impart perfect universal truths to their students

38:07 except math teachers thank you so we're not doing math but we're doing theoretical computer science that has relevance to practice so we're straddling a bit both worlds but i want definitely to include some universal truths of of algorithms in this module so we'll not just look at here's java code and it seems to work and well if it doesn't and if it doesn't uh we'll try to prove that things work and we'll try to get an understanding why they do so and that means we'll we'll try to have a clear model of what is uh making up our our matters by our objects the machines and the programs and the data and we'll talk about this in next week i guess in much more detail and we'll try to make quantitative predictions it's a bit like um like a civil engineer doesn't just start building a bridge and then if it collapses they try to build it slightly differently they try to predict up front if this is going to work out computer science and programming we're in the in the convenient situation that we can often just try it out and if it fails we modify it and we keep unit testing etc until it works and that's often effective just because it's so

39:33 fast and then no one's damaged if the bridge collapses if your first attempt to implement something doesn't work out so that's fine but for the important big questions you're designing them a big system and you want to predict is this algorithmic approach or this architecture good enough uh you don't want to implement that nine months and then find out oh gosh we should have done something entirely differently and now we're screwed and the project will be over budget and over time and i'll be fired instead you want to have some way of predicting things now this is this is quite tough to be honest i think mostly computer science is not at the point to predict exactly whether the bridge will last or will be uh efficient enough but we can get to some degree of that and then a little bit something that you'll explore maybe more in the continuous assessments is we'll try to validate if our predictions are also true in some applications now that's less of a focus in in this module but uh we'll touch a little bit on it

40:44 now i hope you're um you're excited about the universal truths part because this also means this is knowledge that doesn't age so quickly whereas the fastest way to sort a million integers in java on pentium 4 or whatever that ages quite quickly whereas the fundamental idea of what makes sorting algorithms fast usually survives much longer the downside of these universal truths is if we want models and predictions we need somehow the machinery for that which involves some mathematical techniques so that's what we'll cover in the in the second part of this week

41:23 But before we start...

41:24 but before we do that i'd like to do a little little test with you now uh i don't want you to panic so that's why this guy's here it's a survey and it's called a prior knowledge survey not a prerequisite survey it's not things that i think you should know or i even expect you could know it's things that might be useful and it's just interesting for me to know whether you know that i hope that distinction is is clear and to stress that point it's not graded it's anonymous uh it's a formative assessment which is a fancy way of saying it's an assessment that tells you and tells me how things are going and it's helping you to to see clear but it's not about assessing what you've already learned which would be fairly pointless in the first lecture

42:17 the cover the questions cover quite a few different topics and some of them are really nasty in the sense that you have to scratch your head twice and maybe write down something on a piece of paper

42:31 what i would like to you to do is give it a sincere try and i'm i'm not planning on doing anything else for the rest of today's session so we have another 45 minutes roughly or 40 minutes which is probably ample to finish it but also you won't be much faster there's quite a few questions and i want you to give it a fair attempt so try to solve it on your own to as much as you can remember it doesn't matter at all if you solve it correctly it's more about getting a feeling where we are lots of the things we don't need actually for this class i put them in because they're interesting for me to know and if you want the main idea the main goal of this is to see if i can speed up or slow down on certain things because every one of you knows already topic x then i don't have to spend much time on it

Video 0-2: §0.1 Proof templates →