# 1. Sorting (assuming sorting into ascending order) a) BUBBLE SORT

Save this PDF as:

Size: px
Start display at page:

## Transcription

1 DECISION 1 Revision Notes 1. Sorting (assuming sorting into ascending order) a) BUBBLE SORT Make sure you show comparisons clearly and label each pass First Pass Second Pass Third Pass Fouth Pass b) SHUTTLE SORT Step 1 Compare first two numbers. If the smaller number is on the right, swap the two numbers write the remainder of the list. Step 2 Move one step forwards in the list and compare the two numbers. If the smaller is on the right swap the two numbers write the remainder of the list Step 3 Repeat Step 2 until the two numbers on the extreme right have been compared, this completes the FIRST PASS. Step 4 SECOND PASS repeat Step 1 3 but no need to compare last 2 in the list (final place already sorted) Step 5 THIRD PASS repeat Step 1 3 but no need to compare last 3 places as last 2 already sorted..etc STOP when a complete pass produces no swaps show this! Make sure you show comparisons clearly and label each pass First Pass Second Pass Third Pass (no swap) Fourth Pass SHUTTLE-SORT First Pass Compare first two numbers swap if necessary rewrite the remainder of the list. Second Pass Compare second and third number swap if necessary rewrite the remainder of the list. Now compare the first two numbers swap if necessary and re-write the list.if not swap needed start the next pass. Final Pass The pass which starts by comparing the second to last and last numbers. Make sure you complete the pass indicating comparisons made. BUBBLE AND SHUTTLE For a list of n numbers the list will definitely be sorted after the (n-1) th pass Maximum number of comparisons/swaps = n(n 1) 2 Shuttle can be more efficient than bubble as pass stops when no swap needed.

2 c) SHELL SORT This is the one which involving splitting the lists into groups sorting the groups merging the groups and splitting the lists again into smaller groups the final step is to shuttle sort the last grouping which involves all elements in the list. Step 1 For a list of n values work out INT(n/2) = m divide the list into m subgroups. Step 2 Shuttle sort each subgroup you may need to keep a record of comparisons/swaps but jut rewrite each subgroup in order. Merge the groups to form 1 list again Step 3 Work out INT(m/2) = divide the list into this many subgroup shuttle sort groups and merge Continue until groups size = 1 and shuttle sort the complete list. To gain full marks it is not necessary to show the individual passes of the Shuttle see opposite INT(8/2) = groups INT(4/2) = groups INT(2/2) = Take care with odd numbers INT(9/2) = 4 d) QUICK SORT Take care with notation -underline PIVOT value in list -box in pivot value in resorted list - once boxed the value stays boxed until the end Step 1 Underline the first value in the list (PIVOT) rewrite the list so that any values smaller than this are to the left - keep the original order of the values (see opposite) Step 2 Draw a box around the pivot your list is now split into two groups repeat step 1 choosing the fist value in the LHS as the pivot and then repeat for the RHS. Continue until none of the sublists have more than 2 numbers (eg. No more than 1 unused value between pivots) Pivot chosen Pivot used R K W D P L A K D P L A R W D A K P L R W A D K P L R W A D K L P R W 2. Algorithms Tracing an algorithm means showing how the variables change value as the computer would run through the program List the variables used (in the order they are introduced) as column headings in a table If the PRINT command is used write clearly PRINT : and list the words/values the computer would print Watch out for INEQUALITLES - less than or less than or equal to When you think you have finished tracing start again and check the values you have listed particularly the last ones to make sure you didn t need to repeat again. If you are asked to state the purpose of the algorithm try to use correct mathematical terms Division quotient and remainder Square Numbers/Square roots

3 Factors Multiples Integer values /Roots If you are asked to state values of the variables for which the algorithm would fail you will usually need to state inequalities If you are asked to change/add additional commands to the algorithm make sure you give the line an appropriate number. 3. Graphs definitions Node / Vertex usually represent places - Degree / Order number of edges at the node loop Order 4 Order 2 Arc / Edges represent roads / pipes / cables - Digraph if one or more of the edges has direction one way Connected Graph it is possible to get from any node to another not necessarily a direct route Complete Graph (K n ) - there is a direct route between any 2 nodes/vertices Number of edges in K n = n(n 1) 2 K 4 K 4 drawn as a PLANAR graph (no edges crossing) Hamilton Cycle visits every vertex once (and only once apart from the first/last vertex)) starts and finished at the same vertex does not use any edges more than once (does not need to include every edge) n nodes (n -1)!/2 Hamilton cycles - undirected network Eulerian Graph traversable possible to draw without lifting pen - the degree/order of all of the nodes are even The complete graph K n is Eulerian if n is odd 4. MINIMUM SPANNING TREES KRUSKALS or PRIMS n nodes the minimum span tree will have n 1 edges - always a good idea to draw out your chosen minimum spanning tree - clearly state it s minimum weight B e.g. Minimum weight = 28 m KRUSKALS 1) List the edges in ascending order of size/weight A 2) Choose the smallest edge 3) Choose the next smallest edge 4) Keep selecting edges in order of size but ignore any that would make a loop. D C E

