150 likes | 301 Views
Welcome!. The Beauty of Computer Science. Cinda Heeren Lecturer Department of CS UIUC. Let’s play!. 1. People on adjacent vertices must hold different poses. 2. Use the smallest # of poses possible. 3. I specify some poses. Graph Coloring.
E N D
Welcome! The Beauty of Computer Science • Cinda Heeren • Lecturer • Department of CS • UIUC
Let’s play! 1. People on adjacent vertices must hold different poses. 2. Use the smallest # of poses possible. 3. I specify some poses.
No one sitting on the same side of a pair of tables can have the same talkitivity rating. No one sitting in the same “column” can have the same talkitivity rating. Lunchroom Politics Suppose you have 16 friends each of whose talkitivity rating is O, L, P, S, 4 friends per type. No one sitting at the same table can have the same talkitivity rating. Can you seat your friends?
Lunchroom Politics Suppose you have 16 friends each of whose talkitivity rating is O, L, P, S, 4 friends per type. No one sitting at the same table can have the same talkitivity rating. No one sitting on the same side of a pair of tables can have the same talkitivity rating. No one sitting in the same “column” can have the same talkitivity rating. Can you seat your friends?
Lunchroom Politics Fill in the grid so that each row, column, and bold 2x2 square has exactly one of each of the digits 1 through 4. Can you solve the puzzle?
Sudoku 1 Fill in the grid so that each row, column, and bold 2x2 square has exactly one of each of the digits 1 through 4. 2 2 4 3 Can you solve the puzzle?
Sudoku? 1 2 2 4 3
Sudoku? 1 I can use my Graph Colorer to solve my Sudoku puzzles! 2 To do so, I just have to run out to the store and buy an adapter that changes my Sudoku puzzle into the right graph… 2 4 3
What does this have to do with computer science? You can think of the “adapter” and the “graph colorer” as pieces of software. They are programs whose inputs and outputs are well defined. Ultimate Graph Colorer Exam Scheduler / Graph Color ADAPTER Sudoku / Graph Color ADAPTER Map Color / Graph Color ADAPTER Beautiful
Why are these two problems on the same slide? CS173Graphs Suppose YOU are the person in charge of scheduling finals. Conflict exams are not allowed…that is, no student can have two exams scheduled for any one time. How many exam periods do you need? Suppose I give you a graph consisting of vertices and edges. Your task is to label the vertices with colors. Vertices which share an edge cannot be colored the same. How many colors do you need?
CS173Graphs Graphs are a very general way of representing data. We can use graphs to model things as diverse as: • Scheduling problems • Routes for travelling between cities • Connections between atoms in a molecule • Paths that messages can take in a network • Dependence relations between events in a large project
CS173Graphs Definitions you should understand: • Simple • Vertex • Edge • Weights • Degree • Neighbors • Connected • Complete • Bipartite • Planar • Cycle • Tree • Path • Circuit
CS 173 Announcements • Homework #13 available, due 5/7, 8a. • Final exam 5/10, 7-10p, 1404 Siebel, email cinda w conflicts. • Exam review: 5/9, 5-6:30p, location TBA • Section this week is review.