COMP 102: Computers and Computing

Similar documents
About the Author. Dependency Chart. Chapter 1: Logic and Sets 1. Chapter 2: Relations and Functions, Boolean Algebra, and Circuit Design

15110 PRINCIPLES OF COMPUTING SAMPLE EXAM 2

Lecture 3, Review of Algorithms. What is Algorithm?

Elements of Graph Theory

Bawar Abid Abdalla. Assistant Lecturer Software Engineering Department Koya University

Switching to AQA from Edexcel

MATHEMATICAL STRUCTURES FOR COMPUTER SCIENCE

Computer Organization and Levels of Abstraction

Chapter 9 Graph Algorithms

Department Curriculum and Assessment Outline

Department of Computer Applications. MCA 312: Design and Analysis of Algorithms. [Part I : Medium Answer Type Questions] UNIT I

Chapter 9 Graph Algorithms

1 P a g e A r y a n C o l l e g e \ B S c _ I T \ C \

Introduction p. 1 Pseudocode p. 2 Algorithm Header p. 2 Purpose, Conditions, and Return p. 3 Statement Numbers p. 4 Variables p. 4 Algorithm Analysis

COMP 102: Computers and Computing

3. According to universal addressing, what is the address of vertex d? 4. According to universal addressing, what is the address of vertex f?

11/22/2016. Chapter 9 Graph Algorithms. Introduction. Definitions. Definitions. Definitions. Definitions

Lecture 3. Brute Force

Chapter 9 Graph Algorithms

Computer Organization and Levels of Abstraction

Chapter 2. Boolean Expressions:

R10 SET - 1. Code No: R II B. Tech I Semester, Supplementary Examinations, May

Second Semester - Question Bank Department of Computer Science Advanced Data Structures and Algorithms...

12 Abstract Data Types

Constraint Satisfaction Problems

Chapter 9. Greedy Technique. Copyright 2007 Pearson Addison-Wesley. All rights reserved.

LECTURE 4. Logic Design

Examples of P vs NP: More Problems

6.034 Quiz 1, Spring 2004 Solutions

1 Tree Search (12 points)

CSE 20 DISCRETE MATH. Fall

To prove something about all Boolean expressions, we will need the following induction principle: Axiom 7.1 (Induction over Boolean expressions):

Thomas H. Cormen Charles E. Leiserson Ronald L. Rivest. Introduction to Algorithms

OUTLINE. Paper Review First Paper The Zero-Error Side Information Problem and Chromatic Numbers, H. S. Witsenhausen Definitions:

SAMPLE CURRICULUM GUIDE June 2014

PATH FINDING AND GRAPH TRAVERSAL

CIS 1.5 Course Objectives. a. Understand the concept of a program (i.e., a computer following a series of instructions)

Propositional Calculus. Math Foundations of Computer Science

COURSE: DATA STRUCTURES USING C & C++ CODE: 05BMCAR17161 CREDITS: 05

Multimedia Networking ECE 599

«Computer Science» Requirements for applicants by Innopolis University

7.1 Introduction. A (free) tree T is A simple graph such that for every pair of vertices v and w there is a unique path from v to w

Switching to AQA from OCR

Introductory Combinatorics

LOGIC AND DISCRETE MATHEMATICS

CSE 21 Spring 2016 Homework 5. Instructions

Combinational Logic & Circuits

Digital Communication Prof. Bikash Kumar Dey Department of Electrical Engineering Indian Institute of Technology, Bombay

CSE 373 Final Exam 3/14/06 Sample Solution

EE/CSCI 451 Spring 2018 Homework 8 Total Points: [10 points] Explain the following terms: EREW PRAM CRCW PRAM. Brent s Theorem.

1 5,9,2,7,6,10,4,3,8,1 The first number (5) is automatically the first number of the sorted list

Welcome Back to Fundamentals of Multimedia (MR412) Fall, 2012 Lecture 10 (Chapter 7) ZHU Yongxin, Winson

Lecture (04) Boolean Algebra and Logic Gates

Lecture (04) Boolean Algebra and Logic Gates By: Dr. Ahmed ElShafee

