 Hello everyone, this is Alice Gao. In this video, I'm going to describe a few examples of constraint satisfaction problems. First, let's look at a real-world constraint satisfaction problem. Pascal van Hentrik is one of the world-leading experts on solving large, real-world constraint satisfaction problems. He has worked on many different problems, including disaster recovery and transportation planning. Take evacuation planning as an example. Evacuation planning is critical in preparing and responding to natural and man-made disasters. In a controlled evacuation, agencies must instruct each endangered resident to follow a specific evacuation route at a given departure time. There are two main challenges with evacuation planning. First, we must deploy enough resources to give instructions to the endangered population. Second, we must ensure that the endangered population comply with the evacuation orders. Unfortunately, authorities still primarily rely on expert knowledge and simple heuristics to design and execute evacuation plans. Let's look at several issues with the existing evacuation approaches. First, the existing approaches violate a desirable constraint that all evacuees in a residential zone should preferably follow the same evacuation route. Several work address this issue by assigning a single evacuation path to each residential area. Second, evacuees may not follow the instructions if there are forks in the road. Ladies work address this issue by constructing a forest of evacuation trees. In each tree, the route is at a safe place and the leaves are the residential areas. Third, the existing approaches allow preemption. That is, the evacuation can be interrupted and restarted arbitrarily. This is not desirable in practice since it will confuse the evacuees and the emergency services, and it will be hard to enforce. Van Hentrik's work generates non-preemptive evacuation schedules by using a constraint programming approach. Their model includes many variables and constraints such as the number of evacuees, the number of vehicles to be evacuated per time unit, the starting evacuation time, and the road capacities. Their constraint programming model was applied to a real-life evacuation case study in New South Wales, Australia. This region is susceptible to floods. A major spill would require evacuating 80,000 people. Their model generated non-preemptive schedules that are close to the optimal schedules generated in prior work, and yet are much more practical. I haven't told you much about the constraint programming model. Please read the paper if you are interested in learning more. Next, let's look at crossword puzzles. I presume that most of you are familiar with them. Whenever I see crossword puzzles, it reminds me of The Imitation Game, one of my favorite movies. In the movie, Alan Turing first mentioned crossword puzzles during the interview at Blashley Park. Let me replay some of the conversation for you. Turing says, I don't speak German. Deniston says, How are you supposed to decrypt German communications? Turing says, Well, I'm really quite excellent at crossword puzzles. German codes are a puzzle, a game just like any other game. I like solving problems, commander. And enigma is the most difficult problem in the world. Deniston says, Enigma isn't difficult, it is impossible. Everyone thinks enigma is unbreakable. Turing says, Good, let me try, and then we'll know for sure, won't we? I always laugh after hearing this dialogue, and I always wonder, what would happen if I go to an interview and claim that my strength is in puzzles and games? Would I get the job or not? Next, we have the graph coloring problem. This is a well-known mathematical problem. We're given a graph and a set of colors. The question is, can we color all the vertices in the graph, such that no two adjacent vertices have the same color? This question may look quite abstract and boring. However, it has many applications in the real world. Let me give you some examples. 1. Making a schedule or timetable. 2. Assigning radio frequencies to the towers. We must assign different frequencies to towers in the same location. 3. Register allocation in compiler optimization. We must assign a large number of target program variables onto a small number of CPU registers. 4. Map coloring. In a geographical map of countries or states, no two adjacent cities can be assigned the same color. There is a famous theorem for this problem. Four colors are sufficient to color any map. The next example is a Sudoku puzzle. The goal is to complete all the empty squares with the numbers 1 to 9, such that the numbers are all different in each row, in each column, and in each 3x3 grid. When I took the Introduction to AI course at UBC, I had to write a program to solve Sudoku for one of the assignments. I struggled with writing the program quite a bit, but it was a lot of fun, and I learned a lot. Finally, I have the Four Queens problem. You should be familiar with this problem. I will be using the Four Queens problem as a running example to discuss algorithms to solve a CSP. That is all my examples on constraint satisfaction problems. When you think about a constraint satisfaction problem, what examples do you have in mind? If you have heard of cool applications of constraint satisfaction problems, I would love to hear about them and share them with everybody else in the class. Thank you very much for watching. I will see you in the next video. Bye for now.