4 List the edges as you choose them with their weights + draw the tree as you work AD: 4 A D CF : 7 either order E CB : 7 FE : 8 B AC : 11 TOTAL = 37 C Disadvantage : difficult to do from a matrix (table) F GREEDY ALGORITHM at each stage you make the most obviously advantageous choice without thinking ahead PRIMS From a graph 1) Choose the smallest edge (or the starting point given) 2) Find the smallest edge that is joined to your first choice edge 3) You can only choose edges that connect to the tree already drawn always choose the smallest available UNLESS it forms a loop 4) Continue until all the nodes are connected List the edges as you choose them with their weights + draw the tree as you work From a Table 1) Choose a starting vertex and delete all elements in that vertex s row and highlight its column 2) Neglecting all deleted terms, scan all highlighted columns for the lowest available element and circle that element 3) Delete the circled element s row and highlight its column 4) Repeat steps 2 and 3 until all rows deleted 5) The spanning tree is formed by the circled arcs Workings -Full and clear workings shown in a table -List of the edges chosen, in the order chosen, with their weights -diagram of minimum tree - the minimum total weight

6 6. Travelling Salesman (Upper and Lower Bounds) Hamilton Cycle a tour/route which contains every vertex exactly once for small numbers of nodes may be possible to list the hamilton cycles but no algorithm (n-1)! different cycles for n nodes instead we use Upper and Lower bounds Lower bound - delete one of the vertices (often told which one) -find a minimum spanning tree (Kruskals or Prims) for the remaining vertices -add to the spanning tree to weights of the two smallest edges from the deleted vertex You may need to repeat this for all vertices-the biggest answer is the best LOWER BOUND Likely to be single nodes in the Lower Bound solution therefore unlikely to be the optimal solution as a complete tour would not be possible using the edges used. Upper bound (Nearest Neighbour) (You may need to complete a matrix to show the shortest distance between pairs of nodes) - choose a starting node (may be given in the question) -join this node to the nearest node - continue - join your new node to the nearest node (as long as it hasn t already been used) when you have included all nodes join the last node you picked back to the start If working from a table circle the edges chosen and delete the rest of the row and column do not confuse with PRIMS - you can only choose from the current column not previous ones used LIST the edges in the order they were chosen and their weights The TOTAL of the weights is the UPPER BOUND Upper bound is often a tour which may be improved on Nearest Neighbour is a HEURISTIC Algorithm will give a satisfactory solutions but not necessarily the optimal You may need to repeat this for all vertices-the smallest answer is the best UPPER BOUND When stating the possible length of the optimal solution make sure you use not just < You have found the optimum solution if Upper bound = Lower Bound 7. Matchings Bipartite graph has 2 distinct sets of vertices (no edges within the group of vertices) MATCHING one or more edge connecting a vertex in one group to a vertex in the other a vertex can only be used once COMPLETE MATCHING matches every vertex in one group to one in the second group MAXIMAL MATCHING is one where that uses the greatest possible number of edges (complete is always maximal) To improve a matching (find a maximal matching) - Always start with the initial matching (usually given in the question) -Start with an unmatched node in the LHS - Move to RHS along and edge NOT in INITIAL MATCHING -Move back to LHS along and edge IN the INITIAL MATCHING - Continue until you reach an unmatched vertex in the RHS

