Download Pushing Boxes

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts
no text concepts found
Transcript
INTRODUCTION TO DATA STRUCTURE AND
ALGORITHM DESIGN
SCHOOL OF COMPUTER SCIENCE, FUDAN UNIVERSITY
WU YONGHUI
CONTENTS
• Goal for the Course
• Ideas for the Course
• Introduction to the Course
GOAL FOR THE COURSE
• Goal
• Polishing Students’ Programming Skills Solving
Problems with Data Structures and Algorithms
• Data Structures
• Data structures are ways of organizing data in
programs to represent the real world
• Integer, Real, Character, Array, Struct, Pointer
• Linear List, Tree, Graph
• Algorithms
• Methods solving problems by programming
PUSHING BOXES: PUSHING THE BOX TO THE TARGET
CELL
PUSHING BOXES: PUSHING THE BOX TO THE TARGET
CELL
• A two-dimensional maze composed of square cells which may or
may not be filled with rock
• You can move north, south, east or west one cell at a step
• A box can be pushed to an adjacent free cell
• Data Structure: How to represent it in a program?
• Algorithm: How to solve it by programming?
IDEAS FOR THE COURSE
• Programming
Knowledge
System
and
Programming Strategies Solving Problems
• Programming is a Technology
• Programming Contests’ Problems used in the
Course
Programming Knowledge System and Programming
Strategies Solving Problems
• A person’s professional ability
• Programming Knowledge System and
Programming Strategies Solving Problems
PROGRAMMING KNOWLEDGE SYSTEM AND
PROGRAMMING STRATEGIES SOLVING PROBLEMS
• The programming knowledge system can be summarized
as a famous formula: “Algorithms + Data Structures =
Programs”. It is also the foundation for knowledge system
of computer science and engineering.
• Strategies solving problems are strategies for data
modeling and algorithm design. When data models and
algorithms for problems are not standard, what strategies
we should take to solve these problems.
PUSHING BOXES: PUSHING THE BOX TO THE TARGET
CELL
• Data Structures: Graph, Queue
• Algorithm:
• Your pushing the box;
• Your walking to the cell where you can push the
box;
PROGRAMMING IS A TECHNOLOGY
• [1] Practice, practice, practice !
• [2] Practice in a systematic way (with test
data, solutions, and analysis ; based on
programming knowledge system and
programming strategies)
Programming Contests’ Problems
• Programming Contests:
• Contests Solving Problems by Programming
• Programming Contests’ Problems:
•
•
•
•
•
Problem Description
Input
Output
Sample Input
Sample Output
• Input==>Program==>Output
• A program is accepted if and only if it passes all test cases.
INTRODUCTION TO THE COURSE
• the Series of “for Collegiate Programming Contests and
Education”
• Data Structure Practice: for Collegiate Programming
Contests and Education
THE SERIES OF “FOR COLLEGIATE PROGRAMMING CONTEST
AND EDUCATION”
DATA STRUCTURE PRACTICE: FOR COLLEGIATE
PROGRAMMING CONTESTS AND EDUCATION
• Used not only as an experiment book, but also for
systematic programming contests’ training
• 4 Sections, 14 chapters, 200 programming contest
problems
• Contents:
• Section 1 Fundamental Programming Skills
• Section 2 Experiments for Linear Lists
• Section 3 Experiments for Trees
• Section 4 Experiments for Graphs
CHARACTERS OF THE BOOK
• (1) Programming contest problems are used as
experiments and homework.
• (2) Not only analyses and solutions, or hints to
problems are showed, but also test data for most of
problems are provided. Sources and IDs for Online
Judge for these problems are also given.
• Courses & Experiments
• [1] Introducing Knowledge Background
• [2] Reading the Problem, thinking how to solve it
• [3] Introducing Analysis
• [4] Solving Problems by Programming (Experiments or
Homeworks)
ONLINE JUDGE SYSTEMS FOR PROBLEMS IN MY BOOK
Online Judge systems Web Sites
POJ
http://poj.org/
ZOJ
http://acm.zju.edu.cn/onlinejudge/
UVA
Ural
http://uva.onlinejudge.org/
http://livearchive.onlinejudge.org/
http://acm.timus.ru/
Sgu
http://acm.sgu.ru/
• Yonghui Wu’s email: [email protected]