Algorithm Design and Analysis Homework #1 Due: 5pm, Friday, October 4, 2013 TA === Homework submission instructions ===
|
|
|
- Kristin Griffith
- 9 years ago
- Views:
Transcription
1 Algorithm Design and Analysis Homework #1 Due: 5pm, Friday, October 4, 2013 TA === Homework submission instructions === For Problem 1, commit your source code and a brief documentation to the SVN server (katrina.csie.ntu.edu.tw). You should create a new folder hw1 and put these two files in it. The filenames of the source code, Makefile, and the documentation file should be main.c and report.txt, respectively; you will get some penalties in your grade if your submission does not follow the naming rule. The documentation file should be in plain text format (.txt file). In the documentation file you should explain how your code works, and anything you would like to convey to the TAs. You have to login to judgegirl system ( to initiate the juding process of your program. For Problem 2 through 5, submit the answers via the SVN server (electronic copy) or to the TA at the beginning of class on the due date (hard copy). Except the programming assignment, each student may only choose to submit the homework in only one way; either all in hard copies or all via SVN. If you submit your homework partially in one way and partially in the other way, you might only get the score of the part submitted as hard copies or the part submitted via SVN. If you choose to submit the answers of the writing problems through SVN, please combine the answers of all writing problems into only ONE file in the pdf format, with the file name in the format of hw1 [student ID].pdf (e.g. hw1 b pdf ); otherwise, you might only get the score of one of the files (the one that the grading TA chooses). Discussions with others are encouraged. However, you should write down your solutions with your own words. In addition, for each problem you have to specify the references (the Internet URL you consulted with or the people you discussed with) on the first page of your solution to that problem. NO LATE SUBMISSION IS ALLOWED for the homework submission in hard copies - no score will be given for the part that is submitted after the deadline. For submissions via SVN (including the programming assignment and electronic copies of the writing problems), up to one day of delay is allowed; however, the score of the part that is submitted after the deadline will get some penalties according to the following rule (the time will be in seconds): LATE SCORE = ORIGINAL SCORE (1 DelayT ime/86400) 1
2 Problem 1. Rectangle Man (30%) According to the latest news, the archaeologists have found the monument left from the aliens called Rectangle Man. They have left a puzzle in the monument. People who are able to solve the puzzle may found the treasure left behind by the aliens. The monument says, You should know that a rectangle can be determined by four points. But does it really needs up to four points to determine a rectangle? No! In fact, only two points on the diagonal are needed. We have left a map of points. As long as you can determine the maximum number of rectangles those points can form, you can find the treasure we left. There is one last thing you should know: we only care about rectangles whose edges are parallel or perpendicular to the x axis. The following illustration reveals the only two ways a valid rectangle can be formed: You can see that two imaginary points and two points selected from the given map of points are sufficient to form a rectangle. Note: For a rectangle to be valid, there can be no points inside the boundary of that rectangle. The following figures illustrates whether a few valid and invalid rectangles. Invalid Rectangle Valid Rectangle Invalid Rectangle Your goal is to write a program that utilizes a divide-and-conquer algorithm to solve the problem and retrieve the treasure left by the aliens. Hint 1: Sorting the points by their coordinates and dividing them into two groups would help a lot. Hint 2: When you want to find the possible points which can form rectangles with a specific point, you can find that there may be some points blocking all the points behind them from forming rectangles. It may be beneficial to use some kind of data structure to maintain those blocking 2
3 points. In the following figure, when we consider the rectangles the red point can form with points on the right side, those grey points cannot be the ones to form valid rectangles since they are blocked by the blue point, while the pink point is certainly an option. Blocking point. The specific point Report(10%) Please write down how you derived the algorithm, how you implemented it, and analyze the running time of your algorithm using asymptotic notations. Coding(20%) Input format: The first line contains the total number of points, n, 0 < n And the following n lines contains each point s coordinate. For any pair of points a, b in the map, a.x b.x and a.y b.y where a.x and a.y are the X and Y coordinates of a, respectively, and b.x and b.y are the X and Y coordinates of b, respectively. In addition, the X and Y coordinates of the points can all be represented in integer. Output format: Please output the maximum possible number of rectangles in a single line. Sample input: Sample output: 6 3
4 Problem 2. Solving Recurrences (16%) a. (2%) T (n) = 2T ( n 2 ) + n Use the substitution method to prove that T (n) = O(n log n) ( n ) ( n ) b. (2%) T (n) = T + T Use the substitution method to prove that T (n) = O(n) ( n ) ( ) 2n c. (2%) T (n) = T + T + Θ(n) 3 3 Draw a recursion tree, and use it to prove that T (n) = Ω(nlgn) For the following subproblems, give tight asymptotic bounds ( i.e. corresponding proofs. You can use whatever methods you want. d. (3%) T (n) = 3T e. (2%) T (n) = 7T f. (3%) T (n) = 2T ( ) n log n ( n 4 ) + Θ(n 2 ) ( n 2 ) + n log 2 n Θ(n 2 ), Θ(nlgn) ) and the g. (2%) T (n) = 2T (n 1) + 1 Assume that T(1)=1 for all recurrences. 4
5 (a) The board for n = 4 (b) The piece to be filled in the board (c) The board covered by the pieces for n = 4 Figure 1: The tiling problem Problem 3. (15%) Assume that n is a positive integer which is a power of two. We have a triangular board which is composed of equilateral trangles, and one triangle on the edge gets randomly removed (see Figure 1(a)). You are asked to cover the entire board with the trapezoical piece shown in Figure 1(b). See Figure 1(c) for an example. Note that the piece can be rotated. All tiles on the board except the one taken way have to be covered, and no tiles can be left outside of the board. In this problem, we ask you to design an algorithm to solve this problem with the divide-and-conquer strategy. Analyze the running time of your algorithm by using the recurrences. Problem 4. Selection in two lists (15%) Given two sorted list with length m and n, design an O(log m+log n)-time algorithm to compute the k-th smallest element in the union of the two given lists. Please give the pseudo code of your algorithm in detail (10%), and explain why the time complexity of your algorithm satisfies the requirement (5%). 5
6 Problem 5. (24%) 1. (8%)The following pseudo code implements a function that multiplies two very large numbers stored in two binary strings. 1 multiply ( value1, value2 ) 2 length1 = number of digits of value1 3 length2 = number of digits of value2 4 i f length1 < 5 && length2 < 5 5 // It s small enough that we can do 6 // arithmetic operations in constant time. 7 return value1 * value2 8 k = max ( length1, length2 ) / 2 + max ( length1, length2 ) % 2 9 value1_ high = first length1 - k digits of value1 10 value1_ low = last k digits of value1 11 value2_ high = first length2 - k digits of value2 12 value2_ low = last k digits of value2 13 z1 = multiply ( value1_ high, value2_ high ) 14 z2 = multiply ( value1_ high, value2_ low ) 15 z3 = multiply ( value1_ low, value2_ high ) 16 z4 = multiply ( value1_ low, value2_ low ) 17 add 2* k trailing 0 s to z1 18 add k trailing 0 s to z2 and z3 19 return z1+z2+z3+z4 Assume that the larger number of the two has n digits. The running time of the procedure 4T ( n 2 ) + O(n), if n 5 would be T (n) =. Therefore, the procedure runs in O(n 2 ) time. Θ(1), if n < 5 Please modify the procedure and justify that your procedure can run in O(n log 2 3 ) time. 2. (8%)Please give a pseudo code for power_of_ten_to_binary(n) which returns a binary string representing 10 n where n is a positive integer. You have to give the recurrences to represent its running time and justify that your procedure runs in O(n log 2 3 ) time. 3. (8%)Please give a pseudocode for decimal_to_binary(x) which returns a binary string representing the n-digit decimal integer x and justify that your procedure runs in O(n log 2 3 ) time. 6
Algorithms. Margaret M. Fleck. 18 October 2010
Algorithms Margaret M. Fleck 18 October 2010 These notes cover how to analyze the running time of algorithms (sections 3.1, 3.3, 4.4, and 7.1 of Rosen). 1 Introduction The main reason for studying big-o
Activity 1: Using base ten blocks to model operations on decimals
Rational Numbers 9: Decimal Form of Rational Numbers Objectives To use base ten blocks to model operations on decimal numbers To review the algorithms for addition, subtraction, multiplication and division
Closest Pair Problem
Closest Pair Problem Given n points in d-dimensions, find two whose mutual distance is smallest. Fundamental problem in many applications as well as a key step in many algorithms. p q A naive algorithm
5.4 Closest Pair of Points
5.4 Closest Pair of Points Closest Pair of Points Closest pair. Given n points in the plane, find a pair with smallest Euclidean distance between them. Fundamental geometric primitive. Graphics, computer
Many algorithms, particularly divide and conquer algorithms, have time complexities which are naturally
Recurrence Relations Many algorithms, particularly divide and conquer algorithms, have time complexities which are naturally modeled by recurrence relations. A recurrence relation is an equation which
Selected practice exam solutions (part 5, item 2) (MAT 360)
Selected practice exam solutions (part 5, item ) (MAT 360) Harder 8,91,9,94(smaller should be replaced by greater )95,103,109,140,160,(178,179,180,181 this is really one problem),188,193,194,195 8. On
BALTIC OLYMPIAD IN INFORMATICS Stockholm, April 18-22, 2009 Page 1 of?? ENG rectangle. Rectangle
Page 1 of?? ENG rectangle Rectangle Spoiler Solution of SQUARE For start, let s solve a similar looking easier task: find the area of the largest square. All we have to do is pick two points A and B and
Near Optimal Solutions
Near Optimal Solutions Many important optimization problems are lacking efficient solutions. NP-Complete problems unlikely to have polynomial time solutions. Good heuristics important for such problems.
Introduction to Algorithms March 10, 2004 Massachusetts Institute of Technology Professors Erik Demaine and Shafi Goldwasser Quiz 1.
Introduction to Algorithms March 10, 2004 Massachusetts Institute of Technology 6.046J/18.410J Professors Erik Demaine and Shafi Goldwasser Quiz 1 Quiz 1 Do not open this quiz booklet until you are directed
WORK SCHEDULE: MATHEMATICS 2007
, K WORK SCHEDULE: MATHEMATICS 00 GRADE MODULE TERM... LO NUMBERS, OPERATIONS AND RELATIONSHIPS able to recognise, represent numbers and their relationships, and to count, estimate, calculate and check
From Last Time: Remove (Delete) Operation
CSE 32 Lecture : More on Search Trees Today s Topics: Lazy Operations Run Time Analysis of Binary Search Tree Operations Balanced Search Trees AVL Trees and Rotations Covered in Chapter of the text From
CSE373: Data Structures and Algorithms Lecture 3: Math Review; Algorithm Analysis. Linda Shapiro Winter 2015
CSE373: Data Structures and Algorithms Lecture 3: Math Review; Algorithm Analysis Linda Shapiro Today Registration should be done. Homework 1 due 11:59 pm next Wednesday, January 14 Review math essential
Patterns in Pascal s Triangle
Pascal s Triangle Pascal s Triangle is an infinite triangular array of numbers beginning with a at the top. Pascal s Triangle can be constructed starting with just the on the top by following one easy
First programming project: Key-Word indexer
University of Illinois at Chicago CS 202: Data Structures and Discrete Mathematics II Handout 2 Professor Robert H. Sloan Friday, August 30, 2002 First programming project: Key-Word indexer 1 Indexing
Data Structures and Algorithms Written Examination
Data Structures and Algorithms Written Examination 22 February 2013 FIRST NAME STUDENT NUMBER LAST NAME SIGNATURE Instructions for students: Write First Name, Last Name, Student Number and Signature where
Math Games For Skills and Concepts
Math Games p.1 Math Games For Skills and Concepts Original material 2001-2006, John Golden, GVSU permission granted for educational use Other material copyright: Investigations in Number, Data and Space,
Factorizations: Searching for Factor Strings
" 1 Factorizations: Searching for Factor Strings Some numbers can be written as the product of several different pairs of factors. For example, can be written as 1, 0,, 0, and. It is also possible to write
Dynamic Programming. Lecture 11. 11.1 Overview. 11.2 Introduction
Lecture 11 Dynamic Programming 11.1 Overview Dynamic Programming is a powerful technique that allows one to solve many different types of problems in time O(n 2 ) or O(n 3 ) for which a naive approach
Shortest Path Algorithms
Shortest Path Algorithms Jaehyun Park CS 97SI Stanford University June 29, 2015 Outline Cross Product Convex Hull Problem Sweep Line Algorithm Intersecting Half-planes Notes on Binary/Ternary Search Cross
A Note on Maximum Independent Sets in Rectangle Intersection Graphs
A Note on Maximum Independent Sets in Rectangle Intersection Graphs Timothy M. Chan School of Computer Science University of Waterloo Waterloo, Ontario N2L 3G1, Canada [email protected] September 12,
Grade 6 Mathematics Performance Level Descriptors
Limited Grade 6 Mathematics Performance Level Descriptors A student performing at the Limited Level demonstrates a minimal command of Ohio s Learning Standards for Grade 6 Mathematics. A student at this
Equations Involving Lines and Planes Standard equations for lines in space
Equations Involving Lines and Planes In this section we will collect various important formulas regarding equations of lines and planes in three dimensional space Reminder regarding notation: any quantity
The program also provides supplemental modules on topics in geometry and probability and statistics.
Algebra 1 Course Overview Students develop algebraic fluency by learning the skills needed to solve equations and perform important manipulations with numbers, variables, equations, and inequalities. Students
ALGEBRA. sequence, term, nth term, consecutive, rule, relationship, generate, predict, continue increase, decrease finite, infinite
ALGEBRA Pupils should be taught to: Generate and describe sequences As outcomes, Year 7 pupils should, for example: Use, read and write, spelling correctly: sequence, term, nth term, consecutive, rule,
Numeracy Targets. I can count at least 20 objects
Targets 1c I can read numbers up to 10 I can count up to 10 objects I can say the number names in order up to 20 I can write at least 4 numbers up to 10. When someone gives me a small number of objects
7 Gaussian Elimination and LU Factorization
7 Gaussian Elimination and LU Factorization In this final section on matrix factorization methods for solving Ax = b we want to take a closer look at Gaussian elimination (probably the best known method
F.IF.7b: Graph Root, Piecewise, Step, & Absolute Value Functions
F.IF.7b: Graph Root, Piecewise, Step, & Absolute Value Functions F.IF.7b: Graph Root, Piecewise, Step, & Absolute Value Functions Analyze functions using different representations. 7. Graph functions expressed
Solving Quadratic Equations
9.3 Solving Quadratic Equations by Using the Quadratic Formula 9.3 OBJECTIVES 1. Solve a quadratic equation by using the quadratic formula 2. Determine the nature of the solutions of a quadratic equation
Grade 6 Math Circles. Binary and Beyond
Faculty of Mathematics Waterloo, Ontario N2L 3G1 The Decimal System Grade 6 Math Circles October 15/16, 2013 Binary and Beyond The cool reality is that we learn to count in only one of many possible number
Computational Geometry. Lecture 1: Introduction and Convex Hulls
Lecture 1: Introduction and convex hulls 1 Geometry: points, lines,... Plane (two-dimensional), R 2 Space (three-dimensional), R 3 Space (higher-dimensional), R d A point in the plane, 3-dimensional space,
Practice Book. Practice. Practice Book
Grade 10 Grade 10 Grade 10 Grade 10 Grade 10 Grade 10 Grade 10 Exam CAPS Grade 10 MATHEMATICS PRACTICE TEST ONE Marks: 50 1. Fred reads at 300 words per minute. The book he is reading has an average of
Which two rectangles fit together, without overlapping, to make a square?
SHAPE level 4 questions 1. Here are six rectangles on a grid. A B C D E F Which two rectangles fit together, without overlapping, to make a square?... and... International School of Madrid 1 2. Emily has
Data Structure [Question Bank]
Unit I (Analysis of Algorithms) 1. What are algorithms and how they are useful? 2. Describe the factor on best algorithms depends on? 3. Differentiate: Correct & Incorrect Algorithms? 4. Write short note:
Outline BST Operations Worst case Average case Balancing AVL Red-black B-trees. Binary Search Trees. Lecturer: Georgy Gimel farb
Binary Search Trees Lecturer: Georgy Gimel farb COMPSCI 220 Algorithms and Data Structures 1 / 27 1 Properties of Binary Search Trees 2 Basic BST operations The worst-case time complexity of BST operations
Graphing calculators Transparencies (optional)
What if it is in pieces? Piecewise Functions and an Intuitive Idea of Continuity Teacher Version Lesson Objective: Length of Activity: Students will: Recognize piecewise functions and the notation used
Lesson Plan. N.RN.3: Use properties of rational and irrational numbers.
N.RN.3: Use properties of rational irrational numbers. N.RN.3: Use Properties of Rational Irrational Numbers Use properties of rational irrational numbers. 3. Explain why the sum or product of two rational
1. A student followed the given steps below to complete a construction. Which type of construction is best represented by the steps given above?
1. A student followed the given steps below to complete a construction. Step 1: Place the compass on one endpoint of the line segment. Step 2: Extend the compass from the chosen endpoint so that the width
2. (a) Explain the strassen s matrix multiplication. (b) Write deletion algorithm, of Binary search tree. [8+8]
Code No: R05220502 Set No. 1 1. (a) Describe the performance analysis in detail. (b) Show that f 1 (n)+f 2 (n) = 0(max(g 1 (n), g 2 (n)) where f 1 (n) = 0(g 1 (n)) and f 2 (n) = 0(g 2 (n)). [8+8] 2. (a)
Linear Programming Notes V Problem Transformations
Linear Programming Notes V Problem Transformations 1 Introduction Any linear programming problem can be rewritten in either of two standard forms. In the first form, the objective is to maximize, the material
MA 408 Computer Lab Two The Poincaré Disk Model of Hyperbolic Geometry. Figure 1: Lines in the Poincaré Disk Model
MA 408 Computer Lab Two The Poincaré Disk Model of Hyperbolic Geometry Put your name here: Score: Instructions: For this lab you will be using the applet, NonEuclid, created by Castellanos, Austin, Darnell,
http://www.aleks.com Access Code: RVAE4-EGKVN Financial Aid Code: 6A9DB-DEE3B-74F51-57304
MATH 1340.04 College Algebra Location: MAGC 2.202 Meeting day(s): TR 7:45a 9:00a, Instructor Information Name: Virgil Pierce Email: [email protected] Phone: 665.3535 Teaching Assistant Name: Indalecio
CSC148 Lecture 8. Algorithm Analysis Binary Search Sorting
CSC148 Lecture 8 Algorithm Analysis Binary Search Sorting Algorithm Analysis Recall definition of Big Oh: We say a function f(n) is O(g(n)) if there exists positive constants c,b such that f(n)
8 Square matrices continued: Determinants
8 Square matrices continued: Determinants 8. Introduction Determinants give us important information about square matrices, and, as we ll soon see, are essential for the computation of eigenvalues. You
Extra Credit Assignment Lesson plan. The following assignment is optional and can be completed to receive up to 5 points on a previously taken exam.
Extra Credit Assignment Lesson plan The following assignment is optional and can be completed to receive up to 5 points on a previously taken exam. The extra credit assignment is to create a typed up lesson
CS104: Data Structures and Object-Oriented Design (Fall 2013) October 24, 2013: Priority Queues Scribes: CS 104 Teaching Team
CS104: Data Structures and Object-Oriented Design (Fall 2013) October 24, 2013: Priority Queues Scribes: CS 104 Teaching Team Lecture Summary In this lecture, we learned about the ADT Priority Queue. A
HW4: Merge Sort. 1 Assignment Goal. 2 Description of the Merging Problem. Course: ENEE759K/CMSC751 Title:
HW4: Merge Sort Course: ENEE759K/CMSC751 Title: Merge Sort Date Assigned: March 24th, 2009 Date Due: April 10th, 2009 11:59pm Contact: Fuat Keceli keceli (at) umd (dot) edu 1 Assignment Goal The final
Mathematical Induction. Lecture 10-11
Mathematical Induction Lecture 10-11 Menu Mathematical Induction Strong Induction Recursive Definitions Structural Induction Climbing an Infinite Ladder Suppose we have an infinite ladder: 1. We can reach
Section 1.1. Introduction to R n
The Calculus of Functions of Several Variables Section. Introduction to R n Calculus is the study of functional relationships and how related quantities change with each other. In your first exposure to
Vectors 2. The METRIC Project, Imperial College. Imperial College of Science Technology and Medicine, 1996.
Vectors 2 The METRIC Project, Imperial College. Imperial College of Science Technology and Medicine, 1996. Launch Mathematica. Type
Answer Key for California State Standards: Algebra I
Algebra I: Symbolic reasoning and calculations with symbols are central in algebra. Through the study of algebra, a student develops an understanding of the symbolic language of mathematics and the sciences.
The University of the State of New York REGENTS HIGH SCHOOL EXAMINATION MATHEMATICS B. Thursday, January 29, 2004 9:15 a.m. to 12:15 p.m.
The University of the State of New York REGENTS HIGH SCHOOL EXAMINATION MATHEMATICS B Thursday, January 9, 004 9:15 a.m. to 1:15 p.m., only Print Your Name: Print Your School s Name: Print your name and
1.3. DOT PRODUCT 19. 6. If θ is the angle (between 0 and π) between two non-zero vectors u and v,
1.3. DOT PRODUCT 19 1.3 Dot Product 1.3.1 Definitions and Properties The dot product is the first way to multiply two vectors. The definition we will give below may appear arbitrary. But it is not. It
3. Mathematical Induction
3. MATHEMATICAL INDUCTION 83 3. Mathematical Induction 3.1. First Principle of Mathematical Induction. Let P (n) be a predicate with domain of discourse (over) the natural numbers N = {0, 1,,...}. If (1)
PES Institute of Technology-BSC QUESTION BANK
PES Institute of Technology-BSC Faculty: Mrs. R.Bharathi CS35: Data Structures Using C QUESTION BANK UNIT I -BASIC CONCEPTS 1. What is an ADT? Briefly explain the categories that classify the functions
Mathematics. (www.tiwariacademy.com : Focus on free Education) (Chapter 5) (Complex Numbers and Quadratic Equations) (Class XI)
( : Focus on free Education) Miscellaneous Exercise on chapter 5 Question 1: Evaluate: Answer 1: 1 ( : Focus on free Education) Question 2: For any two complex numbers z1 and z2, prove that Re (z1z2) =
Computer Science 281 Binary and Hexadecimal Review
Computer Science 281 Binary and Hexadecimal Review 1 The Binary Number System Computers store everything, both instructions and data, by using many, many transistors, each of which can be in one of two
Why? A central concept in Computer Science. Algorithms are ubiquitous.
Analysis of Algorithms: A Brief Introduction Why? A central concept in Computer Science. Algorithms are ubiquitous. Using the Internet (sending email, transferring files, use of search engines, online
Analysis of Algorithms I: Optimal Binary Search Trees
Analysis of Algorithms I: Optimal Binary Search Trees Xi Chen Columbia University Given a set of n keys K = {k 1,..., k n } in sorted order: k 1 < k 2 < < k n we wish to build an optimal binary search
Automata and Formal Languages
Automata and Formal Languages Winter 2009-2010 Yacov Hel-Or 1 What this course is all about This course is about mathematical models of computation We ll study different machine models (finite automata,
Connections Across Strands Provides a sampling of connections that can be made across strands, using the theme (fractions) as an organizer
Overview Context Connections Positions fractions in a larger context and shows connections to everyday situations, careers, and tasks Identifies relevant manipulatives, technology, and web-based resources
Class Overview. CSE 326: Data Structures. Goals. Goals. Data Structures. Goals. Introduction
Class Overview CSE 326: Data Structures Introduction Introduction to many of the basic data structures used in computer software Understand the data structures Analyze the algorithms that use them Know
Unit 6 Direction and angle
Unit 6 Direction and angle Three daily lessons Year 4 Spring term Unit Objectives Year 4 Recognise positions and directions: e.g. describe and find the Page 108 position of a point on a grid of squares
Research Tools & Techniques
Research Tools & Techniques for Computer Engineering Ron Sass http://www.rcs.uncc.edu/ rsass University of North Carolina at Charlotte Fall 2009 1/ 106 Overview of Research Tools & Techniques Course What
Accentuate the Negative: Homework Examples from ACE
Accentuate the Negative: Homework Examples from ACE Investigation 1: Extending the Number System, ACE #6, 7, 12-15, 47, 49-52 Investigation 2: Adding and Subtracting Rational Numbers, ACE 18-22, 38(a),
Dynamic Programming Problem Set Partial Solution CMPSC 465
Dynamic Programming Problem Set Partial Solution CMPSC 465 I ve annotated this document with partial solutions to problems written more like a test solution. (I remind you again, though, that a formal
15 Prime and Composite Numbers
15 Prime and Composite Numbers Divides, Divisors, Factors, Multiples In section 13, we considered the division algorithm: If a and b are whole numbers with b 0 then there exist unique numbers q and r such
The Prime Numbers. Definition. A prime number is a positive integer with exactly two positive divisors.
The Prime Numbers Before starting our study of primes, we record the following important lemma. Recall that integers a, b are said to be relatively prime if gcd(a, b) = 1. Lemma (Euclid s Lemma). If gcd(a,
Introduction to Programming System Design. CSCI 455x (4 Units)
Introduction to Programming System Design CSCI 455x (4 Units) Description This course covers programming in Java and C++. Topics include review of basic programming concepts such as control structures,
Chapter 3. Cartesian Products and Relations. 3.1 Cartesian Products
Chapter 3 Cartesian Products and Relations The material in this chapter is the first real encounter with abstraction. Relations are very general thing they are a special type of subset. After introducing
FACTORING QUADRATICS 8.1.1 and 8.1.2
FACTORING QUADRATICS 8.1.1 and 8.1.2 Chapter 8 introduces students to quadratic equations. These equations can be written in the form of y = ax 2 + bx + c and, when graphed, produce a curve called a parabola.
CHAPTER 5 Round-off errors
CHAPTER 5 Round-off errors In the two previous chapters we have seen how numbers can be represented in the binary numeral system and how this is the basis for representing numbers in computers. Since any
Pseudo code Tutorial and Exercises Teacher s Version
Pseudo code Tutorial and Exercises Teacher s Version Pseudo-code is an informal way to express the design of a computer program or an algorithm in 1.45. The aim is to get the idea quickly and also easy
CSCI 1301: Introduction to Computing and Programming Summer 2015 Project 1: Credit Card Pay Off
CSCI 1301: Introduction to Computing and Programming Summer 2015 Project 1: Credit Card Pay Off Introduction This project will allow you to apply your knowledge of variables, assignments, expressions,
Analysis of a Search Algorithm
CSE 326 Lecture 4: Lists and Stacks 1. Agfgd 2. Dgsdsfd 3. Hdffdsf 4. Sdfgsfdg 5. Tefsdgass We will review: Analysis: Searching a sorted array (from last time) List ADT: Insert, Delete, Find, First, Kth,
Current Standard: Mathematical Concepts and Applications Shape, Space, and Measurement- Primary
Shape, Space, and Measurement- Primary A student shall apply concepts of shape, space, and measurement to solve problems involving two- and three-dimensional shapes by demonstrating an understanding of:
Randomized algorithms
Randomized algorithms March 10, 2005 1 What are randomized algorithms? Algorithms which use random numbers to make decisions during the executions of the algorithm. Why would we want to do this?? Deterministic
Shortest Inspection-Path. Queries in Simple Polygons
Shortest Inspection-Path Queries in Simple Polygons Christian Knauer, Günter Rote B 05-05 April 2005 Shortest Inspection-Path Queries in Simple Polygons Christian Knauer, Günter Rote Institut für Informatik,
1 Review of Least Squares Solutions to Overdetermined Systems
cs4: introduction to numerical analysis /9/0 Lecture 7: Rectangular Systems and Numerical Integration Instructor: Professor Amos Ron Scribes: Mark Cowlishaw, Nathanael Fillmore Review of Least Squares
Common Core Unit Summary Grades 6 to 8
Common Core Unit Summary Grades 6 to 8 Grade 8: Unit 1: Congruence and Similarity- 8G1-8G5 rotations reflections and translations,( RRT=congruence) understand congruence of 2 d figures after RRT Dilations
In this section, you will develop a method to change a quadratic equation written as a sum into its product form (also called its factored form).
CHAPTER 8 In Chapter 4, you used a web to organize the connections you found between each of the different representations of lines. These connections enabled you to use any representation (such as a graph,
ALGORITHMS AND FLOWCHARTS. By Miss Reham Tufail
ALGORITHMS AND FLOWCHARTS By Miss Reham Tufail ALGORITHMS AND FLOWCHARTS A typical programming task can be divided into two phases: Problem solving phase produce an ordered sequence of steps that describe
CHAPTER 5. Number Theory. 1. Integers and Division. Discussion
CHAPTER 5 Number Theory 1. Integers and Division 1.1. Divisibility. Definition 1.1.1. Given two integers a and b we say a divides b if there is an integer c such that b = ac. If a divides b, we write a
Mathematics standards
Mathematics standards Grade 6 Summary of students performance by the end of Grade 6 Reasoning and problem solving Students represent and interpret routine and non-routine mathematical problems in a range
Analysis of Binary Search algorithm and Selection Sort algorithm
Analysis of Binary Search algorithm and Selection Sort algorithm In this section we shall take up two representative problems in computer science, work out the algorithms based on the best strategy to
Unit 8 Angles, 2D and 3D shapes, perimeter and area
Unit 8 Angles, 2D and 3D shapes, perimeter and area Five daily lessons Year 6 Spring term Recognise and estimate angles. Use a protractor to measure and draw acute and obtuse angles to Page 111 the nearest
SMT 2014 Algebra Test Solutions February 15, 2014
1. Alice and Bob are painting a house. If Alice and Bob do not take any breaks, they will finish painting the house in 20 hours. If, however, Bob stops painting once the house is half-finished, then the
Math Placement Test Study Guide. 2. The test consists entirely of multiple choice questions, each with five choices.
Math Placement Test Study Guide General Characteristics of the Test 1. All items are to be completed by all students. The items are roughly ordered from elementary to advanced. The expectation is that
6.4 Normal Distribution
Contents 6.4 Normal Distribution....................... 381 6.4.1 Characteristics of the Normal Distribution....... 381 6.4.2 The Standardized Normal Distribution......... 385 6.4.3 Meaning of Areas under
1. Define: (a) Variable, (b) Constant, (c) Type, (d) Enumerated Type, (e) Identifier.
Study Group 1 Variables and Types 1. Define: (a) Variable, (b) Constant, (c) Type, (d) Enumerated Type, (e) Identifier. 2. What does the byte 00100110 represent? 3. What is the purpose of the declarations
The Set Data Model CHAPTER 7. 7.1 What This Chapter Is About
CHAPTER 7 The Set Data Model The set is the most fundamental data model of mathematics. Every concept in mathematics, from trees to real numbers, is expressible as a special kind of set. In this book,
8 th Grade Task 2 Rugs
8 th Grade Task 2 Rugs Student Task Core Idea 4 Geometry and Measurement Find perimeters of shapes. Use Pythagorean theorem to find side lengths. Apply appropriate techniques, tools and formulas to determine
A Concrete Introduction. to the Abstract Concepts. of Integers and Algebra using Algebra Tiles
A Concrete Introduction to the Abstract Concepts of Integers and Algebra using Algebra Tiles Table of Contents Introduction... 1 page Integers 1: Introduction to Integers... 3 2: Working with Algebra Tiles...
The Tower of Hanoi. Recursion Solution. Recursive Function. Time Complexity. Recursive Thinking. Why Recursion? n! = n* (n-1)!
The Tower of Hanoi Recursion Solution recursion recursion recursion Recursive Thinking: ignore everything but the bottom disk. 1 2 Recursive Function Time Complexity Hanoi (n, src, dest, temp): If (n >
Geometric Transformations
Geometric Transformations Definitions Def: f is a mapping (function) of a set A into a set B if for every element a of A there exists a unique element b of B that is paired with a; this pairing is denoted
(67902) Topics in Theory and Complexity Nov 2, 2006. Lecture 7
(67902) Topics in Theory and Complexity Nov 2, 2006 Lecturer: Irit Dinur Lecture 7 Scribe: Rani Lekach 1 Lecture overview This Lecture consists of two parts In the first part we will refresh the definition
Lecture 3: Finding integer solutions to systems of linear equations
Lecture 3: Finding integer solutions to systems of linear equations Algorithmic Number Theory (Fall 2014) Rutgers University Swastik Kopparty Scribe: Abhishek Bhrushundi 1 Overview The goal of this lecture
Section IV.1: Recursive Algorithms and Recursion Trees
Section IV.1: Recursive Algorithms and Recursion Trees Definition IV.1.1: A recursive algorithm is an algorithm that solves a problem by (1) reducing it to an instance of the same problem with smaller
4. How many integers between 2004 and 4002 are perfect squares?
5 is 0% of what number? What is the value of + 3 4 + 99 00? (alternating signs) 3 A frog is at the bottom of a well 0 feet deep It climbs up 3 feet every day, but slides back feet each night If it started
Florida Math for College Readiness
Core Florida Math for College Readiness Florida Math for College Readiness provides a fourth-year math curriculum focused on developing the mastery of skills identified as critical to postsecondary readiness