7 Initial Matching : A-G, B-M, C-H, D-S Solution Include edges in alternating but not in initial Alternating Path: F A + G C + H - E AF,CG, EH Include edges in initial but not in alternating BM, DS You may need to repeat the process more than once if you haven t found a maximal matching investigate different starting points if more than one unmatched vertex in the LHS 9. LINEAR PROGRAMMING The inequalities - identify the variables to use in your inequalities question may state x is.and y is. - it may help you to make a table with x and y as column headings and the factors needed as the row headings with their totals shown at the end of the rows) - check for the word integer in the question often for the inequalities - state clearly the objective function what you are trying to maximise or minimise - don t forget the inequalities for the lower limits of x and y e.g x 0, y 3 - make sure you use the same units throughout (e.g, kg ) The graph - label you axes clearly - label the lines and you plot them - shade out the area you cannot use don t forget to shade below the axes if necessary. - plot the objective function label this Finding the optimal solution - if maximising look for point further away from origin and objective line moves out of feasible region - if minimising look for point closest to origin - use simultaneous equations to calculate the (x,y) at the vertex being investigated - calculate the value of the objective function using this x and y - if integer solutions needed (use your common sense) investigate points in the feasible region near the initial vertex chosen TAKE CARE with questions involving percentages if an inequality involves 40% of the total produced your inequality should involve 0.4(x + y) If you have to find the lines defining the Feasible Region use the equation y = mx + c to work out the equations of the lines plotted (m is the gradient and c is the y intercept)

### MATHEMATICS Unit Decision 1

General Certificate of Education January 2008 Advanced Subsidiary Examination MATHEMATICS Unit Decision 1 MD01 Tuesday 15 January 2008 9.00 am to 10.30 am For this paper you must have: an 8-page answer

### The number of marks is given in brackets [ ] at the end of each question or part question. The total number of marks for this paper is 72.

ADVANCED SUBSIDIARY GCE UNIT 4736/01 MATHEMATICS Decision Mathematics 1 THURSDAY 14 JUNE 2007 Afternoon Additional Materials: Answer Booklet (8 pages) List of Formulae (MF1) Time: 1 hour 30 minutes INSTRUCTIONS

### Decision Mathematics D1 Advanced/Advanced Subsidiary. Tuesday 5 June 2007 Afternoon Time: 1 hour 30 minutes

Paper Reference(s) 6689/01 Edexcel GCE Decision Mathematics D1 Advanced/Advanced Subsidiary Tuesday 5 June 2007 Afternoon Time: 1 hour 30 minutes Materials required for examination Nil Items included with

### MATHEMATICS Unit Decision 1

General Certificate of Education June 2007 Advanced Subsidiary Examination MATHEMATICS Unit Decision 1 MD01 Thursday 7 June 2007 9.00 am to 10.30 am For this paper you must have: an 8-page answer book

### MATHEMATICS 4736 Decision Mathematics 1

ADVANCED SUBSIDIARY GCE MATHEMATICS 4736 Decision Mathematics 1 QUESTION PAPER Candidates answer on the Printed Answer Book OCR Supplied Materials: Printed Answer Book 4736 List of Formulae (MF1) Other

### Graph Theory. Euler tours and Chinese postmen. John Quinn. Week 5

Graph Theory Euler tours and Chinese postmen John Quinn Week 5 Recap: connectivity Connectivity and edge-connectivity of a graph Blocks Kruskal s algorithm Königsberg, Prussia The Seven Bridges of Königsberg

### MATHEMATICS Unit Decision 1

General Certificate of Education January 2007 Advanced Subsidiary Examination MATHEMATICS Unit Decision 1 MD01 Tuesday 16 January 2007 9.00 am to 10.30 am For this paper you must have: an 8-page answer

### EdExcel Decision Mathematics 1

EdExcel Decision Mathematics 1 Linear Programming Section 1: Formulating and solving graphically Notes and Examples These notes contain subsections on: Formulating LP problems Solving LP problems Minimisation

### Decision Mathematics 1 TUESDAY 22 JANUARY 2008

ADVANCED SUBSIDIARY GCE 4736/01 MATHEMATICS Decision Mathematics 1 TUESDAY 22 JANUARY 2008 Additional materials: Answer Booklet (8 pages) Graph paper Insert for Questions 3 and 4 List of Formulae (MF1)

### 2.3 Scheduling jobs on identical parallel machines

2.3 Scheduling jobs on identical parallel machines There are jobs to be processed, and there are identical machines (running in parallel) to which each job may be assigned Each job = 1,,, must be processed

### The TSP is a special case of VRP, which means VRP is NP-hard.

49 6. ROUTING PROBLEMS 6.1. VEHICLE ROUTING PROBLEMS Vehicle Routing Problem, VRP: Customers i=1,...,n with demands of a product must be served using a fleet of vehicles for the deliveries. The vehicles,

### Decision Mathematics D1. Advanced/Advanced Subsidiary. Friday 12 January 2007 Morning Time: 1 hour 30 minutes. D1 answer book

Paper Reference(s) 6689/01 Edexcel GCE Decision Mathematics D1 Advanced/Advanced Subsidiary Friday 12 January 2007 Morning Time: 1 hour 30 minutes Materials required for examination Nil Items included

