Common Mistakes. Quick sort. Only choosing one pivot per iteration. At each iteration, one pivot per sublist should be chosen.

Similar documents
Decision Mathematics practice paper

Decision Mathematics D1 Advanced/Advanced Subsidiary. Friday 17 May 2013 Morning Time: 1 hour 30 minutes

Decision Mathematics D1

Dijkstra s Algorithm (5/9/2013)

Taxicab Geometry Part II Meeting 3

Mark Scheme (Results) Summer GCE Decision D1 (6689) Paper 1

and 6.855J. Network Simplex Animations

Regents Exam Questions by Topic Page 1 TOOLS OF GEOMETRY: Constructions NAME:

UNIT 1 SIMILARITY, CONGRUENCE, AND PROOFS Lesson 2: Constructing Lines, Segments, and Angles Instruction

MIDTERM REVIEW INDU 421 (Fall 2013)

NANYANG TECHNOLOGICAL UNIVERSITY SEMESTER II EXAMINATION MH1301 DISCRETE MATHEMATICS. Time Allowed: 2 hours

CONSTRUCTION #1: Segment Copy

(Geometry) Academic Standard: TLW use appropriate tools to perform basic geometric constructions.

Geometry SOL G.4 Constructions Name Date Block. Constructions

Math 152: Applicable Mathematics and Computing

Past questions from the last 6 years of exams for programming 101 with answers.

A Level Computer Science H446/02 Algorithms and programming. Practice paper - Set 1. Time allowed: 2 hours 30 minutes

Geometry Final Exam Review 2012 #

Foundations of Distributed Systems: Tree Algorithms

Universal Cycles for Permutations Theory and Applications

ILLUSION CONFUSION! - MEASURING LINES -

2. Here are some triangles. (a) Write down the letter of the triangle that is. right-angled, ... (ii) isosceles. ... (2)

Coding for Efficiency

Finite Mathematical Structures A

Edexcel. Decision Mathematics 1

7th Grade Drawing Geometric Figures

Math 3 Geogebra Discovery - Equidistance Decemeber 5, 2014

Examination paper for TDT4120 Algorithms and Data Structures

Table of Contents Problem Solving with the Coordinate Plane

9.3 Properties of Chords

Informed search algorithms. Chapter 3 (Based on Slides by Stuart Russell, Richard Korf, Subbarao Kambhampati, and UW-AI faculty)

Materials: Computer lab or set of calculators equipped with Cabri Geometry II and lab worksheet.

Geometry Unit 3 Note Sheets Date Name of Lesson. Slopes of Lines. Partitioning a Segment. Equations of Lines. Quiz

Year 10 Practical Assessment Skills Lesson 1 Results tables and Graph Skills

1 Robot Axis and Movement

3. Given the similarity transformation shown below; identify the composition:

A Historical Example One of the most famous problems in graph theory is the bridges of Konigsberg. The Real Koningsberg

Previous Lecture. How can computation sort data faster for you? Sorting Algorithms: Speed Comparison. Recursive Algorithms 10/31/11

Extra Practice 1. Name Date. Lesson 8.1: Parallel Lines. 1. Which line segments are parallel? How do you know? a) b) c) d)

DATE PERIOD. Lesson Reading Guide. Line and Angle Relationships

5. Suppose the points of a scatterplot lie close to the line 3x + 2y = 6. The slope of this line is: A) 3. B) 2/3. C) 3/2. D) 3/2.

Constructions. Learning Intention: By If you use 1 litre of orange, you will use 4 litres of water (1:4).

Decision Mathematics D2 Advanced/Advanced Subsidiary. Thursday 6 June 2013 Morning Time: 1 hour 30 minutes

Slopes of Lines Notes What is slope?

Link State Routing. Stefano Vissicchio UCL Computer Science CS 3035/GZ01

Objective: Use a compass and straight edge to construct congruent segments and angles.

Physical Synthesis of Bus Matrix for High Bandwidth Low Power On-chip Communications

TOURNAMENT ROUND. Round 1

Counting Things Solutions

