logic in computer science - arizona state university

15
Logic in Computer Science Yu “Tony” Zhang, Ph.D. Assistant Professor Arizona State University

Upload: others

Post on 28-Oct-2021

5 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Logic in Computer Science - Arizona State University

Logic in Computer Science

Yu “Tony” Zhang, Ph.D.Assistant Professor

Arizona State University

Page 2: Logic in Computer Science - Arizona State University

“The Calculus of Computer Science”

| Logic’s role in Computer Science- Computer Architecture- Software Engineering & Robotics- Programming languages- Databases- AI & Robotics- Computation Theory- ...

Logic

�♢Φ⟶�Ө

main() {if (i > 5) i++;

}

P = NP?

Page 3: Logic in Computer Science - Arizona State University

| Propositional logic

| First-order logic

| Logic programming

Topics covered in this class

Page 4: Logic in Computer Science - Arizona State University

| What are the current trends in Logic Modeling and/or AI?- Incorporating uncertainty into logic modeling

-Knowledge augmented learning systems

-Model retrieval (learning) for common sense reasoning- Magellan, the explorer, went around the world three times. On one of his trips, he died. Which

trip did he die?

Trends in logic

Page 5: Logic in Computer Science - Arizona State University

Knight’s TourGary Chen and Drew Nibeck

Page 6: Logic in Computer Science - Arizona State University

What is Knight’s Tour?

A game where you play as a chess knight.

Goal:

● Go to every square.

Restrictions:

● You may not revisit a square.

Page 7: Logic in Computer Science - Arizona State University

Solutions

Solutions:

● Open Tour● Closed Tour● No Tour

Open Tour

Page 8: Logic in Computer Science - Arizona State University

A Heuristical Approach

Warnsdorff’s Rule:

Choose the tile with the least number

of possible moves.

Page 9: Logic in Computer Science - Arizona State University

Our Solution

2. Filter moves

1. Find Moves

3. Count

3

3

2

2

7

7

4. Pick best

Page 10: Logic in Computer Science - Arizona State University

Improvements

Resolving Ties:

Arnd Roth Hypothesis:

- Take the position furthest from the center

Ira Pohl Hypothesis:

- Sum the neighbors of the neighbors, then choose the least

2

2

36

32

9

5

Page 11: Logic in Computer Science - Arizona State University
Solution quality analysis as the board size increases (not student data)
Page 12: Logic in Computer Science - Arizona State University
Computation analysis as the board size increases (not student data)
Page 13: Logic in Computer Science - Arizona State University
Conclusions1. XXXX2. YYYY…
Page 14: Logic in Computer Science - Arizona State University

Sources

https://en.wikipedia.org/wiki/Knight%27s_tour

Douglas Squirrel and Paul Coll, A Warnsdorff-Rule Algorithm for Knight’s Tour on a Square Chessboard

Page 15: Logic in Computer Science - Arizona State University
Final project reminder (in lieu of the final exam)
Survey response rate now at ~70%