### Homework 15 Solutions

PROBLEM ONE (Trees) Homework 15 Solutions 1. Recall the definition of a tree: a tree is a connected, undirected graph which has no cycles. Which of the following definitions are equivalent to this definition

### Chapter There are non-isomorphic rooted trees with four vertices. Ans: 4.

Use the following to answer questions 1-26: In the questions below fill in the blanks. Chapter 10 1. If T is a tree with 999 vertices, then T has edges. 998. 2. There are non-isomorphic trees with four

### COLORED GRAPHS AND THEIR PROPERTIES

COLORED GRAPHS AND THEIR PROPERTIES BEN STEVENS 1. Introduction This paper is concerned with the upper bound on the chromatic number for graphs of maximum vertex degree under three different sets of coloring

### Example 5.5. The heuristics are demonstrated with this example of n=5 vertices and distances in the following matrix:

39 5.3. HEURISTICS FOR THE TSP Notation: f = length of the tour given by the algortihm a f = length of the optimal tour min Most of the following heuristics are designed to solve symmetric instances of

### GRAPH THEORY and APPLICATIONS. Trees

GRAPH THEORY and APPLICATIONS Trees Properties Tree: a connected graph with no cycle (acyclic) Forest: a graph with no cycle Paths are trees. Star: A tree consisting of one vertex adjacent to all the others.

### IE 680 Special Topics in Production Systems: Networks, Routing and Logistics*

IE 680 Special Topics in Production Systems: Networks, Routing and Logistics* Rakesh Nagi Department of Industrial Engineering University at Buffalo (SUNY) *Lecture notes from Network Flows by Ahuja, Magnanti

### Approximation Algorithms

Approximation Algorithms or: How I Learned to Stop Worrying and Deal with NP-Completeness Ong Jit Sheng, Jonathan (A0073924B) March, 2012 Overview Key Results (I) General techniques: Greedy algorithms

### Section P.9 Notes Page 1 P.9 Linear Inequalities and Absolute Value Inequalities

Section P.9 Notes Page P.9 Linear Inequalities and Absolute Value Inequalities Sometimes the answer to certain math problems is not just a single answer. Sometimes a range of answers might be the answer.

### Linear Programming Problems

Linear Programming Problems Linear programming problems come up in many applications. In a linear programming problem, we have a function, called the objective function, which depends linearly on a number

### Chapter 4. Trees. 4.1 Basics

Chapter 4 Trees 4.1 Basics A tree is a connected graph with no cycles. A forest is a collection of trees. A vertex of degree one, particularly in a tree, is called a leaf. Trees arise in a variety of applications.

### The relationship of a trees to a graph is very important in solving many problems in Maths and Computer Science

Trees Mathematically speaking trees are a special class of a graph. The relationship of a trees to a graph is very important in solving many problems in Maths and Computer Science However, in computer

### Social Media Mining. Graph Essentials

Graph Essentials Graph Basics Measures Graph and Essentials Metrics 2 2 Nodes and Edges A network is a graph nodes, actors, or vertices (plural of vertex) Connections, edges or ties Edge Node Measures

### Lecture Notes on Spanning Trees

Lecture Notes on Spanning Trees 15-122: Principles of Imperative Computation Frank Pfenning Lecture 26 April 26, 2011 1 Introduction In this lecture we introduce graphs. Graphs provide a uniform model

### CMSC 451: Graph Properties, DFS, BFS, etc.

CMSC 451: Graph Properties, DFS, BFS, etc. Slides By: Carl Kingsford Department of Computer Science University of Maryland, College Park Based on Chapter 3 of Algorithm Design by Kleinberg & Tardos. Graphs

### Graph. Consider a graph, G in Fig Then the vertex V and edge E can be represented as:

Graph A graph G consist of 1. Set of vertices V (called nodes), (V = {v1, v2, v3, v4...}) and 2. Set of edges E (i.e., E {e1, e2, e3...cm} A graph can be represents as G = (V, E), where V is a finite and

### Attribute Human Computer

Sorting Unordered Lists Have you ever wondered how you put objects in order? Could you explain your method clearly enough that a computer could follow it? What thought-processes or calculations do you

### Solutions to Exercises 8

Discrete Mathematics Lent 2009 MA210 Solutions to Exercises 8 (1) Suppose that G is a graph in which every vertex has degree at least k, where k 1, and in which every cycle contains at least 4 vertices.

### 3.1 Solving Systems Using Tables and Graphs

Algebra 2 Chapter 3 3.1 Solve Systems Using Tables & Graphs 3.1 Solving Systems Using Tables and Graphs A solution to a system of linear equations is an that makes all of the equations. To solve a system

### Session 6 Number Theory

Key Terms in This Session Session 6 Number Theory Previously Introduced counting numbers factor factor tree prime number New in This Session composite number greatest common factor least common multiple

### 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)

### Minimum Spanning Trees

Minimum Spanning Trees Algorithms and 18.304 Presentation Outline 1 Graph Terminology Minimum Spanning Trees 2 3 Outline Graph Terminology Minimum Spanning Trees 1 Graph Terminology Minimum Spanning Trees

### Outline. NP-completeness. When is a problem easy? When is a problem hard? Today. Euler Circuits

Outline NP-completeness Examples of Easy vs. Hard problems Euler circuit vs. Hamiltonian circuit Shortest Path vs. Longest Path 2-pairs sum vs. general Subset Sum Reducing one problem to another Clique

### Basic Notions on Graphs. Planar Graphs and Vertex Colourings. Joe Ryan. Presented by

Basic Notions on Graphs Planar Graphs and Vertex Colourings Presented by Joe Ryan School of Electrical Engineering and Computer Science University of Newcastle, Australia Planar graphs Graphs may be drawn

### MGF 1107 CH 15 LECTURE NOTES Denson. Section 15.1

1 Section 15.1 Consider the house plan below. This graph represents the house. Consider the mail route below. This graph represents the mail route. 2 Definitions 1. Graph a structure that describes relationships.

### CSE 20: Discrete Mathematics for Computer Science. Prof. Miles Jones. Today s Topics: Graphs. The Internet graph

Today s Topics: CSE 0: Discrete Mathematics for Computer Science Prof. Miles Jones. Graphs. Some theorems on graphs. Eulerian graphs Graphs! Model relations between pairs of objects The Internet graph!

### Chapter 6: Graph Theory

Chapter 6: Graph Theory Graph theory deals with routing and network problems and if it is possible to find a best route, whether that means the least expensive, least amount of time or the least distance.

### Theorem A graph T is a tree if, and only if, every two distinct vertices of T are joined by a unique path.

Chapter 3 Trees Section 3. Fundamental Properties of Trees Suppose your city is planning to construct a rapid rail system. They want to construct the most economical system possible that will meet the

### Connection and costs distribution problems

MaMaEuSch Management Mathematics for European Schools http://www.mathematik.unikl.de/ mamaeusch Connection and costs distribution problems Federico Perea Justo Puerto MaMaEuSch Management Mathematics for

### Long questions answer Advanced Mathematics for Computer Application If P= , find BT. 19. If B = 1 0, find 2B and -3B.

Unit-1: Matrix Algebra Short questions answer 1. What is Matrix? 2. Define the following terms : a) Elements matrix b) Row matrix c) Column matrix d) Diagonal matrix e) Scalar matrix f) Unit matrix OR

### 1 Basic Definitions and Concepts in Graph Theory

CME 305: Discrete Mathematics and Algorithms 1 Basic Definitions and Concepts in Graph Theory A graph G(V, E) is a set V of vertices and a set E of edges. In an undirected graph, an edge is an unordered

### SUPPLEMENT TO CHAPTER

SUPPLEMENT TO CHAPTER 6 Linear Programming SUPPLEMENT OUTLINE Introduction and Linear Programming Model, 2 Graphical Solution Method, 5 Computer Solutions, 14 Sensitivity Analysis, 17 Key Terms, 22 Solved

### Sorting algorithms. CS 127 Fall A brief diversion: What's on the midterm. Heaps: what to know. Binary trees: What to know

CS 127 Fall 2003 Sorting algorithms A brief diversion: What's on the midterm Same format as last time 5 questions, 20 points each, 100 points total 15% of your grade 2 topics: trees, trees, and more trees

### Mark Scheme (Results) January 2012. GCE Decision D1 (6689) Paper 1

Mark Scheme (Results) January 2012 GCE Decision D1 (6689) Paper 1 Edexcel is one of the leading examining and awarding bodies in the UK and throughout the world. We provide a wide range of qualifications

### 3. Evaluate the objective function at each vertex. Put the vertices into a table: Vertex P=3x+2y (0, 0) 0 min (0, 5) 10 (15, 0) 45 (12, 2) 40 Max

SOLUTION OF LINEAR PROGRAMMING PROBLEMS THEOREM 1 If a linear programming problem has a solution, then it must occur at a vertex, or corner point, of the feasible set, S, associated with the problem. Furthermore,

### Appendix E: Graphing Data

