Survey
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
How does one build a chess-playing computer? Issues: 1) Representation (organization) 2) Algorithm (process) Marr’s Information Processing Levels Computational goal What is the goal of the computation, why is it appropriate, and what is the logic of the strategy by which it can be carried out? Representation and algorithm Hardware implementation How can this computational goal be implemented? In particular, what is the representation for the input and output, and what is the algorithm for the transformation? How can the representation and algorithm be realized physically? Data Structures and Algorithms: Introduction What are data structures and algorithms? In their simplest form: Data structures are high-level ways to think about representing data. Algorithms are the operations we perform on some data representation. In a more formal setting, both are components of something called an Abstract Data Type (ADT) (i.e., a specification that describes a data set and the operations on that data) An ADT is independent of any particular language or implementation technique. Formally, a data structure is an implementation of an ADT within a programming language. Collection: an ADT that contains a group of objects Container: a class that implements a collection. Data Structures and Algorithms: Introduction Data Structures and Algorithms: Introduction Why study data structures and algorithms? Data structures The way we represent things has a large influence on what we can do with them and how easily/efficiently we can manipulate them. Most significant problems can be viewed from the perspective of one or more data structures. Some example problems requiring careful representation choices include geographic databases, chess game trees, routing problems, genetic information, satellite imagery, etc.). Data Structures and Algorithms: Introduction Why study data structures and algorithms? Algorithms There are a variety of fundamental operations that are useful to perform on various data structures, regardless of the specific use (e.g. adding, deleting, finding items in lists, dictionaries, trees). Some fundamental algorithms: Adding an item Deleting an item Searching Sorting Testing for existence etc. Fundamental algorithmic topics Recursion Efficiency Language The Top 10 Algorithms (from Computing in Science and Engineering) Metropolis Algorithm for Monte Carlo Simplex Method for Linear Programming Krylov Subspace Iteration Methods The Decomposition Approach to Matrix Computations The Fortran Optimizing Compiler QR Algorithm for Computing Eigenvalues Quicksort Algorithm for Sorting Fast Fourier Transform Integer Relation Detection Fast Multipole Method http://www.computer.org/cise/articles/Top_Algorithms.htm?SMSESSION=NO Data Structures and Algorithms: Introduction Why study data structures and algorithms? General These topics are essential foundational components for further progress in Computer Science (as are introductory programming and discrete mathematics courses). The whole subject matter is really the study of Abstract Data Types (ADTs). Object-oriented languages (e.g., Java, C++) are natural for building and using ADTs. Java Review Appendix A: Java Essentials Introduction Applications and Applets Objects, Classes, and Methods Static Variables Constructors Java Basics Identifiers Reserved Words Variables Primitive Types Constants Assignment Statements and Compatibilities Type Casting Arithmetic Operators and Expressions Parenthesis and Precedence Rules Increment and Decrement Operators Named Constants The Math Class Public, Private, Protected Parameter Passing Java Review (continued) Simple Input and Output Using the Keyboard and Screen Screen Output Keyboard Input using KeyboardInput class The if-else Statement Boolean Expressions Nested Statements Multiway if-else Statements The Conditional Operator The switch Statement Scope Loops The while Statement The for Statement The do-while Statement Additional loop information Java Review (continued) The class String Characters within Strings Concatenation of Strings String Methods The Class StringBuffer The Class StringTokenizer Arrays Array Parameters and Returned Values Initializing Arrays Array Index Out of Bounds Use of = and = = with Arrays Multidimensional Arrays Wrapper Classes Java Review (continued) Appendix B: Exception Handling Basic Exception Handling Predefined Exception Classes Defining Your Own Exception Classes Multiple catch Blocks Declaring Exceptions Exceptions That Do Not Need to Be Caught Java Review (continued) Appendix C: File Input and Output Overview Streams The Advantage of Files Kinds of Files File Names The Package java.io Writing to a Text File Using PrintWriter Flushing and Output File Appending to a Text File Reading a Text File Using BufferedReader Testing for the End of a Text File Reading a File Name from the Keyboard Defining a Method to Open a Stream I/O with Binary Files Writing to a Binary File Using DataOutputStream Reading from a Binary File Using DataInputStream The Class File Object Serialization