TUESDAY, 8 NOVEMBER 2016 MORNING 1 hour 45 minutes

Link State Routing. Brad Karp UCL Computer Science. CS 3035/GZ01 3 rd December 2013

Objective: Use a compass and straight edge to construct congruent segments and angles.

TImath.com. Geometry. Perspective Drawings

Downloaded from

UMBC 671 Midterm Exam 19 October 2009

Lectures: Feb 27 + Mar 1 + Mar 3, 2017

UNIT 1 GEOMETRY. (revision from 1 st ESO) Unit 8 in our books

Technical Drawing Paper 1 - Higher Level (Plane and Solid Geometry)

Design & Communication Graphics Ordinary Level Section A (60 Marks)

Mohr-Mascheroni theorem

physicsandmathstutor.com

The problems in this booklet are organized into strands. A problem often appears in multiple strands. The problems are suitable for most students in

Outline. Tracking with Unreliable Node Sequences. Abstract. Outline. Outline. Abstract 10/20/2009

Constructions. Unit 9 Lesson 7

Geometric Puzzle Medley

Paper 1. Calculator not allowed. Mathematics test. First name. Last name. School. Remember KEY STAGE 3 TIER 6 8. satspapers.org

Graphs of Tilings. Patrick Callahan, University of California Office of the President, Oakland, CA

The University of the State of New York REGENTS HIGH SCHOOL EXAMINATION GEOMETRY. Wednesday, January 29, :15 a.m. to 12:15 p.m.

By now you should be able to explain the meaning of the following:

Solutions of problems for grade R5

Mathematics (JUN11MD0201) General Certificate of Education Advanced Level Examination June Unit Decision TOTAL.

How can we organize our data? What other combinations can we make? What do we expect will happen? CPM Materials modified by Mr.

3.3. You wouldn t think that grasshoppers could be dangerous. But they can damage

3-5 Slopes of Lines. Warm Up Lesson Presentation Lesson Quiz. Holt McDougal Geometry

Network Layer (Routing)

A C E. Answers Investigation 3. Applications. 12, or or 1 4 c. Choose Spinner B, because the probability for hot dogs on Spinner A is

Properties of Chords

1. When sketching long, narrow objects in OBLIQUE, distortion can be lessened by placing the long dimension along:

Heuristics, and what to do if you don t know what to do. Carl Hultquist

CS256 Applied Theory of Computation

UNDERSTAND SIMILARITY IN TERMS OF SIMILARITY TRANSFORMATIONS

Lecture 20: Combinatorial Search (1997) Steven Skiena. skiena

Optimisation and Operations Research

17. Symmetries. Thus, the example above corresponds to the matrix: We shall now look at how permutations relate to trees.

Question Score Max Cover Total 149

MATHEMATICS: PAPER II

CS 787: Advanced Algorithms Homework 1

Planes, Tetrahedra, and Cross Sections

CELIA SCHAHCZENSKI. FE Exam Review Computers Oct. 18, 2018

1-2 Measuring and Constructing Segments. Holt Geometry

COMP Online Algorithms. Paging and k-server Problem. Shahin Kamali. Lecture 11 - Oct. 11, 2018 University of Manitoba

Day 26 Bellringer. 1. Given that the pair of lines intersected by the transversal are parallel, find the value of the x in the following figures.

Algorithms and Data Structures: Network Flows. 24th & 28th Oct, 2014

2010 Pascal Contest (Grade 9)

Lesson 10: Unknown Angle Proofs Proofs with Constructions

the question of whether computers can think is like the question of whether submarines can swim -- Dijkstra

Lesson 1: Scale Drawings

p-percent Coverage in Wireless Sensor Networks

The problems in this booklet are organized into strands. A problem often appears in multiple strands. The problems are suitable for most students in

Approximation Algorithms for Conflict-Free Vehicle Routing

Transcription:

Common Mistakes Examples of typical mistakes Correct version Quick sort Only choosing one pivot per iteration. At each iteration, one pivot per sublist should be chosen. e.g. Use a quick sort to sort the following data into ascending order. 3, 5, 7, 2, 6, 4, 1, 9, 8, First pivot is 6 3, 5, 2, 1, 4, 6 7, 9, 8 giving list 1 { 3, 5, 2, 1, 4} and list 2 {7, 9, 8} pivot for list 1 is 2 giving list 3 {1} and list 4 {3, 5, 4} and so on separating the sort into individual lists and usually dealing with all the left hand lists before moving on to the right hand lists. First pivot is 6 3, 5, 2, 1, 4, 6, 7, 9, 8 Choosing one pivot in each sublist 2 and 9 1, 2 3, 5, 4, 6, 7, 8, 9 Choosing one pivot in each sublist 1, 5 and 8 1, 2, 3, 4, 5, 6 7, 8, 9 and so on. Not selecting a pivot if the numbers in the sublist are already in the correct order. e.g. Use a quick sort to sort the following data into ascending order. 3, 4, 6, 7, 5, 9 The first pivot is 6 List is in order so stop. 3, 4, 6, 7, 5, 9 The first pivot is 6 Choosing one pivot in each sublist 4 and 9 choosing one pivot in each sublist 3, 5 and 7. All pivots chosen, the list is in order so stop. Binary search Forgetting to discard the pivot as well as half of the list. e.g. Locate the name Smith in the following list 1) Brown 2) Davies 3) Hall 1

1 5 First pivot is 3 2 Hall reject top of list. 3) Hall 3 5 4 2 Jones reject top of list 1 5 First pivot is 3 2 Hall reject, pivot and top of list. 4 5 5 2 Smith, name found. 4 5 5 2 Smith, name found. Bin packing Forgetting to offer later items to bin 1 first then bin 2 and so on. e.g. Put the data below into bins of size 10 using the first fit algorithm. 7, 8, 2, 3 Bin 1: 7 + 3 Bin 2: 8 + 2 Minimum Connector (Minimum Spanning Tree) The 7 and 8 are correctly placed, but the third number, 2, should have been placed in bin 1, giving Bin 1 : 7 + 2 Bin 2 : 8 Bin 3 : 3 Forgetting to state which arcs have been rejected when using Kruskal. e.g. Use Kruskal s algorithm to find a minimum spanning tree for the network below. Arcs: AB, DF, AC, EF, CD Arcs: AB, DF, AC, EF, reject BC, reject DE, CD. 2

In Prim s algorithm, only considering vertices connected to the last vertex added to the tree. e.g. Use Prim s algorithm, starting at A, to find a minimum connector for the network above. Draw your tree. AB, BC, CD, DF, FE AB, AC, CD, DF, FE. Dijsktra s algorithm When a vertex has been given its final label, all vertices directly connected to it, no matter where they are, should be given a working value. So the algorithm reaches out from one vertex to the other vertices. The error some candidates make is to not record any working values until the vertices on the left have been completed and then to look at what feeds into the next vertex. e.g. Use Dijkstra s algorithm to find the shortest route from S to B, use the diagram below to make your working clear. Shortest route is S A C B length 6. Shortest route is S A B length 7. 3

Route Inspection (Chinese postman) If there are four odd nodes, all possible pairings of those four nodes must be considered, not just the more likely ones. (Remember the diagram is not drawn to scale!) e.g. Use the Chinese postman algorithm to find the length of the shortest inspection route for the network below. AB + CD = 25 + 90 = 115 AC + BD = 67 + 34 = 101 AD + BC = 52 + 60 = 112 So length is 328 + 101 = 429 m So length is 328 + 115 = 443 m Critical Path Analysis The critical activities have zero total float. They do go from double domino to double domino but this alone is not enough to pick out the critical activities. e.g. State the critical activities from the activity network below. Critical activities are A and D. 4

Critical activities are A, C and D because they go from double to double. Graphical Linear Programming Straight lines must be drawn with a ruler. The lines should be labelled. Lines such as x = 2y are often drawn as y = 2x. Don t forget the non-negativity constraints. If the objective line method is used, an objective line needs to drawn on the graph. Matchings The alternating path must both start, and finish, at an unmatched vertex. The change status step must be clearly shown. 5