You will often make scatter diagrams and line graphs to illustrate the data that you collect. Scatter diagrams are often used to show the relationship between two variables. For example, in an absorbance

### TYPES OF NUMBERS. Example 2. Example 1. Problems. Answers

TYPES OF NUMBERS When two or more integers are multiplied together, each number is a factor of the product. Nonnegative integers that have exactly two factors, namely, one and itself, are called prime

### Chapter 4: Trees. 2. Theorem: Let T be a graph with n vertices. Then the following statements are equivalent:

9 Properties of Trees. Definitions: Chapter 4: Trees forest - a graph that contains no cycles tree - a connected forest. Theorem: Let T be a graph with n vertices. Then the following statements are equivalent:

### Lecture 3. Linear Programming. 3B1B Optimization Michaelmas 2015 A. Zisserman. Extreme solutions. Simplex method. Interior point method

Lecture 3 3B1B Optimization Michaelmas 2015 A. Zisserman Linear Programming Extreme solutions Simplex method Interior point method Integer programming and relaxation The Optimization Tree Linear Programming

### FACTORS, PRIME NUMBERS, H.C.F. AND L.C.M.

Mathematics Revision Guides Factors, Prime Numbers, H.C.F. and L.C.M. Page 1 of 16 M.K. HOME TUITION Mathematics Revision Guides Level: GCSE Higher Tier FACTORS, PRIME NUMBERS, H.C.F. AND L.C.M. Version:

MA 134 Lecture Notes August 20, 2012 Introduction The purpose of this lecture is to... Introduction The purpose of this lecture is to... Learn about different types of equations Introduction The purpose

### 2. THE x-y PLANE 7 C7

2. THE x-y PLANE 2.1. The Real Line When we plot quantities on a graph we can plot not only integer values like 1, 2 and 3 but also fractions, like 3½ or 4¾. In fact we can, in principle, plot any real

### Mathematical Modelling Lecture 8 Networks

Lecture 8 Networks phil.hasnip@york.ac.uk Overview of Course Model construction dimensional analysis Experimental input fitting Finding a best answer optimisation Tools for constructing and manipulating

V. Adamchik 1 Graph Theory Victor Adamchik Fall of 2005 Plan 1. Basic Vocabulary 2. Regular graph 3. Connectivity 4. Representing Graphs Introduction A.Aho and J.Ulman acknowledge that Fundamentally, computer

Teaching Quadratic Functions Contents Overview Lesson Plans Worksheets A1 to A12: Classroom activities and exercises S1 to S11: Homework worksheets Teaching Quadratic Functions: National Curriculum Content

### CHAPTER 2 GRAPHS F G C D

page 1 of Section 2.1 HPTR 2 GRPHS STION 1 INTROUTION basic terminology graph is a set of finitely many points called vertices which may be connected by edges. igs 1 3 show three assorted graphs. v1 v2

### Fall 2015 Midterm 1 24/09/15 Time Limit: 80 Minutes

Math 340 Fall 2015 Midterm 1 24/09/15 Time Limit: 80 Minutes Name (Print): This exam contains 6 pages (including this cover page) and 5 problems. Enter all requested information on the top of this page,

### COURSE: B.TECH-ECE. IV Sem. Data structure Using C. b) Deletion of element in an array

COURSE: B.TECH-ECE. IV Sem Data structure Using C 1. Determine the formula to find the address location of an element in three dimensions array, suppose each element takes four bytes of space & elements

### Sample Problems in Discrete Mathematics

Sample Problems in Discrete Mathematics This handout lists some sample problems that you should be able to solve as a pre-requisite to Computer Algorithms Try to solve all of them You should also read

### What does the number m in y = mx + b measure? To find out, suppose (x 1, y 1 ) and (x 2, y 2 ) are two points on the graph of y = mx + b.

PRIMARY CONTENT MODULE Algebra - Linear Equations & Inequalities T-37/H-37 What does the number m in y = mx + b measure? To find out, suppose (x 1, y 1 ) and (x 2, y 2 ) are two points on the graph of

### Chinese postman problem

PTR hinese postman problem Learning objectives fter studying this chapter, you should be able to: understand the hinese postman problem apply an algorithm to solve the problem understand the importance

### CSE 326, Data Structures. Sample Final Exam. Problem Max Points Score 1 14 (2x7) 2 18 (3x6) 3 4 4 7 5 9 6 16 7 8 8 4 9 8 10 4 Total 92.

Name: Email ID: CSE 326, Data Structures Section: Sample Final Exam Instructions: The exam is closed book, closed notes. Unless otherwise stated, N denotes the number of elements in the data structure

