Download presentation
Presentation is loading. Please wait.
Published byBruce Kennedy Modified over 8 years ago
1
Perspective: Information Processing and Computation Week 11 Lecture notes INF 380E: Perspectives on Information Spring 2016 1
2
Information Processing and Computation This perspective is focused on doing things with information inside computing systems. Information has to be encoded in a way a computing system can recognize and process. 2
3
Computing Computing systems let us store and manipulate information The only thing a computing system can do is follow instructions an algorithm is a set of instructions – an ordered set of unambiguous, executable steps that defines a terminating process a program is a representation of an algorithm encoded for use by a computing system 3
4
Discussion: Computational Thinking Find a partner or two and discuss: How does Wing define computational thinking? – Is her definition useful? – What cultural contexts does it rely on? Are there potential risks to over-emphasizing computational thinking? – What are they? 4
5
Abstraction “distinction between the external properties of an entity and the details of the entity’s internal composition” abstraction allows development of algorithmic processing for classes of objects we can define a data structure to hold encoded information and algorithms to process and manipulate that information 5
6
Abstraction and programming Computers need instructions encoded as numeric digits. – This encoding system is a "machine language" Developing code in a machine language is time- consuming and error-prone – Commonly used instructions were giving mnemonic identifiers to make coding more efficient – And "assemblers" were written to convert into machine language 6
7
Abstraction and programming The primitives in assembly languages are the same as those used in the machine language – Therefore programs written in them are "machine dependent" – And the programmer has to think in terms of the machine's specific small-scale processes So programming languages that used high-level primitives and did not rely on the characteristics of particular machines were developed. – This in turn required developing "compilers" which stick together small-scale machine instructions to achieve the instructions the programmer wrote in high-level code. The first compiler was written by Grace Hopper Complete machine independence is challenging due to significant architectural differences and the possible variations in code/language use 7
8
Programming paradigms: high-level strategies for development Procedural/imperative: – issue a sequence of commands to manipulate data for desired result Declarative: – describe the problem – applies a general-purpose algorithm Functional: – a program accepts inputs and produces outputs Object-oriented: – software is a collection objects that interact to reach desired result an object consists of data and a collection of methods to perform actions on that data – Relies on the definition of classes of objects that have the same computational features – along with methods: procedures describing how the objects should act 8
9
Algorithms “A finite set of precise instructions for performing a computation or solving a problem”. (Rosen, Discrete Mathematics) Also, A mechanical procedure, a series of steps, guaranteed to come to an end and produce the solution. An effective method. 9
10
Algorithms Informally, a set of instructions. Formally: – An algorithm is an ordered set of unambiguous, executable steps that defines a terminating process. 10
11
Properties of algorithms (Rosen) Input – an algorithm has input values from a specified set. Output – from each set of input values an algorithm produces output values from a specified set. Definiteness – the steps of an algorithm must be defined precisely. Correctness – and algorithm should produce the correct output values for each set of input values. Finiteness – an algorithm should produce the desired output after a finite (but perhaps large) number of steps for any input in the set. Effectiveness – it must be possible to perform each step of an algorithm exactly and in a finite amount of time. Generality – the procedure should be applicable for all problems of the desired form, not just for a particular set of input values. 11
12
Activity. 12
13
Data Types Data types describe: – the manner in which data is to encoded – operations that can be performed on that data examples: – character strings – integers – float – Boolean 13
14
Defining data types Part of using a data structure to encode information In relational database design, data types are specified for the attributes in a relational schema In XML Schema, you can define data types for XML content. 14
15
Data structures Generally, “the conceptual shape or arrangement of data”. You want a data structure that – fits the conceptual shape of your information – to let you access and manipulate information according to your needs 15
16
Development and implementation By developing shared standards we can have more universal descriptions A standard is an agreed-upon way of making a series of choices – some technical – some conceptual By documenting our choice of standards we make our {descriptions} more useful 16 A BLAST FROM THE PAST: STANDARDS! dataprograms
17
XML data structure The underlying data structure for an XML document is a “tree” – a directed acyclic graph – with ordered branches This hierarchical structure can be parsed to check for validation against a grammar – the grammar is an abstraction of class of documents Good for documents or data with hierarchical structure 17
18
Relational Data Structures Relational databases use mathematical relations as a conceptual shape for data Relations are sets of sequences of ordered values query languages for relational databases leverage that structure to enable retrieval and processing – using known operations from set theory and logic 18
19
Data structures in IR Some information retrieval systems rely on a co- occurence matrix to calculate similarity of documents in terms of their word use This is a data structure that, for a set of terms, records the presence or absence (or frequency) of those terms across some collection of documents The way information is recorded (presence/absence vs frequency) shapes the operations that can be performed on the data 19
20
Data structures for bioinformatics Gene sequences are patterns of proteins that encode instructions for cell-building By representing the sequences in a data structure, molecular biologists can compare structures at high enough scale to learn which genetic sequences encode which instructions Scaling is a major issue for running an algorithm, so compression methods are essential 20
21
The Information Organization Perspective on Data Structures Data structure standards – metadata element sets, schemas. “categories” or “containers” of data that make up a record or other information object. Examples – The set of MARC (Machine-Readable Cataloging format) fields – Encoded Archival Description (EAD), – Dublin Core Metadata Element Set (DCMES), – Categories for the Description of Works of Art (CDWA) 21
22
Comparing the perspectives The information organization perspective on data structures views them at a higher level of abstraction than the computational view. They are closer to how we conceptualize the containment of information. The info org data structure is realized with a computational data structure, which enables processing and retrieval of the recorded information. 22
23
Computation as commentary Find a partner or two and discuss: Wardrip-Fruin argues that Strachey’s love letter generator acted as a parody of a genre of clichéd writing by real people. – Do all computational objects take on this kind of social weight? Whether or not their creators intend them to… – Can you think of other examples of computation being used as social or political commentary? 23
24
SNES code injection SCIgen 24
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.