Presentation is loading. Please wait.

Presentation is loading. Please wait.

Algorithms and Data Structures TEACH THAT Lassie, what’s in this ADS2 course ? Will it be interesting? woof!

Similar presentations


Presentation on theme: "Algorithms and Data Structures TEACH THAT Lassie, what’s in this ADS2 course ? Will it be interesting? woof!"— Presentation transcript:

1

2 Algorithms and Data Structures TEACH THAT

3

4 Lassie, what’s in this ADS2 course ? Will it be interesting? woof!

5 Content linked lists single/doubly-linked, insert, delete, find, min, max, … stacks push/pop/size bracket matching, RP calculator queues enqueue/dequeue/size circular queue (in array) recursion see above big O

6 Content trees n-ary trees: representations & properties binary trees representations & properties & traversals binary search trees insert/find/delete/traverse/height … AVL trees heap insert/delete/sort splay trees red-black trees Continued

7 Content skip lists Sorting bubble/insert/sift sort merge sort quick sort bucket sort (pigeon hole sort) bead sort Dictionaries maps and hash tables open and closed hashing Continued

8 Content Continued 5 pieces of practical work 2 of above are assessed exam lab every 2 nd week woof

9 Algorithms & Data Structures Algorithms & Data Structures Great!

10

11 my ADS2 website under construction (permanently) I hate moodle

12 Home

13 News

14 The lectures

15

16 code & api

17 Lots of code in there

18 DEMOS

19 demos

20 Links to interesting & useful stuff

21 exercises

22 Questions & Answers

23

24 … and now for something completely different!!!

25 Lassie, why are algorithms and data structures important?

26 Lassie, will there be anything in the course that is challenging and exciting?

27 I just hope I get feedback, continuously

28 Lassie, will you teach us to “THINK LIKE A COMPUTER SCIENTIST”?

29 Lassie, honestly, I’m not that experienced as a programmer. Will you help us with our programming?

30 Will we use BIG data sets?

31 woof!

32 1 st couple of lectures “Who cares?”

33 If someone was to teach you to drive a car would they: 1. explain how the internal combustion engine works 2. take you through the intricacies of synchromesh gears 3. fully independent suspension, spring rates, and dampers 4. front and real wheel drive: pros and cons 5. basic aerodynamics 6. … 7. …

34 … or would they show you the knobs and levers and take you for a spin

35 Go for a spin

36 1 st lecture … “Who cares?”

37 Who cares? Machines are getting bigger, faster, cheaper … do efficient data structures and algorithms really matter?

38

39 An emotional attachment to algorithms and data structures An empirical study using the IMDB

40 An emotional attachment to algorithms and data structures An empirical study using the IMDB

41 An emotional attachment to algorithms and data structures An empirical study using the IMDB

42 HashSet?

43 ArrayList?

44 woof

45 An emotional attachment to algorithms and data structures An empirical study using the IMDB

46 An emotional attachment to algorithms and data structures An empirical study using the IMDB We could run this in the class for 1 st three entries above

47 So? What was that about? This is 1 st & 2 nd lecture Quickly/Immediately they get to see Alg & DS can have a dramatic effect We use real data We use a big data set We show that there is an empirical side to CS Computer Science is a Science

48 Okay, what’s next

49 The TSP challenge

50 It’s impossible to cover all the material we want to cover

51 So give them something that will draw them in …

52 Give them something that is fun …

53 The TSP challenge 100 Glasgow postal codes in a 5K radius Find the shortest tour not assessed, no marks, … a crappy trophy Email me tour whenever I will maintain website Basic code with GUI on course website

54 Code is here

55 Data sets are here

56 Code is here

57 Our very own demo program

58

59

60 Your challenge is do write a method for the TSP class to find as short a route as possible round Glasgow. You have all semester to do this.

61 That took about a week to develop Furthest insertion algorithm used Easy to add a solver Students can do this if they want (no pressure) Thanks SoCS for letting me do this

62 Footnote for all … Some crappy prizes: 1.Green jacket 2.Blue Riband 3.Pint of milk at the Indy 500 4.Victoria Cross 5.A gold star 6.… 7. 4 th year project prize I am NOT kidding

63 next?

64 Instant feedback!!!

65 btree as an example

66 btree

67

68

69

70 Ewe have to implement some of the methods and test them

71 Any other examples Lassie?

72 Doubly Linked List

73 Any others

74 avlTree and emailOfDoom

75

76

77 Feedback?

78 Well, there are also programs that use your classes and methods and test them against data sets, checks results are correct, complexity is within limits and gives you “brownie” points. Richard’s seen this before. He could tell you more if you want.

79 What was this “THINK LIKE A COMPUTER SCIENTIST” stuff?

80 Count from zero?

81

82

83

84

85 I, being of sound mody and bind, herby swear that I will, on occasion, write java code in the class, that I will explain what I am thinking and doing. I also swear that I will debug code in the class and I will explain what I am thinking and what I am doing. I will try my best to explain what I think is good and what is bad as a Computer Programmer … as Almighty Dog is my witness.

86 baaa!

87 An Example

88 Example of “Thinking Like a Computer Scientist” I spent one day tracking down a bug in ADS2 code I fixed it No big deal But wait. Why throw that day away? Do something with it!

89 anatomy of a bug

90

91

92 AVL Trees Anatomy of a bug

93 I wrote java code for the avl tree: the data structure, a test/demo program and managed to display it … I felt … smug

94

95 smug It was written all over me

96 … so smug that I just HAD to demo it to a friend/colleague … Dr. Chris “unworthy” Unsworth

97

98 … and this is what happened

99

100

101

102

103

104

105

106

107

108

109 Calm down … think

110 Example

111

112

113

114 So?

115 The sheep have a point dude.

116 This is what I hope to do 1.Capture the students’ interest 2.Convince the class that studying/knowing/using ADS is worthwhile 3.Teach students the basics of ADS & a wee bit more 4.Develop students’ programming skills (and their programming appreciation) 5.Give fast feedback 6.Develop students’ programming skills (I already said that, didn’t I?) 7.When appropriate, expose the thinking of a Computer Scientist 8.Use realistic data sets where possible

117 Available from the gift shop now

118


Download ppt "Algorithms and Data Structures TEACH THAT Lassie, what’s in this ADS2 course ? Will it be interesting? woof!"

Similar presentations


Ads by Google