### Section Notes 3. The Simplex Algorithm. Applied Math 121. Week of February 14, 2011

Section Notes 3 The Simplex Algorithm Applied Math 121 Week of February 14, 2011 Goals for the week understand how to get from an LP to a simplex tableau. be familiar with reduced costs, optimal solutions,

### Math 443/543 Graph Theory Notes 4: Connector Problems

Math 443/543 Graph Theory Notes 4: Connector Problems David Glickenstein September 19, 2012 1 Trees and the Minimal Connector Problem Here is the problem: Suppose we have a collection of cities which we

### Grade 6 Math Circles. Multiplication

Faculty of Mathematics Waterloo, Ontario N2L 3G1 Introduction Grade 6 Math Circles November 5/6, 2013 Multiplication At this point in your schooling you should all be very comfortable with multiplication.

### Linear Programming. Solving LP Models Using MS Excel, 18

SUPPLEMENT TO CHAPTER SIX Linear Programming SUPPLEMENT OUTLINE Introduction, 2 Linear Programming Models, 2 Model Formulation, 4 Graphical Linear Programming, 5 Outline of Graphical Procedure, 5 Plotting

### Grade 9 Mathematics Unit #1 Number Sense Sub-Unit #1 Rational Numbers. with Integers Divide Integers

Page1 Grade 9 Mathematics Unit #1 Number Sense Sub-Unit #1 Rational Numbers Lesson Topic I Can 1 Ordering & Adding Create a number line to order integers Integers Identify integers Add integers 2 Subtracting

### Lecture 3: Linear Programming Relaxations and Rounding

Lecture 3: Linear Programming Relaxations and Rounding 1 Approximation Algorithms and Linear Relaxations For the time being, suppose we have a minimization problem. Many times, the problem at hand can

### FACTORS, PRIME NUMBERS, H.C.F. AND L.C.M.

Mathematics Revision Guides Factors, Prime Numbers, H.C.F. and L.C.M. Page 1 of 10 M.K. HOME TUITION Mathematics Revision Guides Level: GCSE Foundation Tier FACTORS, PRIME NUMBERS, H.C.F. AND L.C.M. Version:

### Min-cost flow problems and network simplex algorithm

Min-cost flow problems and network simplex algorithm The particular structure of some LP problems can be sometimes used for the design of solution techniques more efficient than the simplex algorithm.

### / Approximation Algorithms Lecturer: Michael Dinitz Topic: Steiner Tree and TSP Date: 01/29/15 Scribe: Katie Henry

600.469 / 600.669 Approximation Algorithms Lecturer: Michael Dinitz Topic: Steiner Tree and TSP Date: 01/29/15 Scribe: Katie Henry 2.1 Steiner Tree Definition 2.1.1 In the Steiner Tree problem the input

### Homework MA 725 Spring, 2012 C. Huneke SELECTED ANSWERS

Homework MA 725 Spring, 2012 C. Huneke SELECTED ANSWERS 1.1.25 Prove that the Petersen graph has no cycle of length 7. Solution: There are 10 vertices in the Petersen graph G. Assume there is a cycle C

### 5. GRAPHS ON SURFACES

. GRPHS ON SURCS.. Graphs graph, by itself, is a combinatorial object rather than a topological one. But when we relate a graph to a surface through the process of embedding we move into the realm of topology.

### A. V. Gerbessiotis CS Spring 2014 PS 3 Mar 24, 2014 No points

A. V. Gerbessiotis CS 610-102 Spring 2014 PS 3 Mar 24, 2014 No points Problem 1. Suppose that we insert n keys into a hash table of size m using open addressing and uniform hashing. Let p(n, m) be the

### 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

### CHAPTER 1. Minimum connectors

PTR Minimum connectors Learning objectives fter studying this chapter, you should be able to: understand the significance of a minimum spanning tree apply Kruskal s algorithm to a network apply Prim s

### Solve addition and subtraction word problems, and add and subtract within 10, e.g., by using objects or drawings to represent the problem.

Solve addition and subtraction word problems, and add and subtract within 10, e.g., by using objects or drawings to represent the problem. Solve word problems that call for addition of three whole numbers

### The Not-Formula Book for C1

Not The Not-Formula Book for C1 Everything you need to know for Core 1 that won t be in the formula book Examination Board: AQA Brief This document is intended as an aid for revision. Although it includes

### Chapter 10: Network Flow Programming

Chapter 10: Network Flow Programming Linear programming, that amazingly useful technique, is about to resurface: many network problems are actually just special forms of linear programs! This includes,

