lecture0 - IntrotoDataStructures&Algorithms...

Info iconThis preview shows pages 1–7. Sign up to view the full content.

View Full Document Right Arrow Icon
Lecture 0 : Course Overview ECE 2574 Chao Huang Virginia Tech Spring 2010
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
C. Huang, Virginia Tech 2 Course Overview Entry-level survey course on algorithms and data structures Programming and problem-solving with applications According to wikipedia. .. » In mathematics and computing, an  algorithm  is a procedure  (a finite set of well-defined instructions) for accomplishing  some task which, given an initial state, will terminate in a  defined end-state.  » In computer science, a  data structure  is a way of storing  data in a computer so that it can be used efficiently.  A simple interpretation » Algorithm: method for solving problem » Data structure: method for storing information
Background image of page 2
C. Huang, Virginia Tech 3 An Example: A Beautiful Game Hex  » Piet Hein 1942, John Nash 1948, Parker Brothers 1962 » Two players alternate in picking a cell in a hex grid » Red: make a red path from lower left to upper right » Blue: make a blue path from  upper left to lower right » How to detect when a player has won?
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
C. Huang, Virginia Tech 4 Start with Something Small in 3 4 4 9 8 0 2 3 5 6 2 9 5 9 7 3 4 8 5 6 0 2 6 1 1 2 3 4 5 6 7 8 9 0 out 3 4 4 9 8 0 2 3 5 6 5 9 7 3 4 8 6 1 evidence (2-3-4-9) (5-6) (2-3-4-8-0) How can we implement a simple algorithm to solve it?
Background image of page 4
C. Huang, Virginia Tech 5 Union-Find Abstraction What are critical operations we need to support? » N objects Grid points » Find: test whether two objects are in the same set Is there a connection between A and B? » Union: merge two sets Add a connection Design efficient data structure to store connectivity information  and algorithms for  UNION  and  FIND » Number of operations M can be huge Computation time » Number of objects N can be huge Memory usage
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
C. Huang, Virginia Tech 6 Quick-Find Algorithm Data structure » Maintain array  id[]  with name for each of N elements » p  and  q  are connected iff they have the same id Find: to check if  p  and  q  are connected, check id Union: to merge sets, update entries with the same id i 0
Background image of page 6
Image of page 7
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 01/28/2010 for the course ECE 2574 taught by Professor Chuang during the Spring '08 term at Virginia Tech.

Page1 / 27

lecture0 - IntrotoDataStructures&Algorithms...

This preview shows document pages 1 - 7. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online