Logic Programming Projects

advertisement
Project Topics
Course: Logic Programming and Constraint Programming
Logic Programming Projects
A1.[Eight Queens and Knight Tour]
Write Prolog programs for
- three different methods of solving Eight Queens problems
- some methods of solving Knight Tour problem.
The above methods must produce all solutions for each problems.
(Hint: Read chapter 4 in [5] and chapter 3 in [6])
A2.[2-3 Dictionary]
A 2-3 tree is a kind of balanced trees. Write Prolog programs that implement some
important operations on 2-3-tree.
(Hint: Read chapter 10 in [5]).
A3.[AVL Tree]
AVL tree is a kind of balanced tree. Write Prolog programs that implement some
important operations on AVL trees.
(Hint: Read chapter 10 in [5]).
A4. [Minimum Spanning Tree]
Weighted graphs are graphs in which weights or costs are associated with each edges.
A minimum spanning tree of a weighted graph is a collection of edges connecting all
the vertices such that the sum of the weights of the edges is at least as small as the
sum of the weights of any other collection of edges connecting all the vertices. The
minimum spanning tree need not be unique.
Write Prolog programs that implement the two algorithms to find minimum spanning
tree:
- Priority-First Search (or Prim’s algorithm)
- Kruskal algorithm
(Hint: Read chapter 24 in [4]).
A5. [Disjstra’s Algorithm]
The single-source shortest-paths problem is defined as follows:
Given a weighted, directed graph G = (V,E), we want to find a shortest path from a
given source vertex s  V to every vertex x  V.
Study the Disjstra’s algorithm that solves the single-source shortest-paths problem and
write a Prolog program implementing the algorithm.
Hint: Read chapter 25 in [4].
A6. [Hamilton Cycle]
Given a graph, Hamilton cycle is a path that starts from some node, visits all the other
nodes (once at each node) and return the original node. Develop an exhaustive search
algorithm that can find all Hamilton cycles starting from a given node. Implement the
algorithm in Prolog.
Hint: Read chapter 44 in [3].
References
[1] Clocksin, W. F. and Mellish, C. S., Programming in Prolog, 2nd Edition, SpringerVerlag, 1984.
[2] Aho, A. V., Hopcroft, J. E., Ullman, J. D., Data Structures and Algorithms, AddisonWesley Publishing Company, 1983.
[3] Sedgewick, R., Algorithms – 2nd Edition, Addison-Wesley Publishing Company,
1988.
[4] Cormen, T., Leiserson, C.E., Rivest, R.L., Introduction to Algorithms, The MIT
Press, 1997.
[5] Brako, I., Prolog Programming for Artificial Intelligence, 2nd Edition, AddisonWesley, 1990.
[6] Wirth, N., Algorithms + Data Structures = Programs, Prentice-Hall, Englewood
Cliffs, 1976.
Constraint Programming Projects
B1. Formulate the graph vertex coloring as a Constraint Satisfaction Problem over finite
domains and solve it by using standard backtracking algorithm with forward checking
(BC-FC) that can solve CSPs over finite domains. Write a Visual C++ program that
implements the algorithm.
B2. Write Visual C++ programs that can solve CSPs over finite domains by the following
algorithms:
- backmarking
- backjumping
- graph-based backjumping
- conflict-directed backjumping.
Try each of them on N-QUEENS problem.
B3. Study standard backtracking algorithm with forward checking (BC-FC) that can
solve CSPs over finite domains. Develop an application of the algorithm for high school
course scheduling problem (dealing hard constraints only).
B4. Study standard backtracking algorithm with forward checking that can solve CSPs
over finite domains. Develop an application of the algorithm for exam timetabling for a
university faculty (dealing hard constraints only).
B5. Solving car sequencing problem using constraint logic programming language BProlog.
B6. Bridge scheduling using constraint logic programming language B-Prolog.
B7. Study the Hulubei’s C++ CSP Library (Available:
http://www.hulubei.net/tudor/csp/). Write some small applications in C++ using the CSP
library.
B8. Exam timetabling for a university faculty using constraint logic programming
language B-Prolog. Assume that only hard constraints are handled.
B9. Study Dynamic Backtracking algorithm for solving CSPs over finite domains (given
by Ginsberg). Implement the algorithm and try it with N-QUEENS example.
B10. Develop a CSP solver (for finite domain CSPs) that uses arc-consistency and
domain splitting. Assume that it accepts only binary constraints.
B11. [Multiple Project Selection]
An organization has to consider multiple investment projects. These projects may have
some economic dependencies among them. Due to the limitation of capital, the
organization can not undertake all projects. It has to select some of the projects in such a
way that the investment based on this selection would yield the maximum economic
interest. There are two approaches for determining which projects to accept and which
project to reject:
(i)
the method of ranking, and
(ii)
the method of integer programming.
Write a (CLP) B-Prolog program that implements the ranking method for selecting
investment projects.
B12. [Assignment Problem]
The assignment problem is a problem where assignees are being assigned to perform
tasks. For example, the assignees might be employees who need to be given work
assignments. Assigning people to jobs is a common application of the assignment
problem. However, the assignees could be machines, or vehicles or plants. To fit the
definition of an assignment problem, the applications need to be formulated in such a
way that satisfy the following assumptions.
1. The number of assignees and the number of tasks are the same. (This number is
denoted by n.)
2. Each assignee is to be assigned to exactly one task.
3. Each task is to be performed by exactly one assignee.
4. There is a cost cij associated with assignee i (i= 1,2,…,n) performing task j
(j=1,2,…,n).
5. The objective is to determine how all n assignments should be made in order to
minimize the total cost.
Write a CLP (B-Prolog) program that can solve the above problem.
B13. Solving the TSP (traveling salesman problem) with Tabu search.
B14. Solving the graph coloring problem with Tabu search.
B15. Solving the TSP (traveling salesman problem) with simulated annealing.
B16. Study the Open TS, a Java Tabu search library, 2002 (Available:
http://www-124.ibm.com/developerworks/opensource/coin/OpenTS/). Write some small
applications using the Open TS library.
B17. Study weak-commitment search. Try the algorithm on N-QUEENS problem.
B18 Study Min-Conflict Hill Climbing and Min-Conflict Random Walk algorithms. Try
the algorithms on N-QUEENS problem.
B19. Study WSAT algorithm. Apply it to solve graph coloring problem.
B20. Study genetic algorithm. Apply it to solve TSP (traveling salesman problem)
problem.
B21. Study genetic algorithm. Apply it to solve graph coloring problem.
B22. Study WSAT algorithm. Try the algorithm on N-QUEENS problem.
B23. Given a graph, Hamilton cycle is a path that starts from some node, visits all the
other nodes (once at each node) and return the original node.
Find all Hamilton cycles of a graph by using constraint logic programming approach.
B24. Solving CSP by using neural network. Apply it to solve graph coloring problem.
Download