MCS-375: Algorithms: Analysis and Design Handout #G2 San Skulrattanakulchai Gustavus Adolphus College Oct 21, Huffman Codes

Constraint Satisfaction Problems (CSPs)

CSE 20 DISCRETE MATH. Winter

Combinational Circuits Digital Logic (Materials taken primarily from:

Konigsberg Bridge Problem

Algorithms Interview Questions

OCR H446 A-Level Computer Science

Constraint Satisfaction Problems

Fundamentals of Multimedia. Lecture 5 Lossless Data Compression Variable Length Coding

A6-R3: DATA STRUCTURE THROUGH C LANGUAGE

EE67I Multimedia Communication Systems Lecture 4

COMP 102: Computers and Computing

Practice Final Exam 1

CS-6402 DESIGN AND ANALYSIS OF ALGORITHMS

Exam Sample Questions CS3212: Algorithms and Data Structures

Crossing bridges. Crossing bridges Great Ideas in Theoretical Computer Science. Lecture 12: Graphs I: The Basics. Königsberg (Prussia)

7 Temporal Models (20 points)

ECE 499/599 Data Compression & Information Theory. Thinh Nguyen Oregon State University

DISCRETE MATHEMATICS

COMP 102: Computers and Computing

M.Sc. (Computer Science) I Year Assignments for May Paper I DATA STRUCTURES Assignment I

A Survey of Mathematics with Applications 8 th Edition, 2009

PESIT Bangalore South Campus Hosur road, 1km before Electronic City, Bengaluru -100 Department of MCA

Information Science 2

Constraint satisfaction problems. CS171, Winter 2018 Introduction to Artificial Intelligence Prof. Richard Lathrop

Edexcel GCSE in Computer Science Microsoft IT Academy Mapping

Eulerian Tours and Fleury s Algorithm

Foundations of AI. 9. Predicate Logic. Syntax and Semantics, Normal Forms, Herbrand Expansion, Resolution

Class Overview. Introduction to Artificial Intelligence COMP 3501 / COMP Lecture 2: Search. Problem Solving Agents

4 Search Problem formulation (23 points)

Systems Architecture I

Fundamentals of Discrete Mathematical Structures

CS 188: Artificial Intelligence. What is Search For? Constraint Satisfaction Problems. Constraint Satisfaction Problems

Constraint Satisfaction Problems (CSPs) Introduction and Backtracking Search

Announcements. Homework 4. Project 3. Due tonight at 11:59pm. Due 3/8 at 4:00pm

Midterm Exam Review. CS 2420 :: Fall 2016 Molly O'Neil

Constraint Satisfaction Problems

CSPs: Search and Arc Consistency

DIT411/TIN175, Artificial Intelligence. Peter Ljunglöf. 30 January, 2018

Constraint satisfaction search. Combinatorial optimization search.

DIGITAL SYSTEM DESIGN

Gate-Level Minimization. section instructor: Ufuk Çelikcan

Analysis of Algorithms Prof. Karen Daniels

Name: UW CSE 473 Midterm, Fall 2014

Reference Sheet for CO142.2 Discrete Mathematics II

Sample Question Paper

Transcription:

COMP 102: Computers and Computing Lecture 26: Final Exam Review Instructor: Kaleem Siddiqi (siddiqi@cim.mcgill.ca) Class web page: www.cim.mcgill.ca/~siddiqi/102.html

Number Representation and Logic Binary digits (Bits) Number representation using positional notation Number conversion from one base to another ASCII for text Logical variables and logical operations (AND, OR, NOT) Logical expressions and simple word problems Truth tables Digital logic gates: AND, OR, NOT, NAND, NOR, EX-OR 2

Laws of Boolean Algebra Commutativity Laws Distribution Laws DeMorgan s Laws Application of laws to simplify Boolean expressions Disjunction of Conjunction ( sum of products ) form Finite State Machines and word problems Finite State Machine Implementation 3

Computer Programming Definition of a program Data: input and output, and procedures Notion of a variable and variable assignment A loop Types of variables Arithmetic operations Comparison operators 4

Computer Programming A recursive function Two features of a recursive function: calls itself, checks to see if a termination condition is met (the base case), in which case it exits Basic Features of Programming (Scripting) using Scratch Specifically: conditional statements, different types of loops, recursive functions, etc. 5

Machine Language Basic components of a computer The memory hierarchy The CPU Fetch-decode-execute cycle Notion of a machine instruction and what it does Types of machine instructions (transferring data, arithmetic or logical operations, control of flow) What a compiler does: parsing, front end -> IR -> back end -> executable 6

Arrays and Algorithms Numerous examples of loops in Scratch Specifically: a for loop, a while loop Difference between loops and a recursion Arrays: in Scratch we use 1D arrays or Lists, but this concept is easily generalized to 2D arrays or 3D arrays Indexing an array Definition of an algorithm: an ordered set of unambiguous instructions to solve a precisely stated problem, which also terminates The idea that an algorithm may be described, abstractly, using pseudocode An example of an algorithm (Minimum) and the ability to generalize these ideas to other problems (define inputs, intermediate variables, computations, outputs). 7

Sorting Sock matching examples (different algorithms) Comparing these algorithms Examples where sorting is beneficial (sorting lists, sorting web pages, etc.) Bubble Sort and all its details Complexity (number of operatins) and storage requirements of bubble sort Selection sort and its complexity and storage requirements Merge sort and its complexity and storage requirements Classification of complexity: constant, linear, log-linear, quadratic, exponential 8

Searching, Graphs Sequential search and how it works Binary search and how it works Worst-case analysis (number of operations) of these two approaches Assumptions made by binary search (e.g., that the data has been sorted) Examples of abstract search problems (maze, subway system, etc.) Definition of a graph Properties of graphs: a path, the path length, the adjacency matrix Examples of graph problems: shortest path, minimum travel time, etc. Directed graphs, undirected graphs, cycles and trees 9

Graphs 7 Bridges of Konigsberg problem Euler s formulation of this problem as that of finding a cycle that starts and stops at the same node and visits each edge once (a tour). Euler s Theorem An Eulerian path is a path in the graph that visits each edge exactly once. An Eulerian tour is therefore an Eulerian path that starts and stops at the same vertex. Regular graphs, complete graphs, random graphs Rings and Lattices Graph drawing Depth-first search versus Breadth-first search Best-first search 10

Data Compression Lossy compression versus lossless compression An alphabet Codewords Fixed length versus variable length codewords Definition of a prefix code Representation of a prefix code using a binary tree Huffman Coding algorithm Huffman Coding example 11

Data Compression Contd. Sound files, the AIFF format and the basics of differential coding MP3 frequency encoding: a basic idea of how it works Encoding images: lossless (e.g. TIFF) versus lossy (e.g. JPEG) encoding How movies are encoded (e.g. MPEG2) 12

Constraint Satisfaction Problems Common examples of CSPs Map coloring, satisfying a boolean expression, Sudoku puzzle Details of CSPs: variables, values they can take, constraints that must be respected Definition of a solution to a CSP Different types of variables: boolean, finite domain discrete variables, infinite domain discrete variables, continuous variables Different types of constratins: unary, binary, higher-order Preferences (soft constraints) A constraint graph (nodes as variables and arcs to represent the constraints) The detailed steps of a constructive approach, e.g., as applied to map coloring The two heuristics: most constrained variable and least constraining value The iterative approach and its detailed steps. The pentagon problem. 13

Computability An alphabet, a language and a grammar The notion of decidability of a language or a computer science problem The Post Correspondence Problem (PCP) The Halting Problem The idea that the Halting Problem is undecidable and so too is PCP The Syracuse sequence The Syracuse conjecture 14

Computer Vision What is computer vision? Visual illusions and the idea that what you see is an abstraction 3 Problems in Computer Vision: segmentation, face recognition and stereo The ability to formulate these three problems as computational problems and to suggest and develop possible examples to solve them. 15

Two Guest Lectures High level aspects of the mobile robotics lecture and the ability to answer reasonable questions based on computer science concepts discussed in class that apply to this lecture. Details of the geometry of stereo vision The basic principle behind stereo vision and an understanding of how disparity plays a crucial role The formulation of correspondence as a computational problem 16