### Problem Set 7 Solutions

8 8 Introduction to Algorithms May 7, 2004 Massachusetts Institute of Technology 6.046J/18.410J Professors Erik Demaine and Shafi Goldwasser Handout 25 Problem Set 7 Solutions This problem set is due in

### 5.1 Bipartite Matching

CS787: Advanced Algorithms Lecture 5: Applications of Network Flow In the last lecture, we looked at the problem of finding the maximum flow in a graph, and how it can be efficiently solved using the Ford-Fulkerson

### EXPONENTS. To the applicant: KEY WORDS AND CONVERTING WORDS TO EQUATIONS

To the applicant: The following information will help you review math that is included in the Paraprofessional written examination for the Conejo Valley Unified School District. The Education Code requires

### (Refer Slide Time: 01:35)

Artificial Intelligence Prof. Sudeshna Sarkar Department of Computer Science and Engineering Indian Institute of Technology, Kharagpur Lecture - 6 Informed Search -2 Today we start our 6 th lecture. This

T92 Mathematics Success Grade 8 [OBJECTIVE] The student will create rational approximations of irrational numbers in order to compare and order them on a number line. [PREREQUISITE SKILLS] rational numbers,

### Buffon s Needle. A Collection of Mathematical Investigations. by Kevin Bertman

Buffon s Needle A Collection of Mathematical Investigations by Kevin Bertman 1 Table of Contents INTRODUCTION 3 ESTIMATING THE VALUE OF PI USING EXPERIMENTAL PROBABILITY 4 CREATING A VIRTUAL EXPERIMENT

### Induction Problems. Tom Davis November 7, 2005

Induction Problems Tom Davis tomrdavis@earthlin.net http://www.geometer.org/mathcircles November 7, 2005 All of the following problems should be proved by mathematical induction. The problems are not necessarily

### 12 Abstract Data Types

12 Abstract Data Types 12.1 Source: Foundations of Computer Science Cengage Learning Objectives After studying this chapter, the student should be able to: Define the concept of an abstract data type (ADT).

### Linear Programming. March 14, 2014

Linear Programming March 1, 01 Parts of this introduction to linear programming were adapted from Chapter 9 of Introduction to Algorithms, Second Edition, by Cormen, Leiserson, Rivest and Stein [1]. 1

### Polynomials Classwork

Polynomials Classwork What Is a Polynomial Function? Numerical, Analytical and Graphical Approaches Anatomy of an n th -degree polynomial function Def.: A polynomial function of degree n in the vaiable

### Linear Inequalities and Linear Programming. Systems of Linear Inequalities in Two Variables

Linear Inequalities and Linear Programming 5.1 Systems of Linear Inequalities 5.2 Linear Programming Geometric Approach 5.3 Geometric Introduction to Simplex Method 5.4 Maximization with constraints 5.5

### Writing the Equation of a Line in Slope-Intercept Form

Writing the Equation of a Line in Slope-Intercept Form Slope-Intercept Form y = mx + b Example 1: Give the equation of the line in slope-intercept form a. With y-intercept (0, 2) and slope -9 b. Passing

### LINEAR PROGRAMMING PROBLEM: A GEOMETRIC APPROACH

59 LINEAR PRGRAMMING PRBLEM: A GEMETRIC APPRACH 59.1 INTRDUCTIN Let us consider a simple problem in two variables x and y. Find x and y which satisfy the following equations x + y = 4 3x + 4y = 14 Solving

Table of Contents Graphing with Excel 1 1. Graphing Data 1.1. Starting the Chart Wizard 1.2. Selecting the Data 1.3. Selecting the Chart Options 1.3.1. Titles Tab 1.3.2. Axes Tab 1.3.3. Gridlines Tab 1.3.4.

### LINEAR PROGRAMMING THE SIMPLEX METHOD

LINEAR PROGRAMMING THE SIMPLE METHOD () Problems involving both slack and surplus variables A linear programming model has to be extended to comply with the requirements of the simplex procedure, that

### COMPASS Numerical Skills/Pre-Algebra Preparation Guide. Introduction Operations with Integers Absolute Value of Numbers 13

COMPASS Numerical Skills/Pre-Algebra Preparation Guide Please note that the guide is for reference only and that it does not represent an exact match with the assessment content. The Assessment Centre

### Math 018 Review Sheet v.3

Math 018 Review Sheet v.3 Tyrone Crisp Spring 007 1.1 - Slopes and Equations of Lines Slopes: Find slopes of lines using the slope formula m y y 1 x x 1. Positive slope the line slopes up to the right.